| | |
| | | .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)){ |
| | |
| | | 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); |
| | |
| | | }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 审批未通过通知 |
| | | |
| | |
| | | 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(),"未查询到司机信息"); |