物料推艾普MES-物料类型赋值调整
This commit is contained in:
parent
d12c8a47a7
commit
18d2fd8bbf
|
@ -13,10 +13,12 @@ import nc.bs.logging.Log;
|
|||
import nc.bs.trade.business.HYPubBO;
|
||||
import nc.bs.uapbd.util.MyHelper;
|
||||
import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||
import nc.jdbc.framework.processor.MapProcessor;
|
||||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.bd.material.marbasclass.MarBasClassVO;
|
||||
import nc.vo.bd.material.stock.MaterialStockVO;
|
||||
import nc.vo.fi.pub.SqlUtils;
|
||||
import nc.vo.org.OrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
|
||||
|
@ -183,11 +185,22 @@ public class MaterialToEpicMesListener implements IBusinessListener {
|
|||
}
|
||||
|
||||
private String getGoodsType(String pkMaterial) throws BusinessException {
|
||||
String targetCode = configParams.get("dldzOrg");
|
||||
String[] orgItem = targetCode.split(",");
|
||||
String inStr = SqlUtils.getInStr("b.code", orgItem, Boolean.TRUE);
|
||||
// 物料-库存信息-物料类型 DR=分销补货;FR=工厂补货;MR=制造件;PR=采购件;OT=委外件;ET=其他
|
||||
// mesÎïÁÏÀàÐÍ ÖÆÔì1 ÆäËü0
|
||||
// mes物料类型 制造1 其它0(ERP多个组织中如果有一个是制造件就传1)
|
||||
String mesType = "0";
|
||||
String martype = MyHelper.transferField(MaterialStockVO.getDefaultTableName(), MaterialStockVO.MARTYPE, MaterialStockVO.PK_MATERIAL, pkMaterial);
|
||||
if ("MR".equals(martype)) {
|
||||
// String martype = MyHelper.transferField(MaterialStockVO.getDefaultTableName(), MaterialStockVO.MARTYPE, MaterialStockVO.PK_MATERIAL, pkMaterial);
|
||||
String countSql = "SELECT count(1)" +
|
||||
" FROM bd_materialstock a" +
|
||||
" LEFT JOIN org_stockorg b ON a.pk_org = b.pk_stockorg" +
|
||||
" WHERE a.dr = 0 AND a.martype = 'MR' " +
|
||||
" AND a.pk_material = '[pkMaterial]'" +
|
||||
" AND " + inStr;
|
||||
countSql = countSql.replace("[pkMaterial]", pkMaterial);
|
||||
Integer num = (Integer) new BaseDAO().executeQuery(countSql, new ColumnProcessor());
|
||||
if (num > 0) {
|
||||
mesType = "1";
|
||||
}
|
||||
return mesType;
|
||||
|
|
Loading…
Reference in New Issue