From c50fc1f181bf9d72a02f7b65eb00273213774cad Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Fri, 20 Oct 2023 18:12:36 +0800
Subject: [PATCH] fix:状态问题修复
---
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
index 9f7971d..2c4a3cb 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -118,7 +118,7 @@
//������
String allocationNum = "JBD-" + dateString + String.format("%04d", i);
allocation.setAllocationNum(allocationNum);
- if(Objects.nonNull(allocationCond.getEscalationUnitId())&&allocationCond.getEscalationUnitId().toString().length()==6) {
+ if(Objects.nonNull(allocationCond.getEscalationUnitId())&& escalationType(allocationCond.getEscalationUnitId())) {
allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue());
}
if(NEW_BUILT.equals(allocationCond.getState())) {
@@ -154,6 +154,9 @@
}
//������������������
Allocation allocation = allocationUpdateCond.convert();
+ if(Objects.nonNull(allocationUpdateCond.getEscalationUnitId())&& escalationType(allocationUpdateCond.getEscalationUnitId())) {
+ allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue());
+ }
if(Objects.nonNull(allocationUpdateCond.getEscalationUnitId())&&allocationUpdateCond.getEscalationUnitId().toString().length()==6) {
allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue());
}
@@ -782,4 +785,12 @@
}
return 1;
}
+ private boolean escalationType(Integer id){
+ boolean f = false;
+ String code = responsibilityUnitMapper.selectAreaCode(id);
+ if(code.length() == 6){
+ return true;
+ }
+ return f;
+ }
}
--
Gitblit v1.8.0