互感器总补丁
This commit is contained in:
		
							parent
							
								
									c28339a91c
								
							
						
					
					
						commit
						3731882c3d
					
				|  | @ -141,12 +141,12 @@ | ||||||
| 			<implementation>nccloud.api.impl.ic.atp.ATPQueryIpml</implementation> | 			<implementation>nccloud.api.impl.ic.atp.ATPQueryIpml</implementation> | ||||||
| 		</component> | 		</component> | ||||||
| 
 | 
 | ||||||
| 		<!--官棍속묏 흙욋데--> | 		<!--官棍속묏흙욋데--> | ||||||
|         		<component priority="0" singleton="true" remote="true" tx="CMT" supportAlias="true"> |         		<component priority="0" singleton="true" remote="true" tx="CMT" supportAlias="true"> | ||||||
|         			<interface>nccloud.api.ic.m47.IAPISubcontInMaintain</interface> |         			<interface>nccloud.api.ic.m47.IAPISubcontInMaintain</interface> | ||||||
|         			<implementation>nccloud.api.impl.ic.m47.APISubcontInMaintainImpl</implementation> |         			<implementation>nccloud.api.impl.ic.m47.APISubcontInMaintainImpl</implementation> | ||||||
|         		</component> |         		</component> | ||||||
|         <!--官棍속묏 흙욋데--> |         <!--官棍속묏흙욋데--> | ||||||
| 	</public> | 	</public> | ||||||
| </module> | </module> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -95,7 +95,7 @@ public class InsertBP implements IInsertBP<SaleOutVO>, | ||||||
|         // 2020年3月2日 新增保存移动业务消息 |         // 2020年3月2日 新增保存移动业务消息 | ||||||
|         processor.addAfterRule(new MobAfterSaveMessageRule()); |         processor.addAfterRule(new MobAfterSaveMessageRule()); | ||||||
| 
 | 
 | ||||||
