修改 可疑品提示消息

tags/yfai-pcn-ext-v1.0
LML丶 12 months ago
parent 7a26e53381
commit 458ee12f52

@ -18,16 +18,14 @@ import java.util.List;
public interface IMesInputDefectRecordService {
@ApiOperation(value = "扫描产品条码")
@ApiOperation(value = "查询页面信息")
public MesPartInspectionViewModel queryPartInspection(MesPartInspectionInputModel model, String org);
// @ApiOperation(value = "批次录入")
// public MesPartInspectionViewModel queryPartAndLot(String partNo, String lot, Integer frontBack, Integer qty, String org);
@ApiOperation(value = "零件类型缺陷类型对应关系信息")
public List<MesPartTypeDefect> queryPartTypeDefect(String serialNumber, String defectLocation, boolean flg, Integer frontBack, String org);
@ApiOperation(value = "零件类型缺陷类型对应关系信息")
@ApiOperation(value = "完成质检")
public void savePartInspection(MesPartInspectionInputModel model, String org);

@ -5,10 +5,9 @@ import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingPartAndLotModel;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import io.swagger.annotations.ApiOperation;
import java.util.List;
/**
* @Description :
* @Reference :
@ -19,8 +18,11 @@ import java.util.List;
public interface IMesNcProcessingService {
@ApiOperation(value = "扫描产品条码")
public MesNcProcessingModel queryProduceSn(String serialNumber, String partNo, String lot, String org);
@ApiOperation(value = "查询NC-零件检测-单据")
public ListPager<MesPartInspection> queryPartInspectionByPager(MesPartInspection partInspection, Pager pager);
@ApiOperation(value = "查询NC-零件检测-单据")
public MesNcProcessingModel queryPartInspection(MesPartInspection partInspection);
@ApiOperation(value = "查询标记不良的物料及批次")
public ListPager<MesNcProcessingPartAndLotModel> queryPartLot(String partNo, String lot, String org, Pager pager);

@ -33,7 +33,8 @@ public class MesInputDefectRecordController {
try {
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, AuthUtil.getOrganizeCode()));
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, "CK01"));
// return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, AuthUtil.getOrganizeCode()));
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
@ -61,18 +62,19 @@ public class MesInputDefectRecordController {
}
@PostMapping("/save-defect-record")
@ApiOperation(value = "完成质检-保存不良记录")
public ResultBean saveDefectRecord(@RequestBody MesPartInspectionInputModel model) {
@ApiOperation(value = "完成质检")
public ResultBean savePartInspection(@RequestBody MesPartInspectionInputModel model) {
try {
if (StringUtils.isEmpty(model.getSerialNumber()) &&
if (StringUtils.isEmpty(model.getSn()) &&
(StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLot()) || StringUtils.isEmpty(model.getQty()))) {
throw new ImppBusiException("条码为空或零件号+批次+数量为空");
}
inputDefectRecordService.savePartInspection(model, AuthUtil.getOrganizeCode());
inputDefectRecordService.savePartInspection(model, "CK01");
// inputDefectRecordService.savePartInspection(model, AuthUtil.getOrganizeCode());
return ResultBean.success("质检已完成,请继续");
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);

@ -4,9 +4,9 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesNcProcessingService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingInputModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingPartAndLotModel;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
@ -30,17 +30,15 @@ public class MesNcProcessingController {
private IMesNcProcessingService ncProcessingService;
@GetMapping("/query")
@ApiOperation(value = "查询产品条码或零件号+批次")
public ResultBean queryProduceSn(String serialNumber, String partNo, String lot) {
@GetMapping("/query-part-inspection-pager")
@ApiOperation(value = "查询NC-零件检测-单据")
public ResultBean queryPartInspectionByPager(MesPartInspection partInspection, Pager pager) {
try {
// 数据校验
if (StringUtils.isEmpty(serialNumber) && (StringUtils.isEmpty(partNo) || StringUtils.isEmpty(lot))) {
throw new ImppBusiException("产品条码为空或零件号+批次为空");
}
return ResultBean.success("查询成功").setResultObject(ncProcessingService.queryProduceSn(serialNumber, partNo, lot, AuthUtil.getOrganizeCode()));
partInspection.setOrganizeCode(AuthUtil.getOrganizeCode());
ListPager<MesPartInspection> partInspectionListPager = ncProcessingService.queryPartInspectionByPager(partInspection, pager);
return ResultBean.success("查询成功").setListPager(partInspectionListPager);
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
@ -48,17 +46,14 @@ public class MesNcProcessingController {
}
}
@GetMapping("/query-part-lot")
@ApiOperation(value = "查询零件批次")
public ResultBean queryPartLot(String partNo, String lot, Pager pager) {
@GetMapping("/query-part-inspection")
@ApiOperation(value = "查询NC-零件检测-单据")
public ResultBean queryPartInspection(MesPartInspection partInspection) {
try {
// 数据校验
// ValidatorBean.checkNotNull(partNo, "零件号不能为空");
// ValidatorBean.checkNotNull(lot, "不能为空");
ListPager<MesNcProcessingPartAndLotModel> modelList = ncProcessingService.queryPartLot(partNo, lot, AuthUtil.getOrganizeCode(), pager);
return ResultBean.success("查询成功").setListPager(modelList);
partInspection.setOrganizeCode(AuthUtil.getOrganizeCode());
return ResultBean.success("查询成功").setResultObject(ncProcessingService.queryPartInspection(partInspection));
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
@ -66,16 +61,19 @@ public class MesNcProcessingController {
}
}
@PostMapping("/save-nc")
@ApiOperation(value = "NC处理")
public ResultBean saveNc(@RequestBody MesNcProcessingInputModel model) {
try {
// 数据校验
ValidatorBean.checkNotNull(model.getType(), "类型不能为空");
if (StringUtils.isEmpty(model.getSerialNumber()) && (StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLot()))) {
throw new ImppBusiException("产品条码为空或零件号+批次为空");
}
ValidatorBean.checkNotNull(model.getPartInspection(), "单据不能为空");
ValidatorBean.checkNotNull(model.getPartInspectionDetailList(), "单据明细不能为空");
ValidatorBean.checkNotNull(model.getPerson(), "责任人不能为空");
// if (StringUtils.isEmpty(model.getSn()) && (StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLot()))) {
// throw new ImppBusiException("产品条码为空或零件号+批次为空");
// }
String description = MesExtEnumUtil.NC_TYPE.valueOfDescription(model.getType());
if (StringUtils.isEmpty(description)) {

@ -19,7 +19,6 @@ import cn.estsh.i3plus.pojo.mes.bean.rework.MesReworkTask;
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel;
import cn.estsh.i3plus.pojo.mes.repository.*;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ResultBean;
@ -88,11 +87,11 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
//获取NC-零件检测-单据
MesPartInspection partInspection;
Integer sourceType = null;
if (!StringUtils.isEmpty(inputModel.getSerialNumber())) {
if (!StringUtils.isEmpty(inputModel.getSn())) {
// 数据校验
ValidatorBean.checkNotNull(inputModel.getFrontBack(), "正反面不能为空");
//检查条码
MesProduceSn produceSn = checkProduceSn(inputModel.getSerialNumber(), org);
MesProduceSn produceSn = checkProduceSn(inputModel.getSn(), org);
//获取NC-零件检测-单据
partInspection = getPartInspection(inputModel, org);
@ -100,6 +99,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
//检查物料
part = checkPart(produceSn, org);
sourceType = MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue();
} else {
// 数据校验
@ -121,7 +121,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
MesPartTypePicture partTypePicture = checkPartTypePicture(part, org);
//构造返回信息
MesPartInspectionViewModel model = getModel(partInspection, part, partTypePicture, inputModel.getFrontBack(), org);
MesPartInspectionViewModel model = getModel(partInspection, part, partTypePicture, inputModel.getFrontBack(), sourceType, org);
model.setSourceType(sourceType);
model.setTransferFlg(inputModel.isTransferFlg());
@ -205,15 +205,23 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
//若检验单为空,则生成新的单据并合格
if (StringUtils.isEmpty(model.getPartInspection())) {
partInspection = createPartInspection(model, MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), org);
partInspection = createPartInspection(model, MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue(), org);
partInspectionRepository.save(partInspection);
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
MesProduceSn produceSn = checkProduceSn(model.getSn(), org);
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue());
ConvertBean.serviceModelInitialize(produceSn, "LML");
produceSnRepository.save(produceSn);
}
} else {
//原单据不合格 现合格
if (model.getPartInspection().getInspectionStatus() == MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()) {
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelUpdate(model.getPartInspection(), "LML");
partInspectionRepository.save(model.getPartInspection());
//查询当前单据明细
@ -223,11 +231,18 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
k.setId(null);
k.setOrganizeCode(org);
k.setPid(model.getPartInspection().getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelInitialize(k, "LML");
});
partInspectionDetailRepository.saveAll(resultDetailList);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
MesProduceSn produceSn = checkProduceSn(model.getSn(), org);
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue());
ConvertBean.serviceModelInitialize(produceSn, "LML");
produceSnRepository.save(produceSn);
}
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org);
moveRepository.save(move);
@ -247,11 +262,18 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
model.getPartInspectionDetailList().forEach(k -> {
k.setOrganizeCode(org);
k.setPid(partInspection.getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelInitialize(k, "LML");
});
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
MesProduceSn produceSn = checkProduceSn(model.getSn(), org);
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
ConvertBean.serviceModelInitialize(produceSn, "LML");
produceSnRepository.save(produceSn);
}
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "LGORT"), configService.getCfgValue(org, "UMLGO"), org);
moveRepository.save(move);
@ -259,7 +281,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
} else {
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelUpdate(model.getPartInspection(), "LML");
partInspectionRepository.save(model.getPartInspection());
//查询当前单据明细
@ -269,9 +291,16 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
k.setId(null);
k.setOrganizeCode(org);
k.setPid(model.getPartInspection().getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelInitialize(k, "LML");
});
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
MesProduceSn produceSn = checkProduceSn(model.getSn(), org);
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
ConvertBean.serviceModelInitialize(produceSn, "LML");
produceSnRepository.save(produceSn);
}
partInspectionDetailRepository.saveAll(resultDetailList);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
@ -296,7 +325,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
//根据条码找最近一条单据
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(inputModel.getSerialNumber(), "sn", packBean);
DdlPreparedPack.getStringEqualPack(inputModel.getSn(), "sn", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean);
@ -343,7 +372,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
List<MesPartInspectionDetail> resultDetailList = partInspectionDetailRepository.findByHqlWhere(packBean);
resultDetailList.forEach(k -> {
k.setIsDeleted(MesCommonConstant.TRUE_INTEGER);
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelUpdate(model.getPartInspection(), "LML");
});
return resultDetailList;
@ -431,11 +460,11 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getDescription()));
}
//是否需要判断条码质量状态
if (produceSn.getQcStatus() != MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue()) {
throw new ImppBusiException(String.format("【%s】此条码质量状态为【%s】,请选择【%s】状态的条码", serialNumber, MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(produceSn.getQcStatus()),
MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getDescription()));
}
// //是否需要判断条码质量状态
// if (produceSn.getQcStatus() != MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue()) {
// throw new ImppBusiException(String.format("【%s】此条码质量状态为【%s】,请选择【%s】状态的条码", serialNumber, MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(produceSn.getQcStatus()),
// MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getDescription()));
// }
return produceSn;
}
@ -455,12 +484,12 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
partInspection.setInspectionDate(TimeTool.getToday());
partInspection.setInspectionStatus(inspectionStatus);
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
partInspection.setSn(model.getSerialNumber());
partInspection.setSn(model.getSn());
partInspection.setLot(model.getLot());
partInspection.setQty(model.getQty());
partInspection.setWorkCenterCode(model.getWorkCenterCode());
partInspection.setSourceType(model.getSourceType());
ConvertBean.serviceModelInitialize(partInspection, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelInitialize(partInspection, "LML");
return partInspection;
}
@ -476,7 +505,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
private MesMove createMove(MesPartInspectionInputModel model, String source, String target, String org) {
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
serialNoModel.setPartNo(model.getPart().getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, "LML", org, 1);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
@ -493,7 +522,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
ConvertBean.serviceModelInitialize(move, "LML");
return move;
}
@ -505,12 +534,12 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
//若不存在则提示物料信息不存在
if (StringUtils.isEmpty(part)) {
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号不存在请检查数据", produceSn.getSerialNumber(), produceSn.getPartNo()));
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号不存在请检查数据", produceSn.getProductSn(), produceSn.getPartNo()));
}
//根据条码查询零件类型partType
if (StringUtils.isEmpty(part.getPartTypeCode())) {
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型请检查数据", produceSn.getSerialNumber(), produceSn.getPartNo()));
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型请检查数据", produceSn.getProductSn(), produceSn.getPartNo()));
}
@ -606,7 +635,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
return alarmConfigList;
}
private MesPartInspectionViewModel getModel(MesPartInspection partInspection, MesPart part, MesPartTypePicture partTypePicture, Integer frontBack, String org) {
private MesPartInspectionViewModel getModel(MesPartInspection partInspection, MesPart part, MesPartTypePicture partTypePicture, Integer frontBack,
Integer sourceType, String org) {
List<MesPartInspectionDetail> detailList = new ArrayList<>();
@ -615,6 +645,16 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
detailList = checkPartInspectionDetail(partInspection, org);
}
// if (sourceType == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
//
// partInspection.getSn();
// DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
// DdlPreparedPack.getStringEqualPack(partInspection.getSn(), "sn", packBean);
// List<MesPartInspection> partInspectionList = partInspectionRepository.findByHqlWhere(packBean);
//
// for()
//
// }
//位置
List<MesLocationConfig> locationConfigList = checkLocationConfig(org);
List<String> locationCodeList = locationConfigList.stream().map(k -> k.getDefectLocation()).collect(Collectors.toList());
@ -630,6 +670,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
Map<String, MesDefectWarnConfig> alarmConfigMap = alarmConfigList.stream().collect(Collectors.toMap(k -> k.getDefectLocation(), k -> k));
locationConfigList.forEach(k -> {
k.setFrontBack(frontBack);
if (alarmConfigMap.containsKey(k.getDefectLocation())) {
k.setIsflg(true);
}

@ -6,7 +6,6 @@ import cn.estsh.i3plus.ext.mes.pcn.apiservice.dao.IMesNcProcessingDao;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingInputModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingPartAndLotModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingViewModel;
import cn.estsh.i3plus.mes.pcn.api.iservice.busi.ISyncFuncService;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.platform.common.tool.TimeTool;
@ -17,6 +16,9 @@ import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.*;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspectionDetail;
import cn.estsh.i3plus.pojo.mes.bean.rework.MesReworkTask;
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel;
import cn.estsh.i3plus.pojo.mes.repository.*;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
@ -29,7 +31,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -74,40 +75,60 @@ public class MesNcProcessingService implements IMesNcProcessingService {
@Autowired
private MesProduceSnRepository produceSnRepository;
/***
*
* @param serialNumber
* @param partNo
* @param lot
* @param org
* @return
*/
@Autowired
private MesPartInspectionRepository partInspectionRepository;
@Autowired
private MesPartInspectionDetailRepository partInspectionDetailRepository;
@Autowired
private MesReworkTaskRepository reworkTaskRepository;
@Override
public MesNcProcessingModel queryProduceSn(String serialNumber, String partNo, String lot, String org) {
public ListPager<MesPartInspection> queryPartInspectionByPager(MesPartInspection partInspection, Pager pager) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(partInspection.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(partInspection.getSn(), "sn", packBean);
DdlPreparedPack.getStringEqualPack(partInspection.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringLikerPack(partInspection.getPartName(), "partName", packBean);
DdlPreparedPack.getStringEqualPack(partInspection.getLot(), "lot", packBean);
DdlPreparedPack.getNumEqualPack(partInspection.getQty(), "qty", packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
pager = PagerHelper.getPager(pager, partInspectionRepository.findByHqlWhereCount(packBean));
List<MesPartInspection> resultList = partInspectionRepository.findByHqlWherePage(packBean, pager);
if (!StringUtils.isEmpty(serialNumber)) {
//检查不良条码
List<MesDefectRecord> defectRecordList = queryDefectRecordBySerialNumber(serialNumber, org);
return new ListPager<>(resultList, pager);
}
//检查物料
MesPart part = checkPart(defectRecordList, org);
@Override
public MesNcProcessingModel queryPartInspection(MesPartInspection partInspection) {
//构造返回结果
MesNcProcessingModel model = getModel(part, defectRecordList, org);
return model;
} else {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(partInspection.getOrganizeCode());
DdlPreparedPack.getNumEqualPack(partInspection.getId(), "pid", packBean);
List<MesPartInspectionDetail> detailList = partInspectionDetailRepository.findByHqlWhere(packBean);
//检查不良条码
List<MesDefectRecord> defectRecordList = queryDefectRecordByPartAndLot(partNo, lot, org);
//检查物料
MesPart part = null;
if (partInspection.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
//检查条码
MesProduceSn produceSn = checkProduceSn(partInspection.getSn(), partInspection.getOrganizeCode());
//检查物料
MesPart part = checkPartByPartNo(partNo, org);
part = checkPart(produceSn, partInspection.getOrganizeCode());
//构造返回结果
MesNcProcessingModel model = getModel(part, defectRecordList, org);
return model;
} else {
//检查物料
part = checkPartByPartNo(partInspection.getPartNo(), partInspection.getOrganizeCode());
}
//构造返回结果
MesNcProcessingModel model = getModel(part, detailList, partInspection.getOrganizeCode());
return model;
}
@Override
@ -123,58 +144,52 @@ public class MesNcProcessingService implements IMesNcProcessingService {
@Override
public void saveNc(MesNcProcessingInputModel model, String org) {
if (!StringUtils.isEmpty(model.getSerialNumber())) {
String serialNumber = model.getSerialNumber();
if (model.getPartInspection().getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
String serialNumber = model.getPartInspection().getSn();
Integer type = model.getType();
Integer person = model.getPerson();
//检查不良条码
List<MesDefectRecord> defectRecordList = queryDefectRecordBySerialNumber(serialNumber, org);
//检查物料
MesPart part = checkPartByPartNo(defectRecordList.get(0).getPartNo(), org);
MesPart part = checkPartByPartNo(model.getPartInspection().getPartNo(), org);
//保存数据
saveDate(part, defectRecordList, type, person, org);
saveDate(model, part, type, person, org);
} else {
String partNo = model.getPartNo();
String lot = model.getLot();
String partNo = model.getPartInspection().getPartNo();
String lot = model.getPartInspection().getLot();
Integer type = model.getType();
Integer person = model.getPerson();
//检查不良条码
List<MesDefectRecord> defectRecordList = queryDefectRecordByPartAndLot(partNo, lot, org);
//检查物料
MesPart part = checkPartByPartNo(partNo, org);
//保存数据
saveDate(part, defectRecordList, type, person, org);
saveDate(model, part, type, person, org);
}
}
/**
*
*
* @param defectRecordList
* @param produceSn
* @param org
* @return
*/
private MesPart checkPart(List<MesDefectRecord> defectRecordList, String org) {
private MesPart checkPart(MesProduceSn produceSn, String org) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(defectRecordList.get(0).getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(produceSn.getPartNo(), "partNo", packBean);
MesPart part = partRepository.getByProperty(packBean);
//若不存在则提示物料信息不存在
if (StringUtils.isEmpty(part)) {
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号不存在请检查数据", defectRecordList.get(0).getSerialNumber(), defectRecordList.get(0).getPartNo()));
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号不存在请检查数据", produceSn.getProductSn(), produceSn.getPartNo()));
}
//根据条码查询零件类型partType
if (StringUtils.isEmpty(part.getPartTypeCode())) {
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型请检查数据", defectRecordList.get(0).getSerialNumber(), defectRecordList.get(0).getPartNo()));
throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型请检查数据", produceSn.getProductSn(), produceSn.getPartNo()));
}
@ -301,11 +316,11 @@ public class MesNcProcessingService implements IMesNcProcessingService {
*
*
* @param part
* @param defectRecordList
* @param detailList
* @param org
* @return
*/
private MesNcProcessingModel getModel(MesPart part, List<MesDefectRecord> defectRecordList, String org) {
private MesNcProcessingModel getModel(MesPart part, List<MesPartInspectionDetail> detailList, String org) {
//todo 图片暂时放空
//检查零件类型与图片对应关系
MesPartTypePicture partTypePicture = checkPartTypePicture(part, org);
@ -313,10 +328,10 @@ public class MesNcProcessingService implements IMesNcProcessingService {
//位置
List<MesLocationConfig> locationConfigList = checkLocationConfig(org);
Map<String, List<MesDefectRecord>> defectRecordMap = defectRecordList.stream().collect(Collectors.groupingBy(k -> k.getDefectLocation()));
Map<String, List<MesPartInspectionDetail>> defectRecordMap = detailList.stream().collect(Collectors.groupingBy(k -> k.getDefectLocation()));
Map<String, List<MesDefectRecord>> defectMap = defectRecordList.stream().collect(Collectors.groupingBy(k -> k.getDefectTypeCode()));
// Map<String, List<MesPartInspectionDetail>> defectMap = detailList.stream().collect(Collectors.groupingBy(k -> k.getDefectTypeCode()));
//位置是否标黄Map,key位置value标黄标识
locationConfigList.forEach(k -> {
@ -325,17 +340,17 @@ public class MesNcProcessingService implements IMesNcProcessingService {
}
});
List<MesNcProcessingViewModel> defectModelList = new ArrayList<>();
defectMap.forEach((k, v) -> {
MesNcProcessingViewModel model = new MesNcProcessingViewModel();
model.setDefectTypeCode(k);
model.setQty(v.size());
model.setDefectTypeName(v.get(0).getDefectTypeName());
defectModelList.add(model);
});
// List<MesNcProcessingViewModel> defectModelList = new ArrayList<>();
// defectMap.forEach((k, v) -> {
// MesNcProcessingViewModel model = new MesNcProcessingViewModel();
// model.setDefectTypeCode(k);
// model.setQty(v.size());
// model.setDefectTypeName(v.get(0).getDefectTypeName());
// defectModelList.add(model);
// });
MesNcProcessingModel model = new MesNcProcessingModel();
model.setDefectModelList(defectModelList);
model.setDetailList(detailList);
model.setPartTypePicture(partTypePicture);
model.setLocationConfigList(locationConfigList);
return model;
@ -345,37 +360,130 @@ public class MesNcProcessingService implements IMesNcProcessingService {
*
*
* @param part
* @param defectRecordList
* @param model
* @param type
* @param person
* @param org
*/
private void saveDate(MesPart part, List<MesDefectRecord> defectRecordList, Integer type, Integer person, String org) {
GenSerialNoModel serialNoModel = new GenSerialNoModel("NC_DEFECT_ZRSUM");
serialNoModel.setPartNo(part.getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
}
private void saveDate(MesNcProcessingInputModel model, MesPart part, Integer type, Integer person, String org) {
if (type == MesExtEnumUtil.NC_TYPE.NORMAL.getValue()) {
MesProduceSn sn = checkProduceSn(model.getSn(), org);
sn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
produceSnRepository.save(sn);
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.NORMAL.getValue());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
partInspectionRepository.save(model.getPartInspection());
GenSerialNoModel serialNoModel = new GenSerialNoModel("NC_DEFECT_ZRSUM");
serialNoModel.setPartNo(part.getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
}
MesMove move = new MesMove();
move.setMatnr(part.getPartNo());
move.setOrganizeCode(org);
move.setFactoryCode(org);
move.setLgort(configService.getCfgValue(org, "UMLGO"));
move.setUmlgo(configService.getCfgValue(org, "LGORT"));
move.setMenge(model.getPartInspection().getQty().intValue());
move.setMeins(part.getUnit());
move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
moveRepository.save(move);
} else if (type == MesExtEnumUtil.NC_TYPE.REWORK.getValue()) {
GenSerialNoModel serialNoModel1 = new GenSerialNoModel("NC_REWORK");
serialNoModel1.setPartNo(part.getPartNo());
ResultBean rb1 = syncFuncService.syncSerialNo(serialNoModel1, AuthUtil.getSessionUser().getUserName(), org, 1);
String rework = "";
if (null != rb1 && !CollectionUtils.isEmpty(rb1.getResultList())) {
rework = (rb1.getResultList().get(0)).toString();
}
if (type == MesExtEnumUtil.NC_TYPE.NORMAL.getValue() || type == MesExtEnumUtil.NC_TYPE.RELEASE.getValue()) {
MesReworkTask reworkTask = new MesReworkTask();
reworkTask.setReworkedQty(model.getPartInspection().getQty());
reworkTask.setSn(model.getPartInspection().getSn());
reworkTask.setReworkOrder(rework);
reworkTask.setPartNo(model.getPartInspection().getPartNo());
reworkTask.setPartInspectionId(model.getPartInspection().getId());
reworkTask.setOrganizeCode(org);
reworkTask.setType(model.getPartInspection().getSourceType());
ConvertBean.serviceModelInitialize(reworkTask, AuthUtil.getSessionUser().getUserName());
reworkTaskRepository.save(reworkTask);
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.REWORK.getValue());
model.getPartInspection().setDefectTypeId(reworkTask.getId());
partInspectionRepository.save(model.getPartInspection());
} else if (type == MesExtEnumUtil.NC_TYPE.SCRAP.getValue()) {
MesProduceSn sn = checkProduceSn(model.getSn(), org);
sn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SCRAP.getValue());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
produceSnRepository.save(sn);
String serialNumber = defectRecordList.get(0).getSerialNumber();
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue());
model.getPartInspection().setRejectQty(model.getPartInspection().getQty());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
partInspectionRepository.save(model.getPartInspection());
GenSerialNoModel serialNoModel = new GenSerialNoModel("NC_DEFECT_ZRSUM");
serialNoModel.setPartNo(part.getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
}
MesProduceSn sn = checkProduceSn(serialNumber, org);
MesMove move = new MesMove();
move.setMatnr(part.getPartNo());
move.setOrganizeCode(org);
move.setFactoryCode(org);
move.setLgort(configService.getCfgValue(org, "UMLGO"));
move.setUmlgo(configService.getCfgValue(org, "LGORT"));
move.setMenge(model.getPartInspection().getQty().intValue());
move.setMeins(part.getUnit());
move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
moveRepository.save(move);
} else if (type == MesExtEnumUtil.NC_TYPE.RELEASE.getValue()) {
MesProduceSn sn = checkProduceSn(model.getSn(), org);
sn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue());
sn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getValue());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
produceSnRepository.save(sn);
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.RELEASE.getValue());
ConvertBean.serviceModelUpdate(sn, AuthUtil.getSessionUser().getUserName());
partInspectionRepository.save(model.getPartInspection());
GenSerialNoModel serialNoModel = new GenSerialNoModel("NC_DEFECT_ZRSUM");
serialNoModel.setPartNo(part.getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
}
MesMove move = new MesMove();
move.setMatnr(part.getPartNo());
move.setOrganizeCode(org);
move.setFactoryCode(org);
move.setLgort(configService.getCfgValue(org, "UMLGO"));
move.setUmlgo(configService.getCfgValue(org, "LGORT"));
move.setMenge(defectRecordList.get(0).getQty().intValue());
move.setMenge(model.getPartInspection().getQty().intValue());
move.setMeins(part.getUnit());
move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday());
@ -384,13 +492,6 @@ public class MesNcProcessingService implements IMesNcProcessingService {
moveRepository.save(move);
}
defectRecordList.forEach(k -> {
k.setNcType(type);
k.setPerson(person);
ConvertBean.serviceModelUpdate(k, AuthUtil.getSessionUser().getUserName());
});
defectRecordRepository.saveAll(defectRecordList);
}
private MesProduceSn checkProduceSn(String serialNumber, String org) {

@ -61,7 +61,7 @@ public class MesShippingLoadingCheckService implements IMesShippingLoadingCheckS
//若生成装车单,则一定有装车单明细
DdlPackBean orderDetailPackBean = DdlPackBean.getDdlPackBean(loadingList.organizeCode);
DdlPreparedPack.getNumEqualPack(loadingListResult.getId(), "pid", orderDetailPackBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"seq"}, orderDetailPackBean);
// DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"seq"}, orderDetailPackBean);
List<MesLoadingListDetail> detailList = vehiclesOrderDetailRepository.findByHqlWhere(orderDetailPackBean);
//是否逆转
@ -115,7 +115,7 @@ public class MesShippingLoadingCheckService implements IMesShippingLoadingCheckS
//校验发运单是否存在
DdlPackBean orderDetailPackBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getNumEqualPack(model.getShippingCode(), "shippingCode", orderDetailPackBean);
DdlPreparedPack.getNumEqualPack(loadingList.getId(), "pid", orderDetailPackBean);
DdlPreparedPack.getStringEqualPack(model.getShippingCode(), "shippingCode", orderDetailPackBean);
MesLoadingListDetail vehiclesOrderDetail = vehiclesOrderDetailRepository.getByProperty(orderDetailPackBean);
if (StringUtils.isEmpty(vehiclesOrderDetail)) {
@ -197,7 +197,7 @@ public class MesShippingLoadingCheckService implements IMesShippingLoadingCheckS
//校验装车单是否存在
DdlPackBean orderPackBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(orderCode, "loadingOrderNo", orderPackBean);
DdlPreparedPack.getStringEqualPack(orderCode, "orderCode", orderPackBean);
MesLoadingList loadingList = vehiclesOrderRepository.getByProperty(orderPackBean);
if (StringUtils.isEmpty(loadingList)) {
throw new ImppBusiException(String.format("【%s】此装车单不存在请检查数据", orderCode));

@ -85,7 +85,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
}
DdlPackBean orderDetailPackBean = DdlPackBean.getDdlPackBean(shippingOrderManagement.organizeCode);
DdlPreparedPack.getStringEqualPack(shippingOrderManagement.getOrderCode(), "orderCode", orderDetailPackBean);
DdlPreparedPack.getStringEqualPack(orderManagement.getOrderCode(), "orderCode", orderDetailPackBean);
MesLoadingList loadingList = ListRepository.getByProperty(orderDetailPackBean);
if (StringUtils.isEmpty(loadingList)) {
throw new ImppBusiException(String.format("【%s】此发运单配置是否装车为是,但没生成装车单,请检查数据!", shippingOrderManagement.getShippingCode()));
@ -109,7 +109,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
DdlPackBean orderDetailPackBean = DdlPackBean.getDdlPackBean(shippingOrderManagement.organizeCode);
DdlPreparedPack.getNumEqualPack(shippingOrderManagement.getId(), "shippingId", orderDetailPackBean);
DdlPreparedPack.getNumEqualPack(orderManagement.getId(), "pid", orderDetailPackBean);
List<MesShippingOrderManagementDetail> detailList = shippingOrderManagementDetailRepository.findByHqlWhere(orderDetailPackBean);
@ -283,7 +283,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
//发运单明细状态修改为校验完成
DdlPackBean orderManagementDetailPackBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getNumEqualPack(orderManagement.getId(), "shippingId", orderManagementDetailPackBean);
DdlPreparedPack.getNumEqualPack(orderManagement.getId(), "pid", orderManagementDetailPackBean);
List<MesShippingOrderManagementDetail> orderManagementDetailList = shippingOrderManagementDetailRepository.findByHqlWhere(orderManagementDetailPackBean);
List<MesProduceSn> produceSnList = new ArrayList<>();
@ -298,6 +298,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
MesProduceSn produceSn = produceSnRepository.getByProperty(packBean);
produceSn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.SHIPPED.getValue());
detail.setActualQty(1);
ConvertBean.serviceModelUpdate(detail, AuthUtil.getSessionUser().getUserName());
produceSnList.add(produceSn);

@ -1,8 +1,12 @@
package cn.estsh.i3plus.ext.mes.pcn.pojo.model;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspectionDetail;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
@ -13,22 +17,20 @@ import lombok.Data;
@Data
public class MesNcProcessingInputModel {
@ApiParam("类型")
private Integer type;
@ApiParam("条码")
private String serialNumber;
private String sn;
@ApiParam("责任人")
private Integer person;
@ApiParam("类型")
private Integer type;
@ApiParam("物料号")
private String partNo;
@ApiParam("批次")
private String lot;
@ApiParam("NC-零件检测详情")
private List<MesPartInspectionDetail> partInspectionDetailList;
@ApiParam("NC-零件检测-单据")
private MesPartInspection partInspection;
}

@ -3,6 +3,8 @@ package cn.estsh.i3plus.ext.mes.pcn.pojo.model;
import cn.estsh.i3plus.pojo.mes.bean.MesLocationConfig;
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.bean.MesPartTypePicture;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspectionDetail;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -19,15 +21,24 @@ import java.util.List;
public class MesNcProcessingModel {
@ApiParam("位置")
@ApiParam("正面位置")
List<MesLocationConfig> frontLocationConfigList;
@ApiParam("背面位置")
List<MesLocationConfig> BackLocationConfigList;
@ApiParam("背面位置")
List<MesLocationConfig> locationConfigList;
@ApiParam("图片")
private MesPartTypePicture partTypePicture;
@ApiParam("缺陷列表")
private List<MesNcProcessingViewModel> defectModelList;
@ApiParam("NC-零件检测详情")
private List<MesPartInspectionDetail> detailList;
@ApiParam("NC-零件检测-单据")
private MesPartInspection partInspection;
@ApiParam("物料")
private MesPart part;

@ -3,7 +3,6 @@ package cn.estsh.i3plus.ext.mes.pcn.pojo.model;
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspection;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspectionDetail;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -30,7 +29,7 @@ public class MesPartInspectionInputModel {
private String partNo;
@ApiParam("条码")
private String serialNumber;
private String sn;
@ApiParam("正反面")
private Integer frontBack;

@ -22,8 +22,11 @@ import java.util.Map;
public class MesPartInspectionViewModel {
@ApiParam("位置")
@ApiParam("正面位置")
private List<MesLocationConfig> locationConfigList;
//
// @ApiParam("反面位置")
// private List<MesLocationConfig> locationConfigList;
@ApiParam("NC-零件检测详情")
private List<MesPartInspectionDetail> partInspectionDetailList;

Loading…
Cancel
Save