电力电子-艾普MES-BOM推送调整
This commit is contained in:
parent
867cdfdcf0
commit
b9a8c6b873
|
|
@ -48,10 +48,7 @@ public class BomSaveAfterEpicMesRule implements IRule<AggBomVO> {
|
|||
if (!MMValueCheck.isEmpty(vos)) {
|
||||
try {
|
||||
configParams = MyHelper.getConfigParams("Dldz-config", null);
|
||||
JSONArray data = buildSyncData(vos);
|
||||
if (!data.isEmpty()) {
|
||||
pushData(data, vos);
|
||||
}
|
||||
buildSyncData(vos);
|
||||
} catch (BusinessException e) {
|
||||
String message = e.getMessage();
|
||||
logDl.error("EpicMes-BOM-exp:" + message, e);
|
||||
|
|
@ -70,8 +67,7 @@ public class BomSaveAfterEpicMesRule implements IRule<AggBomVO> {
|
|||
/**
|
||||
* 构建同步数据
|
||||
*/
|
||||
private JSONArray buildSyncData(AggBomVO[] useVOs) throws BusinessException {
|
||||
JSONArray data = new JSONArray();
|
||||
private void buildSyncData(AggBomVO[] useVOs) throws BusinessException {
|
||||
for (AggBomVO vo : useVOs) {
|
||||
// 判断物料的业务单元是否是电力电子公司,不是则跳过
|
||||
BomVO hvo = (BomVO) vo.getParentVO();
|
||||
|
|
@ -99,6 +95,7 @@ public class BomSaveAfterEpicMesRule implements IRule<AggBomVO> {
|
|||
|
||||
String mitm = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.CODE,
|
||||
MaterialVO.PK_MATERIAL + " = '" + hcmaterialid + "'");
|
||||
JSONArray data = new JSONArray();
|
||||
for (BomItemVO childrenVO : childrenVOs) {
|
||||
String cmaterialid = childrenVO.getCmaterialid();
|
||||
String sitm = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.CODE,
|
||||
|
|
@ -113,6 +110,7 @@ public class BomSaveAfterEpicMesRule implements IRule<AggBomVO> {
|
|||
singleObj.put("remark", childrenVO.getVnote()); // 备注
|
||||
data.add(singleObj);
|
||||
}
|
||||
pushData(data, new AggBomVO[]{vo});
|
||||
/**
|
||||
* [
|
||||
* {
|
||||
|
|
@ -127,7 +125,6 @@ public class BomSaveAfterEpicMesRule implements IRule<AggBomVO> {
|
|||
*/
|
||||
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -61,10 +61,7 @@ public class BomToEpicMesPlugin implements IBackgroundWorkPlugin {
|
|||
for (Map<String, String> map : pkList) {
|
||||
String cbomid = map.get("cbomid");
|
||||
AggBomVO[] vos = qry.queryAggBomByBomID(new String[]{cbomid});
|
||||
JSONArray data = buildSyncData(vos);
|
||||
if (!data.isEmpty()) {
|
||||
pushData(data, vos);
|
||||
}
|
||||
buildSyncData(vos);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
@ -76,8 +73,7 @@ public class BomToEpicMesPlugin implements IBackgroundWorkPlugin {
|
|||
/**
|
||||
* 构建同步数据
|
||||
*/
|
||||
private JSONArray buildSyncData(AggBomVO[] useVOs) throws BusinessException {
|
||||
JSONArray data = new JSONArray();
|
||||
private void buildSyncData(AggBomVO[] useVOs) throws BusinessException {
|
||||
for (AggBomVO vo : useVOs) {
|
||||
// 判断物料的业务单元是否是电力电子公司,不是则跳过
|
||||
BomVO hvo = (BomVO) vo.getParentVO();
|
||||
|
|
@ -105,6 +101,7 @@ public class BomToEpicMesPlugin implements IBackgroundWorkPlugin {
|
|||
|
||||
String mitm = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.CODE,
|
||||
MaterialVO.PK_MATERIAL + " = '" + hcmaterialid + "'");
|
||||
JSONArray data = new JSONArray();
|
||||
for (BomItemVO childrenVO : childrenVOs) {
|
||||
String cmaterialid = childrenVO.getCmaterialid();
|
||||
String sitm = MyHelper.getStrValByCondition(MaterialVO.getDefaultTableName(), MaterialVO.CODE,
|
||||
|
|
@ -119,6 +116,7 @@ public class BomToEpicMesPlugin implements IBackgroundWorkPlugin {
|
|||
singleObj.put("remark", childrenVO.getVnote()); // 备注
|
||||
data.add(singleObj);
|
||||
}
|
||||
pushData(data, new AggBomVO[]{vo});
|
||||
/**
|
||||
* [
|
||||
* {
|
||||
|
|
@ -133,7 +131,6 @@ public class BomToEpicMesPlugin implements IBackgroundWorkPlugin {
|
|||
*/
|
||||
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue