refactor(task): 统一来料检测任务中检验类型为整数类型
- 将QmsIncomingInspectionTask、QmsIncomingInspectionTaskSearchQO和QmsIncomingInspectionTaskVO中的inspectionType由Long改为Integer - 去除来料检测任务中根据字典项Id获取检验类型的逻辑,直接使用请求中的类型值 - 修改注释说明检验类型仅支持0(来料检测)和1(盘库检测) - 保持检验类型字段与业务实际类型对应,简化代码逻辑
This commit is contained in:
parent
9317c2f9b5
commit
357366b84d
|
|
@ -148,12 +148,6 @@ public class IncomingInspectionTaskControllerService {
|
||||||
LocalDateTime requiredFinishTime = now.plusDays(standard.getInspectionCycle());
|
LocalDateTime requiredFinishTime = now.plusDays(standard.getInspectionCycle());
|
||||||
|
|
||||||
// 7. 构建并保存来料检测任务
|
// 7. 构建并保存来料检测任务
|
||||||
Long inspectionType = switch (request.getType()) {
|
|
||||||
case 0 -> dictionaryItemService.getIdByCode("TypeOfIncomingInspection", "IncomingInspection");
|
|
||||||
case 1 -> dictionaryItemService.getIdByCode("TypeOfIncomingInspection", "InventoryDetection");
|
|
||||||
default -> throw new NflgException(STATE.BusinessError, "不支持的检验类型");
|
|
||||||
};
|
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(inspectionType)).throwMessage("检验类型不存在");
|
|
||||||
QmsIncomingInspectionTask task = new QmsIncomingInspectionTask()
|
QmsIncomingInspectionTask task = new QmsIncomingInspectionTask()
|
||||||
.setTaskNo(taskNo)
|
.setTaskNo(taskNo)
|
||||||
.setMaterialId(material.getId())
|
.setMaterialId(material.getId())
|
||||||
|
|
@ -165,7 +159,7 @@ public class IncomingInspectionTaskControllerService {
|
||||||
.setPurchaseOrderNo(request.getPurchaseOrderNo())
|
.setPurchaseOrderNo(request.getPurchaseOrderNo())
|
||||||
.setPurchaseOrderLine(request.getPurchaseOrderLine())
|
.setPurchaseOrderLine(request.getPurchaseOrderLine())
|
||||||
.setFactory(request.getFactory())
|
.setFactory(request.getFactory())
|
||||||
.setInspectionType(inspectionType)
|
.setInspectionType(request.getType())
|
||||||
.setInspectionQty(request.getInspectionQty())
|
.setInspectionQty(request.getInspectionQty())
|
||||||
.setInspectionStatus((short) 0)
|
.setInspectionStatus((short) 0)
|
||||||
.setInspectorId(inspectorId)
|
.setInspectorId(inspectorId)
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ public class QmsIncomingInspectionTaskSearchQO extends PageQO {
|
||||||
private Boolean isOverdue;
|
private Boolean isOverdue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测类型(字典项id)
|
* 检测类型,0:来料检测;1:盘库检测
|
||||||
*/
|
*/
|
||||||
private Long inspectionType;
|
private Integer inspectionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送检日期开始
|
* 送检日期开始
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,9 @@ public class QmsIncomingInspectionTaskVO {
|
||||||
private String factory;
|
private String factory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测类型(字典项id)
|
* 检测类型,0:来料检测;1:盘库检测
|
||||||
*/
|
*/
|
||||||
private Long inspectionType;
|
private Integer inspectionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验数量
|
* 检验数量
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,9 @@ public class QmsIncomingInspectionTask implements Serializable {
|
||||||
private String factory;
|
private String factory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测类型,字典项id
|
* 检测类型,0:来料检测;1:盘库检测
|
||||||
*/
|
*/
|
||||||
private Long inspectionType;
|
private Integer inspectionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验数量,即送检数量
|
* 检验数量,即送检数量
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue