From ab23a15a0aa653913955feb8e849676f7a5b4e4a Mon Sep 17 00:00:00 2001 From: Lx <935448346@qq.com> Date: Mon, 28 Jul 2025 11:21:50 +0800 Subject: [PATCH 1/6] 0728 --- .../module/course/mapper/ProcessMapper.java | 1 + .../service/impl/ProcessServiceImpl.java | 17 +++++++++----- .../resources/mapper/course/ProcessMapper.xml | 23 +++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/mapper/ProcessMapper.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/mapper/ProcessMapper.java index 71a34279..5d5b1013 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/mapper/ProcessMapper.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/mapper/ProcessMapper.java @@ -122,5 +122,6 @@ public interface ProcessMapper extends BaseMapper { */ IPage 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 page); + IPage getMyCourseStudentPage(@Param("entity") Process entity, Page page); } diff --git a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/service/impl/ProcessServiceImpl.java b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/service/impl/ProcessServiceImpl.java index 3ac815b1..bf839c54 100644 --- a/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/service/impl/ProcessServiceImpl.java +++ b/dl-module-jx/src/main/java/cn/iocoder/yudao/module/course/service/impl/ProcessServiceImpl.java @@ -143,11 +143,13 @@ public class ProcessServiceImpl extends ServiceImpl impl public IPage getMyCourseStudentPage(Process process, Page page) { //当前教练ID Long userId = SecurityFrameworkUtils.getLoginUserId(); - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() + process.setCoachId(userId); +// processMapper.getMyCourseStudentPage(process, page); + /*LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() .eq(Process::getCoachId, userId) .notIn(Process::getSubject, Arrays.asList(1, 4)); - /*.eq(Process::getCourseId, process.getCourseId()) - .eq(Process::getSubject, process.getSubject());*/ + *//*.eq(Process::getCourseId, process.getCourseId()) + .eq(Process::getSubject, process.getSubject());*//* if (process != null && process.getCourseId() != null) { queryWrapper.eq(Process::getCourseId, process.getCourseId()); } @@ -156,7 +158,8 @@ public class ProcessServiceImpl extends ServiceImpl impl } if (process != null && StringUtils.isNotEmpty(process.getUserName())) { queryWrapper.like(Process::getUserName, process.getUserName()); - } + }*/ + //状态等于1-训练中的 /*if(dictDataService.getValueByTypeAndLabel("check_in_switch", "科二科三同时打卡开关").equals("0")){ // 开关为0时,只查询状态为1的记录 @@ -169,11 +172,13 @@ public class ProcessServiceImpl extends ServiceImpl impl // 其他查询条件 queryWrapper.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0")) .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")) // .groupBy(Process::getUserId) .orderByDesc(BaseDO::getCreateTime); - return this.page(page, queryWrapper); + // 需要查询订单表中是否终止 + return this.page(page, queryWrapper);*/ + return processMapper.getMyCourseStudentPage(process, page); } /** diff --git a/dl-module-jx/src/main/resources/mapper/course/ProcessMapper.xml b/dl-module-jx/src/main/resources/mapper/course/ProcessMapper.xml index 51547a45..4aef0044 100644 --- a/dl-module-jx/src/main/resources/mapper/course/ProcessMapper.xml +++ b/dl-module-jx/src/main/resources/mapper/course/ProcessMapper.xml @@ -756,4 +756,27 @@ AND p.course_type = #{courseType} + + + From 97ab7331baa2f7b9e3dae1f8bf101d593e30d493 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Tue, 29 Jul 2025 10:35:31 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9B=B4=E6=96=B00729?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 27 ++++++++++++++++--- .../inspection/entity/InspectionInfo.java | 2 ++ .../service/IInspectionInfoService.java | 2 +- .../impl/InspectionInfoServiceImpl.java | 3 ++- .../inspection/InspectionInfoMapper.xml | 5 ++++ 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index 1af6c0c3..28658aaf 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -132,8 +132,8 @@ public class InspectionInfoController extends BaseController { */ @GetMapping("geStelectInspectionByBusiness") public CommonResult geStelectInspectionByBusiness(InspectionInfo inspectionInfo, - @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum, - @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { + @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { Page page = new Page<>(pageNum, pageSize); return success(inspectionInfoService.geStelectInspectionByBusiness(page, inspectionInfo)); } @@ -396,8 +396,27 @@ public class InspectionInfoController extends BaseController { * @date 16:22 2024/12/18 **/ @GetMapping("/getBusinessCountByType") - public CommonResult getBusinessCountByType(@RequestParam(required = false, name ="partnerId") Integer partnerId) { - return success(inspectionInfoService.getBusinessCountByType(partnerId)); + public CommonResult getBusinessCountByType(@RequestParam(required = false, name = "partnerId") Integer partnerId, + @RequestParam(required = false, name = "unit") String unit) { + List 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)); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 59f5500f..d68151d2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -258,4 +258,6 @@ public class InspectionInfo extends TenantBaseDO /** 保险公司名称 */ @TableField(exist = false) private String insuranceCompanyName; + @TableField(exist = false) + private List datetimeRange; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java index deda7d8c..29df7569 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java @@ -179,7 +179,7 @@ public interface IInspectionInfoService extends IService */ IPage geStelectInspectionByBusiness(Page page, InspectionInfo inspectionInfo); - Map getBusinessCountByType(Integer partnerId); + Map getBusinessCountByType(Integer partnerId, List datetimeRange); List selectMeetCarList(List datetimeRange); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 2680ad01..cc00a66b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -1027,7 +1027,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl getBusinessCountByType(Integer partnerId) { + public Map getBusinessCountByType(Integer partnerId, List datetimeRange) { // 创建线程池 ExecutorService executor = Executors.newFixedThreadPool(10); @@ -1058,6 +1058,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl page = new Page<>(1, 1); diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml index ca05e2f6..0fc15afe 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml @@ -689,6 +689,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND ii.status = '1' + + + AND imco.create_time BETWEEN #{info.datetimeRange[0]} AND #{info.datetimeRange[1]} + + + + + +