jiangping
2024-06-03 e7b6e88a424a751ac657e150f52d72f1173321c9
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -713,7 +713,8 @@
            if(Constants.equalsInteger(approve.getType(),Constants.ONE)){
                continue;
            }
            if(Constants.equalsInteger(approve.getChekorId(),memberId)){
            if(Constants.equalsInteger(approve.getChekorId(),memberId)
                    &&Constants.equalsInteger(approve.getStatus(), Constants.ONE)){
                approveDataVO.setCanBeApproved(Constants.ONE);
                approveDataVO.setDriverParam(approve.getDriverParam());
            }
@@ -721,11 +722,9 @@
                approveList.add(approve);
            }
        }
        if(CollectionUtils.isEmpty(approveList)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批信息:级别数据异常");
        }
        return  approveList;
    }
@@ -779,8 +778,6 @@
                        .orderByAsc(Approve::getLevel)
                        .orderByAsc(Approve::getId)
        );
        String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()
                +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode();
        for (Approve approve:approveAllList ) {
@@ -866,6 +863,9 @@
                .lambda()
                .eq(Approve::getObjId,approveDTO.getObjId())
                .eq(Approve::getObjType,approveDTO.getObjType())
                .eq(Approve::getChekorId,approveDTO.getLoginUserInfo().getMemberId())
                .eq(Approve::getType,Constants.ZERO)
                .eq(Approve::getStatus,Constants.approveStatus.auditIng)
                .last(" limit 1")
        );
        if(Objects.isNull(approve)){
@@ -879,9 +879,9 @@
        approve.setStatus(approveDTO.getStatus());
        approve.setCheckInfo(approveDTO.getCheckInfo());
        approve.setCheorId(approveDTO.getLoginUserInfo().getMemberId().toString());
        approve.setCheckorName(approve.getLoginUserInfo().getRealname());
        approve.setCheckorName(approveDTO.getLoginUserInfo().getRealname());
        approve.setCheckDate(new Date());
        approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"审批通过":approveDTO.getCheckInfo());
        approve.setStatusInfo(approveDTO.getStatus()==Constants.TWO?"已同意":approveDTO.getCheckInfo());
        Visits visits = new Visits();
        CarUseBook carUseBook = new CarUseBook();
        this.dealBusinessData(approveDTO,approve,visits,carUseBook);
@@ -962,10 +962,9 @@
        }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals(
                Constants.approveObjectType.unCityUseCar)){
            // 市内外用车申请
            carUseBookMapper.updateById(carUseBook);
            if(dealBusinessBean){
                //TODO 发送审批通过消息
                carUseBookMapper.updateById(carUseBook);
            }else if(approveDTO.getStatus().equals(Constants.THREE)){
                //TODO 审批未通过通知
@@ -1062,7 +1061,7 @@
            carUseBook.setEditDate(new Date());
            carUseBook.setEditor(approveDTO.getLoginUserInfo().getMemberId());
            //如果配置修改司机 且 入参了更换后司机信息
            if(approveDTO.getStatus()==Constants.TWO&&approve.getDriverParam().equals(Constants.ONE)){
            if(approveDTO.getStatus()==Constants.TWO&&Constants.equalsInteger(approve.getDriverParam(),Constants.ONE)){
                CarDriver carDriver = carDriverMapper.selectById(approveDTO.getDriverId());
                if(Objects.isNull(carDriver)){
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到司机信息");