From e689db4edbedee42e38f6fd4d425483481115c29 Mon Sep 17 00:00:00 2001 From: "castle.zang" Date: Tue, 29 Oct 2024 14:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84sps=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesPullingOrderInfoService.java | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java index 1bd4511..6c26cc1 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java @@ -344,7 +344,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { MesSpsInfo mesSpsInfo = new MesSpsInfo(); mesSpsInfo.setId(pullingOrder.getId()); mesSpsInfo.setSeq(pullingOrder.getProductSeq()); - mesSpsInfo.setOrderCode(pullingOrder.getWorkOrderNo()); + mesSpsInfo.setOrderCode(pullingOrder.getPullingOrderNo()); mesSpsInfo.setCustOrderCode(pullingOrder.getCustOrderNo()); List partList = pullingOrder.getPartList(); @@ -358,18 +358,24 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { if (part.getLocation().indexOf(",") > 0){ String[] locations = part.getLocation().split(","); detailInfo.setSection(locations[0]); - detailInfo.setAddress(locations[1]); - }else { - detailInfo.setAddress(part.getLocation()); } + detailInfo.setAddress(part.getLocation()); detailInfoList.add(detailInfo); } } mesSpsInfo.setPartList(detailInfoList); result.put("info", mesSpsInfo); } - - return JSON.toJSONString(result); + String jsonString = JSON.toJSONString(result); + return jsonString.replaceAll("id", "Id") + .replaceAll("orderCode", "OrderCode") + .replaceAll("custOrderCode", "CustOrderCode") + .replaceAll("seq", "Seq") + .replaceAll("partNo", "PartNo") + .replaceAll("partName", "PartName") + .replaceAll("section", "Section") + .replaceAll("address", "Address") + .replaceAll("qty", "Qty").replaceAll("partList","PartList"); } @Override @@ -417,7 +423,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { MesSpsInfo mesSpsInfo = new MesSpsInfo(); mesSpsInfo.setId(pullingOrder.getId()); mesSpsInfo.setSeq(pullingOrder.getProductSeq()); - mesSpsInfo.setOrderCode(pullingOrder.getWorkOrderNo()); + mesSpsInfo.setOrderCode(pullingOrder.getPullingOrderNo()); mesSpsInfo.setCustOrderCode(pullingOrder.getCustOrderNo()); List partList = pullingOrder.getPartList(); @@ -431,17 +437,24 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { if (part.getLocation().indexOf(",") > 0){ String[] locations = part.getLocation().split(","); detailInfo.setSection(locations[0]); - detailInfo.setAddress(locations[1]); - }else { - detailInfo.setAddress(part.getLocation()); } + detailInfo.setAddress(part.getLocation()); detailInfoList.add(detailInfo); } } mesSpsInfo.setPartList(detailInfoList); result.put("info", mesSpsInfo); } - return JSON.toJSONString(result); + String jsonString = JSON.toJSONString(result); + return jsonString.replaceAll("id", "Id") + .replaceAll("orderCode", "OrderCode") + .replaceAll("custOrderCode", "CustOrderCode") + .replaceAll("seq", "Seq") + .replaceAll("partNo", "PartNo") + .replaceAll("partName", "PartName") + .replaceAll("section", "Section") + .replaceAll("address", "Address") + .replaceAll("qty", "Qty").replaceAll("partList","PartList"); } // @Override @@ -514,7 +527,8 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { seriesPackBean.setWhereAppend(seriesPackBean.getWhereAppend() + " order by modifyDatetime desc"); MesPullingOrderInfo mesPullingOrder = mesPullingOrderInfoRepository.getByProperty(seriesPackBean); - if (StringUtil.isEmpty(mesPullingOrder)) { + log.info("castle-1-查询条件为:workCenterCode:{},pullOrderType:{},pullOrderStatus:{}查询出来的数据为:{}",assemblyLine,MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(),MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue(),JSON.toJSONString(mesPullingOrder)); + if (StringUtil.isEmpty(mesPullingOrder)) { return null; } //更新主表状态 源系统为25配料完成 现在-【已发送设备-30】 @@ -529,6 +543,8 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { if (!org.apache.shiro.util.CollectionUtils.isEmpty(pullingOrderPartInfos)) { mesPullingOrder.setPartList(pullingOrderPartInfos); } + log.info("castle-2-查询出来的数据为:{}",JSON.toJSONString(mesPullingOrder)); + return mesPullingOrder; } }