diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java index e3aedc1..a1e5de9 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java @@ -213,15 +213,15 @@ public class MesSpotCheckOrderService implements IMesSpotCheckOrderService { spotCheckOrderPartRepository.saveAll(model.getOrderPartList()); } - Integer orderResult = MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT.OK.getValue(); + Integer orderResult = MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT_TYPE.OK.getValue(); for (MesSpotCheckOrderResult result : model.getOrderResultList()) { if (StringUtils.isEmpty(result.getSpotCheckRealValue())) { throw new ImppBusiException(String.format("点检单明细未填写完成,请继续质检", result.getSpotCheckRealValue())); } - if (result.getIsTolerance() == MesCommonConstant.TRUE_INTEGER && orderResult == MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT.OK.getValue()) { - orderResult = MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT.NOK.getValue(); + if (result.getIsTolerance() == MesCommonConstant.TRUE_INTEGER && orderResult == MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT_TYPE.OK.getValue()) { + orderResult = MesExtEnumUtil.SPOT_CHECK_ORDER_RESULT_TYPE.NOK.getValue(); } result.setSpotCheckTime(TimeTool.getNowTime(true)); ConvertBean.serviceModelUpdate(result, AuthUtil.getSessionUser().getUserName());