Commit 7eed1e91 by zhangxingmin

基本法

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