feat(ic): 成套领料接口-设置单据日期, 如果单据日期小于2025-11-02,则单据日期设置为2025-11-02

This commit is contained in:
mzr 2025-10-25 20:51:15 +08:00
parent 0f4d3f810c
commit 3d0a463d1a
1 changed files with 23 additions and 7 deletions

View File

@ -28,6 +28,7 @@ import nc.vo.mmpac.pickm.entity.AggPickmVO;
import nc.vo.mmpac.pickm.entity.PickmItemVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.VOStatus;
import nc.vo.pub.lang.UFDate;
import nc.vo.pub.lang.UFDouble;
import nc.vo.scmpub.check.billvalidate.BillVOsCheckRule;
import nc.vo.scmpub.res.billtype.ICBillType;
@ -433,6 +434,21 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain {
UFDouble num = new UFDouble(paramMap.get("num").toString());
for (MaterialOutVO vo : vos) {
MaterialOutHeadVO headVo = vo.getHead();
UFDate dbilldate = headVo.getDbilldate();
// 设置单据日期, 如果单据日期小于2025-11-02则单据日期设置为2025-11-02
UFDate ufDate = new UFDate("2025-11-02");
if (dbilldate != null) {
int i = dbilldate.compareTo(ufDate);
if (i < 0) {
headVo.setDbilldate(ufDate);
}
} else {
UFDate nowDate = new UFDate();
int i = nowDate.compareTo(ufDate);
if (i < 0) {
headVo.setDbilldate(ufDate);
}
}
// ÉèÖà vdef9 ÆôÔ´ÁìÁÏid
if (MMValueCheck.isNotEmpty(paramMap.get("vdef9"))) {
headVo.setVdef9(paramMap.get("vdef9").toString());