转介绍数据问题

This commit is contained in:
mx 2024-11-19 14:18:41 +08:00
parent 7c57a19800
commit a6ede150d2
3 changed files with 19 additions and 9 deletions

View File

@ -43,6 +43,10 @@ public class UserContractAmountInfo {
* 合同价格
*/
private BigDecimal contractAmount;
/**
* payId
*/
private Long payId;
/**
* 已付款金额
*/

View File

@ -335,6 +335,7 @@ public class HomeServiceImpl implements HomeService {
// BigDecimal sumPayAmount = new BigDecimal(0);
//记录合同编码防止重复
Map<String,String> repeatContractCode = new HashMap<>();
Set<Long> payIdSet = new HashSet<>();
UserContractAmountVo daPan = new UserContractAmountVo();
BigDecimal all = new BigDecimal(0);
@ -364,6 +365,7 @@ public class HomeServiceImpl implements HomeService {
}
all = all.add(obj.getContractAmount());
}
if (!payIdSet.contains(obj.getPayId())){
//判断是否为转介绍合同
if(contractSource.equals(obj.getCustomSource())){
daPan.addJsPayedSumAmount(obj.getPayedMoney());
@ -372,6 +374,9 @@ public class HomeServiceImpl implements HomeService {
daPan.addOtherPayedSumAmount(obj.getPayedMoney());
vo.addOtherPayedSumAmount(obj.getPayedMoney());
}
payIdSet.add(obj.getPayId());
}
}
//计算未付款金额
@ -499,7 +504,7 @@ public class HomeServiceImpl implements HomeService {
* @param type
* @return
*/
// @Cacheable(cacheNames = CacheNames.HOME_F, key = "#type + '_' + #tabType")
@Cacheable(cacheNames = CacheNames.HOME_F, key = "#type + '_' + #tabType")
public UserAmountVo getUserContractAndPayInfo(Integer type, int tabType){
Map<String, Object> mapParam = this.getDate(type);
LocalDate startDate = (LocalDate)mapParam.get("startDate");

View File

@ -161,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
info.is_due as isDue,
info.contract_code as contractCode,
cus.custom_source as customSource,
pay.id as payId,
pay.money as payedMoney
FROM sys_user u
inner join sys_user_role ur on ur.user_id = u.user_id