fix(mmpac): 流程生产订单推送PLM-bug处理等

This commit is contained in:
mzr 2025-09-10 18:25:49 +08:00
parent 1b74bb7498
commit b1a623162e
2 changed files with 7 additions and 10 deletions

View File

@ -101,14 +101,13 @@ public class PmoToPlmAction implements ICommonAction {
List<Map<String, Object>> resultList = new ArrayList<>();
for (PMOAggVO vo : array) {
// 每个 PMOAggVO 对应一个 Map 对象
Map<String, Object> request = new HashMap<>();
// 获取父 VO假设大部分字段在 ParentVO
PMOHeadVO parentVO = vo.getParentVO();
// 获取子 VO假设部分自定义字段在 ChildVO 或表体 VO
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO getBodyVO()
for (PMOItemVO itemVO : childVO) {
// 每个 PMOAggVO 对应一个 Map 对象
Map<String, Object> request = new HashMap<>();
// 1. 产品品号 (cmaterialvid -> 物料编码)
if (itemVO != null) {
// NO 产品品号 cmaterialvid 物料编码
@ -171,10 +170,10 @@ public class PmoToPlmAction implements ICommonAction {
Gson gson = new Gson();
Map result = gson.fromJson(responseString, Map.class);
if (!"true".equals(result.get("success").toString())) {
throw new BusinessException(result.get("msg").toString());
throw new BusinessException(result.get("msg") + "");
} else {
// 调整PLM传输状态
String updateSql = "update mm_pmo set def13 = 'Y' where cpmohid = '[cpmohid]'";
String updateSql = "update mm_mo set vdef13 = '是' where cpmohid = '[cpmohid]'";
updateSql = updateSql.replace("[cpmohid]", parentVO.getPrimaryKey());
getDao().executeUpdate(updateSql);
resultList.add(result);

View File

@ -93,16 +93,14 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
if (array == null || array.size() == 0) {
return;
}
for (PMOAggVO vo : array) {
// 每个 PMOAggVO 对应一个 Map 对象
Map<String, Object> request = new HashMap<>();
// 获取父 VO假设大部分字段在 ParentVO
PMOHeadVO parentVO = vo.getParentVO();
// 获取子 VO假设部分自定义字段在 ChildVO 或表体 VO
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO getBodyVO()
for (PMOItemVO itemVO : childVO) {
// 每个 PMOAggVO 对应一个 Map 对象
Map<String, Object> request = new HashMap<>();
// 1. 产品品号 (cmaterialvid -> 物料编码)
if (itemVO != null) {
// NO 产品品号 cmaterialvid 物料编码
@ -167,7 +165,7 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
throw new BusinessException(result.get("msg").toString());
} else {
// 调整PLM传输状态
String updateSql = "update mm_pmo set def13 = 'Y' where cpmohid = '[cpmohid]'";
String updateSql = "update mm_mo set vdef13 = '是' where cpmohid = '[cpmohid]'";
updateSql = updateSql.replace("[cpmohid]", parentVO.getPrimaryKey());
getDao().executeUpdate(updateSql);
}