转介绍数据问题
This commit is contained in:
parent
7c57a19800
commit
a6ede150d2
@ -43,6 +43,10 @@ public class UserContractAmountInfo {
|
|||||||
* 合同价格
|
* 合同价格
|
||||||
*/
|
*/
|
||||||
private BigDecimal contractAmount;
|
private BigDecimal contractAmount;
|
||||||
|
/**
|
||||||
|
* payId
|
||||||
|
*/
|
||||||
|
private Long payId;
|
||||||
/**
|
/**
|
||||||
* 已付款金额
|
* 已付款金额
|
||||||
*/
|
*/
|
||||||
|
@ -335,12 +335,13 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
// BigDecimal sumPayAmount = new BigDecimal(0);
|
// BigDecimal sumPayAmount = new BigDecimal(0);
|
||||||
//记录合同编码,防止重复
|
//记录合同编码,防止重复
|
||||||
Map<String,String> repeatContractCode = new HashMap<>();
|
Map<String,String> repeatContractCode = new HashMap<>();
|
||||||
|
Set<Long> payIdSet = new HashSet<>();
|
||||||
|
|
||||||
UserContractAmountVo daPan = new UserContractAmountVo();
|
UserContractAmountVo daPan = new UserContractAmountVo();
|
||||||
BigDecimal all = new BigDecimal(0);
|
BigDecimal all = new BigDecimal(0);
|
||||||
for(UserContractAmountInfo obj : list){
|
for(UserContractAmountInfo obj : list){
|
||||||
UserContractAmountVo vo = res.get(obj.getUserId());
|
UserContractAmountVo vo = res.get(obj.getUserId());
|
||||||
if(vo==null){
|
if(vo == null){
|
||||||
vo=new UserContractAmountVo();
|
vo=new UserContractAmountVo();
|
||||||
vo.setUserId(obj.getUserId());
|
vo.setUserId(obj.getUserId());
|
||||||
vo.setNickName(obj.getNickName());
|
vo.setNickName(obj.getNickName());
|
||||||
@ -364,15 +365,19 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
}
|
}
|
||||||
all = all.add(obj.getContractAmount());
|
all = all.add(obj.getContractAmount());
|
||||||
}
|
}
|
||||||
//判断是否为转介绍合同
|
if (!payIdSet.contains(obj.getPayId())){
|
||||||
if(contractSource.equals(obj.getCustomSource())){
|
//判断是否为转介绍合同
|
||||||
daPan.addJsPayedSumAmount(obj.getPayedMoney());
|
if(contractSource.equals(obj.getCustomSource())){
|
||||||
vo.addJsPayedSumAmount(obj.getPayedMoney());
|
daPan.addJsPayedSumAmount(obj.getPayedMoney());
|
||||||
}else {
|
vo.addJsPayedSumAmount(obj.getPayedMoney());
|
||||||
daPan.addOtherPayedSumAmount(obj.getPayedMoney());
|
}else {
|
||||||
vo.addOtherPayedSumAmount(obj.getPayedMoney());
|
daPan.addOtherPayedSumAmount(obj.getPayedMoney());
|
||||||
|
vo.addOtherPayedSumAmount(obj.getPayedMoney());
|
||||||
|
}
|
||||||
|
payIdSet.add(obj.getPayId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//计算未付款金额
|
//计算未付款金额
|
||||||
res.values().forEach(v->{
|
res.values().forEach(v->{
|
||||||
@ -499,7 +504,7 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @Cacheable(cacheNames = CacheNames.HOME_F, key = "#type + '_' + #tabType")
|
@Cacheable(cacheNames = CacheNames.HOME_F, key = "#type + '_' + #tabType")
|
||||||
public UserAmountVo getUserContractAndPayInfo(Integer type, int tabType){
|
public UserAmountVo getUserContractAndPayInfo(Integer type, int tabType){
|
||||||
Map<String, Object> mapParam = this.getDate(type);
|
Map<String, Object> mapParam = this.getDate(type);
|
||||||
LocalDate startDate = (LocalDate)mapParam.get("startDate");
|
LocalDate startDate = (LocalDate)mapParam.get("startDate");
|
||||||
|
@ -161,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
info.is_due as isDue,
|
info.is_due as isDue,
|
||||||
info.contract_code as contractCode,
|
info.contract_code as contractCode,
|
||||||
cus.custom_source as customSource,
|
cus.custom_source as customSource,
|
||||||
|
pay.id as payId,
|
||||||
pay.money as payedMoney
|
pay.money as payedMoney
|
||||||
FROM sys_user u
|
FROM sys_user u
|
||||||
inner join sys_user_role ur on ur.user_id = u.user_id
|
inner join sys_user_role ur on ur.user_id = u.user_id
|
||||||
|
Loading…
Reference in New Issue
Block a user