委外订单审批同步锐制代码优化
This commit is contained in:
		
							parent
							
								
									1f3d4f0bfd
								
							
						
					
					
						commit
						4612e2f19b
					
				|  | @ -16,6 +16,7 @@ import nc.vo.bd.supplier.SupplierVO; | |||
| import nc.vo.cmp.util.StringUtils; | ||||
| import nc.vo.org.OrgVO; | ||||
| import nc.vo.pub.BusinessException; | ||||
| import nc.vo.pub.lang.UFDouble; | ||||
| import nc.vo.pubapp.pattern.exception.ExceptionUtils; | ||||
| import nc.vo.pubapp.pattern.pub.SqlBuilder; | ||||
| import nc.vo.sc.m61.entity.SCOrderHeaderVO; | ||||
|  | @ -53,7 +54,8 @@ public class AfterApproceRuleSyncRZWMSProcess implements IRule<SCOrderVO> { | |||
| 
 | ||||
|         for (SCOrderItemVO body : bodys) { | ||||
|             JSONObject singleObj = new JSONObject(); | ||||
| 
 | ||||
|             //操作状态 1新增/修改、2删除(删除时只需上传wbid) | ||||
|             singleObj.put("operate", 1); | ||||
|             // 单据类型 | ||||
|             singleObj.put("cgjh_wbid", body.getVsrctrantype()); // 第三方系统采购计划id | ||||
|             singleObj.put("cgxh", body.getVsrcrowno());           // 采购计划序号 | ||||
|  | @ -68,10 +70,17 @@ public class AfterApproceRuleSyncRZWMSProcess implements IRule<SCOrderVO> { | |||
|             // 物料 | ||||
|             singleObj.put("wlbm_wbid", transferCodeByPk(MaterialVO.getDefaultTableName(), MaterialVO.CODE, MaterialVO.PK_MATERIAL, body.getPk_material())); // 第三方系统材料id | ||||
| 
 | ||||
|             singleObj.put("cgsl", body.getNqtunitnum());          // 采购数量 | ||||
|             singleObj.put("jhrq", body.getDplanarrvdate());       // 交货日期 | ||||
|             singleObj.put("zbxx_cgrq", head.getDbilldate().toString()); // 采购日期 | ||||
|             singleObj.put("cgrq", head.getDbilldate()).toString();  // 采购日期 | ||||
|             UFDouble nqtunitnum = body.getNqtunitnum() == null ? UFDouble.ZERO_DBL : body.getNqtunitnum(); | ||||
|             singleObj.put("cgsl", nqtunitnum.getDouble());          // 采购数量 | ||||
|             if (body.getDplanarrvdate() != null) { | ||||
|                 singleObj.put("jhrq", body.getDplanarrvdate().toString());       // 交货日期 | ||||
|             } | ||||
|             if (head.getDbilldate() != null) { | ||||
|                 singleObj.put("zbxx_cgrq", head.getDbilldate().toString()); // 采购日期 | ||||
|             } | ||||
|             if (head.getDbilldate() != null) { | ||||
|                 singleObj.put("cgrq", head.getDbilldate().toString());  // 采购日期 | ||||
|             } | ||||
| 
 | ||||
|             singleObj.put("htxh", body.getCrowno());              // 合同序号 | ||||
|             singleObj.put("zbxx_cgy_wbid", transferCodeByPk(PsndocVO.getDefaultTableName(), PsndocVO.CODE, PsndocVO.PK_PSNDOC, head.getCemployeeid())); // 第三方系统采购员id | ||||
|  | @ -85,8 +94,9 @@ public class AfterApproceRuleSyncRZWMSProcess implements IRule<SCOrderVO> { | |||
|         List<SCOrderVO> aggvoList = new ArrayList<>(); | ||||
|         for (SCOrderVO aggvo : SCOrderVOS) { | ||||
|             String pkOrg = aggvo.getParentVO().getPk_org(); | ||||
|             Integer fstatusflag = aggvo.getParentVO().getFstatusflag(); | ||||
|             String orgCode = transferCodeByPk(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg); | ||||
|             if ("30401".equals(orgCode)) { | ||||
|             if ("30401".equals(orgCode) && 3 == fstatusflag) { | ||||
|                 aggvoList.add(aggvo); | ||||
|             } | ||||
|         } | ||||
|  | @ -45,6 +45,8 @@ public class SCOrderApproveAction { | |||
|         prcr.addAfterRule(new SCOrderRewritePMStartDateRule(true)); | ||||
|         prcr.addAfterRule(new ApproveSupplyRule()); | ||||
|         prcr.addAfterRule(new SCOrderApprovePMSupplyRule()); | ||||
| 
 | ||||
|         //2025年5月18日15点12分--互感器委外订单审批推送RZ系统 | ||||
|         prcr.addAfterRule(new AfterApproceRuleSyncRZWMSProcess()); | ||||
|     } | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue