From b1f6ded5e62a4e0ef016fe1935d5d7b8d6f9cdac Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 4 Jun 2025 16:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B5=E5=AD=90=E5=8C=96?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=BC=94=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesInputDefectRecordService.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 8f79f65..c2f6c79 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 @@ -810,17 +810,12 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService if (StringUtils.isEmpty(inputModel.getWorkCellCode())) { return; } - int refundFlag = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); - if (inputModel.getOptType() == 2) { - refundFlag = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); - } - //根据条码找最近一条单据 DdlPackBean packBean = DdlPackBean.getDdlPackBean(org); DdlPreparedPack.getStringEqualPack(produceSn.getProductSn(), "sn", packBean); DdlPreparedPack.getStringNoEqualPack(inputModel.getWorkCellCode(), "workCellCode", packBean); DdlPreparedPack.getStringNotBlanklPack("workCellCode", packBean); - DdlPreparedPack.getNumEqualPack(refundFlag, "refundFlag", packBean); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean); @@ -1471,16 +1466,11 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService DdlPreparedPack.getStringEqualPack(workCellCode, "workCellCode", packBean); MesWorkCell workCell = workCellRDao.getByProperty(packBean); MesExtEnumUtil.MES_PART_INSPECTION_TYPE type = null; - if (workCell != null) { - if (workCell.getType() == null) { - MesPcnException.throwFlowException(String.format("工位【%s】未维护工位类型,请检查数据", workCellCode)); - } + if (workCell != null && workCell.getType() != null) { if (workCell.getType() == MesExtEnumUtil.MES_WORK_CELL_CHECK_TYPE.PRODUCT_CELL.getValue()) { type = MesExtEnumUtil.MES_PART_INSPECTION_TYPE.ONLINE_CHECK; } else if (workCell.getType() == MesExtEnumUtil.MES_WORK_CELL_CHECK_TYPE.GP12_CELL.getValue()) { type = MesExtEnumUtil.MES_PART_INSPECTION_TYPE.GP12_CHECK; - } else { - MesPcnException.throwFlowException(String.format("工位【%s】维护了不支持的工位类型,请检查数据", workCellCode)); } } return type != null ? type.getValue() : null;