diff --git a/ic/src/private/nc/bs/ic/m45/sign/rule/AfterSigningSynchronizeRuleMES.java b/ic/src/private/nc/bs/ic/m45/sign/rule/AfterSigningSynchronizeRuleMES.java index bc741d7..89d669a 100644 --- a/ic/src/private/nc/bs/ic/m45/sign/rule/AfterSigningSynchronizeRuleMES.java +++ b/ic/src/private/nc/bs/ic/m45/sign/rule/AfterSigningSynchronizeRuleMES.java @@ -92,17 +92,17 @@ public class AfterSigningSynchronizeRuleMES implements IRule { PsndocVO.NAME, PsndocVO.PK_PSNDOC, hvo.getCwhsmanagerid())); // 保管员 dataObj.put("remark", hvo.getVnote()); // 备注 // 添加采购员信息 - 来自cbizid字段 - String purchaser = transferCodeByPk(PsndocVO.getDefaultTableName(), - PsndocVO.NAME, PsndocVO.PK_PSNDOC, hvo.getCbizid()); - if (purchaser != null && !purchaser.isEmpty()) { - dataObj.put("purchaser", purchaser); // 采购员 - } - // 添加供应商信息 - 来自cvendorid字段 - String supplier = transferCodeByPk(SupplierVO.getDefaultTableName(), - SupplierVO.CODE, SupplierVO.PK_SUPPLIER, hvo.getCvendorid()); - if (supplier != null && !supplier.isEmpty()) { - dataObj.put("supplierId", supplier); // 供应商编码 - } +// String purchaser = transferCodeByPk(PsndocVO.getDefaultTableName(), +// PsndocVO.NAME, PsndocVO.PK_PSNDOC, hvo.getCbizid()); +// if (purchaser != null && !purchaser.isEmpty()) { +// dataObj.put("purchaser", purchaser); // 采购员 +// } +// // 添加供应商信息 - 来自cvendorid字段 +// String supplier = transferCodeByPk(SupplierVO.getDefaultTableName(), +// SupplierVO.CODE, SupplierVO.PK_SUPPLIER, hvo.getCvendorid()); +// if (supplier != null && !supplier.isEmpty()) { +// dataObj.put("supplierId", supplier); // 供应商编码 +// } // 构建明细 List detailsList = new ArrayList<>(); if (bvos != null) { diff --git a/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java b/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java index b07963d..d84374e 100644 --- a/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java +++ b/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java @@ -48,7 +48,7 @@ public class PurchaseReceiptRuleMES implements IRule { obmlog.debug("AfterSigningSynchronizeRuleMES-没有需要处理的采购收货单"); return; } - // 检查并筛选组织为电缆的采购收货单 +// // 检查并筛选组织为电缆的采购收货单 List filteredPurchaseInVOS = checkAndFilterBills(purchaseInVOS); if (filteredPurchaseInVOS.isEmpty()) { obmlog.debug("AfterSigningSynchronizeRuleMES-没有需要处理的需要同步的组织为电缆的采购收货单"); @@ -179,7 +179,7 @@ public class PurchaseReceiptRuleMES implements IRule { // 分类(必填)- 默认为"N"(货物) data.put("costOrder", "N"); // 是否退货(必填)- 映射为freplenishflag,如果为Y则为退货 - data.put("returned", head.getFreplenishflag()); + data.put("returned", head.getFreplenishflag() == null ? head.getFreplenishflag().booleanValue() : null); // 备注 - 映射为vnote data.put("remark", head.getVnote()); // 维护人信息 @@ -192,7 +192,7 @@ public class PurchaseReceiptRuleMES implements IRule { for (PurchaseInBodyVO body : bodys) { JSONObject detailItem = new JSONObject(); // 收货单号(必填)- 在buildSyncData方法中设置 - detailItem.put("orderNo", dbilldate != null ? dbilldate.toString().substring(0, 10) : null); + detailItem.put("orderNo", head.getVbillcode()); // 收货单序号(必填)- 映射为行号(crowno) detailItem.put("orderSn", body.getCrowno()); // 事务类型(必填)- 使用表体字段cbodytranstypecode diff --git a/ic/src/private/nc/bs/ic/m4c/sign/rule/AfterSigningSynchronizeRuleMES.java b/ic/src/private/nc/bs/ic/m4c/sign/rule/AfterSigningSynchronizeRuleMES.java index 83effb5..5b4c1b5 100644 --- a/ic/src/private/nc/bs/ic/m4c/sign/rule/AfterSigningSynchronizeRuleMES.java +++ b/ic/src/private/nc/bs/ic/m4c/sign/rule/AfterSigningSynchronizeRuleMES.java @@ -14,6 +14,7 @@ import nc.vo.bd.material.MaterialVO; import nc.vo.bd.material.measdoc.MeasdocVO; import nc.vo.bd.psn.PsndocVO; import nc.vo.bd.rack.RackVO; +import nc.vo.bd.stordoc.StordocVO; import nc.vo.bd.supplier.SupplierVO; import nc.vo.ic.m45.entity.PurchaseInVO; import nc.vo.ic.m4c.entity.SaleOutBodyVO; @@ -24,6 +25,7 @@ import nc.vo.pub.BusinessException; import nc.vo.pub.lang.UFDate; import nc.vo.pubapp.pattern.exception.ExceptionUtils; import nc.vo.pubapp.pattern.pub.SqlBuilder; +import nc.vo.vorg.DeptVersionVO; import nccloud.pubift.commen.itf.utils.IHttpPostOtherSys; import net.sf.mpxj.primavera.schema.CurrencyType; @@ -38,9 +40,8 @@ import java.util.List; * 销售出库(签字后传MES金思维系统) */ public class AfterSigningSynchronizeRuleMES implements IRule { - private static final String SALE_OUT_URL = "/GTHINKING/AjaxService/N_MISPRO/SaleOrderOutbound.ashx/SaveData"; // 销售出库登记接口 - private static final String logginfo = "OALOG"; - private static final Log obmlog = Log.getInstance(logginfo); + private static final String SALE_OUT_URL = "/GTHINKING/AjaxService/N_KCSJJS/101527003.ashx/gt_rec_api_xsckdj"; // 销售出库登记接口 + private static final Log obmlog = Log.getInstance("OALOG"); private static final BaseDAO dao = new BaseDAO(); public AfterSigningSynchronizeRuleMES() { @@ -52,7 +53,7 @@ public class AfterSigningSynchronizeRuleMES implements IRule { // 初始化HTTP请求工具类 IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); if (saleOutVOS == null || saleOutVOS.length == 0) { - obmlog.debug("AfterSigningSynchronizeRule-没有需要处理的销售出库单"); + obmlog.debug("AfterSigningSynchronizeRule-没有需要处理的销售出库单."); return; } // 检查并筛选组织为电缆的销售出库单 @@ -96,14 +97,14 @@ public class AfterSigningSynchronizeRuleMES implements IRule { // 汇率 默认为1 dataObj.put("exRate", 1); // 部门ID - 部门(cdptvid) - dataObj.put("departmentId", transferCodeByPk(DeptVO.getDefaultTableName(), - DeptVO.CODE, DeptVO.PK_DEPT, hvo.getCdptvid())); // 采购部门ID + dataObj.put("departmentId", transferCodeByPk(DeptVersionVO.getDefaultTableName(), + DeptVersionVO.CODE, DeptVersionVO.PK_VID, hvo.getCdptvid())); // 采购部门ID // 仓库编码 - 仓库(cwarehouseid) - dataObj.put("storeId", transferCodeByPk(RackVO.getDefaultTableName(), - RackVO.CODE, RackVO.PK_RACK, hvo.getCwarehouseid())); // 仓库编码 + dataObj.put("storeId", transferCodeByPk(StordocVO.getDefaultTableName(), + StordocVO.CODE, StordocVO.PK_STORDOC, hvo.getCwarehouseid())); // 仓库编码 // 采购员 - 业务员(cbizpersonid) dataObj.put("purchaser", transferCodeByPk(PsndocVO.getDefaultTableName(), - PsndocVO.CODE, PsndocVO.PK_PSNDOC, hvo.getCbizid())); + PsndocVO.NAME, PsndocVO.PK_PSNDOC, hvo.getCbizid())); // 客户ID - 订单客户(ccustomerid),这里因为是采购所以用供应商映射 dataObj.put("supplyId", transferCodeByPk(CustomerVO.getDefaultTableName(), CustomerVO.CODE, CustomerVO.PK_CUSTOMER, hvo.getCcustomerid())); @@ -156,11 +157,11 @@ public class AfterSigningSynchronizeRuleMES implements IRule { detail.put("batchNum", bvo.getVbatchcode()); // 物料批号 - 必填 detail.put("scaleFactor", transferSpecialField(bvo.getVchangerate())); // 换算系数 - 必填 // 数量信息 - 必填 - detail.put("issuedQty", bvo.getNshouldassistnum()); // 应发数量 - 必填 - detail.put("mIssuedQty", bvo.getNshouldnum()); // 主应发数量 - 必填 - detail.put("actQry", bvo.getNassistnum()); // 实发数量 - 必填 - detail.put("mActQry", bvo.getNnum()); // 主实发数量 - 必填 - detail.put("assistActQry", bvo.getNassistnum()); // 辅助实发数量 - 必填 + detail.put("issuedQty", bvo.getNshouldassistnum() == null ? bvo.getNshouldassistnum().getDouble() : null); // 应发数量 - 必填 + detail.put("mIssuedQty", bvo.getNshouldnum() == null ? bvo.getNshouldnum().getDouble() : null); // 主应发数量 - 必填 + detail.put("actQry", bvo.getNassistnum() == null ? bvo.getNassistnum().getDouble() : null); // 实发数量 - 必填 + detail.put("mActQry", bvo.getNnum() == null ? bvo.getNnum().getDouble() : null); // 主实发数量 - 必填 + detail.put("assistActQry", bvo.getNassistnum() == null ? bvo.getNassistnum().getDouble() : null); // 辅助实发数量 - 必填 // 客户和供应商信息 detail.put("customId", transferCodeByPk(CustomerVO.getDefaultTableName(), CustomerVO.CODE, CustomerVO.PK_CUSTOMER, bvo.getCasscustid())); // 客户ID diff --git a/ic/src/private/nc/bs/ic/m4r/approve/rule/AfterApprovingSynchronizeRuleMES.java b/ic/src/private/nc/bs/ic/m4r/approve/rule/AfterApprovingSynchronizeRuleMES.java index 3466463..e563db5 100644 --- a/ic/src/private/nc/bs/ic/m4r/approve/rule/AfterApprovingSynchronizeRuleMES.java +++ b/ic/src/private/nc/bs/ic/m4r/approve/rule/AfterApprovingSynchronizeRuleMES.java @@ -13,11 +13,9 @@ import nc.vo.bd.material.MaterialVO; import nc.vo.bd.rack.RackVO; import nc.vo.bd.stordoc.StordocVO; import nc.vo.bd.supplier.SupplierVO; -import nc.vo.ic.m4c.entity.SaleOutVO; import nc.vo.ic.m4r.entity.InvCountBillVO; import nc.vo.ic.m4r.entity.InvCountBodyVO; import nc.vo.ic.m4r.entity.InvCountHeaderVO; -import nc.vo.org.DeptVO; import nc.vo.pub.BusinessException; import nc.vo.pub.lang.UFDate; import nc.vo.pub.lang.UFDouble; diff --git a/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java b/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java index 826d720..691f617 100644 --- a/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java +++ b/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java @@ -200,8 +200,8 @@ public class AfterApprovingSynchronizeRuleMES implements IRule { JSONArray properties = new JSONArray(); JSONObject property = new JSONObject(); // 行号 - property.put("propertyFiled", head.getVbillcode()); - property.put("propertyValue", body.getCrowno()); + property.put("propertyFiled", "SXZF15"); + property.put("propertyValue", body.getCsaleorderbid()); properties.add(property); detailItem.put("properties", properties); details.add(detailItem);