| | |
| | | private PlatformLogMapper platformLogMapper; |
| | | @Autowired |
| | | private PlatformReasonMapper platformReasonMapper; |
| | | @Autowired |
| | | private PlatformGroupMapper platformGroupMapper; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | platformBooks.setEditDate(new Date()); |
| | | platformBooks.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooks.getReasonId()); |
| | | if(Objects.isNull(platformReason)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到入园原因数据"); |
| | | } |
| | | PlatformGroup platformGroup = platformGroupMapper.selectById(platformReason.getGroupId()); |
| | | if(Objects.isNull(platformGroup)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到入园原因配置月台组数据"); |
| | | } |
| | | |
| | | //生成任务记录 |
| | | PlatformJob platformJob = platformBooks.toPlatformJob(); |
| | | platformJob.setId(null); |
| | | platformJob.setPlatformGroupId(platformReason.getGroupId().intValue()); |
| | | if(Constants.equalsInteger(platformGroup.getType(),Constants.ZERO)){ |
| | | platformJob.setType(Constants.platformJobType.wxcxh); |
| | | }else if(Constants.equalsInteger(platformGroup.getType(),Constants.ONE)){ |
| | | platformJob.setType(Constants.platformJobType.wxczh); |
| | | }else{ |
| | | platformJob.setType(Constants.platformJobType.sgscxh); |
| | | } |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey()); |
| | | platformJobMapper.insert(platformJob); |
| | | platformBooks.setJobId(platformJob.getId()); |