质量 缺陷类型 NC处理

tags/yfai-pcn-ext-v1.0
LML丶 1 year ago
parent 082d6fd0d6
commit 7a68868a09

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

@ -206,7 +206,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
//查询扫描的条码
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(partNo, "partNo", packBean);
DdlPreparedPack.getStringEqualPack(Lot, "Lot", packBean);
DdlPreparedPack.getStringEqualPack(Lot, "lot", packBean);
// DdlPreparedPack.getNumEqualPack(0, "ncType", packBean);
List<MesDefectRecord> defectRecordList = defectRecordRepository.findByHqlWhere(packBean);

Loading…
Cancel
Save