Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
f01ae8b502
|
@ -5,15 +5,11 @@ 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;
|
||||
import nc.bs.uapbd.util.ThirdPartyPostRequestUtil;
|
||||
import nc.jdbc.framework.processor.MapListProcessor;
|
||||
import nc.jdbc.framework.processor.MapProcessor;
|
||||
import nc.pub.billcode.itf.IBillcodeManage;
|
||||
import nc.vo.bc.pmpub.project.ProjectHeadVO;
|
||||
import nc.vo.bd.bom.bom0202.entity.BomVO;
|
||||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
|
||||
|
@ -26,7 +22,6 @@ import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
|||
import nccloud.commons.lang.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -188,7 +183,7 @@ public class SyncEpicMesUtil {
|
|||
JSONObject orderParam = new JSONObject();
|
||||
orderParam.put("id", null); // 唯一标识(主键)
|
||||
orderParam.put("siteCode", deptParams.getOrDefault(deptCode, ""));// 工厂编码
|
||||
orderParam.put("contractNo", pmoItem.getVsalebillcode());// ºÏͬºÅ-È¡ERPµÄÏúÊÛ¶©µ¥ºÅ
|
||||
orderParam.put("contractNo", pmoItem.getVfirstcode());// 合同号-取ERP的源头单据号-销售订单号
|
||||
/*if (projectMap != null) {
|
||||
orderParam.put("contractNo", projectMap.get(ProjectHeadVO.PROJECT_CODE));// 合同号
|
||||
orderParam.put("contractName", projectMap.get(ProjectHeadVO.PROJECT_NAME)); // 合同名称
|
||||
|
@ -322,14 +317,15 @@ public class SyncEpicMesUtil {
|
|||
obj.put("companyName", tr.get("name"));
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (PMOItemVO item : vo.getChildrenVO()) {
|
||||
HYPubBO hybo = new HYPubBO();
|
||||
// HYPubBO hybo = new HYPubBO();
|
||||
// List<String> materialtype = (List<String>) hybo.findColValue("mm_pmo_serialno", "vsncode", "cmoid = '" + item.getCmoid() + "' and dr = 0 ");
|
||||
// IBillcodeManage billcodeManage = NCLocator.getInstance().lookup(IBillcodeManage.class);;
|
||||
// IBillcodeManage billcodeManage = NCLocator.getInstance().lookup(IBillcodeManage.class);
|
||||
// String code = billcodeManage.getPreBillCode_RequiresNew("xxxxx-code-rule", hvo.getPk_group(), hvo.getPk_org());
|
||||
String vsncode = " select vsncode from mm_pmo_serialno where cmoid in ( '" + item.getCmoid() + "' ) and mm_pmo_serialno.dr = 0\t ";
|
||||
String vsncode = " select vsncode from mm_pmo_serialno where cmoid in ( '" + item.getCmoid() + "' ) and mm_pmo_serialno.dr = 0 ";
|
||||
// Map<String, Object> vsncodeList = (Map<String, Object>) dao.executeQuery(vsncode, new MapProcessor());
|
||||
ArrayList<Map<String, Object>> vsncodeList = (ArrayList<Map<String, Object>>) dao.executeQuery(vsncode, new MapListProcessor());
|
||||
if (vsncodeList.isEmpty()) {
|
||||
jsonArray.add("");
|
||||
continue;
|
||||
}
|
||||
for (Map<String, Object> v : vsncodeList) {
|
||||
|
@ -338,7 +334,7 @@ public class SyncEpicMesUtil {
|
|||
// String detailItem = (null != materialtype ? materialtype : "") + hvo.getDbilldate().toStdString().substring(0, 3) + hvo.getDbilldate().toStdString().substring(5, 6) + code;
|
||||
// jsonArray.add(detailItem);
|
||||
}
|
||||
obj.put("releaseNo", jsonArray);
|
||||
obj.put("releaseNo", jsonArray.toString());
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -115,8 +115,8 @@ public class MaterialToEpicMesListener implements IBusinessListener {
|
|||
singleObj.put("deputyUnit", unitMap.get("deputy_unitname"));// 副单位
|
||||
singleObj.put("auditCode", "1");// 审核码
|
||||
singleObj.put("statusCode", statusCode);// 状态码(Y表示启用,N表示停用)
|
||||
singleObj.put("mrlTypeErp", getGoodsProject(pkMaterial));// 物料类型ERP(1:专用件,3:通用件)
|
||||
singleObj.put("mrlType", mrlTypeCOde);// 物料分类编码
|
||||
// singleObj.put("mrlTypeErp", getGoodsProject(pkMaterial));// 物料类型ERP(1:专用件,3:通用件)
|
||||
singleObj.put("mrlType", getGoodsType(pkMaterial));// 物料分类 制造1 其它0
|
||||
singleObj.put("convertRate", unitMap.getOrDefault("convertRate", "1"));// 单位换算率
|
||||
// singleObj.put("isCheck", "1");// 是否选中(1:是,0:否)
|
||||
pushData(singleObj);
|
||||
|
@ -182,4 +182,15 @@ public class MaterialToEpicMesListener implements IBusinessListener {
|
|||
return mrlTypeErp;
|
||||
}
|
||||
|
||||
private String getGoodsType(String pkMaterial) throws BusinessException {
|
||||
// 物料-库存信息-物料类型 DR=分销补货;FR=工厂补货;MR=制造件;PR=采购件;OT=委外件;ET=其他
|
||||
// mes物料类型 制造1 其它0
|
||||
String mesType = "0";
|
||||
String martype = MyHelper.transferField(MaterialStockVO.getDefaultTableName(), MaterialStockVO.MARTYPE, MaterialStockVO.PK_MATERIAL, pkMaterial);
|
||||
if ("MR".equals(martype)) {
|
||||
mesType = "1";
|
||||
}
|
||||
return mesType;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue