k94314517
2024-06-03 c51def5fc636116513082b10f97ba0339231f33a
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -863,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)){
@@ -876,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);
@@ -959,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 审批未通过通知
@@ -1059,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(),"未查询到司机信息");