From 03029876b6f0f7cf60ff591a35a066e16343c6ea Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 31 Dec 2024 13:23:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?44653=20=E7=94=B5=E5=AD=90=E5=8C=96?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E8=BE=93=E5=85=A5=E6=95=B0=E9=87=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E6=95=B0=E7=82=B9=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/controller/busi/MesInputDefectRecordController.java | 3 ++- .../mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java | 4 ++-- .../pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java | 4 ++-- .../mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java | 2 +- .../serviceimpl/step/MesProductResultErrorHandleStepService.java | 4 ++-- .../i3plus/ext/mes/pcn/pojo/model/MesReworkTaskRequestModel.java | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesInputDefectRecordController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesInputDefectRecordController.java index 8e83dd8..2d41c6f 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesInputDefectRecordController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesInputDefectRecordController.java @@ -5,6 +5,7 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService; import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel; +import cn.estsh.i3plus.platform.common.tool.MathOperation; import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn; import cn.estsh.impp.framework.boot.auth.AuthUtil; import cn.estsh.impp.framework.boot.exception.ImppBusiException; @@ -73,7 +74,7 @@ public class MesInputDefectRecordController { try { if (StringUtils.isEmpty(model.getSn()) && - (StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLotNo()) || StringUtils.isEmpty(model.getQty()) || model.getQty() == 0)) { + (StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLotNo()) || StringUtils.isEmpty(model.getQty()) || MathOperation.compareTo(model.getQty(), new Double(0)) == 0)) { throw new ImppBusiException("条码为空或零件号+批次+数量为空"); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java index c4b9f2d..c919c4e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java @@ -1038,7 +1038,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { mesQmsScrap.setOrganizeCode(organizeCode); mesQmsScrap.setAsnNo(""); mesQmsScrap.setSource("MES"); - mesQmsScrap.setRejectQty(assemblyModel.getScrapQty().intValue()); + mesQmsScrap.setRejectQty(assemblyModel.getScrapQty()); mesQmsScrap.setPartNo(assemblyModel.getAssemblyPartNo()); mesQmsScrap.setPartName(assemblyModel.getAssemblyPartName()); mesQmsScrap.setDefectTypeName("拆解报废"); @@ -1094,7 +1094,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { move.setLgort(srcLocate); move.setUmlgo(destLocate); move.setPartInspectionId(partInspectionId); - move.setMenge(Double.valueOf(requestModel.getReworkedQty()+"")); + move.setMenge(requestModel.getReworkedQty()); move.setMeins(mesPartSap.getUnit()); move.setPostDate(TimeTool.getToday()); move.setPostTime(TimeTool.getTimeShortWithColon()); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java index af27561..01a7018 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java @@ -675,7 +675,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService DdlPreparedPack.getNumEqualPack(inputModel.getId(), "id", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getPartNo(), "partNo", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getLotNo(), "lotNo", packBean); - DdlPreparedPack.getNumEqualPack(inputModel.getQty().intValue(), "qty", packBean); + DdlPreparedPack.getNumEqualPack(inputModel.getQty(), "qty", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue(), "sourceType", packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean); @@ -844,7 +844,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService partInspection.setSn(model.getSn()); partInspection.setCustSn(StringUtil.isEmpty(model.getCustSn())?"":model.getCustSn()); partInspection.setLotNo(model.getLotNo()); - partInspection.setQty(model.getQty().intValue()); + partInspection.setQty(model.getQty()); partInspection.setWorkCenterCode(model.getWorkCenterCode()); partInspection.setShiftCode(model.getShiftCode()); partInspection.setSourceType(model.getSourceType()); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java index c594acc..cf164e1 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java @@ -663,7 +663,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { move.setFactoryCode(org); move.setLgort(source); move.setUmlgo(target); - move.setMenge(Double.parseDouble(model.getPartInspection().getQty().toString())); + move.setMenge(model.getPartInspection().getQty()); move.setMeins(model.getPart().getUnit()); move.setZrsum(zrsum); move.setPostDate(TimeTool.getToday()); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java index 4dba70b..ea88997 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java @@ -145,11 +145,11 @@ public class MesProductResultErrorHandleStepService extends BaseStepService { } else { partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue()); } - partInspection.setRejectQty(mesProduceSn.getQty().intValue()); + partInspection.setRejectQty(mesProduceSn.getQty()); partInspection.setShiftCode(mesProduceSn.getShiftCode()); partInspection.setSn(mesProduceSn.getProductSn()); partInspection.setOrganizeCode(reqBean.getOrganizeCode()); - partInspection.setQty(mesProduceSn.getQty().intValue()); + partInspection.setQty(mesProduceSn.getQty()); partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()); partInspection.setId(id); ConvertBean.serviceModelInitialize(partInspection, reqBean.getUserInfo()); diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesReworkTaskRequestModel.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesReworkTaskRequestModel.java index 0a463c7..9a071c1 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesReworkTaskRequestModel.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesReworkTaskRequestModel.java @@ -46,10 +46,10 @@ public class MesReworkTaskRequestModel { private Integer isOrigSn; @ApiModelProperty("返工数量") - private Integer reworkedQty; + private Double reworkedQty; @ApiModelProperty("报废数量") - private Integer scrapQty; + private Double scrapQty; /**20 返工 30 报废 */ @ApiModelProperty("类型") From e38af160251f1b2f86a20a427ede45ec2ed8f983 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Thu, 2 Jan 2025 16:09:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?44653=20=E7=94=B5=E5=AD=90=E5=8C=96?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E8=BE=93=E5=85=A5=E6=95=B0=E9=87=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E6=95=B0=E7=82=B9=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java index 01a7018..b3b6fd1 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java @@ -675,7 +675,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService DdlPreparedPack.getNumEqualPack(inputModel.getId(), "id", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getPartNo(), "partNo", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getLotNo(), "lotNo", packBean); - DdlPreparedPack.getNumEqualPack(inputModel.getQty(), "qty", packBean); + DdlPreparedPack.getNegativeNumEqualPack(inputModel.getQty(), "qty", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue(), "sourceType", packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean); From 8402aab2e1853c267cc6cab94f66aeeef6a47487 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Thu, 2 Jan 2025 16:15:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?44653=20=E7=94=B5=E5=AD=90=E5=8C=96?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E8=BE=93=E5=85=A5=E6=95=B0=E9=87=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E6=95=B0=E7=82=B9=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java index cf164e1..624991e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java @@ -124,7 +124,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { DdlPreparedPack.getStringEqualPack(partInspection.getPartNo(), "partNo", packBean); DdlPreparedPack.getStringLikerPack(partInspection.getPartName(), "partName", packBean); DdlPreparedPack.getStringEqualPack(partInspection.getLotNo(), "lotNo", packBean); - DdlPreparedPack.getNumEqualPack(partInspection.getQty(), "qty", packBean); + DdlPreparedPack.getNegativeNumEqualPack(partInspection.getQty(), "qty", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean); DdlPreparedPack.getNumEqualPack(partInspection.getRefundFlag(), "refundFlag", packBean);