From c05ddf57634572b43869e00d426efe05d2df5077 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期三, 10 六月 2026 08:16:23 +0800
Subject: [PATCH] feat:模版合同加备注、水电房屋租赁执行次数改为合同有效期、合同履约列表新增双方履约、开票新增拟开票数量
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java | 188 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 136 insertions(+), 52 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
index 252dee9..8782f83 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
@@ -1,6 +1,7 @@
package com.by4cloud.platformx.business.service.impl;
import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjUtil;
@@ -13,6 +14,7 @@
import com.by4cloud.platformx.business.mapper.*;
import com.by4cloud.platformx.business.service.OutBoundService;
import com.by4cloud.platformx.common.core.util.R;
+import com.by4cloud.platformx.common.security.util.SecurityUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@@ -38,6 +40,7 @@
private final ContractMapper contractMapper;
private final ContractPaymentScheduleProcessMapper scheduleProcessMapper;
private final ContractOutBoundMapper contractOutBoundMapper;
+ private final DeliveryOverdueMapper deliveryOverdueMapper;
@Override
public R add(OutBoundAddDTO addDTO) {
@@ -50,6 +53,7 @@
.in(ContractSubjectMatter::getMaterialCode, addDTO.getSubjectMatterList().stream().map(item -> item.getSubjectMatterCode()).collect(Collectors.toList()))
.exists(Contract.class, contractQuery ->
contractQuery.select(ContractSubjectMatter::getId)
+ .eq(Contract::getContractStatus,2)
.eq(Contract::getId, ContractSubjectMatter::getContractId)
.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), Contract::getPartyA, addDTO.getBusGuestName())
.eq(ObjUtil.isNotNull(addDTO.getBusGuestId()), Contract::getPartyAId, addDTO.getBusGuestId())
@@ -59,25 +63,30 @@
if (ArrayUtil.isEmpty(subjectMatterList.toArray())) {
return R.failed("娌℃湁鏌ヨ鍒扮浉鍏冲悎鍚岃鍗�");
}
- Double outTotal = subjectMatterList.stream().mapToDouble(item -> {
- // 浼樺厛鍒ゆ柇 remainNum
- if (item.getRemainingQuantity() != null && item.getRemainingQuantity().compareTo(new BigDecimal("0")) > 0) {
- return item.getRemainingQuantity().doubleValue();
- } else {
- // remainNum 涓� null 鎴� 0 鏃讹紝浣跨敤 quantity
- return item.getQuantity() == null ? 0.0 : item.getQuantity().doubleValue();
- }
- }).sum();
- BigDecimal orderNum = addDTO.getSubjectMatterList().stream().map(OutSubjectMatterAddDTO::getOutBoundNum)
+ List<String> erpCodeList = subjectMatterList.stream().map(ContractSubjectMatter::getMaterialCode).collect(Collectors.toList());
+ BigDecimal orderNum = subjectMatterList.stream().filter(item -> item.getDeliveryStatus() != 2)
+ .map(item -> item.getDeliveryStatus() == 0 ? item.getQuantity() : item.getRemainingQuantity())
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
+ BigDecimal outTotal = addDTO.getSubjectMatterList().stream()
+ .filter(item -> erpCodeList.contains(item.getSubjectMatterCode()))
+ .map(OutSubjectMatterAddDTO::getOutBoundNum)
.filter(num -> num != null) // 杩囨护鎺� null 鍊硷紝闃叉 NullPointerException
.reduce(BigDecimal.ZERO, BigDecimal::add);
- if (new BigDecimal(outTotal).compareTo(orderNum) < 0) {
+ if (outTotal.compareTo(orderNum) > 0) {
return R.failed("鍑哄簱鏁伴噺瓒呭嚭鍚堝悓璁㈠崟鏁伴噺");
}
//褰撳墠鍏ュ簱鏍囩殑鐗�
Map<Long, Object> currentOutMap = new HashMap<>();
+ //鍑哄簱鎵规
+ String batchNumber = DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN);
//鍑哄簱
addDTO.getSubjectMatterList().stream().forEach(outSubjectMatterAddDTO -> {
+ OutBound outBound = BeanUtil.copyProperties(outSubjectMatterAddDTO, OutBound.class);
+ outBound.setBatchNumber(batchNumber);
+ outBound.setBusGuestName(addDTO.getBusGuestName());
+ outBound.setBusGuestId(addDTO.getBusGuestId());
+ outBound.setOutBoundTime(addDTO.getOutBoundTime());
+ baseMapper.insert(outBound);
BigDecimal remainNum = outSubjectMatterAddDTO.getOutBoundNum();
for (ContractSubjectMatter subjectMatter : subjectMatterList) {
if (outSubjectMatterAddDTO.getSubjectMatterCode().equals(subjectMatter.getMaterialCode())) {
@@ -85,7 +94,7 @@
if (subjectMatter.getDeliveredQuantity().compareTo(new BigDecimal("0")) > 0) {
remainNum = remainNum.subtract(subjectMatter.getRemainingQuantity());
//閮ㄥ垎浜や粯鐘舵�佷笅 鍏ㄩ儴鍑哄簱
- if (remainNum.compareTo(new BigDecimal("0")) >= 0) {
+ if (remainNum.compareTo(new BigDecimal("0")) > 0) {
BigDecimal currentOut = subjectMatter.getRemainingQuantity();
subjectMatter.setDeliveredQuantity(subjectMatter.getQuantity());
subjectMatter.setRemainingQuantity(new BigDecimal("0"));
@@ -95,7 +104,7 @@
contractSubjectMatterMapper.updateById(subjectMatter);
currentOutMap.put(subjectMatter.getContractId(), subjectMatter);
//鏂板鍚堝悓鍑哄簱鍘嗗彶
- saveContractOutBound(contract, addDTO, subjectMatter);
+ saveContractOutBound(contract, addDTO, subjectMatter, outBound.getId());
} else {
BigDecimal currentOut = remainNum.add(subjectMatter.getRemainingQuantity());
subjectMatter.setDeliveredQuantity(subjectMatter.getQuantity().add(remainNum));
@@ -106,14 +115,14 @@
contractSubjectMatterMapper.updateById(subjectMatter);
currentOutMap.put(subjectMatter.getContractId(), subjectMatter);
//鏂板鍚堝悓鍑哄簱鍘嗗彶
- saveContractOutBound(contract, addDTO, subjectMatter);
+ saveContractOutBound(contract, addDTO, subjectMatter, outBound.getId());
break;
}
} else {
//鏈氦浠樼姸鎬佷笅
remainNum = remainNum.subtract(subjectMatter.getQuantity());
- if (remainNum.compareTo(new BigDecimal("0")) >= 0) {
+ if (remainNum.compareTo(new BigDecimal("0")) > 0) {
subjectMatter.setDeliveredQuantity(subjectMatter.getQuantity());
subjectMatter.setRemainingQuantity(new BigDecimal("0"));
subjectMatter.setActualDeliveryDate(DateUtil.today());
@@ -122,7 +131,7 @@
contractSubjectMatterMapper.updateById(subjectMatter);
currentOutMap.put(subjectMatter.getContractId(), subjectMatter);
//鏂板鍚堝悓鍑哄簱鍘嗗彶
- saveContractOutBound(contract, addDTO, subjectMatter);
+ saveContractOutBound(contract, addDTO, subjectMatter, outBound.getId());
} else {
BigDecimal currentOut = remainNum.add(subjectMatter.getQuantity());
subjectMatter.setDeliveredQuantity(subjectMatter.getQuantity().add(remainNum));
@@ -133,17 +142,13 @@
contractSubjectMatterMapper.updateById(subjectMatter);
currentOutMap.put(subjectMatter.getContractId(), subjectMatter);
//鏂板鍚堝悓鍑哄簱鍘嗗彶
- saveContractOutBound(contract, addDTO, subjectMatter);
+ saveContractOutBound(contract, addDTO, subjectMatter, outBound.getId());
break;
}
}
}
}
- OutBound outBound = BeanUtil.copyProperties(outSubjectMatterAddDTO, OutBound.class);
- outBound.setBusGuestName(addDTO.getBusGuestName());
- outBound.setBusGuestId(addDTO.getBusGuestId());
- outBound.setOutBoundTime(addDTO.getOutBoundTime());
- baseMapper.insert(outBound);
+
});
//鍑哄簱搴旀敹娆炬槑缁�
@@ -197,41 +202,93 @@
//鏌ヨ涔嬪墠鎵�鏈夊彂璐у墠搴旀敹
List<PaymentConfirm> fhConfirmList = paymentConfirmMapper.selectList(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, contract.getId())
- .eq(PaymentConfirm::getScheduleId,schedule.getId()).orderByDesc(PaymentConfirm::getCreateTime));
- BigDecimal fhTotalAmount = fhConfirmList.stream().map(item->item.getTransationAmount()).reduce(BigDecimal.ZERO,BigDecimal::add);
+ .eq(PaymentConfirm::getScheduleId, schedule.getId()).orderByDesc(PaymentConfirm::getCreateTime));
+ BigDecimal fhTotalAmount = fhConfirmList.stream().map(item -> item.getTransationAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
//鏈鍙戣揣鍓嶅簲鏀� 鍑哄簱鎬婚 - 鎵�鏈夊彂璐у墠搴旀敹
paymentConfirm.setTransationAmount(paymentConfirm.getTransationAmount().subtract(fhTotalAmount));
paymentConfirm.setReceivableAmount(paymentConfirm.getTransationAmount());
paymentConfirm.setTotalAmount(lastConfirm.getTotalAmount().subtract(paymentConfirm.getTransationAmount()));
- paymentConfirmMapper.insert(paymentConfirm);
+ if (schedule.getPaymentRatio().compareTo(new BigDecimal("0")) > 0) {
+ paymentConfirmMapper.insert(paymentConfirm);
+ }
} else {
//涓嶅瓨鍦ㄥ彂璐у簲鏀� 鍑哄簱鎬婚
paymentConfirm.setTotalAmount(lastConfirm.getTotalAmount().subtract(paymentConfirm.getTransationAmount()));
- paymentConfirmMapper.insert(paymentConfirm);
+ if (schedule.getPaymentRatio().compareTo(new BigDecimal("0")) > 0) {
+ paymentConfirmMapper.insert(paymentConfirm);
+ }
}
} else {
//鏃犱箣鍓嶉樁娈靛簲鏀�
paymentConfirm.setTotalAmount(paymentConfirm.getTransationAmount().multiply(new BigDecimal("-1")));
- paymentConfirmMapper.insert(paymentConfirm);
+ if (schedule.getPaymentRatio().compareTo(new BigDecimal("0")) > 0) {
+ paymentConfirmMapper.insert(paymentConfirm);
+ //瀹㈡埛浠樻瀹屾垚鍚堝悓
+ List<Contract> customerCompleteContractList = contractMapper.selectList(Wrappers.<Contract>lambdaQuery().eq(Contract::getPartyAId, contract.getPartyAId())
+ .eq(Contract::getPartyBId, SecurityUtils.getUser().getCompId()).apply(" amount = paid_amount"));
+ if (ArrayUtil.isNotEmpty(customerCompleteContractList)) {
+ List<BigDecimal> outAmountList = new ArrayList<>();
+ for (Contract completeContract : customerCompleteContractList
+ ) {
+ PaymentConfirm contractLastConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, completeContract.getId())
+ .orderByDesc(PaymentConfirm::getCreateTime).last("limit 1"));
+ //鏌ヨ瀹㈡埛浠樻瀹屾垚鍚堝悓涓渶鍚庢槑缁嗛噾棰� 鏈夐鏀惰浆鍏ュ綋鍓嶅悎鍚�
+ if (contractLastConfirm.getTotalAmount().compareTo(new BigDecimal("0")) > 0) {
+ //鏂板瀹屾垚浠樻鍚堝悓 璧勯噾杞嚭
+ PaymentConfirm outConfirm = BeanUtil.copyProperties(contractLastConfirm, PaymentConfirm.class, "id", "transationAmount",
+ "advanceAmount", "receivableAmount", "overdueAmount", "totalAmount");
+ outConfirm.setBusinessType("璧勯噾杞嚭");
+ outConfirm.setConfirmTime(new Date());
+ outConfirm.setTransationAmount(contractLastConfirm.getTotalAmount());
+ outConfirm.setTotalAmount(new BigDecimal("0"));
+ paymentConfirmMapper.insert(outConfirm);
+ outAmountList.add(outConfirm.getTransationAmount());
+ }
+ }
+ if (ArrayUtil.isNotEmpty(outAmountList.toArray())) {
+ BigDecimal currentInSum = outAmountList.stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+ //鏂板褰撳墠鍚堝悓 璧勯噾杞叆
+ PaymentConfirm inConfirm = BeanUtil.copyProperties(paymentConfirm, PaymentConfirm.class, "id", "transationAmount",
+ "advanceAmount", "receivableAmount", "overdueAmount", "totalAmount");
+ inConfirm.setBusinessType("璧勯噾杞叆");
+ inConfirm.setConfirmTime(new Date());
+ inConfirm.setTransationAmount(currentInSum);
+ inConfirm.setTotalAmount(paymentConfirm.getTotalAmount().add(currentInSum));
+ //鏇存柊褰撳墠闃舵瀹為檯鏀舵 鍜� 鏀舵鐘舵��
+ schedule.setActualAmount(inConfirm.getTransationAmount());
+ schedule.setPaymentStatus(2);
+ if (inConfirm.getTotalAmount().compareTo(new BigDecimal("0")) > 0){
+ inConfirm.setAdvanceAmount(inConfirm.getTotalAmount());
+ }else if (inConfirm.getTotalAmount().compareTo(new BigDecimal("0")) < 0) {
+ inConfirm.setReceivableAmount(inConfirm.getTotalAmount().multiply(new BigDecimal("-1")));
+ schedule.setActualAmount(paymentConfirm.getTotalAmount().subtract(currentInSum));
+ schedule.setPaymentStatus(1);
+ }
+ paymentConfirmMapper.insert(inConfirm);
+ //鏇存柊褰撳墠闃舵瀹為檯鏀舵 鍜� 鏀舵鐘舵��
+ scheduleMapper.updateById(schedule);
+ }
+ }
+ }
}
//鏇存柊鍙戣揣鍓嶆敹娆剧敓鏁堟椂闂�
if (ObjUtil.isNull(schedule.getEffectiveDate())) {
- schedule.setEffectiveDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), schedule.getAgreedDays()));
+ schedule.setEffectiveEndDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), schedule.getAgreedDays()));
//鏌ヨ鏄惁鏈夊悗缁樁娈�
- List<ContractPaymentSchedule> afterSchedule = scheduleMapper.selectList(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, contractId)
- .gt(ContractPaymentSchedule::getStageOrder, schedule.getStageOrder()));
- if (ArrayUtil.isEmpty(afterSchedule.toArray())) {
- schedule.setEffectiveEndDate(contract.getExpirationDate());
- }
+// List<ContractPaymentSchedule> afterSchedule = scheduleMapper.selectList(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, contractId)
+// .gt(ContractPaymentSchedule::getStageOrder, schedule.getStageOrder()));
+// if (ArrayUtil.isEmpty(afterSchedule.toArray())) {
+// schedule.setEffectiveEndDate(contract.getExpirationDate());
+// }
scheduleMapper.updateById(schedule);
//鏌ヨ鏄惁鏈変箣鍓嶉樁娈�
- ContractPaymentSchedule beforeSchedule = scheduleMapper.selectOne(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, schedule.getContractId())
- .lt(ContractPaymentSchedule::getStageOrder, schedule.getStageOrder()).orderByDesc(ContractPaymentSchedule::getCreateTime).last("limit 1"));
- if (ObjUtil.isNotNull(beforeSchedule)) {
- beforeSchedule.setEffectiveEndDate(schedule.getEffectiveDate());
- scheduleMapper.updateById(beforeSchedule);
- }
+// ContractPaymentSchedule beforeSchedule = scheduleMapper.selectOne(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, schedule.getContractId())
+// .lt(ContractPaymentSchedule::getStageOrder, schedule.getStageOrder()).orderByDesc(ContractPaymentSchedule::getCreateTime).last("limit 1"));
+// if (ObjUtil.isNotNull(beforeSchedule)) {
+// beforeSchedule.setEffectiveEndDate(schedule.getEffectiveDate());
+// scheduleMapper.updateById(beforeSchedule);
+// }
//鏇存柊灞ョ害
ContractPaymentScheduleProcess contractPaymentScheduleProcess = new ContractPaymentScheduleProcess();
contractPaymentScheduleProcess.setContractId(schedule.getContractId());
@@ -239,7 +296,11 @@
contractPaymentScheduleProcess.setScheduleId(schedule.getId());
contractPaymentScheduleProcess.setScheduleName(schedule.getStageName());
contractPaymentScheduleProcess.setProcessDate(addDTO.getOutBoundTime());
- scheduleProcessMapper.insert(contractPaymentScheduleProcess);
+ ContractPaymentScheduleProcess lastProcess = scheduleProcessMapper.selectOne(Wrappers.<ContractPaymentScheduleProcess>lambdaQuery().eq(ContractPaymentScheduleProcess::getContractId, schedule.getContractId())
+ .eq(ContractPaymentScheduleProcess::getScheduleId, schedule.getId()).last("limit 1"));
+ if (ObjUtil.isNull(lastProcess)) {
+ scheduleProcessMapper.insert(contractPaymentScheduleProcess);
+ }
}
//鏌ヨ鏄惁鏈夊悗缁樁娈�
@@ -251,13 +312,11 @@
//鏈�鍚庨樁娈电敓鏁堟椂闂�
ContractPaymentSchedule endSchedule = afterSchedule.get(0);
if (StrUtil.equals(endSchedule.getStageName(), "璐ㄤ繚閲�")) {
- endSchedule.setEffectiveDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), endSchedule.getAgreedDays()));
- endSchedule.setEffectiveEndDate(contract.getExpirationDate());
- scheduleMapper.updateById(endSchedule);
+// endSchedule.setEffectiveEndDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), endSchedule.getAgreedDays()));
+// scheduleMapper.updateById(endSchedule);
//褰撳墠闃舵鐢熸晥鏃堕棿
- schedule.setEffectiveDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), schedule.getAgreedDays()));
- schedule.setEffectiveEndDate(endSchedule.getEffectiveDate());
- scheduleMapper.updateById(schedule);
+// schedule.setEffectiveEndDate(DateUtil.offsetDay(addDTO.getOutBoundTime(), schedule.getAgreedDays()));
+// scheduleMapper.updateById(schedule);
//鏈�鍚庨樁娈靛簲鏀�
PaymentConfirm newConfim = new PaymentConfirm();
newConfim.setBusinessType(endSchedule.getStageName() + "搴旀敹");
@@ -278,7 +337,9 @@
lastNewTotal = lastNewConfirm.getTotalAmount();
}
newConfim.setTotalAmount(lastNewTotal.subtract(newConfim.getReceivableAmount()));
- paymentConfirmMapper.insert(newConfim);
+ if (endSchedule.getPaymentRatio().compareTo(new BigDecimal("0")) > 0) {
+ paymentConfirmMapper.insert(newConfim);
+ }
}
//鏇存柊鍚堝悓涓嬩釜闃舵
contract.setNextScheduleName(endSchedule.getStageName());
@@ -290,15 +351,15 @@
contractMapper.updateById(contract);
}
if (ArrayUtil.isEmpty(afterSchedule.toArray())) {
- schedule.setEffectiveEndDate(contract.getExpirationDate());
- scheduleMapper.updateById(schedule);
+// schedule.setEffectiveEndDate(contract.getExpirationDate());
+// scheduleMapper.updateById(schedule);
//鏇存柊鍚堝悓涓嬩釜闃舵
contract.setNextScheduleName("鏃�");
contractMapper.updateById(contract);
//褰撳墠涓哄悎鍚屾渶鍚庨樁娈�
- PaymentConfirm lastNewConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId,contract.getId())
+ PaymentConfirm lastNewConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, contract.getId())
.orderByDesc(PaymentConfirm::getCreateTime).last("limit 1"));
- if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0"))>=0){
+ if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0) {
//鏈夐浠樹笖瓒呰繃搴旀敹 鍏抽棴鍚堝悓鐘舵��
contract.setContractStatus(3);
contractMapper.updateById(contract);
@@ -311,7 +372,7 @@
return R.ok();
}
- private void saveContractOutBound(Contract contract, OutBoundAddDTO addDTO, ContractSubjectMatter subjectMatter) {
+ private void saveContractOutBound(Contract contract, OutBoundAddDTO addDTO, ContractSubjectMatter subjectMatter, Long outBoundId) {
ContractOutBound contractOutBound = new ContractOutBound();
contractOutBound.setContractId(contract.getId());
contractOutBound.setContractName(contract.getContractName());
@@ -323,6 +384,29 @@
contractOutBound.setOutBoundNum(subjectMatter.getLastDeliveredQuantity());
contractOutBound.setOutBoundAttNames(addDTO.getOutBoundAttNames());
contractOutBound.setOutBoundAttPaths(addDTO.getOutBoundAttPaths());
+ contractOutBound.setOutBoundId(outBoundId);
+ contractOutBound.setInvoiceStatus("0");
+ contractOutBound.setInvoiceNum(new BigDecimal("0"));
contractOutBoundMapper.insert(contractOutBound);
+ if (StrUtil.isEmpty(contract.getContractCategory())){
+ if (DateUtil.compare(addDTO.getOutBoundTime(),contract.getExpirationDate())>0){
+ saveOverdueOutBound(contract, addDTO, subjectMatter);
+ }
+ }
+ }
+
+ private void saveOverdueOutBound(Contract contract, OutBoundAddDTO addDTO, ContractSubjectMatter subjectMatter) {
+ DeliveryOverdue overdue = new DeliveryOverdue();
+ overdue.setContractId(contract.getId());
+ overdue.setContractName(contract.getContractName());
+ overdue.setBusGuestId(contract.getPartyAId());
+ overdue.setBusGuestName(contract.getPartyA());
+ overdue.setMaterialName(subjectMatter.getMaterialName());
+ overdue.setMaterialInternalName(subjectMatter.getMaterialInternalName());
+ overdue.setMaterialCode(subjectMatter.getMaterialCode());
+ overdue.setOverdueNum(subjectMatter.getLastDeliveredQuantity());
+ overdue.setTotalAmount(subjectMatter.getUnitPrice().multiply(subjectMatter.getLastDeliveredQuantity()));
+ overdue.setOverdueDuration(new BigDecimal(DateUtil.betweenDay(addDTO.getOutBoundTime(),contract.getExpirationDate(),true)));
+ deliveryOverdueMapper.insert(overdue);
}
}
\ No newline at end of file
--
Gitblit v1.9.1