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