parent
ab3ed04215
commit
0add4db475
|
@ -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) {
|
||||||
try {
|
|
||||||
// 初始化HTTP请求工具类
|
// 初始化HTTP请求工具类
|
||||||
IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class);
|
IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class);
|
||||||
|
try {
|
||||||
|
// 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) {
|
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);
|
||||||
|
|
Loading…
Reference in New Issue