| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public boolean check(Integer id, Integer sate) { |
| | | public boolean check(Integer id, Integer state) { |
| | | AllocationExtensionExt extensionExt = this.baseMapper.extOne(id); |
| | | if(!AllocationExtensionApproveEnum.APPLYING.value.equals(extensionExt.getState())){ |
| | | throw new BusinessException("审批中才能发起审批!"); |
| | | } |
| | | AllocationExtension allocationExtension = new AllocationExtension(); |
| | | allocationExtension.setId(id); |
| | | allocationExtension.setState(sate); |
| | | allocationExtension.setState(state); |
| | | this.baseMapper.updateById(allocationExtension); |
| | | if(AllocationExtensionApproveEnum.PASS.value.equals(sate)){ |
| | | if(AllocationExtensionApproveEnum.PASS.value.equals(state)){ |
| | | Allocation allocation = new Allocation(); |
| | | allocation.setAllocationId(extensionExt.getAllocationId()); |
| | | allocation.setChangeDay(extensionExt.getChangeDay()+extensionExt.getExtensionNum()); |