|
|
@@ -29,6 +29,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
+import java.text.DecimalFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
@@ -361,7 +363,8 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
}
|
|
|
}
|
|
|
agencyExtractFee.setSumpremium(bigDecimal);
|
|
|
- BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100")));
|
|
|
+ //总保费*比例/100 保留两位小数
|
|
|
+ BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100"))).setScale(2, RoundingMode.HALF_UP);
|
|
|
agencyExtractFee.setExtractFee(multiply);
|
|
|
// 填充 已提现抽成费用和可提现抽成费用
|
|
|
List<SysAgencyFeeApproval> sysAgencyFeeApprovals = sysAgencyFeeApprovalMapper.selectList(new LambdaQueryWrapper<SysAgencyFeeApproval>()
|
|
|
@@ -436,7 +439,7 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
}
|
|
|
}
|
|
|
agencyExtractFee.setSumpremium(bigDecimal);
|
|
|
- BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100")));
|
|
|
+ BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100"))).setScale(2, RoundingMode.HALF_UP);
|
|
|
agencyExtractFee.setExtractFee(multiply);
|
|
|
// 填充 已提现抽成费用和可提现抽成费用
|
|
|
List<SysAgencyFeeApproval> sysAgencyFeeApprovals = sysAgencyFeeApprovalMapper.selectList(new LambdaQueryWrapper<SysAgencyFeeApproval>()
|
|
|
@@ -518,7 +521,7 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
}
|
|
|
}
|
|
|
agencyExtractFee.setSumpremium(bigDecimal);
|
|
|
- BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100")));
|
|
|
+ BigDecimal multiply = bigDecimal.multiply(new BigDecimal(agencyExtractFee.getProportional()).divide(new BigDecimal("100"))).setScale(2, RoundingMode.HALF_UP);
|
|
|
agencyExtractFee.setExtractFee(multiply);
|
|
|
// 填充 已提现抽成费用和可提现抽成费用
|
|
|
List<SysAgencyFeeApproval> sysAgencyFeeApprovals = sysAgencyFeeApprovalMapper.selectList(new LambdaQueryWrapper<SysAgencyFeeApproval>()
|
|
|
@@ -556,8 +559,7 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
//合伙人
|
|
|
boolean c = sysPartnerService.checkPartner(userId);
|
|
|
if (c) {
|
|
|
- extracted(userId, informationList,teamInformationDto);
|
|
|
- return informationList;
|
|
|
+ return extracted(userId, informationList,teamInformationDto);
|
|
|
}
|
|
|
//校验当前用户是否为机构负责人
|
|
|
boolean b = this.checkUserId(userId);
|
|
|
@@ -632,6 +634,13 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
}
|
|
|
teamInformation.setOrderManNum(num);
|
|
|
informationList.add(teamInformation);
|
|
|
+ Integer type = teamInformationDto.getType();
|
|
|
+ if (type == 1) {
|
|
|
+ int size = informationList.size();
|
|
|
+ if (size == 2) {
|
|
|
+ return informationList;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -642,7 +651,7 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
return informationList;
|
|
|
}
|
|
|
|
|
|
- private void extracted(String userId, List<TeamInformation> informationList,TeamInformationDto teamInformationDto) {
|
|
|
+ private List<TeamInformation> extracted(String userId, List<TeamInformation> informationList,TeamInformationDto teamInformationDto) {
|
|
|
//查询所有推荐的机构负责人核算总保费
|
|
|
List<SysRelationPerson> sysRelationPeople = sysRelationPersonMapper.selectList(new LambdaQueryWrapper<SysRelationPerson>()
|
|
|
.eq(SysRelationPerson::getSuggestId, userId).eq(SysRelationPerson::getType, 1));
|
|
|
@@ -727,10 +736,18 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
}
|
|
|
teamInformation.setOrderManNum(num);
|
|
|
informationList.add(teamInformation);
|
|
|
+ Integer type = teamInformationDto.getType();
|
|
|
+ if (type == 1) {
|
|
|
+ int size = informationList.size();
|
|
|
+ if (size == 2) {
|
|
|
+ return informationList;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ return informationList;
|
|
|
}
|
|
|
|
|
|
|