Commit 7eed1e91 by zhangxingmin

基本法

parent f7572e9f
...@@ -46,6 +46,11 @@ public class ApiAgentDetailFycServiceImpl implements ApiAgentDetailFycService { ...@@ -46,6 +46,11 @@ public class ApiAgentDetailFycServiceImpl implements ApiAgentDetailFycService {
} }
if (!CollectionUtils.isEmpty(algorithmResDtoList)) { if (!CollectionUtils.isEmpty(algorithmResDtoList)) {
for (AlgorithmResDto algorithmResDto : algorithmResDtoList){ for (AlgorithmResDto algorithmResDto : algorithmResDtoList){
if (Objects.isNull(algorithmResDto.getCalculatedValue())
|| algorithmResDto.getCalculatedValue().compareTo(BigDecimal.ZERO) == 0){
//判空判0
continue;
}
AgentDetailFyc agentDetailFyc = new AgentDetailFyc(); AgentDetailFyc agentDetailFyc = new AgentDetailFyc();
//变化前的业务员总FYC积分 -> 查询 //变化前的业务员总FYC积分 -> 查询
agentDetailFyc.setBeforeFyc(totalFyc); agentDetailFyc.setBeforeFyc(totalFyc);
......
...@@ -134,6 +134,7 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ ...@@ -134,6 +134,7 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ
//执行 - 销售佣金 - 出账 (销售佣金基本法) //执行 - 销售佣金 - 出账 (销售佣金基本法)
executeBilling(ExecuteBillingDto.builder() executeBilling(ExecuteBillingDto.builder()
.batchBizId(batchBizId) .batchBizId(batchBizId)
.name(brokerDto.getBrokerName())
.brokerDto(brokerDto) .brokerDto(brokerDto)
.build()); .build());
...@@ -180,7 +181,7 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ ...@@ -180,7 +181,7 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ
.issueNumber(brokerDto.getCommissionPeriod()) .issueNumber(brokerDto.getCommissionPeriod())
.build()) .build())
.executionOrderList(executionOrderList) .executionOrderList(executionOrderList)
.isNegateExecutionOrderList(false) .isNegateExecutionOrderList(true)
.build()); .build());
//生成获得积分的用户的积分明细表记录 //生成获得积分的用户的积分明细表记录
...@@ -309,6 +310,11 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ ...@@ -309,6 +310,11 @@ public class ApiBasicLawCalculateServiceImpl implements ApiBasicLawCalculateServ
if (!CollectionUtils.isEmpty(fortuneDto.getAlgorithmResDtoList())) { if (!CollectionUtils.isEmpty(fortuneDto.getAlgorithmResDtoList())) {
//获得积分业务员绑定的基本法列表对应计算值结果集合 //获得积分业务员绑定的基本法列表对应计算值结果集合
for (AlgorithmResDto algorithmResDto : fortuneDto.getAlgorithmResDtoList()) { for (AlgorithmResDto algorithmResDto : fortuneDto.getAlgorithmResDtoList()) {
if (Objects.isNull(algorithmResDto.getCalculatedValue())
|| algorithmResDto.getCalculatedValue().compareTo(BigDecimal.ZERO) == 0){
//判空判0
continue;
}
Fortune fortune = new Fortune(); Fortune fortune = new Fortune();
//发佣金额 -> 计算值 - sqlAlgorithmResultDtoList集合里面的计算值和值 //发佣金额 -> 计算值 - sqlAlgorithmResultDtoList集合里面的计算值和值
fortune.setAmount(algorithmResDto.getCalculatedValue()); fortune.setAmount(algorithmResDto.getCalculatedValue());
......
...@@ -36,18 +36,20 @@ ...@@ -36,18 +36,20 @@
<select id="queryCommissionBindPolicyBrokerList" <select id="queryCommissionBindPolicyBrokerList"
resultType="com.yd.csf.service.dto.CommissionBindPolicyBrokerDto"> resultType="com.yd.csf.service.dto.CommissionBindPolicyBrokerDto">
select c.*,p.*,pb.* select c.*,p.*,pb.*
from commission c from (select cc.* from commission cc
left join policy p on p.policy_no = c.policy_no and p.is_deleted = 0 <where>
left join policy_broker pb on pb.policy_no = p.policy_no and pb.is_deleted = 0
<where>
<if test="dto.commissionBizIdList != null and dto.commissionBizIdList.size > 0"> <if test="dto.commissionBizIdList != null and dto.commissionBizIdList.size > 0">
and c.commission_biz_id in and cc.commission_biz_id in
<foreach collection="dto.commissionBizIdList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="dto.commissionBizIdList" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
and c.is_deleted = 0 and cc.is_deleted = 0
</where> </where>
group by c.policy_no group by cc.policy_no
) c
left join policy p on p.policy_no = c.policy_no and p.is_deleted = 0
left join policy_broker pb on pb.policy_no = p.policy_no and pb.is_deleted = 0
</select> </select>
</mapper> </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