cjl
2023-10-20 c50fc1f181bf9d72a02f7b65eb00273213774cad
fix:状态问题修复
1 files modified
13 ■■■■■ changed files
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java 13 ●●●●● patch | view | raw | blame | history
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;
    }
}