jiangping
2024-10-10 29d76f8a034cb2bbeccee258e97f66f2e2d87451
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformBooksServiceImpl.java
@@ -60,6 +60,9 @@
    private PlatformReasonMapper platformReasonMapper;
    @Autowired
    private PlatformGroupMapper platformGroupMapper;
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
@@ -241,6 +244,13 @@
        if(Objects.isNull(platformReason)|| !Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"入园原因信息异常,请刷新重试");
        }
        PlatformGroup platformGroup= platformGroupMapper.selectById(platformReason.getGroupId());
        if(Objects.isNull(platformGroup)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到绑定月台组数据");
        }
        if(!Constants.equalsInteger(platformGroup.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"绑定月台组数据异常,请联系管理员");
        }
        //查询车辆是否为自有车
        if(carsMapper.selectCount(new QueryWrapper<Cars>().lambda().eq(Cars::getIsdeleted,Constants.ZERO).eq(Cars::getCode,platformBooksApplyDTO.getCarCodeFront()))>Constants.ZERO){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+platformBooksApplyDTO.getCarCodeFront()+"]属于内部车辆,无法预约");