tags/yfai-pcn-ext-v1.0
王杰 1 year ago
commit b63a8c51af

@ -1,8 +1,9 @@
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesInputDefectRecordModel;
import cn.estsh.i3plus.pojo.mes.bean.MesDefectRecord;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel;
import cn.estsh.i3plus.pojo.mes.bean.MesPartTypeDefect;
import cn.estsh.i3plus.pojo.mes.bean.nc.MesPartInspectionDetail;
import io.swagger.annotations.ApiOperation;
import java.util.List;
@ -18,16 +19,16 @@ public interface IMesInputDefectRecordService {
@ApiOperation(value = "扫描产品条码")
public MesInputDefectRecordModel queryProduceSn(String serialNumber, Integer frontBack, String org);
public MesPartInspectionViewModel queryPartInspection(MesPartInspectionInputModel model, String org);
@ApiOperation(value = "批次录入")
public MesInputDefectRecordModel queryPartAndLot(String partNo, String lot, Integer frontBack, 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 = "零件类型缺陷类型对应关系信息")
public void saveDefectRecord(List<MesDefectRecord> defectRecordList, String org);
public void savePartInspection(MesPartInspectionInputModel model, String org);
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.ext.mes.pcn.api.busi;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
import io.swagger.annotations.ApiOperation;
@ -26,5 +27,7 @@ public interface IMesWorkOrderService {
@ApiOperation(value = "查询工单")
public ListPager<MesWorkOrder> queryMesWorkOrderListByPager(MesWorkOrder workOrder, Pager pager);
void doProductReport(List<MesProduceSn> mesProduceSnList);
}

@ -3,7 +3,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesDefectRecord;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
@ -13,10 +13,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@Api(tags = "缺陷记录页面")
@RequestMapping(MesCommonConstant.MES_YANFEN + "/defect_record")
@ -27,34 +26,14 @@ public class MesInputDefectRecordController {
private IMesInputDefectRecordService inputDefectRecordService;
@GetMapping("/query-loading-order")
@ApiOperation(value = "查询产品条码")
public ResultBean queryProduceSn(String serialNumber, Integer frontBack) {
@PostMapping("/query-part-inspection")
@ApiOperation(value = "查询页面信息")
public ResultBean queryPartInspection(@RequestBody MesPartInspectionInputModel model) {
try {
// 数据校验
ValidatorBean.checkNotNull(serialNumber, "产品条码不能为空");
ValidatorBean.checkNotNull(frontBack, "正反面不能为空");
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryProduceSn(serialNumber, frontBack, AuthUtil.getOrganizeCode()));
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@GetMapping("/query-part-lot")
@ApiOperation(value = "查询零件号-批次")
public ResultBean queryProduceSn(String partNo, String lot, Integer frontBack) {
try {
// 数据校验
ValidatorBean.checkNotNull(partNo, "物料不能为空");
ValidatorBean.checkNotNull(lot, "批次不能为空");
ValidatorBean.checkNotNull(frontBack, "正反面不能为空");
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartAndLot(partNo, lot, frontBack, AuthUtil.getOrganizeCode()));
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, AuthUtil.getOrganizeCode()));
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
@ -83,12 +62,17 @@ public class MesInputDefectRecordController {
@PostMapping("/save-defect-record")
@ApiOperation(value = "完成质检-保存不良记录")
public ResultBean saveDefectRecord(@RequestBody List<MesDefectRecord> defectRecordList) {
public ResultBean saveDefectRecord(@RequestBody MesPartInspectionInputModel model) {
try {
// 数据校验
ValidatorBean.checkNotNull(defectRecordList, "选择不良数据不能为空");
inputDefectRecordService.saveDefectRecord(defectRecordList, AuthUtil.getOrganizeCode());
if (StringUtils.isEmpty(model.getSerialNumber()) &&
(StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLot()) || StringUtils.isEmpty(model.getQty()))) {
throw new ImppBusiException("条码为空或零件号+批次+数量为空");
}
inputDefectRecordService.savePartInspection(model, AuthUtil.getOrganizeCode());
return ResultBean.success("质检已完成,请继续");
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);

@ -3,6 +3,8 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesWorkOrderService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
@ -11,9 +13,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Description :
@ -58,4 +60,18 @@ public class MesWorkOrderController {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@PostMapping(value = "/doProductReport")
@ApiOperation(value = "生产报工")
public ResultBean doProductReport(@RequestBody List<MesProduceSn> mesProduceSnList) {
try {
workOrderService.doProductReport(mesProduceSnList);
return ResultBean.success("操作成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException e) {
return ResultBean.fail(e).build();
} catch (Exception e) {
return ResultBean.fail(e);
}
}
}

@ -2,19 +2,26 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesConfigService;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesInputDefectRecordModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel;
import cn.estsh.i3plus.mes.pcn.api.iservice.busi.ISyncFuncService;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
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.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;
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;
import cn.estsh.impp.framework.boot.util.ValidatorBean;
import lombok.extern.slf4j.Slf4j;
@ -23,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -56,13 +64,15 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
@Autowired
private MesPartTypeDefectRepository partTypeDefectRepository;
@Autowired
private MesDefectRecordRepository defectRecordRepository;
private MesMoveRepository moveRepository;
@Autowired
private MesDefectRecordService defectRecordService;
private MesPartInspectionRepository partInspectionRepository;
@Autowired
private MesPartInspectionDetailRepository partInspectionDetailRepository;
@Autowired
private MesMoveRepository moveRepository;
private MesReworkTaskRepository reworkTaskRepository;
@Autowired
private IMesConfigService configService;
@ -71,38 +81,63 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
private ISyncFuncService syncFuncService;
@Override
public MesInputDefectRecordModel queryProduceSn(String serialNumber, Integer frontBack, String org) {
public MesPartInspectionViewModel queryPartInspection(MesPartInspectionInputModel inputModel, String org) {
//检查物料
MesPart part;
//获取NC-零件检测-单据
MesPartInspection partInspection;
Integer sourceType = null;
if (!StringUtils.isEmpty(inputModel.getSerialNumber())) {
// 数据校验
ValidatorBean.checkNotNull(inputModel.getFrontBack(), "正反面不能为空");
//检查条码
MesProduceSn produceSn = checkProduceSn(serialNumber, org);
MesProduceSn produceSn = checkProduceSn(inputModel.getSerialNumber(), org);
//获取NC-零件检测-单据
partInspection = getPartInspection(inputModel, org);
//检查物料
MesPart part = checkPart(produceSn, org);
part = checkPart(produceSn, org);
//检查零件类型与图片对应关系
MesPartTypePicture partTypePicture = checkPartTypePicture(part, org);
//构造返回信息
MesInputDefectRecordModel model = getModel(part, partTypePicture, frontBack, org);
} else {
// 数据校验
ValidatorBean.checkNotNull(inputModel.getPartNo(), "物料不能为空");
ValidatorBean.checkNotNull(inputModel.getLot(), "批次不能为空");
ValidatorBean.checkNotNull(inputModel.getFrontBack(), "正反面不能为空");
ValidatorBean.checkNotNull(inputModel.getQty(), "数量不能为空");
return model;
}
//检查物料
part = checkPartByPartNo(inputModel.getPartNo(), org);
@Override
public MesInputDefectRecordModel queryPartAndLot(String partNo, String lot, Integer frontBack, String org) {
//获取NC-零件检测-单据
partInspection = getPartInspectionByPartAndLot(inputModel, org);
//检查物料
MesPart part = checkPartByPartNo(partNo, org);
sourceType = MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue();
}
//检查零件类型与图片对应关系
MesPartTypePicture partTypePicture = checkPartTypePicture(part, org);
//构造返回信息
MesInputDefectRecordModel model = getModel(part, partTypePicture, frontBack, org);
MesPartInspectionViewModel model = getModel(partInspection, part, partTypePicture, inputModel.getFrontBack(), org);
model.setSourceType(sourceType);
model.setTransferFlg(inputModel.isTransferFlg());
return model;
}
/**
*
*
* @param partNo
* @param defectLocation
* @param flg
* @param frontBack
* @param org
* @return
*/
@Override
public List<MesPartTypeDefect> queryPartTypeDefect(String partNo, String defectLocation, boolean flg, Integer frontBack, String org) {
@ -143,44 +178,239 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
return partTypeDefectList;
}
/**
* -
*
* @param model
* @param org
*/
@Override
public void saveDefectRecord(List<MesDefectRecord> defectRecordList, String org) {
public void savePartInspection(MesPartInspectionInputModel model, String org) {
//通过条码判断是单件还是批次,
//扫描条码则是单件 没有条码是批次
if (!StringUtils.isEmpty(defectRecordList.get(0).getSerialNumber())) {
// 数据校验
ValidatorBean.checkNotNull(defectRecordList.get(0).getSerialNumber(), "条码不能为空");
//检查条码
MesProduceSn produceSn = checkProduceSn(defectRecordList.get(0).getSerialNumber(), org);
//零件检测详情为空,则代表本次校验为合格。
if (CollectionUtils.isEmpty(model.getPartInspectionDetailList())) {
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
//检查物料
MesPart part = checkPartByPartNo(produceSn.getPartNo(), org);
MesPartInspection partInspection;
//返工单返修完成,需可疑品移正常库
if (model.isTransferFlg()) {
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org);
moveRepository.save(move);
}
//保存数据
saveDate(defectRecordList, part, org);
//判断首次合格还是 多次检验最终为合格品
//若返修单返修完成,则会生成一个新的检验单并合格
//若检验单为空,则生成新的单据并合格
if (StringUtils.isEmpty(model.getPartInspection())) {
partInspection = createPartInspection(model, MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), org);
partInspectionRepository.save(partInspection);
//单件需要修改条码状态 批量则不需要
ConvertBean.serviceModelUpdate(produceSn, AuthUtil.getSessionUser().getUserName());
produceSnRepository.save(produceSn);
} else {
// 数据校验
ValidatorBean.checkNotNull(defectRecordList.get(0).getPartNo(), "零件号不能为空");
ValidatorBean.checkNotNull(defectRecordList.get(0).getLot(), "批次不能为空");
//原单据不合格 现合格
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());
partInspectionRepository.save(model.getPartInspection());
//检查物料
MesPart part = checkPartByPartNo(defectRecordList.get(0).getPartNo(), org);
//查询当前单据明细
List<MesPartInspectionDetail> resultDetailList = queryResultDetailList(model, org);
model.getPartInspectionDetailList().forEach(k -> {
k.setId(null);
k.setOrganizeCode(org);
k.setPid(model.getPartInspection().getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
});
partInspectionDetailRepository.saveAll(resultDetailList);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org);
moveRepository.save(move);
}
}
} else {
//零件检测详情不为空,则代表本次校验为不合格。
//零件检测-单据为空,则是首次不合格
MesPartInspection partInspection;
if (StringUtils.isEmpty(model.getPartInspection())) {
partInspection = createPartInspection(model, MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), org);
partInspectionRepository.save(partInspection);
model.getPartInspectionDetailList().forEach(k -> {
k.setOrganizeCode(org);
k.setPid(partInspection.getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
});
//保存数据
saveDate(defectRecordList, part, org);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "LGORT"), configService.getCfgValue(org, "UMLGO"), org);
moveRepository.save(move);
} else {
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);
model.getPartInspectionDetailList().forEach(k -> {
k.setId(null);
k.setOrganizeCode(org);
k.setPid(model.getPartInspection().getId());
ConvertBean.serviceModelInitialize(k, AuthUtil.getSessionUser().getUserName());
});
partInspectionDetailRepository.saveAll(resultDetailList);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());
//移库
MesMove move = createMove(model, configService.getCfgValue(org, "LGORT"), configService.getCfgValue(org, "UMLGO"), org);
moveRepository.save(move);
}
}
}
/**
* NC--
*
* @param inputModel
* @param org
* @return
*/
private MesPartInspection getPartInspection(MesPartInspectionInputModel inputModel, String org) {
//根据条码找最近一条单据
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(inputModel.getSerialNumber(), "sn", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean);
//若单据经过了NC处理则返回为空
partInspection = checkPartInspection(partInspection, inputModel, org);
return partInspection;
}
/**
* NC--
*
* @param inputModel
* @param org
* @return
*/
private MesPartInspection getPartInspectionByPartAndLot(MesPartInspectionInputModel inputModel, String org) {
//根据扫描的条码查询条码是否存在
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(inputModel.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(inputModel.getLot(), "lot", packBean);
DdlPreparedPack.getNumEqualPack(inputModel.getQty(), "qty", packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue(), "sourceType", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean);
checkPartInspection(partInspection, inputModel, org);
return partInspection;
}
/**
*
*
* @param model
* @param org
* @return
*/
private List<MesPartInspectionDetail> queryResultDetailList(MesPartInspectionInputModel model, String org) {
//根据扫描的条码查询条码是否存在
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getNumEqualPack(model.getPartInspection().getId(), "pid", packBean);
List<MesPartInspectionDetail> resultDetailList = partInspectionDetailRepository.findByHqlWhere(packBean);
resultDetailList.forEach(k -> {
k.setIsDeleted(MesCommonConstant.TRUE_INTEGER);
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
});
return resultDetailList;
}
/**
* NC--
*
* @param partInspection
* @return
*/
private MesPartInspection checkPartInspection(MesPartInspection partInspection, MesPartInspectionInputModel inputModel, String org) {
//针对检测单-一次NC处理是一个单据 若单据经过了NC处理则返回为空
if (!StringUtils.isEmpty(partInspection)) {
//可疑,待NC
if (partInspection.getInspectionStatus() == MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()
&& partInspection.getNcStatus() == MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue()) {
return partInspection;
} else if (partInspection.getInspectionStatus() == MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()
&& partInspection.getNcStatus() == MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue()) {
//报废
throw ImppExceptionBuilder.newInstance().setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode())
.setErrorDetail(String.format("【%s】条码已报废,请检查数据", partInspection.getSn()))
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.build();
} else if (partInspection.getInspectionStatus() == MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()
&& partInspection.getNcStatus() == MesExtEnumUtil.PART_INSPECTION_NC_STATUS.REWORK.getValue()) {
//已创建返修单
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getNumEqualPack(partInspection.getId(), "partInspectionId", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
MesReworkTask reworkTask = reworkTaskRepository.getByProperty(packBean);
if (!StringUtils.isEmpty(reworkTask) && reworkTask.getStatus() == MesExtEnumUtil.REWORK_TASK_STATUS.CREATE.getValue()) {
//已创建返修单
throw ImppExceptionBuilder.newInstance().setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode())
.setErrorDetail(String.format("【%s】已创建返修单,请检查数据", partInspection.getSn()))
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.build();
} else if (!StringUtils.isEmpty(reworkTask) && reworkTask.getStatus() == MesExtEnumUtil.REWORK_TASK_STATUS.FINISH.getValue() &&
partInspection.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
//返修单 进行返修
inputModel.setTransferFlg(true);
}
}
}
return null;
}
/**
*
*
* @param serialNumber
* @param org
* @return
*/
private MesProduceSn checkProduceSn(String serialNumber, String org) {
//根据扫描的条码查询条码是否存在
@ -209,6 +439,64 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
return produceSn;
}
/**
*
*
* @param model
* @param inspectionStatus
* @param org
* @return
*/
private MesPartInspection createPartInspection(MesPartInspectionInputModel model, Integer inspectionStatus, String org) {
MesPartInspection partInspection = new MesPartInspection();
partInspection.setOrganizeCode(org);
partInspection.setPartNo(model.getPart().getPartNo());
partInspection.setPartName(model.getPart().getPartName());
partInspection.setInspectionDate(TimeTool.getToday());
partInspection.setInspectionStatus(inspectionStatus);
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
partInspection.setSn(model.getSerialNumber());
partInspection.setLot(model.getLot());
partInspection.setQty(model.getQty());
partInspection.setWorkCenterCode(model.getWorkCenterCode());
partInspection.setSourceType(model.getSourceType());
ConvertBean.serviceModelInitialize(partInspection, AuthUtil.getSessionUser().getUserName());
return partInspection;
}
/**
*
*
* @param model
* @param source
* @param target
* @param org
* @return
*/
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);
String zrsum = "";
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
zrsum = (rb.getResultList().get(0)).toString();
}
MesMove move = new MesMove();
move.setMatnr(model.getPart().getPartNo());
move.setOrganizeCode(org);
move.setFactoryCode(org);
move.setLgort(source);
move.setUmlgo(target);
move.setMenge(model.getQty());
move.setMeins(model.getPart().getUnit());
move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
return move;
}
private MesPart checkPart(MesProduceSn produceSn, String org) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
@ -318,7 +606,14 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
return alarmConfigList;
}
private MesInputDefectRecordModel getModel(MesPart part, MesPartTypePicture partTypePicture, Integer frontBack, String org) {
private MesPartInspectionViewModel getModel(MesPartInspection partInspection, MesPart part, MesPartTypePicture partTypePicture, Integer frontBack, String org) {
List<MesPartInspectionDetail> detailList = new ArrayList<>();
if (!StringUtils.isEmpty(partInspection) && partInspection.getInspectionStatus() != MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue()) {
detailList = checkPartInspectionDetail(partInspection, org);
}
//位置
List<MesLocationConfig> locationConfigList = checkLocationConfig(org);
@ -340,49 +635,23 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
}
});
MesInputDefectRecordModel model = new MesInputDefectRecordModel();
MesPartInspectionViewModel model = new MesPartInspectionViewModel();
model.setPart(part);
model.setPartInspectionDetailList(detailList);
model.setPartTypePicture(partTypePicture);
model.setLocationConfigList(locationConfigList);
model.setPartInspection(partInspection);
return model;
}
private void saveDate(List<MesDefectRecord> defectRecordList, MesPart part, String org) {
defectRecordList.forEach(r -> {
r.setId(null);
r.setPartNo(part.getPartNo());
r.setPartName(part.getPartName());
r.setOrganizeCode(org);
ConvertBean.serviceModelInitialize(r, AuthUtil.getSessionUser().getUserName());
});
//保存不良数据
defectRecordService.saveDefect(org, AuthUtil.getSessionUser().getUserName(), defectRecordList);
private List<MesPartInspectionDetail> checkPartInspectionDetail(MesPartInspection partInspection, String org) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getNumEqualPack(partInspection.getId(), "pid", packBean);
List<MesPartInspectionDetail> detailList = partInspectionDetailRepository.findByHqlWhere(packBean);
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_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();
return detailList;
}
MesMove move = new MesMove();
move.setMatnr(part.getPartNo());
move.setOrganizeCode(org);
move.setFactoryCode(org);
move.setLgort(configService.getCfgValue(org, "LGORT"));
move.setUmlgo(configService.getCfgValue(org, "UMLGO"));
move.setMenge(defectRecordList.get(0).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);
}
}

