From 8ed539f27278be2a2402c4d32c3d878b3783f821 Mon Sep 17 00:00:00 2001 From: haha Date: Wed, 26 Jun 2024 23:57:44 +0800 Subject: [PATCH] update code --- .../src/main/resources/application-druid.yml | 2 +- .../SurProjectAttendanceDataMapper.xml | 94 ++++++++++++++----- .../video/SurProjectPhotographyMapper.xml | 2 +- 3 files changed, 72 insertions(+), 26 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 7400db4e..9bb28ba0 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -49,7 +49,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://62.234.3.186:3306/yanzhu_jh_test_2024?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 + url: jdbc:mysql://62.234.3.186:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 username: root password: Sxyanzhu@cf123 #url: jdbc:mysql://192.168.126.19:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceDataMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceDataMapper.xml index 22c64e3e..977f2b2e 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceDataMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceDataMapper.xml @@ -45,7 +45,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select * from sur_project_attendance_data_${year} + select + id, + cfgid, + app_id, + projectId, + projectName, + deptId, + deptName, + vendors_code, + serverid, + workerId, + workerName, + identification, + workerPhoto, + workerGender, + birthDate, + ethnic, + nativePlace, + phone, + workTypeName, + specWorkType, + groupName, + companyTypeId, + companyName, + attendance_time, + attendance_out_time, + scanPhoto, + teamId, + workTypeCode, + companyId, + vendorId, + device_code, + is_del, + create_by, + create_time, + update_by, + update_time, + remark + from sur_project_attendance_data_${year} select ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady - left join sur_project sp on sp.id = ady.projectId - where sp.isDel=0 and sp.progressVisible=0 - - and ady.projectId=#{projectId} - - - and sp.deptId=#{deptId} - - and sp.projectType = #{proType} - - and ady.projectId in - - #{item} - - - and date(ady.attendance_time) =date(#{attendanceTime}) + where ady.cfgid in (select id from sur_project_attendance_cfg where + is_del=0 + + and projectId=#{projectId} + + and projectId in (select id from sur_project sp where sp.isDel=0 and sp.progressVisible=0 + + + and sp.deptId=#{deptId} + + and date(ady.attendance_time) =date(#{attendanceTime}) + + and sp.projectType = #{proType} + + and ady.projectId in + + #{item} + + + ) + ) + group by ady.companyTypeId diff --git a/yanzhu-jh/src/main/resources/mapper/video/SurProjectPhotographyMapper.xml b/yanzhu-jh/src/main/resources/mapper/video/SurProjectPhotographyMapper.xml index 8e4e4f7e..a81193f8 100644 --- a/yanzhu-jh/src/main/resources/mapper/video/SurProjectPhotographyMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/video/SurProjectPhotographyMapper.xml @@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} - order by spp.video_date desc + order by sp.projectSort ASC,sp.projectName