doum
17 小时以前 4e1d90d7cfaef3c7a2893e6fcb946ce7dabe938e
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -2638,8 +2638,10 @@
    @Transactional
    public void autoPlatformCallCar(WmsService wmsService){
        //查询当前开启的月台数据
        List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO)
                .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE)
        List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda()
                .eq(PlatformGroup::getStatus,Constants.ZERO)
                .eq(PlatformGroup::getIsdeleted,Constants.ZERO)
                .eq(PlatformGroup::getAutoCall,Constants.ONE)
        );
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(allPlatformGroup)){
            log.error("========月台自动叫号============结束:无自动叫号月台组");
@@ -2672,6 +2674,7 @@
        List<PlatformJob> noticeList = new ArrayList<>();
        //循环所有自动叫号月台
        for (PlatformGroup platformGroup:autoCallGroup) {
            log.error("========月台组自动叫号============ --"+platformGroup.getName());
            List<Platform> platforms = platformList.stream().filter(i->Constants.equalsInteger(i.getGroupId(),platformGroup.getId())).collect(Collectors.toList());
            if(CollectionUtils.isEmpty(platforms)){
                log.error("========月台自动叫号============结束:无自动叫号月台-"+platformGroup.getName());
@@ -2705,7 +2708,8 @@
                Integer workNum = platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda()
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .eq(PlatformJob::getPlatformId,platform.getId())
                        .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())).intValue();
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),Constants.PlatformJobStatus.WORKING.getKey())
                ) .intValue();
                if(workNum>=workingNum){
                    log.error("========月台自动叫号============结束:超过自动叫号作业限制-"+platform.getName());
                    continue;
@@ -2834,8 +2838,7 @@
                if((((platforms.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()).size()>Constants.ZERO)?Constants.ONE:Constants.ZERO)
                                +
                                ((platforms.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList()).size()>Constants.ZERO)?Constants.ONE:Constants.ZERO)
                )==Constants.ONE
                ){
                )==Constants.ONE ){
                    isDefaul = true;
                }
            }
@@ -2994,6 +2997,9 @@
                            typeParam = 1;//
                        }
                    }
                }else{
                    //预约车全部散件
                    typeParam = 1;
                }
            }
@@ -3030,6 +3036,36 @@
                .eq(PlatformJob::getId,platformJob.getId())
        );
    }
    @Override
    public void backToWatiSign(Integer jobId,LoginUserInfo loginUserInfo){
        if(Objects.isNull(jobId)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        PlatformJob platformJob = platformJobMapper.selectById(jobId);
        if(Objects.isNull(platformJob)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,状态已流转");
        }
        PlatformJob oldPlatformJob = new PlatformJob();
        BeanUtils.copyProperties(platformJob,oldPlatformJob);
        platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey());
        platformJob.setEditDate(new Date());
        platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda()
                .eq(PlatformJob::getId,platformJob.getId())
                .set(PlatformJob::getEditor,loginUserInfo.getId())
                .set(PlatformJob::getSignDate,null)
                .set(PlatformJob::getSingType,null)
                .set(PlatformJob::getSignDistance,null)
                .set(PlatformJob::getStatus,platformJob.getStatus())
                .set(PlatformJob::getEditDate,platformJob.getEditDate()));
        //存储操作日志
        savePlatformLog(Constants.PlatformJobLogType.BACK_TO_WAIT_SIGNIN.getKey(),oldPlatformJob,platformJob,
                Constants.PlatformJobLogType.BACK_TO_WAIT_SIGNIN.getInfo());
    }