|
@@ -244,13 +244,19 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
IWrapper<Contract> wrapper = getWrapper();
|
|
IWrapper<Contract> wrapper = getWrapper();
|
|
setContractParam(dto, wrapper);
|
|
setContractParam(dto, wrapper);
|
|
SysUser sysUser = UserUtil.getUserInfo();
|
|
SysUser sysUser = UserUtil.getUserInfo();
|
|
|
|
+
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("customerList", "");
|
|
|
|
+ map.put("count", BigDecimal.ZERO);
|
|
|
|
+ map.put("customerCount", BigDecimal.ZERO);
|
|
|
|
+ map.put("sumAmount", BigDecimal.ZERO);
|
|
|
|
+ map.put("sumClaimMoney", BigDecimal.ZERO);
|
|
|
|
+
|
|
if (StringUtils.isEmpty(sysUser.getUserCode())) {
|
|
if (StringUtils.isEmpty(sysUser.getUserCode())) {
|
|
map = baseMapper.getHeadStatistic(wrapper);
|
|
map = baseMapper.getHeadStatistic(wrapper);
|
|
} else {
|
|
} else {
|
|
List<Long> authIdList = customerService.getAuthIdList();
|
|
List<Long> authIdList = customerService.getAuthIdList();
|
|
if (authIdList.size() == 0) {
|
|
if (authIdList.size() == 0) {
|
|
- map.put("sumAmount", map.getOrDefault("sumAmount", BigDecimal.ZERO));
|
|
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
wrapper.in("t1", Contract::getBuyCorporationId, authIdList);
|
|
wrapper.in("t1", Contract::getBuyCorporationId, authIdList);
|
|
@@ -261,8 +267,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
int customerCount = customers.split(",").length;
|
|
int customerCount = customers.split(",").length;
|
|
map.put("customerCount", customerCount);
|
|
map.put("customerCount", customerCount);
|
|
}
|
|
}
|
|
- map.put("customerList", "");
|
|
|
|
- map.put("sumAmount", map.getOrDefault("sumAmount", BigDecimal.ZERO));
|
|
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -305,7 +309,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
wrapper.between("t1", Contract::getStatus, FlowStatusEnum1.DRAFT.getKey(), FlowStatusEnum1.CANCELLATION.getKey() - 1);
|
|
wrapper.between("t1", Contract::getStatus, FlowStatusEnum1.DRAFT.getKey(), FlowStatusEnum1.CANCELLATION.getKey() - 1);
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(dto.getUserId())) {
|
|
if (StringUtils.isNotEmpty(dto.getUserId())) {
|
|
- wrapper.eq("t1", Contract::getCreateUser, dto.getUserId());
|
|
+ wrapper.eq("t1.salesmanId", dto.getUserId());
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(dto.getSellCorporationId())) {
|
|
if (StringUtils.isNotEmpty(dto.getSellCorporationId())) {
|
|
wrapper.eq("t1", Contract::getSellCorporationId, dto.getSellCorporationId());
|
|
wrapper.eq("t1", Contract::getSellCorporationId, dto.getSellCorporationId());
|