Commit dc6ef209 by hongzhong

薪资单调整,1,AGMS可以预览

parent 3409816e
......@@ -56,7 +56,11 @@ import com.yd.rmi.n22.salary.pojo.SalaryDetails;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchRequestBody;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchResponseBody;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchResponseVO;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.Commission;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.FirstYearPerformanceCommission;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.OtherCommission;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.RecommendSystemCommission;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.RenewalYearPerformanceCommission;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.SearchStaffSalaryDetailsRequestBody;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.SearchStaffSalaryDetailsResponseBody;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.SearchStaffSalaryDetailsResponseVO;
......@@ -387,12 +391,15 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
List<PayScaleInfo> resultList = new ArrayList<>();
//如果是预览薪资单,则跳过权限校验
if(null == requestVO.getIsActive() || requestVO.getIsActive().intValue() != 0){
//等保调整
List<AclCustomer> findByObjSortable = aclPractitionerDALService.getAclCustomers(requestVO.getPractitionerId(),null);
if(null == findByObjSortable ){
responseVO.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("630028")));
return responseVO;
}
}
try {
if ("0".equals(isHistory)) {
// 查询本年
......@@ -417,7 +424,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private List<PayScaleInfo> queryNew(PayScaleQueryRequestVO requestVO) throws Exception {
// 1.先查本地新基本法的薪资
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerIdAndIsbasic(requestVO.getPractitionerId(), 1);
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerIdAndIsbasic(requestVO.getPractitionerId(), 1,requestVO.getIsActive());
List<PayScaleInfo> salaryList = this.translateAgAclLifePractitionerSalaryToPayScaleInfo(list);
// 2.再查N22
......@@ -462,6 +469,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
payScaleInfo.setMonDtlAmount(salary.getPayableAmount().doubleValue());
payScaleInfo.setMonDtlRAmount(salary.getNetAmount().doubleValue());
payScaleInfo.setIsBasic(salary.getIsBasic());
payScaleInfo.setIsActive(salary.getIsActive());
time = payScaleInfo.getMonDtlPeriod();
if (StringUtils.isNotBlank(time)) {
......@@ -635,7 +643,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
List<PayScaleInfo> resultList = aclPractitionerDALService.queryEGHistorySalaryPDFByPractitionerId(practitionerId);
// 加入临时薪资表的数据
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId);
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId,requestVO.getIsActive());
translateObj(list, resultList);
// 排序
......@@ -939,6 +947,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
@Override
public QuerySalaryDetailResponseVO querySalaryDetail(QuerySalaryDetailRequestVO requestVO) {
QuerySalaryDetailResponseVO responseVO = new QuerySalaryDetailResponseVO();
//如果是预览薪资单,则跳过权限校验
if(null == requestVO.getIsActive() || requestVO.getIsActive().intValue() != 0){
//等保调整
Long practitionerId = requestVO.getPractitionerId();
if (null != practitionerId) {
......@@ -948,6 +958,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return responseVO;
}
}
}
// isBasic为0时查询N22,为1时查询本地数据库
if ("1".equals(requestVO.getIsBasic())) {
this.querySalaryDetail(requestVO, responseVO);
......@@ -990,6 +1002,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
AgAclLifePractitionerSalary lifePractitionerSalary = new AgAclLifePractitionerSalary();
lifePractitionerSalary.setPractitionerId(practitionerId);
lifePractitionerSalary.setYearMonth(payoutYearmonth);
lifePractitionerSalary.setIsActive(requestVO.getIsActive());
List<AgAclLifePractitionerSalary> agAclLifePractitionerSalarylist = practitionerSalaryMapper.queryByRecord(lifePractitionerSalary);
if (CollectionUtils.isNotEmpty(agAclLifePractitionerSalarylist)) {
d = agAclLifePractitionerSalarylist.get(0).getTaxoutAmount();
......@@ -1079,17 +1092,21 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
responseBody.setCommonResult(new CommonResult(false, "查询年月不能为空"));
return responseBody;
}
//如果是预览薪资单,则跳过权限校验
if(null == requestVO.getIsActive() || requestVO.getIsActive().intValue() != 0) {
//等保调整
List<AclCustomer> findByObjSortable = aclPractitionerDALService.getAclCustomers(requestVO.getPractitionerId(),null);
if(null == findByObjSortable ){
responseBody.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("630028")));
return responseBody;
}
}
if ("1".equals(requestVO.getIsBasic())) {
// 查询银盾在线佣金的保单列表
this.queryYdOnlineCommission(requestVO, responseBody);
responseBody.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} else {
} else if ("0".equals(requestVO.getIsBasic())){
// 调N22接口
SearchStaffSalaryDetailsResponseVO searchStaffSalaryDetailsResponseVO = n22SalaryService.searchStaffSalaryDetails(requestVO);
if ("查询成功".equals(searchStaffSalaryDetailsResponseVO.getResponseHead().getMessage())) {
......@@ -1099,10 +1116,114 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
responseBody.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}
// 3 所有的数据都从银盾获取
}else if ("3".equals(requestVO.getIsBasic())){
this.queryYdSalaryDetails(requestVO, responseBody);
this.queryYdOnlineCommission(requestVO, responseBody);
responseBody.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}
return responseBody;
}
//所有的数据都从银盾获取
private void queryYdSalaryDetails(SearchStaffSalaryDetailsRequestBody requestVO, SearchStaffSalaryDetailsResponseBody responseBody) {
List<Commission> c01List = new ArrayList<>();
List<Commission> c020304List = new ArrayList<>();
List<Commission> c05List = new ArrayList<>();
List<RenewalYearPerformanceCommission> c06070910List = new ArrayList<>();
List<OtherCommission> otherCommissionLis = new ArrayList<>();
List<Commission> c08List = new ArrayList<>();
WithdrawQueryInfo info = new WithdrawQueryInfo();
info.setPractitionerId(requestVO.getPractitionerId());
info.setPayoutYearmonth(this.getPayoutYearmonth(requestVO));
List<WithdrawLabelInfo> list = agmsFortuneDalService.salaryPolicyNoDetails(info);
if(null != list && list.size() >0){
for(WithdrawLabelInfo withdrawLabelInfo : list){
if ("C01,C02,C03,C04,C05,C08,".indexOf(withdrawLabelInfo.getDropOptionCode()+",") != -1) {
Commission commission = new Commission();
commission.setCommission(withdrawLabelInfo.getReferralAmount().doubleValue());//佣金
commission.setCustomer(withdrawLabelInfo.getInsurerName());//保险公司
commission.setEffectiveDate(withdrawLabelInfo.getEffectiveStartDate());//生效时间
commission.setFYC_RYC(withdrawLabelInfo.getFycAmount().doubleValue());
commission.setInsurance_Cust(withdrawLabelInfo.getInsuredName());//投保人
commission.setPol_name_chn(withdrawLabelInfo.getProductName());//产品名称
commission.setPolicyno(withdrawLabelInfo.getPolicyNo());//保单号
commission.setRate(withdrawLabelInfo.getFycRate().intValue());//职佣率
commission.setSalesCommissionRate(withdrawLabelInfo.getCommissionRate().doubleValue());
commission.setSalestaff(withdrawLabelInfo.getSubordinateSystemName());//体系
commission.setYearPREMIUM(withdrawLabelInfo.getOrderPrice().intValue());//保费
commission.setCalculationFormula(withdrawLabelInfo.getCalculationFormula());//佣金计算公式
//C02:续年度直接销售佣金;C03:续年度销售加码奖金;C04:月度销售加码奖金; 没有orderid
if ("C02,C03,C04,".indexOf(withdrawLabelInfo.getDropOptionCode()+",") != -1) {
c020304List.add(commission);
}
//C01:直接销售拥金;
if ("C01".equals(withdrawLabelInfo.getDropOptionCode())) {
c01List.add(commission);
}
//C05:推荐奖金; 个人的有orderid 团体的无
if ("C05".equals(withdrawLabelInfo.getDropOptionCode())) {
c05List.add(commission);
}
//C08:团队管理绩效达标奖金; 当前经纪人体系的所有保单
if ("C08".equals(withdrawLabelInfo.getDropOptionCode())) {
c08List.add(commission);
}
}
//C07:间接辅导岗位津贴;C06:直接辅导岗位津贴;C09:育成奖金; 被育成体系的所有保单;C10:团队长辅导津贴
if ("C06,C07,C09,C10,".indexOf(withdrawLabelInfo.getDropOptionCode()+",") != -1) {
RenewalYearPerformanceCommission renewalYearPerformanceCommission = new RenewalYearPerformanceCommission();
renewalYearPerformanceCommission.setComments(withdrawLabelInfo.getRemark());
renewalYearPerformanceCommission.setCommission(String.valueOf(withdrawLabelInfo.getReferralAmount()));
renewalYearPerformanceCommission.setRate(String.valueOf(withdrawLabelInfo.getFycRate()));
renewalYearPerformanceCommission.setFYC_RYC(String.valueOf(withdrawLabelInfo.getFycAmount()));
renewalYearPerformanceCommission.setSaleSystem(withdrawLabelInfo.getSubordinateSystemName());
renewalYearPerformanceCommission.setCalculationFormula(withdrawLabelInfo.getCalculationFormula());//佣金计算公式
c06070910List.add(renewalYearPerformanceCommission);
}
//C99:其他,13:公司激励奖金,14:其它税前加扣款,15:加码奖金,16:季度奖金,17,银盾在线佣金
if ("C99,13,14,15,16,17,".indexOf(withdrawLabelInfo.getDropOptionCode()+",") != -1) {
OtherCommission otherCommission = new OtherCommission();
otherCommission.setComments(withdrawLabelInfo.getRemark());
otherCommission.setCommission(String.valueOf(withdrawLabelInfo.getReferralAmount().doubleValue()));
otherCommission.setCommissionName(withdrawLabelInfo.getCommissionType());
otherCommission.setWithdrawedId(withdrawLabelInfo.getWithdrawId());
otherCommission.setCalculationFormula(withdrawLabelInfo.getCalculationFormula());//佣金计算公式
otherCommissionLis.add(otherCommission);
}
}
}
//1,首年度销售佣金 C01
responseBody.setFristYearCommissionList(c01List);
//2,续年度销售佣金 C02
responseBody.setRenewalYearCommissionList(c020304List);
//3,首年度辅导奖金 暂时没有
responseBody.setFristYearCoachCommissionList(null);
//4,续年度辅导奖金 暂时没有
responseBody.setRenewalYearCoachCommissionList(null);
//5,首年度绩效奖金 暂时没有
responseBody.setFirstYearPerformanceCommissionList(null);
//6,续年度绩效奖金 暂时没有
responseBody.setRenewalYearPerformanceCommissionList(c06070910List);
//7,推介奖金 C05 个人的有orderid
responseBody.setRecommendCommissionList(c05List);
//8,体系推介奖金 C05 体系的的有orderid
responseBody.setRecommendSystemCommissionList(null);
//9,特别管理奖金 C08 当前经纪人体系的所有保单
responseBody.setSpecialManagementCommissionList(c08List);
//10, 其他
// * 10.其它税前加扣款-》备注
// * 11.公司激励奖金-》备注
// * 12.加码奖金-》备注
// * 13.季度奖金-》备注
// * 14.银盾在线佣金-》H5
responseBody.setOtherCommissionList(otherCommissionLis);
}
private void queryYdOnlineCommission(SearchStaffSalaryDetailsRequestBody requestVO, SearchStaffSalaryDetailsResponseBody responseBody) {
WithdrawQueryInfo info = new WithdrawQueryInfo();
info.setPractitionerId(requestVO.getPractitionerId());
......
......@@ -14,4 +14,9 @@ public class QuerySalaryDetailRequestVO {
private Long practitionerId;
private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
}
......@@ -16,6 +16,19 @@ public class PayScaleInfo {
private String years;
private String month;
private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public Long getMonShId() {
return monShId;
......
......@@ -9,6 +9,10 @@ public class PayScaleQueryRequestVO {
* 0-查本年 1-查历史 2-查全部
*/
private String isHistory;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
public String getPractitionerIdEG() {
return practitionerIdEG;
......@@ -33,4 +37,12 @@ public class PayScaleQueryRequestVO {
public void setIsHistory(String isHistory) {
this.isHistory = isHistory;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
}
......@@ -3,6 +3,7 @@ package com.yd.dal.entity.agms.fortune;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author xxy
......@@ -83,6 +84,75 @@ public class WithdrawLabelInfo {
*/
private Long insurerBranchId;
/**
* 投保人
*/
private String insuredName;
/**
* 保险公司
*/
private String insurerName;
/**
* 产品名称
*/
private String productName;
/**
* 计划名称
*/
private String planName;
/**
* 有效时间
*/
private String effectiveStartDate;
/**
* 保单号
*/
private String policyNo;
/**
* 保费
*/
private BigDecimal orderPrice;
/**
*公告佣金
*/
private BigDecimal fycAmount;
/**
* 职佣
*/
private BigDecimal gradeCommissionRate;
/**
*佣金比率
*/
private BigDecimal commissionRate;
/**
*公告佣率
*/
private BigDecimal fycRate;
/**
*分摊比率
*/
private BigDecimal shareRate;
/**
*公告佣类型
*/
private String dropOptionCode;
private Integer isActive;
private String remark;
/**
*佣金类型
*/
private String commissionType;
/**
*佣金来源的计算公式
*/
private String calculationFormula;
}
......@@ -50,6 +50,12 @@ public class AgAclLifePractitionerSalary implements Serializable {
private String isBasic;
/**
* 0,预览薪资单,1,经纪人查看薪资单
*/
private Integer isActive;
private static final long serialVersionUID = 1L;
public Long getId() {
......@@ -116,6 +122,14 @@ public class AgAclLifePractitionerSalary implements Serializable {
this.pdfOssPath = pdfOssPath;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
@Override
public boolean equals(Object that) {
if (this == that) {
......
......@@ -38,4 +38,13 @@ public interface AgmsFortuneMapper {
*/
List<WithdrawLabelInfo> transformForWithdrawLabel(@Param("item")WithdrawQueryInfo info);
/**
* 薪资单保单明细
* @param info 过滤条件
* @return 返回结果
*/
List<WithdrawLabelInfo> salaryPolicyNoDetails(@Param("item")WithdrawQueryInfo info);
}
......@@ -18,9 +18,9 @@ public interface AgAclLifePractitionerSalaryMapper {
int updateByPrimaryKey(AgAclLifePractitionerSalary record);
List<AgAclLifePractitionerSalary> queryListByPractitionerId(Long practitionerId);
List<AgAclLifePractitionerSalary> queryListByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("isActive") Integer isActive);
List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic);
List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic,@Param("isActive") Integer isActive);
List<AgAclLifePractitionerSalary> queryByRecord(AgAclLifePractitionerSalary lifePractitionerSalary);
}
......@@ -42,4 +42,11 @@ public interface AgmsFortuneDALService {
*/
List<WithdrawLabelInfo> transformForWithdrawLabel(WithdrawQueryInfo info);
/**
* 薪资单保单明细
* @param info 过滤条件
* @return 返回结果
*/
List<WithdrawLabelInfo> salaryPolicyNoDetails(WithdrawQueryInfo info);
}
......@@ -68,4 +68,8 @@ public class AgmsFortuneDALServiceImpl implements AgmsFortuneDALService {
return agmsFortuneMapper.transformForWithdrawLabel(info);
}
@Override
public List<WithdrawLabelInfo> salaryPolicyNoDetails(WithdrawQueryInfo info) {
return agmsFortuneMapper.salaryPolicyNoDetails(info);
}
}
......@@ -34,6 +34,9 @@ public class Commission {
private String Comments;
private String calculationFormula;
public Commission() {
}
......@@ -161,4 +164,12 @@ public class Commission {
public void setComments(String comments) {
Comments = comments;
}
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
}
......@@ -9,6 +9,7 @@ public class OtherCommission {
private String Commission; //奖金金额
private String Comments;//备注
private Long withdrawedId;
private String calculationFormula;//佣金计算公式
public OtherCommission() {
}
......@@ -52,4 +53,12 @@ public class OtherCommission {
public void setProject_Id(String project_Id) {
Project_Id = project_Id;
}
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
}
......@@ -8,6 +8,7 @@ public class RenewalYearPerformanceCommission {
private String Rate;
private String Commission;
private String Comments;
private String calculationFormula;//佣金计算公式
public RenewalYearPerformanceCommission() {
}
......@@ -52,4 +53,12 @@ public class RenewalYearPerformanceCommission {
public void setComments(String comments) {
Comments = comments;
}
public String getCalculationFormula() {
return calculationFormula;
}
public void setCalculationFormula(String calculationFormula) {
this.calculationFormula = calculationFormula;
}
}
......@@ -18,5 +18,5 @@ public class SearchStaffSalaryDetailsRequestBody {
private Long practitionerId;
private String isBasic;
private Integer isActive;
}
......@@ -250,6 +250,24 @@
<result column="taxAmount" jdbcType="DECIMAL" property="taxAmount" />
<result column="afterTaxAmount" jdbcType="DECIMAL" property="afterTaxAmount" />
<result column="insurerBranchId" jdbcType="BIGINT" property="insurerBranchId" />
<result column="insuredName" jdbcType="VARCHAR" property="insuredName" />
<result column="insurerName" jdbcType="VARCHAR" property="insurerName" />
<result column="productName" jdbcType="VARCHAR" property="productName" />
<result column="planName" jdbcType="VARCHAR" property="planName" />
<result column="effectiveStartDate" jdbcType="VARCHAR" property="effectiveStartDate" />
<result column="policyNo" jdbcType="VARCHAR" property="policyNo" />
<result column="orderPrice" jdbcType="DECIMAL" property="orderPrice" />
<result column="fycAmount" jdbcType="DECIMAL" property="fycAmount" />
<result column="gradeCommissionRate" jdbcType="DECIMAL" property="gradeCommissionRate" />
<result column="commissionRate" jdbcType="DECIMAL" property="commissionRate" />
<result column="fycRate" jdbcType="DECIMAL" property="fycRate" />
<result column="shareRate" jdbcType="DECIMAL" property="shareRate" />
<result column="dropOptionCode" jdbcType="DECIMAL" property="dropOptionCode" />
<result column="is_active" jdbcType="INTEGER" property="isActive"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="commissionType" jdbcType="VARCHAR" property="commissionType"/>
<result column="calculationFormula" jdbcType="VARCHAR" property="calculationFormula"/>
</resultMap>
<select id="transformForWithdrawLabel"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
......@@ -269,7 +287,8 @@
pra.ID practitionerId,
if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount,
if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount,
ib.id insurerBranchId
ib.id insurerBranchId,
salary.is_active isActive
from ag_acl_customer_fortune_pay pay
inner join ag_acl_customer_fortune f on f.fortune_payed_id = pay.id
<!-- inner JOIN ag_po_order o on o.id = f.order_id -->
......@@ -311,4 +330,55 @@
</if>
order by pb.payout_yearmonth
</select>
<select id="salaryPolicyNoDetails"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
resultMap="WithdrawLabelInfo">
select
(select off.name from ag_acl_policyholder off where off.order_id=o.id and off.type=2) insuredName,
i.name insurerName,
p.name productName,
pp.name planName,
o.effective_start_date effectiveStartDate,
o.policy_no policyNo,
f.order_price orderPrice,
f.fyc_amount fycAmount,
f.grade_commission_rate gradeCommissionRate,
(select s.name from ag_acl_practitioner_subordinate_system s where s.id = pra.subordinate_system_id) subordinateSystemName,
pra.name practitionerName,
if(f.commission_rate is null,0,f.commission_rate) commissionRate,
if(f.fyc_rate is null,0,f.fyc_rate) fycRate,
if(f.share_rate is null,100,f.share_rate) shareRate,
f.drop_option_code dropOptionCode,
f.remark remark,
f.commission_type commissionType,
f.referral_amount referralAmount,
f.calculation_formula calculationFormula,
f.withdrawed_id withdrawId
from ag_acl_customer_fortune f
left join ag_po_order o on o.id = f.order_id
left join ag_product_plan pp on pp.id = o.plan_id
left join ag_product p on p.id = o.product_id
left join ag_acl_insurer i on o.insurer_id = i.id
left join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
left join ag_acl_practitioner pra on pra.customer_id = f.customer_id
left join ag_acl_life_insurance_practitioner lifepra on pra.id=lifepra.practitioner_id and lifepra.order_id=o.id
inner join ag_acl_practitioner_setting setting on pra.id = setting.practitioner_id
left join ag_md_drop_options op
left join ag_md_drop_master mas on mas.id = op.drop_master_id on op.drop_option_code = f.commission_payout_status
where (o.status = 3 or o.status = 4 or o.status is null)
AND mas.drop_code like 'Commission_Payout_Status'
AND (f.order_price != 0 or f.order_price is null) and setting.practitioner_type_id = 28
and f.commission_payout_status = 4
<if test="item.payoutYearmonth != null">
and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR}
</if>
<if test="item.practitionerId != null">
and pra.id = #{item.practitionerId,jdbcType=BIGINT}
</if>
</select>
</mapper>
......@@ -11,10 +11,12 @@
<result column="net_amount" jdbcType="DECIMAL" property="netAmount" />
<result column="pdf_oss_path" jdbcType="VARCHAR" property="pdfOssPath" />
<result column="is_basic" jdbcType="BIGINT" property="isBasic" />
<result column="is_active" jdbcType="BIGINT" property="isActive" />
</resultMap>
<sql id="Base_Column_List">
id, practitioner_id, practitioner_code, `year_month`, payable_amount, taxout_amount,
net_amount, pdf_oss_path, is_basic
net_amount, pdf_oss_path, is_basic,is_active
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
......@@ -126,6 +128,9 @@
select <include refid="Base_Column_List" />
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
<if test="isActive != null ">
and is_active = #{isActive,jdbcType=BIGINT}
</if>
</select>
<select id="queryListByPractitionerIdAndIsbasic" resultMap="BaseResultMap">
......@@ -133,6 +138,10 @@
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
and is_basic = #{isBasic,jdbcType=BIGINT}
<if test="isActive != null ">
and is_active = #{isActive,jdbcType=BIGINT}
</if>
</select>
<select id="queryByRecord" resultMap="BaseResultMap">
......@@ -147,5 +156,8 @@
<if test="yearMonth != null">
and `year_month` = #{yearMonth,jdbcType=VARCHAR}
</if>
<if test="isActive != null">
and is_active = #{isActive,jdbcType=VARCHAR}
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment