|
|
|
@ -16,6 +16,7 @@ import cn.estsh.i3plus.pojo.mes.repository.*;
|
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -149,6 +150,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
//扫描条码则是单件 没有条码是批次
|
|
|
|
|
if (!StringUtils.isEmpty(defectRecordList.get(0).getSerialNumber())) {
|
|
|
|
|
|
|
|
|
|
// 数据校验
|
|
|
|
|
ValidatorBean.checkNotNull(defectRecordList.get(0).getSerialNumber(), "条码不能为空");
|
|
|
|
|
//检查条码
|
|
|
|
|
MesProduceSn produceSn = checkProduceSn(defectRecordList.get(0).getSerialNumber(), org);
|
|
|
|
|
|
|
|
|
@ -165,6 +168,10 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
produceSnRepository.save(produceSn);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
// 数据校验
|
|
|
|
|
ValidatorBean.checkNotNull(defectRecordList.get(0).getPartNo(), "零件号不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(defectRecordList.get(0).getLot(), "批次不能为空");
|
|
|
|
|
|
|
|
|
|
//检查物料
|
|
|
|
|
MesPart part = checkPartByPartNo(defectRecordList.get(0).getPartNo(), org);
|
|
|
|
|
|
|
|
|
|