|
|
|
@ -123,6 +123,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(partInspection.getQty(), "qty", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(partInspection.getRefundFlag(), "refundFlag", packBean);
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
|
|
|
|
pager = PagerHelper.getPager(pager, partInspectionRepository.findByHqlWhereCount(packBean));
|
|
|
|
@ -387,11 +388,15 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
|
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.NORMAL.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
|
MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
@ -444,12 +449,15 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.REWORK.getValue());
|
|
|
|
|
model.getPartInspection().setReworkTaskId(reworkTask.getId());
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(),model.getUserName());
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
@ -484,6 +492,11 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue());
|
|
|
|
|
model.getPartInspection().setRejectQty(model.getPartInspection().getQty());
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
if (isOrder) {
|
|
|
|
|
String sourceValue = source;
|
|
|
|
@ -531,12 +544,15 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
|
|
|
|
|
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.RELEASE.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), model.getUserName());
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
String sourceValue = configService.getCfgValue(org, "UMLGO");
|
|
|
|
|
|
|
|
|
|
if (model.getOptType() == 2) {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
//移库 转正常、放行:8000移至2000
|
|
|
|
|
MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move,model.getUserName());
|
|
|
|
|