| | |
| | | @Slf4j |
| | | public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocation> implements AllocationService { |
| | | |
| | | private final Integer NEW_BUILT = 10; |
| | | @Autowired |
| | | private SysDictTypeMapper sysDictTypeMapper; |
| | | @Autowired |
| | |
| | | if(Objects.nonNull(allocationCond.getEscalationUnitId())&&allocationCond.getEscalationUnitId().toString().length()==6) { |
| | | allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue()); |
| | | } |
| | | if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationCond.getState())) { |
| | | if(NEW_BUILT.equals(allocationCond.getState())) { |
| | | allocation.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value); |
| | | } |
| | | //获取新建图片 |
| | | allocationMapper.insert(allocation); |
| | | redisTemplate.opsForValue().set(RedisConstants.JBD_DATA,i); |
| | | if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationCond.getState())) { |
| | | if(NEW_BUILT.equals(allocationCond.getState())) { |
| | | //添加流程数据 |
| | | ApproveTable approveTable = new ApproveTable(); |
| | | approveTable.setRelationId(allocation.getAllocationId()); |
| | | approveTable.setState(AllocationApproveEnum.NEW_BUILT.value); |
| | | approveTable.setState(NEW_BUILT); |
| | | approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value); |
| | | approveTable.setStateName(AllocationApproveEnum.NEW_BUILT.name); |
| | | approveTable.setStateName("新建"); |
| | | approveTableService.saveResult(approveTable); |
| | | } |
| | | fileTableService.upDateResult(allocationCond.getFileBaseList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value); |
| | |
| | | if(Objects.nonNull(allocationUpdateCond.getEscalationUnitId())&&allocationUpdateCond.getEscalationUnitId().toString().length()==6) { |
| | | allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue()); |
| | | } |
| | | if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationUpdateCond.getState())) { |
| | | if(NEW_BUILT.equals(allocationUpdateCond.getState())) { |
| | | //添加流程数据 |
| | | ApproveTable approveTable = new ApproveTable(); |
| | | approveTable.setRelationId(allocation.getAllocationId()); |
| | | approveTable.setState(AllocationApproveEnum.NEW_BUILT.value); |
| | | approveTable.setState(NEW_BUILT); |
| | | approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value); |
| | | approveTable.setStateName(AllocationApproveEnum.NEW_BUILT.name); |
| | | approveTable.setStateName("新建"); |
| | | approveTableService.saveResult(approveTable); |
| | | } |
| | | if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationUpdateCond.getState())) { |
| | | if(NEW_BUILT.equals(allocationUpdateCond.getState())) { |
| | | allocation.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value); |
| | | } |
| | | fileTableService.upDateResult(allocationUpdateCond.getFileBaseList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value); |