|
@@ -1612,4 +1612,23 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
public List<AccountRunningWaterVo> getAccountRunningWaterByContractId(Long contractId) {
|
|
|
return baseMapper.getAccountRunningWaterByContractId(contractId);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 头部统计客户金额
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> getHeadCustomerStatistics() {
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("sumAmount",BigDecimal.ZERO);
|
|
|
+ map.put("sumArrivalAmount",BigDecimal.ZERO);
|
|
|
+ map.put("sumQuantity",BigDecimal.ZERO);
|
|
|
+ List<ContractVo> list = baseMapper.getCustomerMoney();
|
|
|
+ BigDecimal sumAmount = list.stream().map(ContractVo::getSumAmount).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ //赋值原卖方公司名称 多公司
|
|
|
+ corporationService.attributeAssign(list, ContractVo::getSellCorporationId, (item, corporation) -> {
|
|
|
+ item.setSellCorporationName(corporation.getName());
|
|
|
+ });
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|