箱变-销售订单同步启源调整
This commit is contained in:
parent
da721a46e9
commit
7afcfaef06
|
@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONArray;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import nc.bs.dao.BaseDAO;
|
||||
import nc.bs.framework.common.NCLocator;
|
||||
import nc.bs.logging.Log;
|
||||
import nc.bs.trade.business.HYPubBO;
|
||||
import nc.bs.uapbd.util.MyHelper;
|
||||
|
@ -16,23 +15,16 @@ import nc.jdbc.framework.processor.MapProcessor;
|
|||
import nc.vo.org.OrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||
import nc.vo.so.m30.entity.SaleOrderBVO;
|
||||
import nc.vo.so.m30.entity.SaleOrderHVO;
|
||||
import nc.vo.so.m30.entity.SaleOrderVO;
|
||||
import nc.vo.vorg.DeptVersionVO;
|
||||
import nccloud.baseapp.core.log.NCCForUAPLogger;
|
||||
import nccloud.pubift.commen.itf.utils.IHttpPostOtherSys;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 销售订单推送mes
|
||||
* 销售订单推送启源mes
|
||||
*/
|
||||
public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
||||
private static final String LOG_INFO_NAME = "qyMesLog";
|
||||
|
@ -48,7 +40,6 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
public void process(SaleOrderVO[] saleOrderVOs) {
|
||||
try {
|
||||
if (saleOrderVOs == null || saleOrderVOs.length == 0) {
|
||||
|
||||
return;
|
||||
}
|
||||
configParams = MyHelper.getConfigParams("xb-config", null);
|
||||
|
@ -60,6 +51,7 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
ExceptionUtils.wrappException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ¹¹½¨Í¬²½Êý¾Ý
|
||||
*/
|
||||
|
@ -68,7 +60,7 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
Date now = new Date();
|
||||
HYPubBO hybo = new HYPubBO();
|
||||
for (SaleOrderVO vo : useVOs) {
|
||||
// 判断物料的业务单元是否是箱变公司,不是则跳过
|
||||
// 判断业务单元是否是箱变公司,不是则跳过
|
||||
String pkOrg = vo.getParentVO().getPk_org();
|
||||
String orgCode = MyHelper.transferField(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg);
|
||||
if (checkIfOrg(orgCode, configParams)) {
|
||||
|
@ -188,19 +180,6 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
}
|
||||
}
|
||||
|
||||
private Map getGoodsInfo(String pkMaterial) throws BusinessException {
|
||||
String sql = " select a.pk_measdoc, c.name unitname, b.pk_measdoc deputyUnit, d.name deputy_unitname, nvl(b.measrate, '1/1') measrate " +
|
||||
"from bd_material a " +
|
||||
"left join bd_materialconvert b on a.pk_material = b.pk_material " +
|
||||
"left join bd_measdoc c on a.pk_measdoc = c.pk_measdoc " +
|
||||
"left join bd_measdoc d on b.pk_measdoc = d.pk_measdoc " +
|
||||
"where a.pk_material = '" + pkMaterial + "' ";
|
||||
// logDl.error("QMS-Material-getUnitInfo-sql = " + sql);
|
||||
Map map = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
||||
map.put("convertRate", MyHelper.transferSpecialField(map.get("measrate") + ""));
|
||||
return map;
|
||||
}
|
||||
|
||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||
String targetCode = configParams.get("xbOrg");
|
||||
if (targetCode == null || nc.vo.am.common.util.StringUtils.isEmpty(targetCode)) {
|
||||
|
@ -216,6 +195,5 @@ public class AfterApprovingSynchronizeRuleQMS implements IRule<SaleOrderVO> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue