feat(ic): 成套领料接口-设置单据日期, 如果单据日期小于2025-11-02,则单据日期设置为2025-11-02
This commit is contained in:
		
							parent
							
								
									0f4d3f810c
								
							
						
					
					
						commit
						3d0a463d1a
					
				|  | @ -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; | ||||
|  | @ -89,7 +90,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
| //        if (isSpecialCase) { | ||||
| //            processPickingPlanSpecialLogic(vos); | ||||
| //        } | ||||
|         //其他数据填充 | ||||
|         // 其他数据填充 | ||||
|         new MaterialOutSaveFillValue().setDefaultValue(vos); | ||||
| 
 | ||||
|         IMaterialOutMaintainAPI materialOut = NCLocator.getInstance().lookup(IMaterialOutMaintainAPI.class); | ||||
|  | @ -121,7 +122,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
| //        if (isSpecialCase) { | ||||
| //            processPickingPlanSpecialLogic(vos); | ||||
| //        } | ||||
|         //其他数据填充 | ||||
|         // 其他数据填充 | ||||
|         new MaterialOutSaveFillValue().setDefaultValue(vos); | ||||
| 
 | ||||
|         IMaterialOutMaintainAPI materialOut = NCLocator.getInstance().lookup(IMaterialOutMaintainAPI.class); | ||||
|  | @ -245,7 +246,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
|                         roigBvo.setAttributeValue(battr, newBvo.getAttributeValue(battr)); | ||||
|                         bfields.add(battr); | ||||
|                     } | ||||
|                     //设置货位序列号孙表,把原来的孙表删除,修改的货位置为新增 | ||||
|                     // 设置货位序列号孙表,把原来的孙表删除,修改的货位置为新增 | ||||
|                     if (null != newBvo.getLocationVOs()) { | ||||
|                         List<ICLocationVO> allloc = new ArrayList<ICLocationVO>(); | ||||
|                         if (null != deleteLoc && null != deleteLoc.get(roigBvo.getCgeneralbid())) { | ||||
|  | @ -262,7 +263,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
|                     } | ||||
|                     // 翻译货位 | ||||
|                     ICAPILocationVOUtils.translate(materialOutVOs); | ||||
|                     //其他数据填充 | ||||
|                     // 其他数据填充 | ||||
|                     new MaterialOutUpdateFillValue().setDefaultValue(materialOutVOs, bfields); | ||||
|                 } | ||||
|             } | ||||
|  | @ -273,9 +274,9 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
|         tool.doBeforeInsert(materialOutVOs); | ||||
| 
 | ||||
|         IWmsSyncUtils utils = NCLocator.getInstance().lookup(IWmsSyncUtils.class); | ||||
|         //2025年10月15日14点25分--重新覆盖单据转换规则转换的项目字段--wms对接公司存在备料计划与材料出库明细项目字段不一致情况--star | ||||
|         // 2025年10月15日14点25分--重新覆盖单据转换规则转换的项目字段--wms对接公司存在备料计划与材料出库明细项目字段不一致情况--star | ||||
|         if (utils != null && utils.isWMS()) { | ||||
|             //获取originBill里表体的主键和项目字段形成Map,再遍历materialOutVOs去替换明细的项目 | ||||
|             // 获取originBill里表体的主键和项目字段形成Map,再遍历materialOutVOs去替换明细的项目 | ||||
|             Map<String, String> originProjectMap = new HashMap<>(); | ||||
|             for (MaterialOutVO originBill : originBills) { | ||||
|                 MaterialOutBodyVO[] originBodys = originBill.getBodys(); | ||||
|  | @ -298,7 +299,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain { | |||
|                 } | ||||
|             } | ||||
|         } | ||||
|         //2025年10月15日14点25分--重新覆盖单据转换规则转换的项目字段--wms对接公司存在备料计划与材料出库明细项目字段不一致情况--end | ||||
|         // 2025年10月15日14点25分--重新覆盖单据转换规则转换的项目字段--wms对接公司存在备料计划与材料出库明细项目字段不一致情况--end | ||||
|         MaterialOutVO[] updateVOS = NCLocator.getInstance().lookup(IMaterialOutMaintain.class).update(materialOutVOs, originBills); | ||||
|         // 如果是WMS系统 则自动签字 | ||||
|         if (utils != null && utils.isWMS()) { | ||||
|  | @ -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()); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue