jiangping
2024-10-10 d7c484c2f5ff13b000b38cc2d078bfe752d3dad8
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -98,6 +98,8 @@
    private PlatformLogMapper platformLogMapper;
    @Autowired
    private PlatformReasonMapper platformReasonMapper;
    @Autowired
    private PlatformGroupMapper platformGroupMapper;
    @Autowired
@@ -1513,12 +1515,25 @@
            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());