|         //2025年5月27日 新增保存推送锐制 |         //2025年5月27日新增保存推送锐制 | ||||||
|         processor.addAfterFinalRule(new AfterSigningSynchronizeRuleRZ()); |         processor.addAfterFinalRule(new AfterSigningSynchronizeRuleRZ()); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -51,9 +51,9 @@ public class SignBP implements ISignBP<SaleOutVO>, ISignRuleProvider<SaleOutVO> | ||||||
|         processor.addAfterRule(new SaleOutProceedsRuleCG()); |         processor.addAfterRule(new SaleOutProceedsRuleCG()); | ||||||
|         processor.addAfterRule(new MobAfterSignMessageRule()); |         processor.addAfterRule(new MobAfterSignMessageRule()); | ||||||
|         // 销售出库 多一个步骤 先提交销售交货单 与同步销售出库单的orderNo一致 |         // 销售出库 多一个步骤 先提交销售交货单 与同步销售出库单的orderNo一致 | ||||||
|         processor.addAfterRule(new SalesDeliveryOrderRuleMES()); | //        processor.addAfterRule(new SalesDeliveryOrderRuleMES()); | ||||||
|         // 销售出库 签字后 同步到MES金思维系统 |         // 销售出库 签字后 同步到MES金思维系统 | ||||||
|         processor.addAfterRule(new AfterSigningSynchronizeRuleMES()); | //        processor.addAfterRule(new AfterSigningSynchronizeRuleMES()); | ||||||
|         // 盘点(审批后传MES) |         // 盘点(审批后传MES) | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ import java.util.List; | ||||||
|  * @Description TODO |  * @Description TODO | ||||||
|  * @Version 1.0.0 |  * @Version 1.0.0 | ||||||
|  * @Date 2025/5/16 9:01 |  * @Date 2025/5/16 9:01 | ||||||
|  * @Created by ame |  * @Created by sdlizheng | ||||||
|  */ |  */ | ||||||
| public class AfterSigningSynchronizeRuleRZ implements IRule<SaleOutVO> { | public class AfterSigningSynchronizeRuleRZ implements IRule<SaleOutVO> { | ||||||
|     private static Log log = Log.getInstance("rzmomlog"); |     private static Log log = Log.getInstance("rzmomlog"); | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ public class APISubcontInMaintainImpl implements IAPISubcontInMaintain { | ||||||
|         checker.check(vos); |         checker.check(vos); | ||||||
|         // 2、编码翻译成pk |         // 2、编码翻译成pk | ||||||
|         aggVOList = TransferCodeToPKTool.transferAggVO(aggVOList); |         aggVOList = TransferCodeToPKTool.transferAggVO(aggVOList); | ||||||
|         // キュメ<EFBFBD><EFBFBD>サ |         // 3、翻译货位 | ||||||
|         ICAPILocationVOUtils.translate(vos); |         ICAPILocationVOUtils.translate(vos); | ||||||
| 
 | 
 | ||||||
|         new SubcontInSaveFillValue().setDefaultValue(vos); |         new SubcontInSaveFillValue().setDefaultValue(vos); | ||||||
|  |  | ||||||
|  | @ -25,10 +25,7 @@ public class CheckSubcontInSaveValidator extends VONullValidate { | ||||||
|     public String[] getHeadNotNullFields() { |     public String[] getHeadNotNullFields() { | ||||||
|         // TODO Auto-generated method stub |         // TODO Auto-generated method stub | ||||||
|         //组织,仓库,出入库类型编码 |         //组织,仓库,出入库类型编码 | ||||||
|         String[] headnames = |         String[] headnames ={ICPubMetaNameConst.PK_ORG, ICPubMetaNameConst.CWAREHOUSEID, ICPubMetaNameConst.VTRANTYPECODE}; | ||||||
|                 { |  | ||||||
|                         ICPubMetaNameConst.PK_ORG, ICPubMetaNameConst.CWAREHOUSEID, ICPubMetaNameConst.VTRANTYPECODE |  | ||||||
|                 }; |  | ||||||
|         return headnames; |         return headnames; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -61,7 +61,7 @@ public class SubcontInSaveFillValue { | ||||||
|         // 数量,金额,汇率,税率处理 |         // 数量,金额,汇率,税率处理 | ||||||
|         rule = new ICBodyNshouldassistnumCal<SubcontInVO>(); |         rule = new ICBodyNshouldassistnumCal<SubcontInVO>(); | ||||||
|         processer.addFillvalueRule(rule); |         processer.addFillvalueRule(rule); | ||||||
| 
 |         //执行 | ||||||
|         processer.fillvalue(vos); |         processer.fillvalue(vos); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -25,9 +25,9 @@ public class Choose47DefaultFillRule<E extends SubcontInVO> extends ICRule<E> { | ||||||
|     @Override |     @Override | ||||||
|     public void process(E[] vos) { |     public void process(E[] vos) { | ||||||
|         for (E billvo : vos) { |         for (E billvo : vos) { | ||||||
|             // <EFBFBD>מ³ה<EFBFBD>¬<EFBFBD><EFBFBD><EFBFBD>µ |             //<EFBFBD>מ³ה<EFBFBD>¬<EFBFBD><EFBFBD><EFBFBD>µ | ||||||
|             setDefultInfo(billvo); |             setDefultInfo(billvo); | ||||||
|             // <EFBFBD>ט<EFBFBD><EFBFBD>²<EFBFBD><EFBFBD>ס<EFBFBD>י<EFBFBD>¯,±<EFBFBD><EFBFBD><EFBFBD> |             //<EFBFBD>ט<EFBFBD><EFBFBD>²<EFBFBD><EFBFBD>ס<EFBFBD>י<EFBFBD>¯,±<EFBFBD><EFBFBD><EFBFBD> | ||||||
|             setFanaceorgValue(billvo); |             setFanaceorgValue(billvo); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -63,7 +63,7 @@ public class APISaleOutMaintainImpl implements IAPISaleOutMaintain { | ||||||
|         aggVOList = TransferCodeToPKTool.transferAggVO(aggVOList); |         aggVOList = TransferCodeToPKTool.transferAggVO(aggVOList); | ||||||
|         // ·Òë»õλ |         // ·Òë»õλ | ||||||
|         ICAPILocationVOUtils.translate(vos); |         ICAPILocationVOUtils.translate(vos); | ||||||
|         // 其他数据填充 |         //其他数据填充 | ||||||
|         new SaleOutSaveFillValue().setDefaultValue(vos); |         new SaleOutSaveFillValue().setDefaultValue(vos); | ||||||
| 
 | 
 | ||||||
|         return (SaleOutVO[]) PfServiceScmUtil.processBatch("WRITE", "4C", vos, null, |         return (SaleOutVO[]) PfServiceScmUtil.processBatch("WRITE", "4C", vos, null, | ||||||
|  |  | ||||||
|  | @ -79,7 +79,7 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain{ | ||||||
|         new MaterialOutSaveFillValue().setDefaultValue(vos); |         new MaterialOutSaveFillValue().setDefaultValue(vos); | ||||||
| 
 | 
 | ||||||
|         IMaterialOutMaintainAPI materialOut = NCLocator.getInstance().lookup(IMaterialOutMaintainAPI.class); |         IMaterialOutMaintainAPI materialOut = NCLocator.getInstance().lookup(IMaterialOutMaintainAPI.class); | ||||||
|         //设置每行行号 |         // 设置每行行号 | ||||||
|         setMaterialOutRowNum(vos); |         setMaterialOutRowNum(vos); | ||||||
|         return materialOut.insertBills(vos); |         return materialOut.insertBills(vos); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -78,7 +78,7 @@ public class APIOnhandQueryIpml implements IAPIOnhandQuery { | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     //±<EFBFBD><EFBFBD>ה<EFBFBD>מ<EFBFBD>£<EFBFBD>י |     // ±<EFBFBD><EFBFBD>ה<EFBFBD>מ<EFBFBD>£<EFBFBD>י | ||||||
|     private void requiredFieldCheck(String[] requiredField, Map<String, Object> paramMap) { |     private void requiredFieldCheck(String[] requiredField, Map<String, Object> paramMap) { | ||||||
|         for (String field : requiredField) { |         for (String field : requiredField) { | ||||||
|             Object keyValue = paramMap.get(field); |             Object keyValue = paramMap.get(field); | ||||||
|  |  | ||||||
|  | @ -14,5 +14,11 @@ import java.util.Map; | ||||||
|  */ |  */ | ||||||
| public interface IAPISubcontInMaintain { | public interface IAPISubcontInMaintain { | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * | ||||||
|  |      * @param subcontInVOList | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|     SubcontInVO[] save(List<Map<String, Object>> subcontInVOList) throws Exception; |     SubcontInVO[] save(List<Map<String, Object>> subcontInVOList) throws Exception; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -74,7 +74,7 @@ public interface IAPISaleOutMaintain { | ||||||
|   public SaleOutVO[] saveRefSaleOrder(List<Map<String, Object>> paramMapList) |   public SaleOutVO[] saveRefSaleOrder(List<Map<String, Object>> paramMapList) | ||||||
|       throws BusinessException; |       throws BusinessException; | ||||||
|   /** |   /** | ||||||
|    * 根据发货单生成销售出库单 |    *  根据发货单生成销售出库单 | ||||||
|    * @param vos |    * @param vos | ||||||
|    * @return |    * @return | ||||||
|    * @throws BusinessException |    * @throws BusinessException | ||||||
|  |  | ||||||
|  | @ -16,7 +16,23 @@ import nc.vo.pub.BusinessException; | ||||||
|  */ |  */ | ||||||
| public interface IAPIOnhandQuery { | public interface IAPIOnhandQuery { | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据维度查询现存量信息 | ||||||
|  |      * 此方法接收一个参数映射,用于指定查询条件,如仓库、物料等 | ||||||
|  |      * | ||||||
|  |      * @param paramMap 参数映射,包含查询条件 | ||||||
|  |      * @return OnhandVO[] 查询到的现存量信息数组 | ||||||
|  |      * @throws BusinessException 当查询操作失败时抛出的业务异常 | ||||||
|  |      */ | ||||||
|     OnhandVO[] queryOnhandVOByDims(Map<String, Object> paramMap) throws BusinessException; |     OnhandVO[] queryOnhandVOByDims(Map<String, Object> paramMap) throws BusinessException; | ||||||
| 
 | 
 | ||||||
|     OnhandVO[] queryOnhandVOByDims(List<Map<String, Object>> paramMap)throws Exception; |     /** | ||||||
|  |      * 根据多个维度查询现存量信息 | ||||||
|  |      * 此方法接收一个参数映射列表,每个映射包含一组查询条件,用于批量查询 | ||||||
|  |      * | ||||||
|  |      * @param paramMap 参数映射列表,每个映射包含一组查询条件 | ||||||
|  |      * @return OnhandVO[] 查询到的现存量信息数组 | ||||||
|  |      * @throws Exception 当查询操作失败时抛出的异常 | ||||||
|  |      */ | ||||||
|  |     OnhandVO[] queryOnhandVOByDims(List<Map<String, Object>> paramMap) throws Exception; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,13 +2,10 @@ package nccloud.openapi.ic.m47; | ||||||
| 
 | 
 | ||||||
| import nc.bs.framework.common.NCLocator; | import nc.bs.framework.common.NCLocator; | ||||||
| import nc.vo.ic.m47.entity.SubcontInVO; | import nc.vo.ic.m47.entity.SubcontInVO; | ||||||
| import nc.vo.scmpub.res.billtype.ICBillType; |  | ||||||
| import nc.ws.opm.pub.utils.result.APIErrCodeEnum; | import nc.ws.opm.pub.utils.result.APIErrCodeEnum; | ||||||
| import nccloud.api.ic.m47.IAPISubcontInMaintain; | import nccloud.api.ic.m47.IAPISubcontInMaintain; | ||||||
| import nccloud.api.rest.utils.ResultMessageUtil; | import nccloud.api.rest.utils.ResultMessageUtil; | ||||||
| import nccloud.openapi.ic.util.ICAPILocationVOUtils; |  | ||||||
| import nccloud.openapi.scmpub.pub.NCCPubRestResource; | import nccloud.openapi.scmpub.pub.NCCPubRestResource; | ||||||
| import nccloud.openapi.scmpub.pub.TransferMapToVOTool; |  | ||||||
| import org.json.JSONString; | import org.json.JSONString; | ||||||
| 
 | 
 | ||||||
| import javax.ws.rs.Consumes; | import javax.ws.rs.Consumes; | ||||||
|  | @ -32,32 +29,57 @@ public class SubcontInResource extends NCCPubRestResource { | ||||||
|     private static String HEADTABLE = "ic_subcontin_h"; |     private static String HEADTABLE = "ic_subcontin_h"; | ||||||
|     private static String BODYTABLE = "ic_subcontin_b"; |     private static String BODYTABLE = "ic_subcontin_b"; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 保存操作信息 | ||||||
|  |      * | ||||||
|  |      * 该方法通过POST请求接收JSON格式的参数,处理后返回JSON格式的结果 | ||||||
|  |      * 主要用于保存单个操作的信息,将接收到的参数封装成列表的形式, | ||||||
|  |      * 调用另一个save方法进行实际的保存操作 | ||||||
|  |      * | ||||||
|  |      * @param param 包含操作信息的键值对参数 | ||||||
|  |      * @return 返回保存操作的结果,格式为JSON字符串 | ||||||
|  |      */ | ||||||
|     @POST |     @POST | ||||||
|     @Path("operation/save") |     @Path("operation/save") | ||||||
|     @Consumes({"application/json"}) |     @Consumes({"application/json"}) | ||||||
|     @Produces({"application/json"}) |     @Produces({"application/json"}) | ||||||
|     public JSONString save(Map<String, Object> param) { |     public JSONString save(Map<String, Object> param) { | ||||||
|  |         // 将接收到的参数封装成列表,以便调用实际的保存方法 | ||||||
|         List<Map<String, Object>> paramList = new ArrayList(); |         List<Map<String, Object>> paramList = new ArrayList(); | ||||||
|         paramList.add(param); |         paramList.add(param); | ||||||
|  | 
 | ||||||
|  |         // 调用实际的保存方法,并返回保存结果 | ||||||
|         JSONString result = this.save(paramList); |         JSONString result = this.save(paramList); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |     /** | ||||||
|  |      * 保存数据接口 | ||||||
|  |      * 该方法接收一个包含表头和表体信息的JSON数组,尝试将其保存到数据库中 | ||||||
|  |      * 如果传入的数据格式不正确(不包含表头或表体信息),则返回错误信息 | ||||||
|  |      * 如果保存过程中发生异常,则返回异常信息 | ||||||
|  |      * | ||||||
|  |      * @param paramList 一个包含多个数据项的列表,每个数据项是一个Map对象,必须包含表头和表体信息 | ||||||
|  |      * @return 返回一个JSON字符串,包含保存结果或错误信息 | ||||||
|  |      */ | ||||||
|     @POST |     @POST | ||||||
|     @Path("save") |     @Path("save") | ||||||
|     @Consumes({"application/json"}) |     @Consumes({"application/json"}) | ||||||
|     @Produces({"application/json"}) |     @Produces({"application/json"}) | ||||||
|     public JSONString save(List<Map<String, Object>> paramList){ |     public JSONString save(List<Map<String, Object>> paramList){ | ||||||
|         try { |         try { | ||||||
|  |             // 遍历传入的参数列表,检查每个Map对象是否包含表头和表体信息 | ||||||
|             for (Map<String, Object> map : paramList) { |             for (Map<String, Object> map : paramList) { | ||||||
|                 if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { |                 if (!map.containsKey(HEADTABLE) || !map.containsKey(BODYTABLE)) { | ||||||
|  |                     // 如果任一数据项不包含表头或表体信息,返回错误信息 | ||||||
|                     return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); |                     return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |             // 调用服务接口保存数据,并返回保存结果 | ||||||
|             SubcontInVO[] save = NCLocator.getInstance().lookup(IAPISubcontInMaintain.class).save(paramList); |             SubcontInVO[] save = NCLocator.getInstance().lookup(IAPISubcontInMaintain.class).save(paramList); | ||||||
|             return ResultMessageUtil.toJSON(save, "保存成功"); |             return ResultMessageUtil.toJSON(save, "保存成功"); | ||||||
|         }catch (Exception e){ |         } catch (Exception e) { | ||||||
|  |             // 如果保存过程中发生异常,返回异常信息 | ||||||
|             return ResultMessageUtil.exceptionToJSON(e); |             return ResultMessageUtil.exceptionToJSON(e); | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -143,7 +143,7 @@ public class SaleOutResource extends NCCPubRestResource { | ||||||
|                 nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4008027_0", |                 nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4008027_0", | ||||||
|                         "04008027-0464")/* @res "销售出库单修改签字成功" */); |                         "04008027-0464")/* @res "销售出库单修改签字成功" */); | ||||||
|       }else{ |       }else{ | ||||||
|         // ミ゙クト |         //ミ゙クト | ||||||
|         SaleOutVO[] updateVO = |         SaleOutVO[] updateVO = | ||||||
|                 NCLocator.getInstance().lookup(IAPISaleOutMaintain.class) |                 NCLocator.getInstance().lookup(IAPISaleOutMaintain.class) | ||||||
|                         .update(paramMapList); |                         .update(paramMapList); | ||||||
|  |  | ||||||
|  | @ -136,7 +136,7 @@ public class OnhandResource { | ||||||
|         if (remain == null || remain.isEmpty()) { |         if (remain == null || remain.isEmpty()) { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
|         // 转换为 pk 和 code 的映射 |         // 转换为 pk和 code 的映射 | ||||||
|         Map<String, String> pkCodeMap = new HashMap<>(); |         Map<String, String> pkCodeMap = new HashMap<>(); | ||||||
|         for (Map<String, Object> row : remain) { |         for (Map<String, Object> row : remain) { | ||||||
|             if (row != null) { |             if (row != null) { | ||||||
|  |  | ||||||
|  | @ -21,6 +21,7 @@ import nc.vo.mmpac.pickm.enumeration.FbillstatusEnum; | ||||||
| public class PickmApproveBP { | public class PickmApproveBP { | ||||||
| 
 | 
 | ||||||
|     private void addAfterRule(CompareAroundProcesser<AggPickmVO> processer) { |     private void addAfterRule(CompareAroundProcesser<AggPickmVO> processer) { | ||||||
|  |         //备料计划审批推送锐制 | ||||||
|         IRule<AggPickmVO> pickmstatusFilterRule = new AfterApproveRuleSyncRZWMS(); |         IRule<AggPickmVO> pickmstatusFilterRule = new AfterApproveRuleSyncRZWMS(); | ||||||
|         processer.addAfterRule(pickmstatusFilterRule); |         processer.addAfterRule(pickmstatusFilterRule); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -9,6 +9,7 @@ import nc.bs.uapbd.util.ThirdPartyPostRequestUtil; | ||||||
| import nc.impl.pubapp.pattern.rule.IRule; | import nc.impl.pubapp.pattern.rule.IRule; | ||||||
| import nc.jdbc.framework.processor.ColumnProcessor; | import nc.jdbc.framework.processor.ColumnProcessor; | ||||||
| import nc.pubitf.para.SysInitQuery; | import nc.pubitf.para.SysInitQuery; | ||||||
|  | import nc.vo.bd.defdoc.DefdocVO; | ||||||
| import nc.vo.bd.material.MaterialVO; | import nc.vo.bd.material.MaterialVO; | ||||||
| import nc.vo.bd.rt.rt0004.entity.RcVO; | import nc.vo.bd.rt.rt0004.entity.RcVO; | ||||||
| import nc.vo.bd.stordoc.StordocVO; | import nc.vo.bd.stordoc.StordocVO; | ||||||
|  | @ -19,6 +20,7 @@ import nc.vo.mmpac.pickm.entity.PickmItemVO; | ||||||
| import nc.vo.org.OrgVO; | import nc.vo.org.OrgVO; | ||||||
| import nc.vo.pub.BusinessException; | import nc.vo.pub.BusinessException; | ||||||
| import nc.vo.pub.lang.UFBoolean; | import nc.vo.pub.lang.UFBoolean; | ||||||
|  | import nc.vo.pub.lang.UFDouble; | ||||||
| import nc.vo.pubapp.pattern.exception.ExceptionUtils; | import nc.vo.pubapp.pattern.exception.ExceptionUtils; | ||||||
| import nc.vo.pubapp.pattern.pub.SqlBuilder; | import nc.vo.pubapp.pattern.pub.SqlBuilder; | ||||||
| import nc.vo.scmpub.util.ArrayUtil; | import nc.vo.scmpub.util.ArrayUtil; | ||||||
|  | @ -154,31 +156,29 @@ public class AfterApproveRuleSyncRZWMS implements IRule<AggPickmVO> { | ||||||
|             singleObj.put("djxh", body.getVrowno()); |             singleObj.put("djxh", body.getVrowno()); | ||||||
| 
 | 
 | ||||||
|             //djrq	datetime	单据日期	必填 |             //djrq	datetime	单据日期	必填 | ||||||
|             singleObj.put("djrq", head.getDmakedate()); |             singleObj.put("djrq", head.getDmakedate().toString()); | ||||||
| 
 | 
 | ||||||
|             //wlbm_wbid	varchar(100)	第三方系统物料名称id	必填	物料编码的后台ID |             //wlbm_wbid	varchar(100)	第三方系统物料名称id	必填	物料编码的后台ID | ||||||
|             singleObj.put("wlbm_wbid", wlbm_wbid); |             singleObj.put("wlbm_wbid", wlbm_wbid); | ||||||
| 
 | 
 | ||||||
|             //scjh_wbid	varchar(100)	第三方系统生产计划ID	必填	生产计划号外部ID,一般ERP系统的生产订单号。 |  | ||||||
|             singleObj.put("scjh_wbid", head.getCsourcebillid()); |  | ||||||
| 
 |  | ||||||
|             //jhxh	numeric(5)	计划序号	-生产订单行号 |  | ||||||
|             singleObj.put("jhxh", head.getVsourcebillrowno()); |  | ||||||
| 
 |  | ||||||
|             //djsl	numeric(18,3)	单据数量	必填 |             //djsl	numeric(18,3)	单据数量	必填 | ||||||
|             singleObj.put("djsl", body.getNpscnum().getDouble()); |             UFDouble djsl = body.getNplanoutastnum() == null ? UFDouble.ZERO_DBL : body.getNplanoutastnum(); | ||||||
|  |             singleObj.put("djsl", djsl.getDouble()); | ||||||
| 
 | 
 | ||||||
|             //sddd	varchar(510)	送达地点	必填	传仓库名称,要求上位ERP仓库名称不重复。 |             //sddd	varchar(510)送达地点	必填	传仓库名称,要求上位ERP仓库名称不重复。 | ||||||
|             singleObj.put("sddd", transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.NAME, StordocVO.PK_STORDOC, body.getCoutstockid())); | //            singleObj.put("sddd", transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.NAME, StordocVO.PK_STORDOC, body.getCoutstockid())); | ||||||
| 
 | 
 | ||||||
|             //ckbh_wbid	varchar(100)	第三方系统仓库id	必填	储区根据仓库默认,同仓库多储区时,两者必填; |             //ckbh_wbid	varchar(100)	第三方系统仓库id	必填	储区根据仓库默认,同仓库多储区时,两者必填; | ||||||
|             singleObj.put("ckbh_wbid",transferCodeByPk(StordocVO.getDefaultTableName(), StordocVO.CODE, StordocVO.PK_STORDOC, body.getCoutstockid())); | //            singleObj.put("ckbh_wbid",body.getCoutstockid()); | ||||||
| 
 | 
 | ||||||
|             //qfbj	int	签发标记	必填	默认1;上位系统审核传至MOM	1 |             //qfbj	int	签发标记	必填	默认1;上位系统审核传至MOM	1 | ||||||
|             singleObj.put("qfbj", 1); |             singleObj.put("qfbj", 1); | ||||||
| 
 | 
 | ||||||
|             //cght_wbid	varchar(100)	第三方系统合同id	必填	委外订单 |             //cght_wbid	varchar(100)	第三方系统合同id	必填	委外订单主键ID | ||||||
|             singleObj.put("cght_wbid", head.getVfirstbillcode()); |             singleObj.put("cght_wbid",head.getCfirstbillid()); | ||||||
|  | 
 | ||||||
|  |                     //cght_wbid	varchar(100)	第三方系统合同id	必填 | ||||||
|  | //            singleObj.put("cght_wbid", transferCodeByPk("bd_defdoc", DefdocVO.CODE, DefdocVO.PK_DEFDOC, body.getVbdef5())); | ||||||
|             details.add(singleObj); |             details.add(singleObj); | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -51,10 +51,10 @@ public class PMOApproveBP { | ||||||
|         processer.addAfterRule(new PMOCreatePSCPlanRule()); |         processer.addAfterRule(new PMOCreatePSCPlanRule()); | ||||||
|         ICompareRule<PMOAggVO> auditSupplyRule = new PMOApproveAuditSupplyRule(); |         ICompareRule<PMOAggVO> auditSupplyRule = new PMOApproveAuditSupplyRule(); | ||||||
|         processer.addAfterRule(auditSupplyRule); |         processer.addAfterRule(auditSupplyRule); | ||||||
|         // 审批后推送到RZ系统 |         // 审批后推送到锐制系统 | ||||||
|         processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ(true)); |         processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ(true)); | ||||||
|         // 审批后推送流程生产订单到MES |         // 审批后推送流程生产订单到MES | ||||||
|         processer.addAfterRule(new AfterApproveRuleSyncMes()); | //        processer.addAfterRule(new AfterApproveRuleSyncMes()); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ public class AfterApprovingSynchronizeRuleRZ implements IRule<PMOAggVO> { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             // 推送到RZ系统 |             // 推送到锐制系统 | ||||||
|             pushToRZMOM(filteredOrders.toArray(new PMOAggVO[0])); |             pushToRZMOM(filteredOrders.toArray(new PMOAggVO[0])); | ||||||
|         } catch (Exception e) { |         } catch (Exception e) { | ||||||
|             log.error("同步生产订单到RZ系统失败: " + e.getMessage()); |             log.error("同步生产订单到RZ系统失败: " + e.getMessage()); | ||||||
|  |  | ||||||
|  | @ -96,7 +96,7 @@ public class WrAutoProdInFilterBP { | ||||||
| 		// 设置库存组织和仓库 | 		// 设置库存组织和仓库 | ||||||
| 		IRule<AggWrVO> wrProdInSetInStockOrgRule = new WrProdInSetInStockOrgRule(); | 		IRule<AggWrVO> wrProdInSetInStockOrgRule = new WrProdInSetInStockOrgRule(); | ||||||
| 		wrProdInSetInStockOrgRule.process(filterVOs); | 		wrProdInSetInStockOrgRule.process(filterVOs); | ||||||
| 		//2025年5月30日08点45分 --外部系统推送接口时填了仓库,此处不清空 | 		//2025年5月30日08点45分 -- 外部系统推送接口时填了仓库,此处不清空 | ||||||
| 		String userCode = InvocationInfoProxy.getInstance().getUserCode(); | 		String userCode = InvocationInfoProxy.getInstance().getUserCode(); | ||||||
| 		if("rzmes".equals(userCode)||"MES".equals(userCode)){ | 		if("rzmes".equals(userCode)||"MES".equals(userCode)){ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -122,7 +122,7 @@ public class WrProdInSetInStockOrgRule implements IRule<AggWrVO> { | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             //2025年5月30日08点45分 --外部系统推送接口时填了仓库,此处不清空 |             //2025年5月30日08点45分 --外部系统推送接口时填了仓库, 此处不清空 | ||||||
|             if("rzmes".equals(userCode)||"MES".equals(userCode)){ |             if("rzmes".equals(userCode)||"MES".equals(userCode)){ | ||||||
| 
 | 
 | ||||||
|             }else{ |             }else{ | ||||||
|  |  | ||||||
|  | @ -609,7 +609,7 @@ public class WrResource extends AbstractNCCRestResource { | ||||||
|      */ |      */ | ||||||
| 
 | 
 | ||||||
|     private void processMESFields(Map<String, Object> itemMap, BaseDAO baseDAO) throws BusinessException { |     private void processMESFields(Map<String, Object> itemMap, BaseDAO baseDAO) throws BusinessException { | ||||||
|         // 检查是否需要处理MES字段 |         //检查是否需要处理MES字段 | ||||||
|         // 这里可以通过上下文、用户信息或其他标识来判断 |         // 这里可以通过上下文、用户信息或其他标识来判断 | ||||||
|         // 暂时通过检查是否存在特定字段来判断是MES用户 |         // 暂时通过检查是否存在特定字段来判断是MES用户 | ||||||
|         boolean isMESUser = isMESUser(itemMap); |         boolean isMESUser = isMESUser(itemMap); | ||||||
|  | @ -619,7 +619,7 @@ public class WrResource extends AbstractNCCRestResource { | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         try { |         try { | ||||||
|             // 设置cbmoid保持和vbsrcid一致 |             //设置cbmoid保持和vbsrcid一致 | ||||||
|             if (itemMap.containsKey("vbsrcid") && MMValueCheck.isNotEmpty(itemMap.get("vbsrcid"))) { |             if (itemMap.containsKey("vbsrcid") && MMValueCheck.isNotEmpty(itemMap.get("vbsrcid"))) { | ||||||
|                 itemMap.put("cbmoid", itemMap.get("vbsrcid")); |                 itemMap.put("cbmoid", itemMap.get("vbsrcid")); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ public class AfterApprovingSynchronizeRuleRZ implements IRule<OrderVO> { | ||||||
|             if (newOrderVOS.isEmpty()) { |             if (newOrderVOS.isEmpty()) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             // 推送到睿智系统 |             //推送到锐制系统 | ||||||
|             pushToRZMOM(newOrderVOS.toArray(new OrderVO[0])); |             pushToRZMOM(newOrderVOS.toArray(new OrderVO[0])); | ||||||
|         } catch (Exception e) { |         } catch (Exception e) { | ||||||
|             log.error("同步采购订单到锐制系统失败: " + e.getMessage()); |             log.error("同步采购订单到锐制系统失败: " + e.getMessage()); | ||||||
|  |  | ||||||
|  | @ -111,7 +111,7 @@ public class OrderApproveAction { | ||||||
|         processer.addAfterRule(new OrderRewritePMStartDateRule(true)); |         processer.addAfterRule(new OrderRewritePMStartDateRule(true)); | ||||||
|         processer.addAfterRule(new OrderApprovePMSupplyRule()); |         processer.addAfterRule(new OrderApprovePMSupplyRule()); | ||||||
| 
 | 
 | ||||||
|         // 采购订单审批后同步到锐制MES系统 |         // 采购订单审批后同步到锐制系统 | ||||||
|         processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ()); |         processer.addAfterRule(new AfterApprovingSynchronizeRuleRZ()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -91,7 +91,7 @@ public class AfterApproceRuleSyncRZWMSProcess implements IRule<SCOrderVO> { | ||||||
|             // 第三方系统厂商id |             // 第三方系统厂商id | ||||||
|             singleObj.put("zbxx_gycs_wbid", head.getPk_supplier()); |             singleObj.put("zbxx_gycs_wbid", head.getPk_supplier()); | ||||||
| 
 | 
 | ||||||
|             //zbxx_cgy_wbid	varchar(100)	第三方系统采购员id |             //zbxx_cgy_wbid	varchar(100)第三方系统采购员id | ||||||
|             singleObj.put("zbxx_cgy_wbid", head.getCemployeeid()); |             singleObj.put("zbxx_cgy_wbid", head.getCemployeeid()); | ||||||
| 
 | 
 | ||||||
|             // 交货日期 |             // 交货日期 | ||||||
|  |  | ||||||
|  | @ -45,7 +45,7 @@ public class SCOrderApproveAction { | ||||||
|         prcr.addAfterRule(new ApproveSupplyRule()); |         prcr.addAfterRule(new ApproveSupplyRule()); | ||||||
|         prcr.addAfterRule(new SCOrderApprovePMSupplyRule()); |         prcr.addAfterRule(new SCOrderApprovePMSupplyRule()); | ||||||
| 
 | 
 | ||||||
|         //2025年5月18日15点12分-- 互感器委外订单审批推送锐制系统 |         //2025年5月18日15点12分--互感器委外订单审批推送锐制系统 | ||||||
|         prcr.addAfterRule(new AfterApproceRuleSyncRZWMSProcess()); |         prcr.addAfterRule(new AfterApproceRuleSyncRZWMSProcess()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -3,4 +3,5 @@ | ||||||
| 	<rest> | 	<rest> | ||||||
| 		<resource classname="nccloud.api.uapbd.QuerySync"  exinfo=""/> | 		<resource classname="nccloud.api.uapbd.QuerySync"  exinfo=""/> | ||||||
| 	</rest> | 	</rest> | ||||||
|  | 
 | ||||||
| </module> | </module> | ||||||
|  | @ -39,7 +39,7 @@ public class ThirdPartyPostRequestUtil { | ||||||
|             connection.setReadTimeout(DEFAULT_READ_TIMEOUT); // 设置读取超时时间 |             connection.setReadTimeout(DEFAULT_READ_TIMEOUT); // 设置读取超时时间 | ||||||
|             connection.setRequestProperty("Content-Type", "application/json"); // 设置请求头 |             connection.setRequestProperty("Content-Type", "application/json"); // 设置请求头 | ||||||
| 
 | 
 | ||||||
|             // 发送请求体 |             //发送请求体 | ||||||
|             try (OutputStream os = connection.getOutputStream()) { |             try (OutputStream os = connection.getOutputStream()) { | ||||||
|                 byte[] input = requestBody.getBytes("utf-8"); |                 byte[] input = requestBody.getBytes("utf-8"); | ||||||
|                 os.write(input, 0, input.length); |                 os.write(input, 0, input.length); | ||||||
|  |  | ||||||
|  | @ -39,7 +39,7 @@ public class QuerySync extends AbstractNCCRestResource { | ||||||
|                 Calendar calendar = Calendar.getInstance(); |                 Calendar calendar = Calendar.getInstance(); | ||||||
|                 calendar.setTime(date); |                 calendar.setTime(date); | ||||||
|                 calendar.add(Calendar.HOUR_OF_DAY, -3); // 减去 3 小时 |                 calendar.add(Calendar.HOUR_OF_DAY, -3); // 减去 3 小时 | ||||||
|                 //提前三小时,防止ts与现实时间差别 |                 //提前三小时防止ts与现实时间差别 | ||||||
|                 UFDate adjustedUfDate = new UFDate(calendar.getTimeInMillis()); |                 UFDate adjustedUfDate = new UFDate(calendar.getTimeInMillis()); | ||||||
|                 if (!ts.contains(",")) {  // 单个时间戳 |                 if (!ts.contains(",")) {  // 单个时间戳 | ||||||
|                     tsCondition = "ts >= '" + adjustedUfDate + "' AND ts <= '" + new UFDate(new Date()) + "'"; |                     tsCondition = "ts >= '" + adjustedUfDate + "' AND ts <= '" + new UFDate(new Date()) + "'"; | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ public class QuerySyncSqlUtils { | ||||||
|      * 此方法假定传入的 `values` 列表是非空的(由调用方 `buildUniversalCondition` 保证)。 |      * 此方法假定传入的 `values` 列表是非空的(由调用方 `buildUniversalCondition` 保证)。 | ||||||
|      * |      * | ||||||
|      * @param fieldName 字段名 |      * @param fieldName 字段名 | ||||||
|      * @param values    值的列表 (来自非空数组或List) |      * @param values   值的列表 (来自非空数组或List) | ||||||
|      * @return 构建好的IN子句字符串 |      * @return 构建好的IN子句字符串 | ||||||
|      */ |      */ | ||||||
|     private static String buildInClause(String fieldName, List<?> values) { |     private static String buildInClause(String fieldName, List<?> values) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue