|
|
@ -574,8 +574,8 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService<FinFu |
|
|
|
dto.setIsOneSale(true); |
|
|
|
String sid = saveOrUpdateAll(dto).getData(); |
|
|
|
finFundsCarriedForwardApply = fetchBySid(sid); |
|
|
|
//String pdfPath = createPdf(sid, finFundsCarriedForwardApply.getCreateByName()).getData();
|
|
|
|
//baseMapper.updatePathBySid(pdfPath, sid);
|
|
|
|
String pdfPath = createPdf(sid, finFundsCarriedForwardApply.getCreateByName()).getData(); |
|
|
|
baseMapper.updatePathBySid(pdfPath, sid); |
|
|
|
tsqtysd(sid); |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
@ -721,11 +721,11 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService<FinFu |
|
|
|
List<TzDto> listOne; |
|
|
|
List<TzDto> listMany; |
|
|
|
if (zcList.size() > 1) { |
|
|
|
listOne = zcList; |
|
|
|
listMany = zrList; |
|
|
|
} else { |
|
|
|
listOne = zrList; |
|
|
|
listMany = zcList; |
|
|
|
} else { |
|
|
|
listOne = zcList; |
|
|
|
listMany = zrList; |
|
|
|
} |
|
|
|
//3.循环判断多条中是否存在相同的财务系统客户编码,如果有相同的则合并为一条,结转金额相加
|
|
|
|
List<TzDto> manyRemoveList = manyHB(listMany); |
|
|
@ -801,16 +801,33 @@ public class FinFundsCarriedForwardApplyService extends MybatisBaseService<FinFu |
|
|
|
private List<TzDto> manyHB(List<TzDto> list) { |
|
|
|
//转出为多条,转入为一条
|
|
|
|
List<TzDto> manyRemoveList = new ArrayList<>(); |
|
|
|
list.parallelStream().collect(Collectors.groupingBy(tzDto -> tzDto.getCustNo(), Collectors.toList())).forEach((id, transfer) -> { |
|
|
|
transfer.stream().reduce((a, b) -> new TzDto( |
|
|
|
a.getBusSid(), |
|
|
|
a.getTzType(), |
|
|
|
a.getConNo(), |
|
|
|
a.getName(), |
|
|
|
a.getCustNo(), |
|
|
|
a.getVinNo(), |
|
|
|
a.getDcje() + b.getDcje())).ifPresent(manyRemoveList::add); |
|
|
|
}); |
|
|
|
if (list.get(0).getTzType().equals("转出")){ |
|
|
|
list.parallelStream().collect(Collectors.groupingBy(tzDto -> tzDto.getCustNo(), Collectors.toList())).forEach((id, transfer) -> { |
|
|
|
transfer.stream().reduce((a, b) -> new TzDto( |
|
|
|
a.getTzType(), |
|
|
|
a.getBusSid(), |
|
|
|
a.getConNo(), |
|
|
|
a.getCustSid(), |
|
|
|
a.getName(), |
|
|
|
a.getCustNo(), |
|
|
|
a.getVinNo(), |
|
|
|
a.getDcje() + b.getDcje(), |
|
|
|
a.getDrje())).ifPresent(manyRemoveList::add); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
list.parallelStream().collect(Collectors.groupingBy(tzDto -> tzDto.getCustNo(), Collectors.toList())).forEach((id, transfer) -> { |
|
|
|
transfer.stream().reduce((a, b) -> new TzDto( |
|
|
|
a.getTzType(), |
|
|
|
a.getBusSid(), |
|
|
|
a.getConNo(), |
|
|
|
a.getCustSid(), |
|
|
|
a.getName(), |
|
|
|
a.getCustNo(), |
|
|
|
a.getVinNo(), |
|
|
|
a.getDcje(), |
|
|
|
a.getDrje() + b.getDrje())).ifPresent(manyRemoveList::add); |
|
|
|
}); |
|
|
|
} |
|
|
|
return manyRemoveList; |
|
|
|
} |
|
|
|
|
|
|
|