@ -208,18 +208,18 @@ public class MesNcProcessingService implements IMesNcProcessingService {
//查询扫描的条码
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(serialNumber, "serialNumber", packBean);
// DdlPreparedPack.getNumEqualPack(0, "ncType", packBean);
DdlPreparedPack.getNumEqualPack(0, "ncType", packBean);
List<MesDefectRecord> defectRecordList = defectRecordRepository.findByHqlWhere(packBean);
if (CollectionUtils.isEmpty(defectRecordList)) {
throw new ImppBusiException(String.format("【%s】此条码不存在可疑品记录,请检查数据", serialNumber));
throw new ImppBusiException(String.format("【%s】此条码不存在可疑品记录或已经过NC处理,请检查数据", serialNumber));
}
defectRecordList.forEach(k -> {
if (k.getNcType() != 0) {
throw new ImppBusiException(String.format("【%s】此条码已经过NC处理请检查数据", serialNumber));
}
});
//
// defectRecordList.forEach(k -> {
// if (k.getNcType() != 0) {
// throw new ImppBusiException(String.format("【%s】此条码已经过NC处理请检查数据", serialNumber));
// }
// });
return defectRecordList;
@ -405,18 +405,6 @@ public class MesNcProcessingService implements IMesNcProcessingService {
throw new ImppBusiException(String.format("【%s】此条码不存在请检查数据", serialNumber));
}
//根据条码状态判断 是不是已下线条码
//若不是已下线的条码则提示 条码状态 请选择已下线的条码
if (produceSn.getSnStatus() != MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getValue()) {
throw new ImppBusiException(String.format("【%s】此条码状态为【%s】,请选择状态为【%s】状态的条码", serialNumber, MesExtEnumUtil.PRODUCE_SN_STATUS.valueOfDescription(produceSn.getSnStatus()),
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()));
}
return produceSn;
}
}

