From ab3151da6fae8c4b525535e091e5ba8269532cae Mon Sep 17 00:00:00 2001 From: "castle.zang" Date: Mon, 18 Nov 2024 14:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E8=B0=83=E6=95=B4=E5=8F=8A?= =?UTF-8?q?=E7=9B=AE=E8=A7=86=E5=8D=95=E6=89=93=E5=8D=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ext/mes/apiservice/serviceimpl/base/MesWorkOrderService.java | 2 +- .../apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java | 8 ++++---- .../print/strategy/AssemblyVisualListPrintStrategy.java | 5 ++++- .../java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java | 4 ++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesWorkOrderService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesWorkOrderService.java index b417cce..3f9db0c 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesWorkOrderService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesWorkOrderService.java @@ -1799,7 +1799,7 @@ public class MesWorkOrderService extends BaseMesService implements bean.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue()); bean.setUnCompleteQty(bean.getQty()); bean.setFid(UUID.randomUUID().toString()); - + bean.setPullingStatus(MesExtEnumUtil.WORK_ORDER_PULLING_STATUS.NOTCREATE.getValue()); baseRDao.insert(bean); workOrderLogService.saveMesWorkOrderLog(bean,MesExtEnumUtil.WORK_ORDER_LOG_TYPE.INSERT,bean.getQty()); } diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java index 1978b49..7717cb1 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java @@ -440,9 +440,9 @@ public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService { //成品实际缓冲 Long realProductionBuffer; if (workOrderLast.getCustOrderNo().length() >= 10){ - realProductionBuffer = Long.parseLong(workOrderLast.getCustOrderNo().substring(workOrderLast.getCustOrderNo().length() - 7)) - Long.parseLong(infoKH.getCsnNo().substring(3, 10)) ; + realProductionBuffer = Long.parseLong(workOrderLast.getCustOrderNo().substring(workOrderLast.getCustOrderNo().length() - 7)) - Long.parseLong(infoKH.getCsnNo().substring(3, 10)) - kanBan.getOnlineAdjustNum() ; }else { - realProductionBuffer = Long.parseLong(workOrderLast.getCustOrderNo().substring(workOrderLast.getCustOrderNo().length() - 5)) - Long.parseLong(infoKH.getCsnNo().substring(infoKH.getCsnNo().length()-5)) ; + realProductionBuffer = Long.parseLong(workOrderLast.getCustOrderNo().substring(workOrderLast.getCustOrderNo().length() - 5)) - Long.parseLong(infoKH.getCsnNo().substring(infoKH.getCsnNo().length()-5)) - kanBan.getOnlineAdjustNum() ; } if(realProductionBuffer <0){ @@ -450,9 +450,9 @@ public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService { } mesKanBanShowModel.setRealProductionBuffer(realProductionBuffer); Long productionYellowBuffer = kanBan.getProductionYellowBuffer(); - if (realProductionBuffer < productionYellowBuffer){ + if (realProductionBuffer < productionRedBuffer){ mesKanBanShowModel.setRealProductionBufferColor("RED"); - }else if (realProductionBuffer < productionRedBuffer){ + }else if (realProductionBuffer < productionYellowBuffer){ mesKanBanShowModel.setRealProductionBufferColor("YELLOW"); } //声音信息 diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/print/strategy/AssemblyVisualListPrintStrategy.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/print/strategy/AssemblyVisualListPrintStrategy.java index 5ddaa24..2fba1a8 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/print/strategy/AssemblyVisualListPrintStrategy.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/print/strategy/AssemblyVisualListPrintStrategy.java @@ -69,10 +69,13 @@ public class AssemblyVisualListPrintStrategy implements IPrintTemplateStrategySe // 重打印 resultMap.put(MesExtConstWords.REPRINT, "重打印"); // 打印时间 - resultMap.put(MesExtConstWords.PRINT_TIME, TimeTool.getNowTime("yyyyMMdd HH:mm:ss")); + resultMap.put(MesExtConstWords.PRINT_TIME, TimeTool.getNowTime("yyyy-MM-dd HH:mm:ss")); // EDI接口时间 取工单plan_start_time resultMap.put(MesExtConstWords.EDI_REC_TIME, workOrder.getPlanStartTime()); + //替换总成SN + resultMap.put(MesExtConstWords.REPLACE_CSN,MesExtConstWords.CP+workOrder.getCustPartNo().substring(workOrder.getCustPartNo().length() -4)); + // 总个数 Integer totalCount = partProdGroup.getTotalCount(); // 为空时显示内容 diff --git a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java index a741970..a8431f6 100644 --- a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java +++ b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtConstWords.java @@ -333,6 +333,10 @@ public class MesExtConstWords { public static final String PART_PROD_GROUP_CODE = "partProdGroupCode"; + //客户零件号后4位置 + public static final String REPLACE_CSN = "replaceCsn"; + + public static final String CP = "CP"; /** * 系统参数 */