合同拆分金额与收发货规则优化
This commit is contained in:
@@ -976,7 +976,9 @@ public class ContractServiceImpl implements ContractService {
|
||||
if (reqVO.getContractReceiveSends() != null && !reqVO.getContractReceiveSends().isEmpty()) {
|
||||
//通过合同id删除收发货规则
|
||||
List<ContractReceiveSendRespVO> contractReceiveSendListByContract = contractReceiveSendService.getContractReceiveSendListByContractId(id);
|
||||
contractReceiveSendService.deleteContractReceiveSendListByIds(contractReceiveSendListByContract.stream().map(ContractReceiveSendRespVO::getId).toList());
|
||||
if (!contractReceiveSendListByContract.isEmpty()){
|
||||
contractReceiveSendService.deleteContractReceiveSendListByIds(contractReceiveSendListByContract.stream().map(ContractReceiveSendRespVO::getId).toList());
|
||||
}
|
||||
//重新插入收发货规则
|
||||
reqVO.getContractReceiveSends().forEach(item -> {
|
||||
item.setContractId(id);
|
||||
@@ -987,7 +989,9 @@ public class ContractServiceImpl implements ContractService {
|
||||
//更新资金拆分表(直接先删除后面再插入)
|
||||
if (reqVO.getAmountSplit() != null && !reqVO.getAmountSplit().isEmpty()) {
|
||||
List<AmountDismantleDO> amountDismantleList = amountDismantleService.getAmountDismantleListByContractId(id);
|
||||
amountDismantleService.deleteAmountDismantleListByIds(amountDismantleList.stream().map(AmountDismantleDO::getId).toList());
|
||||
if(!amountDismantleList.isEmpty()){
|
||||
amountDismantleService.deleteAmountDismantleListByIds(amountDismantleList.stream().map(AmountDismantleDO::getId).toList());
|
||||
}
|
||||
reqVO.getAmountSplit().forEach(item -> {
|
||||
item.setContractId(id);
|
||||
item.setId(null);
|
||||
|
||||
Reference in New Issue
Block a user