diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java index b2cee29..b1303e5 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java @@ -590,6 +590,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService move.setZrsum(zrsum); move.setPostDate(TimeTool.getToday()); move.setPostTime(TimeTool.getTimeShortWithColon()); + move.setMoveType(MesExtEnumUtil.MOVE_TYPE.SUSPICIOUS_MOVE.getValue()); ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName()); return move; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java index 3f09ed3..2ca9a9f 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java @@ -166,14 +166,14 @@ public class MesNcProcessingService implements IMesNcProcessingService { MesDefectType person = StringUtil.isEmpty(model.getPerson())?new MesDefectType():model.getPerson(); //保存数据 - saveDate(model, model.getPart(), type, person, org,model.getAreaCode()); + saveDate(model, model.getPart(), type, person, org,model.getInventoryLocationCode()); } else { Integer type = model.getType(); MesDefectType person = StringUtil.isEmpty(model.getPerson())?new MesDefectType():model.getPerson(); //保存数据 - saveDate(model, model.getPart(), type, person, org,model.getAreaCode()); + saveDate(model, model.getPart(), type, person, org,model.getInventoryLocationCode()); } } @@ -342,7 +342,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { //移库 转正常、放行:8000移至2000 // MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); - MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org); + MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org,MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE); moveRepository.save(move); } else if (type == MesExtEnumUtil.NC_TYPE.REWORK.getValue()) { @@ -390,7 +390,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { model.getPartInspection().setReworkTaskId(reworkTask.getId()); partInspectionRepository.save(model.getPartInspection()); - MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); + MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org,MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE); moveRepository.save(move); } else if (type == MesExtEnumUtil.NC_TYPE.SCRAP.getValue()) { @@ -409,7 +409,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { partInspectionRepository.save(model.getPartInspection()); //移库 转报废 根据责任方库区对应关系的主数据,选择哪个责任方,就移动到哪个库区(8000移至8002/8003) - MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); + MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org,MesExtEnumUtil.MOVE_TYPE.SCRAP_MOVE); // MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "SCRAP"), org); moveRepository.save(move); @@ -433,7 +433,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { //移库 转正常、放行:8000移至2000 // MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); - MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org); + MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "LGORT"), org,MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE); moveRepository.save(move); } @@ -455,7 +455,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { return produceSn; } - private MesMove createMove(MesNcProcessingInputModel model, String source, String target, String org) { + private MesMove createMove(MesNcProcessingInputModel model, String source, String target, String org,MesExtEnumUtil.MOVE_TYPE moveType) { GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM"); serialNoModel.setPartNo(model.getPart().getPartNo()); ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1); @@ -475,6 +475,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { move.setZrsum(zrsum); move.setPostDate(TimeTool.getToday()); move.setPostTime(TimeTool.getTimeShortWithColon()); + move.setMoveType(moveType.getValue()); ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName()); return move; } diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesNcProcessingInputModel.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesNcProcessingInputModel.java index 32d267a..d05122d 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesNcProcessingInputModel.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/model/MesNcProcessingInputModel.java @@ -30,7 +30,7 @@ public class MesNcProcessingInputModel { private MesDefectType person; @ApiParam("区域代码") - private String areaCode; + private String inventoryLocationCode; @ApiParam("物料") private MesPartSap part;