|
|
|
@ -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());
|
|
|
|
|