From 3eb1144d630759dc842cb5e9b00e406d8e447be5 Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Thu, 31 Jul 2025 18:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BE=E7=89=8C=E9=AA=8C=E6=94=B6=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/api/checked.js | 59 ++ yanzhu-bigscreen/src/api/index.js | 5 +- .../check/projectCheckedDetailDialog.vue | 132 ++++ yanzhu-bigscreen/src/views/projectChecked.vue | 582 +++++++++++++++++- .../mapper/manage/ProProjectCheckedMapper.xml | 15 +- .../manage/SurProjectAttendanceDataMapper.xml | 24 +- .../manage/SurProjectAttendanceUserMapper.xml | 14 +- .../job/QuartzProjectAttendanceDataMapper.xml | 20 +- .../job/QuartzProjectAttendanceUserMapper.xml | 10 +- .../src/views/manage/projectChecked/index.vue | 12 +- 10 files changed, 801 insertions(+), 72 deletions(-) create mode 100644 yanzhu-bigscreen/src/api/checked.js create mode 100644 yanzhu-bigscreen/src/views/check/projectCheckedDetailDialog.vue diff --git a/yanzhu-bigscreen/src/api/checked.js b/yanzhu-bigscreen/src/api/checked.js new file mode 100644 index 00000000..58ee5499 --- /dev/null +++ b/yanzhu-bigscreen/src/api/checked.js @@ -0,0 +1,59 @@ +import request from "@/utils/request"; + +// 查询项目举牌验收列表 +const listProjectChecked=(query)=> { + return request({ + url: '/manage/projectChecked/list', + method: 'get', + params: query + }) +} + +//举牌验收数量统计 +const groupByStatus = (projectId) => { + return request({ + url: `/manage//api/bgscreen/projectChecked/groupByStatus?projectId=${projectId || 0}`, + method: 'get' + }) +} + +//举牌验收技术员统计 +const groupByTechnician = (projectId) => { + return new Promise((resolve, reject) => { + request({ + url: `/manage//api/bgscreen/projectChecked/groupByTechnician?projectId=${projectId || 0}`, + method: 'get' + }).then(d => { + let tmps = (d.data || []).map(it => { + it.result = it.result || 0; + it.cnt = it.cnt || 0; + return it; + }) + let info = []; + tmps.forEach(it => { + let name = it.userName; + let user = info.find(item => item.name == name); + if (!user) { + user = { + name, + toBe: 0, //待验收 + accepted: 0 //已验收 + }; + info.push(user); + } + if (it.result == 0) { + user.toBe = it.cnt; + } else { + user.accepted = it.cnt; + } + }); + resolve(info); + }) + }); +} + +export default { + groupByStatus, + groupByTechnician, + listProjectChecked +} \ No newline at end of file diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index fd1b9a9e..9ae29104 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -13,6 +13,8 @@ import planSchedule from "./planSchedule"; import labor from "./labor"; import bim from "./bim" import machMater from './machmater' +import checked from './checked' + export default { http: axios, downFile: download, @@ -29,5 +31,6 @@ export default { planSchedule, labor, bim, - machMater + machMater, + checked }; diff --git a/yanzhu-bigscreen/src/views/check/projectCheckedDetailDialog.vue b/yanzhu-bigscreen/src/views/check/projectCheckedDetailDialog.vue new file mode 100644 index 00000000..aa87e4a3 --- /dev/null +++ b/yanzhu-bigscreen/src/views/check/projectCheckedDetailDialog.vue @@ -0,0 +1,132 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/views/projectChecked.vue b/yanzhu-bigscreen/src/views/projectChecked.vue index f10cc23c..56f81b61 100644 --- a/yanzhu-bigscreen/src/views/projectChecked.vue +++ b/yanzhu-bigscreen/src/views/projectChecked.vue @@ -1,46 +1,167 @@ \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectCheckedMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectCheckedMapper.xml index a1218e21..a717efd8 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectCheckedMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectCheckedMapper.xml @@ -53,7 +53,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ppc.check_type = #{checkType} and ppc.working_position = #{workingPosition} and ppc.working_position_type = #{workingPositionType} - and ppc.check_result = #{checkResult} + + + and approve_status=100 and check_result=1 + and not (approve_status=100 and check_result=1) + and ppc.check_result = #{checkResult} + + and ppc.technician_user = #{technicianUser} and ppc.supervise_user = #{superviseUser} and ppc.group_dept_user = #{groupDeptUser} @@ -64,6 +70,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and (ppc.approve_status != '100' or ppc.check_result is null or ppc.check_result != '1') and ppc.approve_status = '100' and ppc.check_result = '1' + + and ppc.checking_date BETWEEN + DATE_FORMAT(CURDATE() - INTERVAL (WEEKDAY(CURDATE()) ) DAY, '%Y-%m-%d 00:00:00') + AND + DATE_FORMAT(CURDATE() - INTERVAL (WEEKDAY(CURDATE()) - 6) DAY, '%Y-%m-%d 23:59:59') + + and ppc.is_del = '0' order by ppc.id diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml index 58eb6a00..89f1b0a0 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceDataMapper.xml @@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and cfgid = #{cfgid} and app_id = #{appId} and workerId = #{workerId} - and date(attendance_time) = date(#{attendanceTime}) + and date(ifnull(attendance_time,attendance_out_time)) = date(#{attendanceTime}) order by id desc LIMIT 1 @@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and scanPhoto = #{scanPhoto} and is_del = #{isDel} - and date(attendance_time) = date(#{attendanceTime}) + and date(ifnull(attendance_time,attendance_out_time)) = date(#{attendanceTime}) order by id desc @@ -344,7 +344,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -442,7 +442,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sur_project_attendance_data d left JOIN sur_project_attendance_user u on d.workerId = u.workerId and d.cfgid = u.cfgid left join sys_dept sd on u.companyName = sd.dept_name - where d.cfgid=#{cfgid} and date(d.attendance_time) = #{date} + where d.cfgid=#{cfgid} and date(ifnull(d.attendance_time,d.attendance_out_time)) = #{date} GROUP BY d.workerId @@ -558,7 +558,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} - and date(ady.attendance_time) =date(#{attendanceTime}) + and date(ifnull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime}) @@ -591,7 +591,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and sp.dis_dept_id=#{deptId} - and date(ady.attendance_time) =date(#{attendanceTime}) + and date(ifnull( ady.attendance_time, ady.attendance_out_time)) =date(#{attendanceTime}) and sp.projectType = #{proType} and ady.projectId in @@ -624,7 +624,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select '3' as type, d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d where d.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0) and d.is_del=0 - and date(d.attendance_time) = date(now()) + and date(ifnull(d.attendance_time,d.attendance_out_time)) = date(now()) group by d.companyTypeId @@ -632,7 +632,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d where d.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0) and d.is_del=0 - and date(d.attendance_time) = date(#{attendanceTime}) + and date(ifnull(d.attendance_time,d.attendance_out_time)) = date(#{attendanceTime}) and d.workerName like concat('%', #{workerName}, '%') group by d.companyTypeId @@ -665,7 +665,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -342,7 +342,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -440,7 +440,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sur_project_attendance_data d left JOIN sur_project_attendance_user u on d.workerId = u.workerId and d.cfgid = u.cfgid left join sys_dept sd on u.companyName = sd.dept_name - where d.cfgid=#{cfgid} and date(d.attendance_time) = #{date} + where d.cfgid=#{cfgid} and date(ifnull(d.attendance_time,d.attendance_out_time)) = #{date} GROUP BY d.workerId @@ -476,7 +476,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} - and date(ady.attendance_time) =date(#{attendanceTime}) + and date(ifnull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime}) @@ -510,7 +510,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and sp.dis_dept_id=#{deptId} - and date(ady.attendance_time) =date(#{attendanceTime}) + and date(if(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime}) and sp.project_type = #{proType} @@ -546,7 +546,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select '3' as type, d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d where d.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0) and d.is_del=0 - and date(d.attendance_time) = date(now()) + and date(ifnull(d.attendance_time,d.attendance_out_time)) = date(now()) group by d.companyTypeId @@ -554,7 +554,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d where d.cfgid in (select cfg.id from attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0) and d.is_del=0 - and date(d.attendance_time) = date(#{attendanceTime}) + and date(ifnull(d.attendance_time,d.attendance_out_time)) = date(#{attendanceTime}) and d.workerName like concat('%', #{workerName}, '%') group by d.companyTypeId diff --git a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceUserMapper.xml b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceUserMapper.xml index b974851f..b6149fbb 100644 --- a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceUserMapper.xml +++ b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceUserMapper.xml @@ -472,14 +472,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(1) cnt from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId and u.workerid in( - SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=date(#{createBy}) AND cfgid IN ( + SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifnull(attendance_time,attendance_out_time))=date(#{createBy}) AND cfgid IN ( SELECT id FROM attendance_cfg WHERE project_id=#{projectId} AND dept_id=#{deptId} ) group by workerid )