tags/yfai-pcn-ext-v1.0
gsz 11 months ago
commit 0a6c10a3f7

@ -590,6 +590,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
move.setZrsum(zrsum); move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday()); move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon()); move.setPostTime(TimeTool.getTimeShortWithColon());
move.setMoveType(MesExtEnumUtil.MOVE_TYPE.SUSPICIOUS_MOVE.getValue());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName()); ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
return move; return move;
} }

@ -166,14 +166,14 @@ public class MesNcProcessingService implements IMesNcProcessingService {
MesDefectType person = StringUtil.isEmpty(model.getPerson())?new MesDefectType():model.getPerson(); 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 { } else {
Integer type = model.getType(); Integer type = model.getType();
MesDefectType person = StringUtil.isEmpty(model.getPerson())?new MesDefectType():model.getPerson(); 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 //移库 转正常、放行8000移至2000
// MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); // 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); moveRepository.save(move);
} else if (type == MesExtEnumUtil.NC_TYPE.REWORK.getValue()) { } else if (type == MesExtEnumUtil.NC_TYPE.REWORK.getValue()) {
@ -390,7 +390,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
model.getPartInspection().setReworkTaskId(reworkTask.getId()); model.getPartInspection().setReworkTaskId(reworkTask.getId());
partInspectionRepository.save(model.getPartInspection()); 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); moveRepository.save(move);
} else if (type == MesExtEnumUtil.NC_TYPE.SCRAP.getValue()) { } else if (type == MesExtEnumUtil.NC_TYPE.SCRAP.getValue()) {
@ -409,7 +409,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
partInspectionRepository.save(model.getPartInspection()); partInspectionRepository.save(model.getPartInspection());
//移库 转报废 根据责任方库区对应关系的主数据选择哪个责任方就移动到哪个库区8000移至8002/8003 //移库 转报废 根据责任方库区对应关系的主数据选择哪个责任方就移动到哪个库区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); // MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), configService.getCfgValue(org, "SCRAP"), org);
moveRepository.save(move); moveRepository.save(move);
@ -433,7 +433,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
//移库 转正常、放行8000移至2000 //移库 转正常、放行8000移至2000
// MesMove move = createMove(model, configService.getCfgValue(org, "UMLGO"), areaCode, org); // 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); moveRepository.save(move);
} }
@ -455,7 +455,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
return produceSn; 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"); GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
serialNoModel.setPartNo(model.getPart().getPartNo()); serialNoModel.setPartNo(model.getPart().getPartNo());
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1); ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
@ -475,6 +475,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
move.setZrsum(zrsum); move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday()); move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon()); move.setPostTime(TimeTool.getTimeShortWithColon());
move.setMoveType(moveType.getValue());
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName()); ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
return move; return move;
} }

@ -30,7 +30,7 @@ public class MesNcProcessingInputModel {
private MesDefectType person; private MesDefectType person;
@ApiParam("区域代码") @ApiParam("区域代码")
private String areaCode; private String inventoryLocationCode;
@ApiParam("物料") @ApiParam("物料")
private MesPartSap part; private MesPartSap part;

Loading…
Cancel
Save