Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
51d55b9d18
|
@ -101,14 +101,13 @@ public class PmoToPlmAction implements ICommonAction {
|
||||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
|
||||||
for (PMOAggVO vo : array) {
|
for (PMOAggVO vo : array) {
|
||||||
// 每个 PMOAggVO 对应一个 Map 对象
|
|
||||||
Map<String, Object> request = new HashMap<>();
|
|
||||||
|
|
||||||
// 获取父 VO(假设大部分字段在 ParentVO 中)
|
// 获取父 VO(假设大部分字段在 ParentVO 中)
|
||||||
PMOHeadVO parentVO = vo.getParentVO();
|
PMOHeadVO parentVO = vo.getParentVO();
|
||||||
// 获取子 VO(假设部分自定义字段在 ChildVO 或表体 VO 中)
|
// 获取子 VO(假设部分自定义字段在 ChildVO 或表体 VO 中)
|
||||||
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO 如 getBodyVO()
|
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO 如 getBodyVO()
|
||||||
for (PMOItemVO itemVO : childVO) {
|
for (PMOItemVO itemVO : childVO) {
|
||||||
|
// 每个 PMOAggVO 对应一个 Map 对象
|
||||||
|
Map<String, Object> request = new HashMap<>();
|
||||||
// 1. 产品品号 (cmaterialvid -> 物料编码)
|
// 1. 产品品号 (cmaterialvid -> 物料编码)
|
||||||
if (itemVO != null) {
|
if (itemVO != null) {
|
||||||
// NO 产品品号 cmaterialvid 物料编码
|
// NO 产品品号 cmaterialvid 物料编码
|
||||||
|
@ -171,10 +170,10 @@ public class PmoToPlmAction implements ICommonAction {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
Map result = gson.fromJson(responseString, Map.class);
|
Map result = gson.fromJson(responseString, Map.class);
|
||||||
if (!"true".equals(result.get("success").toString())) {
|
if (!"true".equals(result.get("success").toString())) {
|
||||||
throw new BusinessException(result.get("msg").toString());
|
throw new BusinessException(result.get("msg") + "");
|
||||||
} else {
|
} else {
|
||||||
// 调整PLM传输状态
|
// 调整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());
|
updateSql = updateSql.replace("[cpmohid]", parentVO.getPrimaryKey());
|
||||||
getDao().executeUpdate(updateSql);
|
getDao().executeUpdate(updateSql);
|
||||||
resultList.add(result);
|
resultList.add(result);
|
||||||
|
|
|
@ -93,16 +93,14 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
|
||||||
if (array == null || array.size() == 0) {
|
if (array == null || array.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PMOAggVO vo : array) {
|
for (PMOAggVO vo : array) {
|
||||||
// 每个 PMOAggVO 对应一个 Map 对象
|
|
||||||
Map<String, Object> request = new HashMap<>();
|
|
||||||
|
|
||||||
// 获取父 VO(假设大部分字段在 ParentVO 中)
|
// 获取父 VO(假设大部分字段在 ParentVO 中)
|
||||||
PMOHeadVO parentVO = vo.getParentVO();
|
PMOHeadVO parentVO = vo.getParentVO();
|
||||||
// 获取子 VO(假设部分自定义字段在 ChildVO 或表体 VO 中)
|
// 获取子 VO(假设部分自定义字段在 ChildVO 或表体 VO 中)
|
||||||
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO 如 getBodyVO()
|
PMOItemVO[] childVO = vo.getChildrenVO(); // 或其他子 VO 如 getBodyVO()
|
||||||
for (PMOItemVO itemVO : childVO) {
|
for (PMOItemVO itemVO : childVO) {
|
||||||
|
// 每个 PMOAggVO 对应一个 Map 对象
|
||||||
|
Map<String, Object> request = new HashMap<>();
|
||||||
// 1. 产品品号 (cmaterialvid -> 物料编码)
|
// 1. 产品品号 (cmaterialvid -> 物料编码)
|
||||||
if (itemVO != null) {
|
if (itemVO != null) {
|
||||||
// NO 产品品号 cmaterialvid 物料编码
|
// NO 产品品号 cmaterialvid 物料编码
|
||||||
|
@ -167,7 +165,7 @@ public class AfterApproveSyncPLMRule implements IRule<PMOAggVO> {
|
||||||
throw new BusinessException(result.get("msg").toString());
|
throw new BusinessException(result.get("msg").toString());
|
||||||
} else {
|
} else {
|
||||||
// 调整PLM传输状态
|
// 调整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());
|
updateSql = updateSql.replace("[cpmohid]", parentVO.getPrimaryKey());
|
||||||
getDao().executeUpdate(updateSql);
|
getDao().executeUpdate(updateSql);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue