|
|
|
@ -13,6 +13,7 @@ import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.MesEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.*;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
|
|
|
|
@ -353,7 +354,6 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
|
|
|
|
|
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
//查询当前单据明细
|
|
|
|
|
List<MesPartInspectionDetail> resultDetailList = queryResultDetailList(model, org);
|
|
|
|
@ -387,10 +387,23 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
|
|
|
|
|
checkProduceSn(produceSn, model.getSn());
|
|
|
|
|
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
|
|
|
|
|
String defectTypeCode = MesEnumUtil.DEFECT_TYPE_CODE.DETERMIND.getValue();
|
|
|
|
|
|
|
|
|
|
String defectTypeCodeStr = configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE") == null ? "QX130" :configService.getCfgValue(org, "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据页面上选择的位置 查询位置,若不存在则提示 位置不存在,请检查数据
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(defectTypeCodeStr, "defectTypeCode", packBean);
|
|
|
|
|
MesDefectType defectType = defectTypeRepository.getByProperty(packBean);
|
|
|
|
|
|
|
|
|
|
model.getPartInspection().setDefectTypeCode(defectType.getDefectTypeCode());
|
|
|
|
|
model.getPartInspection().setDefectTypeId(defectType.getId());
|
|
|
|
|
ConvertBean.serviceModelInitialize(produceSn, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
produceSnExtService.update(produceSn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
partInspectionDetailRepository.saveAll(resultDetailList);
|
|
|
|
|
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
|
|
|
|
|
|
|
|
|
|