@ -1,20 +1,27 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesWorkOrderService;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.platform.common.tool.MathOperation;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
import cn.estsh.i3plus.pojo.mes.repository.MesWorkOrderRepository;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import cn.estsh.i3plus.pojo.mes.bean.*;
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 lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Description :
@ -30,7 +37,18 @@ public class MesWorkOrderService implements IMesWorkOrderService {
@Autowired
private MesWorkOrderRepository workOrderRepository;
@Autowired
private MesProductVersionRepository mesProductVersionRDao;
@Autowired
private MesBomRepository mesBomRDao;
@Autowired
private MesWorkCenterRepository mesWorkCenterRDao;
@Autowired
private MesPartRepository mesPartRDao;
@Autowired
private MesProductPlanRepository mesProductPlanRDao;
@Autowired
private MesProductOffLineRepository mesProductOffLineRDao;
@Override
public MesWorkOrder queryMesWorkOrder(MesWorkOrder workOrder) {
@ -76,4 +94,180 @@ public class MesWorkOrderService implements IMesWorkOrderService {
return packBean;
}
@Override
public void doProductReport(List<MesProduceSn> mesProduceSnList) {
//新增初始化
String organizeCode = AuthUtil.getOrganizeCode();
String userName = AuthUtil.getSessionUser().getUserName();
Map<String, List<MesProduceSn>> mesWorkOrderMap = mesProduceSnList.stream().collect(Collectors.groupingBy(MesProduceSn::getPartNo));
Map<String,MesPart> mesPartMap = new HashMap<>();
MesPart mesPart = null;
//查询工单状态
Integer[] orderStatus =new Integer[]{MesExtEnumUtil.ORDER_STATUS.RELEASE.getValue(),MesExtEnumUtil.ORDER_STATUS.process.getValue()};
for (Map.Entry<String, List<MesProduceSn>> mesProduceSn : mesWorkOrderMap.entrySet()) {
List<MesProduceSn> mesWorkOrderList = mesProduceSn.getValue();
//获取物料信息
if(mesPartMap.containsKey(mesProduceSn.getKey())){
mesPart = mesPartMap.get(mesProduceSn.getKey());
}else{
//查询物料信息
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(mesProduceSn.getKey(), "partNo", ddlPackBean);
mesPart = mesPartRDao.getByProperty(ddlPackBean);
if(Objects.isNull(mesPart)){
throw new ImppBusiException(String.format("物料【%s】信息不存在", mesProduceSn.getKey()));
}
mesPartMap.put(mesProduceSn.getKey(),mesPart);
}
//根据物料获取已发布的工单
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(mesPart.getPartNo(), "partNo", ddlPackBean);
DdlPreparedPack.getInPackArray(orderStatus, "workOrderStatus", ddlPackBean);
MesWorkOrder oldMesWorkOrder = workOrderRepository.getByProperty(ddlPackBean);
if(Objects.isNull(oldMesWorkOrder)){
throw new ImppBusiException(String.format("物料【%s】状态未已发布的工单信息不存在", mesPart.getPartNo()));
}
//查询工作中心
ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(oldMesWorkOrder.getWorkCenterCode(), "workCenterCode", ddlPackBean);
MesWorkCenter mesWorkCenter = mesWorkCenterRDao.getByProperty(ddlPackBean);
if (Objects.isNull(mesWorkCenter)) {
throw new ImppBusiException(String.format("产线【%s】不存在", oldMesWorkOrder.getWorkCenterCode()));
}
//获取生产版本
ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(mesPart.getPartNo(), "partNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(mesWorkCenter.getErpWorkCenter(), "workCenterCode", ddlPackBean);
DdlPreparedPack.getStringEqualPack(oldMesWorkOrder.getProductVersion(), "productVersion", ddlPackBean);
MesProductVersion mesProductVersion = mesProductVersionRDao.getByProperty(ddlPackBean);
if (null == mesProductVersion) {
throw new ImppBusiException(String.format("物料【%s】生产版本信息不存在", mesPart.getPartNo()));
}
//物料+生产版本获取bom信息
ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(mesPart.getPartNo(), "partNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(mesProductVersion.getAlternativePartList(), "bomVersion", ddlPackBean);
List<MesBom> mesBoms = mesBomRDao.findByHqlWhere(ddlPackBean);
if (CollectionUtils.isEmpty(mesBoms)) {
throw new ImppBusiException(String.format("物料【%s】生产版本【%s】对应bom信息不存在",
mesPart.getPartNo(), mesProductVersion.getProductVersion()));
}
oldMesWorkOrder.setNum(mesWorkOrderList.size());
oldMesWorkOrder.setReportedQty(MathOperation.add(oldMesWorkOrder.getNum(), oldMesWorkOrder.getReportedQty()));
//更新SAP计划完成数量
saveMesProductPlan(oldMesWorkOrder, false, true);
//更新工单状态
double unCompleteQty = MathOperation.sub(oldMesWorkOrder.getQty(), oldMesWorkOrder.getReportedQty());
oldMesWorkOrder.setUnCompleteQty(unCompleteQty > 0 ? unCompleteQty : 0);
if (oldMesWorkOrder.getReportedQty() > oldMesWorkOrder.getQty()) {
throw new ImppBusiException(String.format("工单报工数量【%s】大于工单数量【%s】,不允许报工",
oldMesWorkOrder.getReportedQty(), oldMesWorkOrder.getQty()));
} else if (Objects.equals(oldMesWorkOrder.getReportedQty(), oldMesWorkOrder.getQty())) {
oldMesWorkOrder.setWorkOrderStatus(MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue());
} else {
oldMesWorkOrder.setWorkOrderStatus(MesExtEnumUtil.ORDER_STATUS.process.getValue());
}
ConvertBean.serviceModelUpdate(oldMesWorkOrder,userName);
workOrderRepository.update(oldMesWorkOrder);
//保存数据
List<MesProductOffLine> mesProductOffLineList = new ArrayList<>();
MesProductOffLine newMesProductOffLine;
for (MesProduceSn produceSn : mesWorkOrderList) {
for (MesBom mesBom : mesBoms) {
newMesProductOffLine = new MesProductOffLine();
newMesProductOffLine.setReportPartNo(oldMesWorkOrder.getPartNo());
newMesProductOffLine.setReportPartNameRdd(oldMesWorkOrder.getPartNameRdd());
newMesProductOffLine.setItemPartNo(mesBom.getItemPartNo());
newMesProductOffLine.setItemPartNameRdd(mesBom.getItemPartName());
newMesProductOffLine.setItemQty(mesBom.getItemQty());
newMesProductOffLine.setAlort(mesProductVersion.getReceiveInventoryPoint());
newMesProductOffLine.setStgeLoc(mesProductVersion.getShipInventoryPoint());
newMesProductOffLine.setQty(1d);
newMesProductOffLine.setReportSn(produceSn.getProductSn());
newMesProductOffLine.setBomVersion(oldMesWorkOrder.getProductVersion());
newMesProductOffLine.setSerialNumber(produceSn.getProductSn());
newMesProductOffLine.setUnit(mesBom.getUnit());
newMesProductOffLine.setItemUnit(mesBom.getItemUnit());
newMesProductOffLine.setWorkOrderNo(oldMesWorkOrder.getWorkOrderNo());
newMesProductOffLine.setWorkCenterCode(oldMesWorkOrder.getWorkCenterCode());
newMesProductOffLine.setWorkCellCode(oldMesWorkOrder.getWorkCellCode());
newMesProductOffLine.setReportType(oldMesWorkOrder.getReportType());
newMesProductOffLine.setSapWorkCenter(oldMesWorkOrder.getErpWorkCenter());
newMesProductOffLine.setOrganizeCode(oldMesWorkOrder.getOrganizeCode());
ConvertBean.serviceModelInitialize(newMesProductOffLine, userName);
mesProductOffLineList.add(newMesProductOffLine);
}
}
mesProductOffLineRDao.saveAll(mesProductOffLineList);
}
}
private void saveMesProductPlan(MesWorkOrder bean, boolean isInsert, boolean isReport) {
if (StringUtil.isEmpty(bean.getPlanOrderNo())) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getPartNo(), "planPartNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(bean.getPlanStartTime(), "planStartDate", ddlPackBean);
DdlPreparedPack.getStringEqualPack(bean.getPlanEndTime(), "planEndDate", ddlPackBean);
MesProductPlan mesProductPlan = mesProductPlanRDao.getByProperty(ddlPackBean);
if (null == mesProductPlan) {
MesProductPlan mesPlanOrder = new MesProductPlan();
mesPlanOrder.setPlanOrderNo("");
mesPlanOrder.setPlanQty(bean.getQty());
mesPlanOrder.setPlanPartNo(bean.getPartNo());
mesPlanOrder.setCompleteQty(0d);
mesPlanOrder.setUncompleteQty(bean.getQty());
mesPlanOrder.setUnit(bean.getUnit());
mesPlanOrder.setPlanStartDate(bean.getPlanStartTime());
mesPlanOrder.setPlanEndDate(bean.getPlanEndTime());
mesPlanOrder.setPartMappingWorkCenterCode(bean.getErpWorkCenter());
mesPlanOrder.setPlanOrganizeCode(bean.getOrganizeCode());
mesPlanOrder.setOrganizeCode(bean.getOrganizeCode());
ConvertBean.serviceModelInitialize(mesPlanOrder, bean.getCreateUser());
mesProductPlanRDao.insert(mesPlanOrder);
} else {
if (isInsert) {
mesProductPlan.setPlanQty(MathOperation.add(mesProductPlan.getPlanQty(), bean.getQty()));
} else {
//报工
if (isReport) {
mesProductPlan.setCompleteQty(MathOperation.add(mesProductPlan.getCompleteQty(), bean.getNum()));
//报工调整
} else {
mesProductPlan.setCompleteQty(MathOperation.sub(mesProductPlan.getCompleteQty(), bean.getNum()));
}
}
mesProductPlan.setUncompleteQty(MathOperation.sub(mesProductPlan.getPlanQty(), mesProductPlan.getCompleteQty()));
ConvertBean.serviceModelUpdate(mesProductPlan, bean.getCreateUser());
mesProductPlanRDao.update(mesProductPlan);
}
} else {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(bean.getPlanOrderNo(), "planOrderNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(bean.getPartNo(), "planPartNo", ddlPackBean);
MesProductPlan mesProductPlan = mesProductPlanRDao.getByProperty(ddlPackBean);
if (null == mesProductPlan) {
throw new ImppBusiException(String.format("SAP计划单号【%s】物料【%s】,不存在", bean.getPlanOrderNo(), bean.getPartNo()));
}
if (!isInsert) {
if (Objects.isNull(mesProductPlan.getCompleteQty())) {
mesProductPlan.setCompleteQty(0d);
}
//报工
if (isReport) {
mesProductPlan.setCompleteQty(MathOperation.add(mesProductPlan.getCompleteQty(), bean.getNum()));
//报工调整
} else {
mesProductPlan.setCompleteQty(MathOperation.sub(mesProductPlan.getCompleteQty(), bean.getNum()));
}
mesProductPlan.setUncompleteQty(MathOperation.sub(mesProductPlan.getPlanQty(), mesProductPlan.getCompleteQty()));
ConvertBean.serviceModelUpdate(mesProductPlan, bean.getCreateUser());
mesProductPlanRDao.update(mesProductPlan);
}
}
}
}

@ -0,0 +1,58 @@
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;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author :
* @CreateDate : 2024-05-09 18:08
* @Modify:
**/
@Data
public class MesPartInspectionInputModel {
@ApiParam("物料")
private MesPart part;
@ApiParam("产线代码")
private String workCenterCode;
@ApiParam("物料号")
private String partNo;
@ApiParam("条码")
private String serialNumber;
@ApiParam("正反面")
private Integer frontBack;
@ApiParam("批次")
private String lot;
@ApiParam("数量")
private Integer qty;
@ApiParam("来源-单件或批次")
private Integer sourceType;
@ApiParam("是否返工单完成单据")
private boolean transferFlg = false;
@ApiParam("NC-零件检测-单据")
private MesPartInspection partInspection;
@ApiParam("NC-零件检测详情")
private List<MesPartInspectionDetail> partInspectionDetailList;
}

@ -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;
@ -17,22 +19,34 @@ import java.util.Map;
* @Modify:
**/
@Data
public class MesInputDefectRecordModel {
public class MesPartInspectionViewModel {
@ApiParam("位置")
List<MesLocationConfig> locationConfigList;
private List<MesLocationConfig> locationConfigList;
@ApiParam("NC-零件检测详情")
private List<MesPartInspectionDetail> partInspectionDetailList;
@ApiParam("图片")
private MesPartTypePicture partTypePicture;
@ApiParam("NC-零件检测-单据")
private MesPartInspection partInspection;
@ApiParam("物料")
private MesPart part;
@ApiParam("是否返工单完成单据")
private boolean transferFlg = false;
@ApiParam("位置是否标黄Map")
private Map<String, Boolean> map;
@ApiParam("来源-单件或批次")
private Integer sourceType;
}
Loading…
Cancel
Save