Compare commits
No commits in common. "d051cbee66f456eacafa9dd34820501959d2522a" and "4052053d4b9942b97c5389c8c561088b21cc5b48" have entirely different histories.
d051cbee66
...
4052053d4b
@ -238,7 +238,7 @@ public class WorkReportServiceImpl extends ServiceImpl<WorkReportMapper, WorkRep
|
|||||||
WorkReportPageReqVO pageReqVO = new WorkReportPageReqVO();
|
WorkReportPageReqVO pageReqVO = new WorkReportPageReqVO();
|
||||||
pageReqVO.setId(id);
|
pageReqVO.setId(id);
|
||||||
WorkReportRespVO workReport = reportMapper.selectByIdOne(pageReqVO);
|
WorkReportRespVO workReport = reportMapper.selectByIdOne(pageReqVO);
|
||||||
List<Long> userIds = Arrays.stream(workReport.getReportTo().split(",")).map(Long::parseLong)
|
List<Long> userIds = Arrays.stream(workReport.getReportTo().split(",")).map(Long::parseLong) // 转换为 Long 类型
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
List<AdminUserDO> userList = adminUserService.getUserList(userIds);
|
List<AdminUserDO> userList = adminUserService.getUserList(userIds);
|
||||||
|
|||||||
@ -50,11 +50,6 @@ public class InspectionConstants {
|
|||||||
*/
|
*/
|
||||||
public static final String DRIVE_SCHOOL_STAFF_KEY = "coach";
|
public static final String DRIVE_SCHOOL_STAFF_KEY = "coach";
|
||||||
|
|
||||||
/**
|
|
||||||
* key的类型为员工
|
|
||||||
*/
|
|
||||||
public static final String JY_DRIVER_STAFF_KEY = "jystaff";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* key的类型为设备
|
* key的类型为设备
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -132,8 +132,8 @@ public class InspectionInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("geStelectInspectionByBusiness")
|
@GetMapping("geStelectInspectionByBusiness")
|
||||||
public CommonResult geStelectInspectionByBusiness(InspectionInfo inspectionInfo,
|
public CommonResult geStelectInspectionByBusiness(InspectionInfo inspectionInfo,
|
||||||
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
||||||
return success(inspectionInfoService.geStelectInspectionByBusiness(page, inspectionInfo));
|
return success(inspectionInfoService.geStelectInspectionByBusiness(page, inspectionInfo));
|
||||||
}
|
}
|
||||||
@ -396,27 +396,8 @@ public class InspectionInfoController extends BaseController {
|
|||||||
* @date 16:22 2024/12/18
|
* @date 16:22 2024/12/18
|
||||||
**/
|
**/
|
||||||
@GetMapping("/getBusinessCountByType")
|
@GetMapping("/getBusinessCountByType")
|
||||||
public CommonResult<?> getBusinessCountByType(@RequestParam(required = false, name = "partnerId") Integer partnerId,
|
public CommonResult<?> getBusinessCountByType(@RequestParam(required = false, name ="partnerId") Integer partnerId) {
|
||||||
@RequestParam(required = false, name = "unit") String unit) {
|
return success(inspectionInfoService.getBusinessCountByType(partnerId));
|
||||||
List<String> datetimeRange = new ArrayList<>();
|
|
||||||
if (unit != null) {
|
|
||||||
DateTime now = DateUtil.date();
|
|
||||||
switch (unit) {
|
|
||||||
case "day":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfDay(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfDay(now)));
|
|
||||||
break;
|
|
||||||
case "week":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfWeek(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfWeek(now)));
|
|
||||||
break;
|
|
||||||
case "month":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfMonth(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfMonth(now)));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return success(inspectionInfoService.getBusinessCountByType(partnerId,datetimeRange));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -258,6 +258,4 @@ public class InspectionInfo extends TenantBaseDO
|
|||||||
/** 保险公司名称 */
|
/** 保险公司名称 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String insuranceCompanyName;
|
private String insuranceCompanyName;
|
||||||
@TableField(exist = false)
|
|
||||||
private List<String> datetimeRange;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,6 @@ public interface IInspectionFileService extends IService<InspectionFile> {
|
|||||||
*/
|
*/
|
||||||
Long addFolder(String folderName, String key);
|
Long addFolder(String folderName, String key);
|
||||||
Long addFolderForJx(String folderName, String key);
|
Long addFolderForJx(String folderName, String key);
|
||||||
Long addFolderForJy(String folderName, String key);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询文件夹树
|
* 查询文件夹树
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
|||||||
*/
|
*/
|
||||||
IPage<InspectionInfo> geStelectInspectionByBusiness(Page<InspectionInfo> page, InspectionInfo inspectionInfo);
|
IPage<InspectionInfo> geStelectInspectionByBusiness(Page<InspectionInfo> page, InspectionInfo inspectionInfo);
|
||||||
|
|
||||||
Map<String, Long> getBusinessCountByType(Integer partnerId, List<String> datetimeRange);
|
Map<String, Long> getBusinessCountByType(Integer partnerId);
|
||||||
|
|
||||||
List<InspectionInfo> selectMeetCarList(List<String> datetimeRange, String goodsTitle);
|
List<InspectionInfo> selectMeetCarList(List<String> datetimeRange, String goodsTitle);
|
||||||
|
|
||||||
|
|||||||
@ -542,36 +542,6 @@ public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper,
|
|||||||
return inspectionFile.getId();
|
return inspectionFile.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long addFolderForJy(String folderName, String key) {
|
|
||||||
//根据key找到对应的文件夹id
|
|
||||||
InspectionFile fatherFolder = baseMapper.selectOne(new LambdaQueryWrapper<InspectionFile>().eq(InspectionFile::getDefaultKey, key));
|
|
||||||
|
|
||||||
//如果默认文件夹为空就新建
|
|
||||||
if (fatherFolder == null) {
|
|
||||||
fatherFolder = new InspectionFile();
|
|
||||||
fatherFolder.setFileName(InspectionFileEnum.getDescByType(key));
|
|
||||||
fatherFolder.setType(InspectionConstants.INSPECTION_FOLDER);
|
|
||||||
fatherFolder.setDefaultKey(key);
|
|
||||||
fatherFolder.setServicePackageId("jiuyuan");
|
|
||||||
baseMapper.insert(fatherFolder);
|
|
||||||
fatherFolder.setFileCode(fatherFolder.getId() + ",");
|
|
||||||
baseMapper.updateById(fatherFolder);
|
|
||||||
}
|
|
||||||
|
|
||||||
InspectionFile inspectionFile = new InspectionFile();
|
|
||||||
inspectionFile.setFatherId(fatherFolder.getId());
|
|
||||||
inspectionFile.setFileName(folderName + InspectionConstants.INSPECTION_FOLDER_SUFFIX);
|
|
||||||
inspectionFile.setType(InspectionConstants.INSPECTION_FOLDER);
|
|
||||||
inspectionFile.setIsStaffFile(InspectionConstants.INSPECTION_IS_STAFF_FILE);
|
|
||||||
inspectionFile.setServicePackageId("jiuyuan");
|
|
||||||
baseMapper.insert(inspectionFile);
|
|
||||||
inspectionFile.setFileCode(inspectionFile.getId() + ",");
|
|
||||||
baseMapper.updateById(inspectionFile);
|
|
||||||
|
|
||||||
return inspectionFile.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询文件夹树
|
* 查询文件夹树
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1027,7 +1027,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Long> getBusinessCountByType(Integer partnerId, List<String> datetimeRange) {
|
public Map<String, Long> getBusinessCountByType(Integer partnerId) {
|
||||||
// 创建线程池
|
// 创建线程池
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(10);
|
ExecutorService executor = Executors.newFixedThreadPool(10);
|
||||||
|
|
||||||
@ -1058,7 +1058,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
// 深拷贝对象,防止多线程修改冲突
|
// 深拷贝对象,防止多线程修改冲突
|
||||||
InspectionInfo infoCopy = JSON.parseObject(JSON.toJSONString(inspectionInfo), InspectionInfo.class);
|
InspectionInfo infoCopy = JSON.parseObject(JSON.toJSONString(inspectionInfo), InspectionInfo.class);
|
||||||
infoCopy.setStatus(status);
|
infoCopy.setStatus(status);
|
||||||
infoCopy.setDatetimeRange(datetimeRange);
|
|
||||||
|
|
||||||
Page<InspectionInfo> page = new Page<>(1, 1);
|
Page<InspectionInfo> page = new Page<>(1, 1);
|
||||||
|
|
||||||
|
|||||||
@ -689,11 +689,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND ii.status = '1'
|
AND ii.status = '1'
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="info.datetimeRange != null and info.datetimeRange.size() > 0">
|
|
||||||
<if test="info.datetimeRange.size() == 2">
|
|
||||||
AND imco.create_time BETWEEN #{info.datetimeRange[0]} AND #{info.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMeetCarList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
<select id="selectMeetCarList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
||||||
@ -811,21 +806,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="query.startTime!=null and query.startTime!=''">
|
<if test="query.startTime!=null and query.startTime!=''">
|
||||||
and ins.start_time between #{query.startTime} and #{query.endTime}
|
and ins.start_time between #{query.startTime} and #{query.endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.datetimeRange != null">
|
|
||||||
<if test="query.dateType != null and query.dateType.equals('jcTime')">
|
|
||||||
and ins.start_time between #{query.datetimeRange[0]} and #{query.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
<if test="query.dateType != null and query.dateType.equals('bxTime')">
|
|
||||||
and car.insurance_expiry_date between #{query.datetimeRange[0]} and #{query.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
<if test="query.dateType != null and query.dateType.equals('bxVehicleTime')">
|
|
||||||
and car.vehicle_insurance_expiry_date between #{query.datetimeRange[0]} and #{query.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
<if test="query.dateType != null and query.dateType.equals('nextInspectionTime')">
|
|
||||||
and car.next_inspection_date between #{query.datetimeRange[0]} and #{query.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectLatestByCarNums" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
<select id="selectLatestByCarNums" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
||||||
SELECT ii.*,car.*
|
SELECT ii.*,car.*
|
||||||
|
|||||||
@ -173,7 +173,7 @@ public interface SchoolBaseConstants {
|
|||||||
/**
|
/**
|
||||||
* 提醒教练未进行离场打卡
|
* 提醒教练未进行离场打卡
|
||||||
*/
|
*/
|
||||||
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_NOT_ATTENDANCE_TODAY = "您今日有车辆: %s 还未进行离场打卡,不要忘记离场打卡哟!";
|
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_NOT_ATTENDANCE_TODAY = "您今日还未进行离场打卡,不要忘记离场打卡哟!";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,6 +122,5 @@ public interface ProcessMapper extends BaseMapper<Process> {
|
|||||||
*/
|
*/
|
||||||
IPage<StudentPassInfoVO> getPassedStudentsByCoachAndExamNum(@Param("coachId")Long coachId, @Param("subject")Integer subject, @Param("examNum")Integer examNum, @Param("name")String name, @Param("courseType") String courseType, @Param("startTime") String startTime, @Param("endTime")String endTime, Page<StudentPassInfoVO> page);
|
IPage<StudentPassInfoVO> getPassedStudentsByCoachAndExamNum(@Param("coachId")Long coachId, @Param("subject")Integer subject, @Param("examNum")Integer examNum, @Param("name")String name, @Param("courseType") String courseType, @Param("startTime") String startTime, @Param("endTime")String endTime, Page<StudentPassInfoVO> page);
|
||||||
|
|
||||||
IPage<Process> getMyCourseStudentPage(@Param("entity") Process entity, Page<Process> page);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,13 +143,11 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
public IPage<Process> getMyCourseStudentPage(Process process, Page<Process> page) {
|
public IPage<Process> getMyCourseStudentPage(Process process, Page<Process> page) {
|
||||||
//当前教练ID
|
//当前教练ID
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
process.setCoachId(userId);
|
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||||
// processMapper.getMyCourseStudentPage(process, page);
|
|
||||||
/*LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
|
||||||
.eq(Process::getCoachId, userId)
|
.eq(Process::getCoachId, userId)
|
||||||
.notIn(Process::getSubject, Arrays.asList(1, 4));
|
.notIn(Process::getSubject, Arrays.asList(1, 4));
|
||||||
*//*.eq(Process::getCourseId, process.getCourseId())
|
/*.eq(Process::getCourseId, process.getCourseId())
|
||||||
.eq(Process::getSubject, process.getSubject());*//*
|
.eq(Process::getSubject, process.getSubject());*/
|
||||||
if (process != null && process.getCourseId() != null) {
|
if (process != null && process.getCourseId() != null) {
|
||||||
queryWrapper.eq(Process::getCourseId, process.getCourseId());
|
queryWrapper.eq(Process::getCourseId, process.getCourseId());
|
||||||
}
|
}
|
||||||
@ -158,8 +156,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
}
|
}
|
||||||
if (process != null && StringUtils.isNotEmpty(process.getUserName())) {
|
if (process != null && StringUtils.isNotEmpty(process.getUserName())) {
|
||||||
queryWrapper.like(Process::getUserName, process.getUserName());
|
queryWrapper.like(Process::getUserName, process.getUserName());
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//状态等于1-训练中的
|
//状态等于1-训练中的
|
||||||
/*if(dictDataService.getValueByTypeAndLabel("check_in_switch", "科二科三同时打卡开关").equals("0")){
|
/*if(dictDataService.getValueByTypeAndLabel("check_in_switch", "科二科三同时打卡开关").equals("0")){
|
||||||
// 开关为0时,只查询状态为1的记录
|
// 开关为0时,只查询状态为1的记录
|
||||||
@ -172,13 +169,11 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
// 其他查询条件
|
// 其他查询条件
|
||||||
queryWrapper.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
|
queryWrapper.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
|
||||||
.orderByDesc(BaseDO::getCreateTime);*/
|
.orderByDesc(BaseDO::getCreateTime);*/
|
||||||
/*queryWrapper.in(Process::getStatus, Arrays.asList("0", "1"))
|
queryWrapper.in(Process::getStatus, Arrays.asList("0", "1"))
|
||||||
.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
|
.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
|
||||||
// .groupBy(Process::getUserId)
|
// .groupBy(Process::getUserId)
|
||||||
.orderByDesc(BaseDO::getCreateTime);
|
.orderByDesc(BaseDO::getCreateTime);
|
||||||
// 需要查询订单表中是否终止
|
return this.page(page, queryWrapper);
|
||||||
return this.page(page, queryWrapper);*/
|
|
||||||
return processMapper.getMyCourseStudentPage(process, page);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.course.vo;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class FinanceDeductInfoVO {
|
public class FinanceDeductInfoVO {
|
||||||
@ -33,8 +32,6 @@ public class FinanceDeductInfoVO {
|
|||||||
|
|
||||||
private Integer subject;
|
private Integer subject;
|
||||||
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
|
|
||||||
private String startTime;
|
private String startTime;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|||||||
@ -49,9 +49,9 @@ public class DriveSchoolCoachClockController {
|
|||||||
* 查询今天未离场的打卡记录
|
* 查询今天未离场的打卡记录
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectTodayClockRecord")
|
@GetMapping("selectTodayClockRecord")
|
||||||
public CommonResult<DriveSchoolCoachClock> selectTodayClockRecord(String carNo) {
|
public CommonResult<DriveSchoolCoachClock> selectTodayClockRecord() {
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
DriveSchoolCoachClock driveSchoolCoachClock = coachClockService.selectTodayClockRecord(userId,carNo);
|
DriveSchoolCoachClock driveSchoolCoachClock = coachClockService.selectTodayClockRecord(userId);
|
||||||
return success(driveSchoolCoachClock);
|
return success(driveSchoolCoachClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,22 +191,5 @@ public class DriveSchoolCoachClockController {
|
|||||||
return success(coachClockService.getTodayCarTrainSituation(driveSchoolCoachClock));
|
return success(coachClockService.getTodayCarTrainSituation(driveSchoolCoachClock));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据教练id查询当日打卡记录的车牌号列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/getClockCarNoByUserId")
|
|
||||||
public CommonResult<List<String>> getClockCarNoByUserId() {
|
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
|
||||||
return success(coachClockService.getClockCarNoByUserId(userId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据教练id查询当日打卡记录的车牌号列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/getClockCarInfoByUserId")
|
|
||||||
public CommonResult<DriveSchoolCoachClock> getClockCarInfoByUserId(String carNo) {
|
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
|
||||||
return success(coachClockService.getClockCarInfoByUserId(userId, carNo));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,9 +240,9 @@ public class TrainController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("noClockInRemindByUserId")
|
@GetMapping("noClockInRemindByUserId")
|
||||||
public CommonResult<NoClockInRemindVO>noClockInRemindByUserId(String carNo){
|
public CommonResult<NoClockInRemindVO>noClockInRemindByUserId(){
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
return success(trainService.noClockInRemindByUserId(userId, carNo));
|
return success(trainService.noClockInRemindByUserId(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -57,11 +57,5 @@ public interface DriveSchoolCoachClockMapper extends BaseMapper<DriveSchoolCoach
|
|||||||
*/
|
*/
|
||||||
List<DriveSchoolCoachClockVO> getTodayCarTrainSituation(@Param("entity") DriveSchoolCoachClock driveSchoolCoachClock);
|
List<DriveSchoolCoachClockVO> getTodayCarTrainSituation(@Param("entity") DriveSchoolCoachClock driveSchoolCoachClock);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据教练id查询当日打卡记录的车牌号列表
|
|
||||||
*/
|
|
||||||
List<String> getClockCarNoByUserId(@Param("userId") Long userId);
|
|
||||||
DriveSchoolCoachClock getClockCarInfoByUserId(@Param("userId") Long userId, @Param("carNo") String carNo);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public interface TrainMapper extends BaseMapper<Train> {
|
|||||||
List<TrainVO> listJoinBatchByIds(@Param("trainIds") List<String> trainIds);
|
List<TrainVO> listJoinBatchByIds(@Param("trainIds") List<String> trainIds);
|
||||||
|
|
||||||
List<NoClockInRemindVO> noClockInRemind();
|
List<NoClockInRemindVO> noClockInRemind();
|
||||||
NoClockInRemindVO noClockInRemindByUserId(@Param("userId")Long userId, @Param("carNo")String carNo);
|
NoClockInRemindVO noClockInRemindByUserId(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据教练打卡id获取对应学员信息
|
* 根据教练打卡id获取对应学员信息
|
||||||
|
|||||||
@ -30,7 +30,7 @@ public interface IDriveSchoolCoachClockService extends IService<DriveSchoolCoach
|
|||||||
/**
|
/**
|
||||||
* 查询今天未离场的打卡记录
|
* 查询今天未离场的打卡记录
|
||||||
*/
|
*/
|
||||||
DriveSchoolCoachClock selectTodayClockRecord(Long userId,String carNo);
|
DriveSchoolCoachClock selectTodayClockRecord(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 到场打卡
|
* 到场打卡
|
||||||
@ -93,10 +93,4 @@ public interface IDriveSchoolCoachClockService extends IService<DriveSchoolCoach
|
|||||||
*/
|
*/
|
||||||
List<DriveSchoolCoachClockVO> getTodayCarTrainSituation(DriveSchoolCoachClock driveSchoolCoachClock);
|
List<DriveSchoolCoachClockVO> getTodayCarTrainSituation(DriveSchoolCoachClock driveSchoolCoachClock);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据教练id查询当日打卡记录的车牌号列表
|
|
||||||
*/
|
|
||||||
List<String> getClockCarNoByUserId(Long userId);
|
|
||||||
DriveSchoolCoachClock getClockCarInfoByUserId(Long userId, String carNo);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,7 +95,7 @@ public interface TrainService extends IService<Train> {
|
|||||||
*/
|
*/
|
||||||
void noClockInRemind();
|
void noClockInRemind();
|
||||||
|
|
||||||
NoClockInRemindVO noClockInRemindByUserId(Long userId, String carNo);
|
NoClockInRemindVO noClockInRemindByUserId(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据教练打卡id,获取对应学员列表信息
|
* 根据教练打卡id,获取对应学员列表信息
|
||||||
|
|||||||
@ -88,14 +88,13 @@ public class DriveSchoolCoachClockServiceImpl extends ServiceImpl<DriveSchoolCoa
|
|||||||
* 查询今天未离场的打卡记录
|
* 查询今天未离场的打卡记录
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public DriveSchoolCoachClock selectTodayClockRecord(Long userId,String carNo) {
|
public DriveSchoolCoachClock selectTodayClockRecord(Long userId) {
|
||||||
if (userId == null) {
|
if (userId == null) {
|
||||||
throw new IllegalArgumentException("用户ID不能为空");
|
throw new IllegalArgumentException("用户ID不能为空");
|
||||||
}
|
}
|
||||||
List<DriveSchoolCoachClock> clockRecord = driveSchoolCoachClockMapper.selectList(
|
List<DriveSchoolCoachClock> clockRecord = driveSchoolCoachClockMapper.selectList(
|
||||||
new LambdaQueryWrapper<DriveSchoolCoachClock>()
|
new LambdaQueryWrapper<DriveSchoolCoachClock>()
|
||||||
.eq(DriveSchoolCoachClock::getUserId, userId)
|
.eq(DriveSchoolCoachClock::getUserId, userId)
|
||||||
.eq(DriveSchoolCoachClock::getCarNo,carNo)
|
|
||||||
.eq(DriveSchoolCoachClock::getTrainDay, DateUtil.format(new Date(), "yyyy-MM-dd"))
|
.eq(DriveSchoolCoachClock::getTrainDay, DateUtil.format(new Date(), "yyyy-MM-dd"))
|
||||||
.isNull(DriveSchoolCoachClock::getEndTime)
|
.isNull(DriveSchoolCoachClock::getEndTime)
|
||||||
.eq(DriveSchoolCoachClock::getDeleted, 0)
|
.eq(DriveSchoolCoachClock::getDeleted, 0)
|
||||||
@ -295,7 +294,7 @@ public class DriveSchoolCoachClockServiceImpl extends ServiceImpl<DriveSchoolCoa
|
|||||||
public void noClockInRemind() {
|
public void noClockInRemind() {
|
||||||
List<DriveSchoolCoachClock> driveSchoolCoachClockList = driveSchoolCoachClockMapper.noClockInRemind();
|
List<DriveSchoolCoachClock> driveSchoolCoachClockList = driveSchoolCoachClockMapper.noClockInRemind();
|
||||||
for (DriveSchoolCoachClock driveSchoolCoachClock : driveSchoolCoachClockList) {
|
for (DriveSchoolCoachClock driveSchoolCoachClock : driveSchoolCoachClockList) {
|
||||||
String message = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_NOT_ATTENDANCE_TODAY, driveSchoolCoachClock.getCarNo());
|
String message = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_NOT_ATTENDANCE_TODAY);
|
||||||
schoolNotifyMessageSendService.sendMessage(driveSchoolCoachClock.getUserId(), message, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, driveSchoolCoachClock.getTenantId());
|
schoolNotifyMessageSendService.sendMessage(driveSchoolCoachClock.getUserId(), message, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, driveSchoolCoachClock.getTenantId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -453,18 +452,5 @@ public class DriveSchoolCoachClockServiceImpl extends ServiceImpl<DriveSchoolCoa
|
|||||||
return driveSchoolCoachClockMapper.getTodayCarTrainSituation(driveSchoolCoachClock);
|
return driveSchoolCoachClockMapper.getTodayCarTrainSituation(driveSchoolCoachClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据教练id查询当日打卡记录的车牌号列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<String> getClockCarNoByUserId(Long userId) {
|
|
||||||
return driveSchoolCoachClockMapper.getClockCarNoByUserId(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DriveSchoolCoachClock getClockCarInfoByUserId(Long userId, String carNo) {
|
|
||||||
return driveSchoolCoachClockMapper.getClockCarInfoByUserId(userId, carNo);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,8 +189,8 @@ public class TrainServiceImpl extends ServiceImpl<TrainMapper, Train> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NoClockInRemindVO noClockInRemindByUserId(Long userId, String carNo){
|
public NoClockInRemindVO noClockInRemindByUserId(Long userId){
|
||||||
return trainMapper.noClockInRemindByUserId(userId, carNo);
|
return trainMapper.noClockInRemindByUserId(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -756,27 +756,4 @@
|
|||||||
AND p.course_type = #{courseType}
|
AND p.course_type = #{courseType}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getMyCourseStudentPage" resultType="cn.iocoder.yudao.module.course.entity.Process">
|
|
||||||
SELECT dsp.*
|
|
||||||
FROM drive_school_process dsp
|
|
||||||
INNER JOIN drive_school_course_order dsco ON dsp.user_id = dsco.user_id AND dsp.course_id = dsco.course_id AND dsco.deleted = 0 AND dsco.if_end = 0 AND dsco.is_sign = 1
|
|
||||||
WHERE
|
|
||||||
dsp.coach_id = #{entity.coachId}
|
|
||||||
<if test="entity.courseId != null and entity.courseId != '' ">
|
|
||||||
AND dsp.course_id = #{entity.courseId}
|
|
||||||
</if>
|
|
||||||
<if test="entity.subject != null ">
|
|
||||||
AND dsp.subject = #{entity.subject}
|
|
||||||
</if>
|
|
||||||
<if test="entity.userName != null and entity.userName != '' ">
|
|
||||||
AND dsp.user_name like CONCAT('%', #{entity.userName}, '%')
|
|
||||||
</if>
|
|
||||||
AND dsp.subject NOT IN (1,4)
|
|
||||||
AND dsp.status IN (0,1)
|
|
||||||
AND (dsp.exam_status IS NULL or dsp.exam_status = 0)
|
|
||||||
AND dsp.deleted = 0
|
|
||||||
ORDER BY dsp.create_time DESC
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -257,7 +257,6 @@
|
|||||||
dsc.student_name,
|
dsc.student_name,
|
||||||
dsc.commission_amount,
|
dsc.commission_amount,
|
||||||
dsc.subject,
|
dsc.subject,
|
||||||
dsc.create_time,
|
|
||||||
course.type AS courseType,
|
course.type AS courseType,
|
||||||
course.name AS courseName
|
course.name AS courseName
|
||||||
FROM drive_school_commission dsc
|
FROM drive_school_commission dsc
|
||||||
|
|||||||
@ -183,25 +183,13 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="noClockInRemind" resultType="cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock">
|
<select id="noClockInRemind" resultType="cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock">
|
||||||
/*SELECT user_id, car_no, tenant_id
|
SELECT user_id, tenant_id
|
||||||
FROM drive_school_coach_clock
|
|
||||||
WHERE
|
|
||||||
DATE (create_time) = CURDATE()
|
|
||||||
AND DATE (start_time) = CURDATE()
|
|
||||||
AND end_time IS NULL
|
|
||||||
AND deleted = 0*/
|
|
||||||
SELECT
|
|
||||||
user_id,
|
|
||||||
GROUP_CONCAT(car_no SEPARATOR ';') AS carNo,
|
|
||||||
tenant_id
|
|
||||||
FROM drive_school_coach_clock
|
FROM drive_school_coach_clock
|
||||||
WHERE
|
WHERE
|
||||||
DATE (create_time) = CURDATE()
|
DATE (create_time) = CURDATE()
|
||||||
AND DATE (start_time) = CURDATE()
|
AND DATE (start_time) = CURDATE()
|
||||||
AND end_time IS NULL
|
AND end_time IS NULL
|
||||||
AND deleted = 0
|
AND deleted = 0
|
||||||
GROUP BY
|
|
||||||
user_id, tenant_id
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@ -337,25 +325,6 @@
|
|||||||
dscc.id
|
dscc.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getClockCarNoByUserId" resultType="string">
|
|
||||||
SELECT car_No
|
|
||||||
FROM drive_school_coach_clock
|
|
||||||
WHERE user_id = #{userId}
|
|
||||||
AND train_day = CURDATE()
|
|
||||||
AND end_time IS NULL
|
|
||||||
AND deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getClockCarInfoByUserId" resultType="cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock">
|
|
||||||
SELECT *
|
|
||||||
FROM drive_school_coach_clock
|
|
||||||
WHERE user_id = #{userId}
|
|
||||||
AND car_no = #{carNo}
|
|
||||||
AND train_day = CURDATE()
|
|
||||||
AND end_time IS NULL
|
|
||||||
AND deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--<select id="getTodayCarTrainSituation" resultType="cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock">
|
<!--<select id="getTodayCarTrainSituation" resultType="cn.iocoder.yudao.module.train.entity.DriveSchoolCoachClock">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM drive_school_coach_clock
|
FROM drive_school_coach_clock
|
||||||
|
|||||||
@ -138,7 +138,6 @@
|
|||||||
FROM drive_school_train
|
FROM drive_school_train
|
||||||
WHERE
|
WHERE
|
||||||
coach_id = #{userId}
|
coach_id = #{userId}
|
||||||
AND car_no = #{carNo}
|
|
||||||
AND DATE(create_time) = CURDATE()
|
AND DATE(create_time) = CURDATE()
|
||||||
AND DATE(start_time) = CURDATE()
|
AND DATE(start_time) = CURDATE()
|
||||||
AND end_time IS NULL
|
AND end_time IS NULL
|
||||||
|
|||||||
@ -29,8 +29,6 @@ import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
|||||||
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
|
|
||||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -41,13 +39,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
import static cn.iocoder.yudao.framework.excel.core.util.ExcelUtils.exportBlankTemplate;
|
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -81,9 +76,6 @@ public class RescueInfoSystem extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private PermissionApi permissionApi;
|
private PermissionApi permissionApi;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RoleService roleService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增【道路救援发起】
|
* 新增【道路救援发起】
|
||||||
*/
|
*/
|
||||||
@ -233,28 +225,6 @@ public class RescueInfoSystem extends BaseController {
|
|||||||
return CommonResult.success("新增成功");
|
return CommonResult.success("新增成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/addDriverApp")
|
|
||||||
public CommonResult addDriverApp(@RequestBody DriverInfo driverInfo) {
|
|
||||||
Long userId;
|
|
||||||
try {
|
|
||||||
userId = rescueInfoService.addDriverApp(driverInfo);
|
|
||||||
} catch (Exception e) {
|
|
||||||
return CommonResult.error(500, e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
return CommonResult.success(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增文件夹
|
|
||||||
* @param userId 用户id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/addFolder")
|
|
||||||
public CommonResult<?> addFolder(@RequestBody Long userId) {
|
|
||||||
return success(rescueInfoService.addFolder(userId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改信息司机
|
* 修改信息司机
|
||||||
*/
|
*/
|
||||||
@ -523,51 +493,4 @@ public class RescueInfoSystem extends BaseController {
|
|||||||
rescueInfoService.inBase(returnCarVO);
|
rescueInfoService.inBase(returnCarVO);
|
||||||
return CommonResult.ok();
|
return CommonResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 员工管理获取救援员工详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/getOnInternal")
|
|
||||||
public CommonResult<?> getOnInternal(Long id) {
|
|
||||||
return success(rescueInfoService.getOnInternal(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入模板下载
|
|
||||||
*
|
|
||||||
* @param response
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
@GetMapping("/get-import-template")
|
|
||||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
|
||||||
String[] head = {"员工姓名", "岗位", "年龄", "电话号码", "性别"};
|
|
||||||
|
|
||||||
// 下拉框列及选项:列索引 -> 下拉框选项
|
|
||||||
Map<Integer, String[]> dropdownColumns = new HashMap<>();
|
|
||||||
|
|
||||||
|
|
||||||
//查询岗位
|
|
||||||
RoleDO roleDO = new RoleDO();
|
|
||||||
roleDO.setServicePackageId("jiuyuan");
|
|
||||||
List<RoleDO> roleDOS = roleService.pageByQuery(roleDO);
|
|
||||||
|
|
||||||
String[] roles = roleDOS.stream()
|
|
||||||
.map(RoleDO::getName)
|
|
||||||
.toArray(String[]::new);
|
|
||||||
|
|
||||||
dropdownColumns.put(1, roles);
|
|
||||||
String[] genders = {"男", "女"};
|
|
||||||
dropdownColumns.put(5, genders);
|
|
||||||
|
|
||||||
List<List<String>> exampleDataList = Arrays.asList(
|
|
||||||
Arrays.asList("测试员工", "岗位是下拉框选择", "年龄", "电话号码", "性别")
|
|
||||||
);
|
|
||||||
|
|
||||||
List<Integer> textColumns = Collections.singletonList(3);
|
|
||||||
|
|
||||||
// 导出空白模板到Excel
|
|
||||||
exportBlankTemplate(response, "staff_template.xlsx", "员工信息", head, dropdownColumns, true, exampleDataList, textColumns);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,6 @@ public class DriverInfo extends TenantBaseDO
|
|||||||
private long jxNum;
|
private long jxNum;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private long wcNum;
|
private long wcNum;
|
||||||
private Long folderId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
|||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.DriverStaffSaveVO;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
@ -88,6 +87,4 @@ public interface RescueInfoMapper extends BaseMapper<RescueInfo>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> selectRescueOrderByRoad(String dictType);
|
List<Map<String, Object>> selectRescueOrderByRoad(String dictType);
|
||||||
|
|
||||||
DriverStaffSaveVO getOnInternal(Long id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
|||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.DriverStaffSaveVO;
|
|
||||||
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.ReturnCarVO;
|
import cn.iocoder.yudao.module.rescue.vo.ReturnCarVO;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -89,8 +88,6 @@ public interface IRescueInfoService extends IService<RescueInfo>
|
|||||||
IPage<DriverInfo> driverList(DriverInfoDto user, Page<DriverInfo> page);
|
IPage<DriverInfo> driverList(DriverInfoDto user, Page<DriverInfo> page);
|
||||||
DriverInfo getDriverById(Long driverId);
|
DriverInfo getDriverById(Long driverId);
|
||||||
void addDriver(DriverInfo driverInfo) throws Exception;
|
void addDriver(DriverInfo driverInfo) throws Exception;
|
||||||
Long addDriverApp(DriverInfo driverInfo) throws Exception;
|
|
||||||
Long addFolder(Long userId);
|
|
||||||
void updateDriver(DriverInfo user);
|
void updateDriver(DriverInfo user);
|
||||||
void delDriver(Long[] ids);
|
void delDriver(Long[] ids);
|
||||||
List<DriverInfo2Dto> driverListApp(DriverInfoDto driverInfoDto);
|
List<DriverInfo2Dto> driverListApp(DriverInfoDto driverInfoDto);
|
||||||
@ -172,7 +169,4 @@ public interface IRescueInfoService extends IService<RescueInfo>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getRescueMessage(String startTime, String endTime);
|
Map<String, Object> getRescueMessage(String startTime, String endTime);
|
||||||
|
|
||||||
|
|
||||||
DriverStaffSaveVO getOnInternal(Long id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,9 +106,6 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, DriverI
|
|||||||
if (StrUtil.isNotEmpty(driverInfo.getRealName())) {
|
if (StrUtil.isNotEmpty(driverInfo.getRealName())) {
|
||||||
user.setNickname(driverInfo.getRealName());
|
user.setNickname(driverInfo.getRealName());
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(driverInfo.getAvatar())) {
|
|
||||||
user.setAvatar(driverInfo.getAvatar());
|
|
||||||
}
|
|
||||||
adminUserApi.updateUser(user);
|
adminUserApi.updateUser(user);
|
||||||
return baseMapper.updateById(driverInfo);
|
return baseMapper.updateById(driverInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,10 +11,7 @@ import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
|||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import cn.iocoder.yudao.module.appBase.domain.SysAnnouncement;
|
import cn.iocoder.yudao.module.appBase.domain.SysAnnouncement;
|
||||||
import cn.iocoder.yudao.module.appBase.service.ISysAnnouncementService;
|
import cn.iocoder.yudao.module.appBase.service.ISysAnnouncementService;
|
||||||
import cn.iocoder.yudao.module.constant.InspectionConstants;
|
|
||||||
import cn.iocoder.yudao.module.constant.UserConstants;
|
import cn.iocoder.yudao.module.constant.UserConstants;
|
||||||
import cn.iocoder.yudao.module.inspection.entity.InspectionFile;
|
|
||||||
import cn.iocoder.yudao.module.inspection.service.IInspectionFileService;
|
|
||||||
import cn.iocoder.yudao.module.rescue.domain.*;
|
import cn.iocoder.yudao.module.rescue.domain.*;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||||
@ -26,7 +23,6 @@ import cn.iocoder.yudao.module.rescue.utils.RedisUtil;
|
|||||||
import cn.iocoder.yudao.module.rescue.utils.RedissonDelayQueue;
|
import cn.iocoder.yudao.module.rescue.utils.RedissonDelayQueue;
|
||||||
import cn.iocoder.yudao.module.rescue.utils.StringUtils;
|
import cn.iocoder.yudao.module.rescue.utils.StringUtils;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
import cn.iocoder.yudao.module.rescue.vo.BuckleVO;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.DriverStaffSaveVO;
|
|
||||||
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
import cn.iocoder.yudao.module.rescue.vo.MoneyManagement;
|
||||||
import cn.iocoder.yudao.module.rescue.vo.ReturnCarVO;
|
import cn.iocoder.yudao.module.rescue.vo.ReturnCarVO;
|
||||||
import cn.iocoder.yudao.module.staff.service.CompanyStaffService;
|
import cn.iocoder.yudao.module.staff.service.CompanyStaffService;
|
||||||
@ -39,10 +35,6 @@ import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
|||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.UserRoleDTO;
|
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
|
||||||
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
|
||||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -51,11 +43,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -125,15 +115,6 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
|||||||
@Lazy
|
@Lazy
|
||||||
private IRescueInfoDetailService rescueInfoDetailService;
|
private IRescueInfoDetailService rescueInfoDetailService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PermissionService permissionService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IInspectionFileService inspectionFileService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private AdminUserService adminUserService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】
|
* 查询【请填写功能名称】
|
||||||
@ -573,7 +554,6 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
|||||||
driverInfoDto.setUserId(newUser.getId());
|
driverInfoDto.setUserId(newUser.getId());
|
||||||
driverInfoDto.setDriverStatus("4");
|
driverInfoDto.setDriverStatus("4");
|
||||||
driverInfoService.save(driverInfoDto);
|
driverInfoService.save(driverInfoDto);
|
||||||
this.addFolder(newUser.getId());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 新增用户信息
|
// 新增用户信息
|
||||||
@ -592,77 +572,6 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
|||||||
driverInfoDto.setUserId(userId);
|
driverInfoDto.setUserId(userId);
|
||||||
driverInfoDto.setDriverStatus("4");
|
driverInfoDto.setDriverStatus("4");
|
||||||
driverInfoService.save(driverInfoDto);
|
driverInfoService.save(driverInfoDto);
|
||||||
addFolder(userId);
|
|
||||||
}
|
|
||||||
//处理车辆信息
|
|
||||||
if (!CollectionUtil.isEmpty(driverInfoDto.getCarInfoList())) {
|
|
||||||
for (RescueCarInfo rescueCarInfo : driverInfoDto.getCarInfoList()) {
|
|
||||||
String rescueCarNum = rescueCarInfo.getRescueCarNum();
|
|
||||||
LambdaQueryWrapper<RescueCarInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(RescueCarInfo::getRescueCarNum, rescueCarNum);
|
|
||||||
RescueCarInfo one = carInfoService.getOne(queryWrapper);
|
|
||||||
if (ObjectUtils.isNotEmpty(one)) {
|
|
||||||
rescueCarInfo.setCarOwn("1");
|
|
||||||
rescueCarInfo.setPossessorId(driverInfoDto.getId());
|
|
||||||
rescueCarInfo.setId(one.getId());
|
|
||||||
carInfoService.updateById(rescueCarInfo);
|
|
||||||
} else {
|
|
||||||
rescueCarInfo.setCarOwn("1");
|
|
||||||
rescueCarInfo.setPossessorId(driverInfoDto.getId());
|
|
||||||
carInfoService.save(rescueCarInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public Long addDriverApp(DriverInfo driverInfoDto) throws Exception {
|
|
||||||
LambdaQueryWrapper<DriverInfo> queryWrapperD = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapperD.eq(DriverInfo::getPhonenumber, driverInfoDto.getPhonenumber());
|
|
||||||
List<DriverInfo> list = driverInfoService.list(queryWrapperD);
|
|
||||||
if (!CollectionUtil.isEmpty(list)) {
|
|
||||||
throw new Exception("该手机号已绑定司机,请不要重复添加");
|
|
||||||
}
|
|
||||||
AdminUserRespDTO sysUser = userService.getUserByMobile(driverInfoDto.getPhonenumber());
|
|
||||||
driverInfoDto.setAuthStatus("2");
|
|
||||||
if (!ObjectUtils.isEmpty(sysUser)) {
|
|
||||||
DriverInfo driverInfoQuery = new DriverInfo();
|
|
||||||
driverInfoQuery.setUserId(sysUser.getId());
|
|
||||||
List<DriverInfo> driverInfos = driverInfoService.selectDriverInfoList(driverInfoQuery);
|
|
||||||
if (CollectionUtil.isEmpty(driverInfos)) {
|
|
||||||
UserDTO newUser = new UserDTO();
|
|
||||||
newUser.setNickname(driverInfoDto.getRealName());
|
|
||||||
newUser.setSex(driverInfoDto.getSex());
|
|
||||||
newUser.setAvatar(driverInfoDto.getAvatar());
|
|
||||||
newUser.setDeptId(driverInfoDto.getDeptId());
|
|
||||||
userService.createUser(newUser);
|
|
||||||
//代表为救援司机角色 需要添加到司机表中
|
|
||||||
driverInfoDto.setUserId(newUser.getId());
|
|
||||||
driverInfoDto.setDriverStatus("4");
|
|
||||||
driverInfoService.save(driverInfoDto);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 新增用户信息
|
|
||||||
CompanyStaffRespVO staffRespVO = new CompanyStaffRespVO();
|
|
||||||
staffRespVO.setLoginAccount(driverInfoDto.getPhonenumber());
|
|
||||||
staffRespVO.setPassword("123456");
|
|
||||||
RoleReqDTO roleReqDTO = roleApi.getRoleInfo("jysj");
|
|
||||||
List<Long> roleIds = new ArrayList<>();
|
|
||||||
roleIds.add((roleReqDTO.getId()));
|
|
||||||
staffRespVO.setRoleIds(roleIds);
|
|
||||||
staffRespVO.setName(driverInfoDto.getRealName());
|
|
||||||
staffRespVO.setSex(driverInfoDto.getSex());
|
|
||||||
staffRespVO.setTel(driverInfoDto.getPhonenumber());
|
|
||||||
Long userId = staffService.saveStaff(staffRespVO);
|
|
||||||
//
|
|
||||||
//代表为救援司机角色 需要添加到司机表中
|
|
||||||
driverInfoDto.setUserId(userId);
|
|
||||||
driverInfoDto.setDriverStatus("4");
|
|
||||||
driverInfoService.save(driverInfoDto);
|
|
||||||
}
|
}
|
||||||
//处理车辆信息
|
//处理车辆信息
|
||||||
if (!CollectionUtil.isEmpty(driverInfoDto.getCarInfoList())) {
|
if (!CollectionUtil.isEmpty(driverInfoDto.getCarInfoList())) {
|
||||||
@ -685,33 +594,7 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return driverInfoDto.getUserId();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long addFolder(Long userId) {
|
|
||||||
AdminUserDO user = adminUserService.getUser(userId);
|
|
||||||
if (ObjectUtil.isNotEmpty(user)) {
|
|
||||||
Long folderId = inspectionFileService.addFolderForJy(user.getNickname(), InspectionConstants.JY_DRIVER_STAFF_KEY);
|
|
||||||
|
|
||||||
//查询员工子表是否存在数据
|
|
||||||
DriverInfo staff = driverInfoService.getOne(Wrappers.<DriverInfo>lambdaQuery().eq(DriverInfo::getUserId, userId));
|
|
||||||
if (ObjectUtil.isNull(staff)) {
|
|
||||||
staff = new DriverInfo();
|
|
||||||
staff.setUserId(userId);
|
|
||||||
staff.setFolderId(folderId);
|
|
||||||
//新增
|
|
||||||
driverInfoService.save(staff);
|
|
||||||
} else {
|
|
||||||
//修改文件夹id
|
|
||||||
driverInfoService.update(Wrappers.<DriverInfo>lambdaUpdate().eq(DriverInfo::getUserId, userId).set(DriverInfo::getFolderId, folderId));
|
|
||||||
}
|
|
||||||
return folderId;
|
|
||||||
} else {
|
|
||||||
log.error("用户不存在");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1527,26 +1410,6 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
|||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public DriverStaffSaveVO getOnInternal(Long id) {
|
|
||||||
DriverStaffSaveVO driverStaffSaveVo = baseMapper.getOnInternal(id);
|
|
||||||
// 查询用户角色集合
|
|
||||||
List<UserRoleDTO> userRoleDTOS = permissionService.userRoleDTOList(Collections.singletonList(id));
|
|
||||||
driverStaffSaveVo.setRoleIds(userRoleDTOS.stream()
|
|
||||||
.filter(role -> "jiuyuan".equals(role.getServicePackageId()))
|
|
||||||
.map(UserRoleDTO::getRoleId)
|
|
||||||
.collect(Collectors.toList()));
|
|
||||||
|
|
||||||
// 查询文件表文件夹id是否存在
|
|
||||||
if (ObjectUtil.isNotEmpty(driverStaffSaveVo.getFolderId())) {
|
|
||||||
InspectionFile folder = inspectionFileService.getOne(Wrappers.<InspectionFile>lambdaQuery().eq(InspectionFile::getId, driverStaffSaveVo.getFolderId()));
|
|
||||||
if (ObjectUtil.isNull(folder)) {
|
|
||||||
driverStaffSaveVo.setFolderId(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return driverStaffSaveVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<RescueInfo> filterRescueInfoByDate(List<RescueInfo> rescueInfos, Date startTime, Date endTime) {
|
public List<RescueInfo> filterRescueInfoByDate(List<RescueInfo> rescueInfos, Date startTime, Date endTime) {
|
||||||
return rescueInfos.stream()
|
return rescueInfos.stream()
|
||||||
.filter(info -> info.getRescueTime() != null &&
|
.filter(info -> info.getRescueTime() != null &&
|
||||||
|
|||||||
@ -1,104 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.rescue.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
|
|
||||||
import cn.iocoder.yudao.module.rescue.domain.DriverInfo;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class DriverStaffSaveVO extends DriverInfo {
|
|
||||||
/**
|
|
||||||
* 员工id
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private Long driverId;
|
|
||||||
/**
|
|
||||||
* 用户账号
|
|
||||||
*/
|
|
||||||
@ExcelProperty("员工账号")
|
|
||||||
private String username;
|
|
||||||
/**
|
|
||||||
* 用户昵称
|
|
||||||
*/
|
|
||||||
@ExcelProperty("员工名称")
|
|
||||||
private String nickname;
|
|
||||||
/**
|
|
||||||
* 用户类型
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String userType;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门编号
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private Long deptId;
|
|
||||||
/**
|
|
||||||
* 用户手机号码
|
|
||||||
*/
|
|
||||||
@ExcelProperty("手机号")
|
|
||||||
private String mobile;
|
|
||||||
/**
|
|
||||||
* 用户密码
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String password;
|
|
||||||
/**
|
|
||||||
* 用户头像
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String avatar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户性别
|
|
||||||
**/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String sex;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户性别
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "用户性别")
|
|
||||||
private String sexStr;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户状态
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户状态
|
|
||||||
*/
|
|
||||||
@ExcelProperty("状态")
|
|
||||||
private String statusStr;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户邮箱
|
|
||||||
*/
|
|
||||||
@ExcelProperty("邮箱")
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 驾驶证类型集合
|
|
||||||
*/
|
|
||||||
private List<String> driverLicenseTypeArr;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件集合
|
|
||||||
*/
|
|
||||||
private List<FileDO> fileList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色集合
|
|
||||||
*/
|
|
||||||
private List<Long> roleIds;
|
|
||||||
}
|
|
||||||
@ -494,31 +494,4 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getOnInternal" resultType="cn.iocoder.yudao.module.rescue.vo.DriverStaffSaveVO">
|
|
||||||
SELECT DISTINCT
|
|
||||||
su.id AS userId,
|
|
||||||
su.nickname,
|
|
||||||
su.username,
|
|
||||||
su.user_type,
|
|
||||||
su.remark,
|
|
||||||
su.dept_id,
|
|
||||||
su.mobile,
|
|
||||||
su.password,
|
|
||||||
su.avatar,
|
|
||||||
su.sex,
|
|
||||||
su.status,
|
|
||||||
di.id AS driverId,
|
|
||||||
di.age,
|
|
||||||
di.folder_id
|
|
||||||
FROM driver_info di
|
|
||||||
INNER JOIN system_users su ON di.user_id = su.id AND su.deleted = 0
|
|
||||||
LEFT JOIN system_user_role sur ON su.id = sur.user_id AND sur.deleted = 0
|
|
||||||
LEFT JOIN system_role sr ON sur.role_id = sr.id AND sr.service_package_id = 'jiuyuan' AND sr.deleted = 0
|
|
||||||
<where>
|
|
||||||
di.deleted = 0
|
|
||||||
and su.id = #{id}
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -135,15 +135,6 @@ public class RoleController {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectListByRoleIdJY")
|
|
||||||
public CommonResult selectListByRoleIdJY(RolePageReqVO role){
|
|
||||||
return success(roleService.selectListByRoleIdJY(role));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过角色id查询角色
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/selectListByRoleIdRepair")
|
@GetMapping("/selectListByRoleIdRepair")
|
||||||
public CommonResult selectListByRoleIdRepair(RolePageReqVO role) {
|
public CommonResult selectListByRoleIdRepair(RolePageReqVO role) {
|
||||||
return success(roleService.selectListByRoleIdRepair(role));
|
return success(roleService.selectListByRoleIdRepair(role));
|
||||||
|
|||||||
@ -45,7 +45,6 @@ public interface UserRoleMapper extends BaseMapperX<UserRoleDO> {
|
|||||||
|
|
||||||
IPage<UserDTO> selectListByRoleId(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleId(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
||||||
IPage<UserDTO> selectListByRoleIdJX(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleIdJX(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
||||||
IPage<UserDTO> selectListByRoleIdJY(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
|
||||||
IPage<UserDTO> selectListByRoleIdRepair(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleIdRepair(@Param("page") Page<UserDTO> page,@Param("role") RolePageReqVO role);
|
||||||
|
|
||||||
List<UserDTO> selectByRoleId(Integer roleId);
|
List<UserDTO> selectByRoleId(Integer roleId);
|
||||||
|
|||||||
@ -174,7 +174,6 @@ public interface RoleService {
|
|||||||
IPage<UserDTO> selectListByRoleId(RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleId(RolePageReqVO role);
|
||||||
|
|
||||||
IPage<UserDTO> selectListByRoleIdJX(RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleIdJX(RolePageReqVO role);
|
||||||
IPage<UserDTO> selectListByRoleIdJY(RolePageReqVO role);
|
|
||||||
|
|
||||||
IPage<UserDTO> selectListByRoleIdRepair(RolePageReqVO role);
|
IPage<UserDTO> selectListByRoleIdRepair(RolePageReqVO role);
|
||||||
|
|
||||||
@ -218,5 +217,11 @@ public interface RoleService {
|
|||||||
*/
|
*/
|
||||||
List<UserDTO> getUserListByCodesAndTenantId(List<String> codes, Long tenantId);
|
List<UserDTO> getUserListByCodesAndTenantId(List<String> codes, Long tenantId);
|
||||||
|
|
||||||
public List<RoleDO> selectRoleByUserId(Long userId);
|
/**
|
||||||
|
* 根据用户id查询角色
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RoleDO> selectRoleByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -369,12 +369,6 @@ public class RoleServiceImpl implements RoleService {
|
|||||||
return userRoleMapper.selectListByRoleIdJX(page,role);
|
return userRoleMapper.selectListByRoleIdJX(page,role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IPage<UserDTO> selectListByRoleIdJY(RolePageReqVO role) {
|
|
||||||
Page<UserDTO> page = new Page<>(role.getPageNo(), role.getPageSize());
|
|
||||||
return userRoleMapper.selectListByRoleIdJY(page,role);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<UserDTO> selectListByRoleIdRepair(RolePageReqVO role) {
|
public IPage<UserDTO> selectListByRoleIdRepair(RolePageReqVO role) {
|
||||||
Page<UserDTO> page = new Page<>(role.getPageNo(), role.getPageSize());
|
Page<UserDTO> page = new Page<>(role.getPageNo(), role.getPageSize());
|
||||||
|
|||||||
@ -77,44 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by su.nickname
|
order by su.nickname
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectListByRoleIdJY" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
|
||||||
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
|
||||||
SELECT
|
|
||||||
su.id,
|
|
||||||
su.username,
|
|
||||||
su.nickname,
|
|
||||||
su.user_type,
|
|
||||||
su.remark,
|
|
||||||
su.dept_id,
|
|
||||||
su.mobile,
|
|
||||||
su.password,
|
|
||||||
su.sex,
|
|
||||||
su.open_id,
|
|
||||||
su.tenant_id,
|
|
||||||
su.status,
|
|
||||||
su.avatar,
|
|
||||||
GROUP_CONCAT(DISTINCT sr2.name SEPARATOR ',') AS roleNames
|
|
||||||
FROM driver_info di
|
|
||||||
INNER JOIN system_users su ON di.user_id = su.id AND su.deleted = 0
|
|
||||||
LEFT JOIN system_user_role sr ON su.id = sr.user_id AND sr.deleted = 0
|
|
||||||
INNER JOIN system_role role ON role.id = sr.role_id AND role.deleted = 0 AND role.code = 'jysj'
|
|
||||||
LEFT JOIN system_role sr2 ON sr.role_id = sr2.id AND sr2.service_package_id = 'jiuyuan'
|
|
||||||
<where>
|
|
||||||
<if test="role.nickname != null">
|
|
||||||
AND (su.nickname like CONCAT('%',#{role.nickname},'%') OR su.username like CONCAT('%',#{role.nickname},'%'))
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
GROUP BY
|
|
||||||
su.id, su.username, su.nickname, su.user_type, su.remark,
|
|
||||||
su.dept_id, su.mobile, su.password, su.sex, su.open_id,
|
|
||||||
su.tenant_id, su.status, su.avatar
|
|
||||||
<if test="role.roleId != null">
|
|
||||||
HAVING SUM(sr.role_id = #{role.roleId}) > 0
|
|
||||||
</if>
|
|
||||||
ORDER BY su.nickname
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectListByRoleIdRepair" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
<select id="selectListByRoleIdRepair" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
||||||
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
||||||
select
|
select
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user