| | |
| | | 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); |
| | | redisTemplate.opsForValue().set(RedisConstants.JBD_DATA,i); |
| | |
| | | @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()); |
| | |
| | | @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(); |