Merge remote-tracking branch 'origin/main'
This commit is contained in:
		
						commit
						14c86ec4d3
					
				|  | @ -177,8 +177,8 @@ public class PurchaseReceiptRuleMES implements IRule<PurchaseInVO> { | |||
|         String supplyId = transferCodeByPk(SupplierVO.getDefaultTableName(), SupplierVO.CODE, | ||||
|                 SupplierVO.PK_SUPPLIER, head.getCvendorid()); | ||||
|         data.put("supplyId", supplyId); | ||||
|         // »õ±ÒID - ÔÝÎÞÃ÷È·Ó³Éä | ||||
|         data.put("currency", null); | ||||
|         // »õ±Ò - ÔÝÎÞÃ÷È·Ó³Éä | ||||
|         data.put("currency", "CNY"); | ||||
|         //汇率(必填) | ||||
|         data.put("rate", 1); | ||||
|         // 结算方式 - 默认为"S"(转账) | ||||
|  |  | |||
|  | @ -3,6 +3,7 @@ package nc.bs.so.m30.rule.approve; | |||
| import com.alibaba.fastjson.JSONArray; | ||||
| import com.alibaba.fastjson.JSONObject; | ||||
| import nc.bs.dao.BaseDAO; | ||||
| import nc.bs.framework.common.InvocationInfoProxy; | ||||
| import nc.bs.framework.common.NCLocator; | ||||
| import nc.bs.logging.Log; | ||||
| import nc.impl.pubapp.pattern.rule.IRule; | ||||
|  | @ -45,9 +46,16 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> { | |||
| 
 | ||||
|     @Override | ||||
|     public void process(SaleOrderVO[] saleOrderVOs) { | ||||
|         // 初始化HTTP请求工具类 | ||||
|         IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); | ||||
|         try { | ||||
|             // 놓迦뺏HTTP헝헹묏야잚 | ||||
|             IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); | ||||
| //            String code = InvocationInfoProxy.getInstance().getUserCode(); | ||||
|             // 当当前操作人员是BIP的时候 直接return 不走同步MES的业务逻辑 | ||||
| //            if (code != null && code.equals("BIP")) { | ||||
| //                obmlog.debug("AfterApprovingSynchronizeRuleMES-当前人员是BIP,不处理"); | ||||
| //                return; | ||||
| //            } | ||||
| 
 | ||||
|             if (saleOrderVOs == null || saleOrderVOs.length == 0) { | ||||
|                 obmlog.debug("AfterApprovingSynchronizeRuleMES-没有需要处理的销售订单"); | ||||
|                 return; | ||||
|  | @ -140,6 +148,7 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> { | |||
|         if (bodys != null) { | ||||
|             for (SaleOrderBVO body : bodys) { | ||||
|                 JSONObject detailItem = new JSONObject(); | ||||
|                 detailItem.put("productNum", head.getVbillcode()); | ||||
|                 // 以下字段需要表体的字段 | ||||
|                 // 需求日期 表体dreceivedate | ||||
|                 UFDate dreceivedate = body.getDreceivedate(); | ||||
|  | @ -187,7 +196,8 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> { | |||
|                 detailItem.put("deliveryDate", dsenddate1 != null ? dsenddate1.toString().substring(0, 10) : null); | ||||
|                 // 其他非必填字段设为null | ||||
|                 detailItem.put("productNum", null); | ||||
|                 detailItem.put("factoryId", null); | ||||
|                 // 传递电缆公司的组织编码 | ||||
|                 detailItem.put("factoryId", transferCodeByPk(SalesOrgVO.getDefaultTableName(), SalesOrgVO.CODE, SalesOrgVO.PK_SALESORG, head.getPk_org())); | ||||
|                 detailItem.put("customMtId", null); | ||||
|                 detailItem.put("customNo", null); | ||||
|                 detailItem.put("customSN", null); | ||||
|  | @ -198,7 +208,22 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> { | |||
|                 // 行号 | ||||
|                 property.put("propertyFiled", "SXZF15"); | ||||
|                 property.put("propertyValue", body.getCsaleorderbid()); | ||||
|                 // 新增三个字段属性 销售订单交易类型编码 | ||||
|                 JSONObject property1 = new JSONObject(); | ||||
|                 JSONObject property2 = new JSONObject(); | ||||
|                 JSONObject property3 = new JSONObject(); | ||||
|                 property1.put("propertyFiled", "SXZF19"); | ||||
|                 property1.put("propertyValue", head.getVtrantypecode()); // 订单类型编码 | ||||
|                 // 销售订单主键 | ||||
|                 property2.put("propertyFiled", "SXZF20"); | ||||
|                 property2.put("propertyValue", head.getCsaleorderid()); // 表头主键 | ||||
| //                // 销售订单子表主键 | ||||
| //                property3.put("propertyFiled", "SXZF21"); | ||||
| //                property3.put("propertyValue", body.getCsaleorderbid());  // 表体主键 | ||||
|                 properties.add(property); | ||||
|                 properties.add(property1); | ||||
|                 properties.add(property2); | ||||
|                 properties.add(property3); | ||||
|                 detailItem.put("properties", properties); | ||||
|                 details.add(detailItem); | ||||
|             } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue