From 58150fda03d0e2664cfd7cc621c03315a286fb67 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Tue, 26 Sep 2023 16:06:03 +0800 Subject: [PATCH] feat:补充提交 --- screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 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 8fcf46e..de6bc3f 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 @@ -119,10 +119,13 @@ i = Integer.parseInt(o.toString()) + 1; } //������ - String allocationNum = "JBD" + dateString + String.format("%04d", i); + String allocationNum = "JBD-" + dateString + String.format("%04d", i); allocation.setAllocationNum(allocationNum); if(Objects.nonNull(allocationCond.getEscalationUnitId())&&allocationCond.getEscalationUnitId().toString().length()==6) { allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue()); + } + if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationCond.getState())) { + allocation.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value); } //������������������ allocationMapper.insert(allocation); @@ -274,7 +277,8 @@ return allocationExt; } - private AllocationExt oneAllocation(Integer id){ + @Override + public AllocationExt oneAllocation(Integer id){ return this.baseMapper.extOne(id); } @@ -282,8 +286,8 @@ @Transactional public void changeAllocation(AllocationChangeCond changeCond) { AllocationExt allocationExt = oneAllocation(changeCond.getAllocationId()); - if(!AllocationApproveEnum.NEW_BUILT.value.equals(allocationExt.getState())) { - throw new BusinessException("������������������������������������"); + if(!AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(allocationExt.getState())) { + throw new BusinessException("������������������������������������"); } Allocation allocation = new Allocation(); allocation.setAllocationId(changeCond.getAllocationId()); @@ -307,8 +311,8 @@ @Transactional public void checkAllocation(AllocationCheckCond checkCond) { AllocationExt allocationExt = oneAllocation(checkCond.getAllocationId()); - if(!AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(allocationExt.getState())) { - throw new BusinessException("������������������������������������"); + if(!AllocationApproveEnum.IN_APPROVAL.value.equals(allocationExt.getState())) { + throw new BusinessException("������������������������������������������"); } QxUser qxUser = UserHelper.getCurrentUser(); Allocation allocation = new Allocation(); -- Gitblit v1.8.0