From 7660cc28cd139b825cbec1a0fbeeb87e44f56d25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Thu, 11 Dec 2025 11:27:20 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/manage/AttendanceUbiDataMapper.xml | 59 +++++++++----------
.../ProMobileAttendanceConfigMapper.xml | 2 +-
.../resources/mapper/manage/ProPlanMapper.xml | 6 +-
.../ProProjectInfoSubdeptsUsersMapper.xml | 8 +--
.../manage/SurProjectAttendanceDataMapper.xml | 32 +++++-----
.../manage/SurProjectAttendanceUserMapper.xml | 18 +++---
.../resources/mapper/system/SysDeptMapper.xml | 2 +-
.../resources/mapper/system/SysMenuMapper.xml | 8 +--
.../trouble/SmzSspProblemmodifyMapper.xml | 6 +-
.../job/QuartzProjectAttendanceDataMapper.xml | 20 +++----
.../job/QuartzProjectAttendanceUserMapper.xml | 10 ++--
11 files changed, 85 insertions(+), 86 deletions(-)
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/AttendanceUbiDataMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/AttendanceUbiDataMapper.xml
index 74a74936..d50c880d 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/AttendanceUbiDataMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/AttendanceUbiDataMapper.xml
@@ -59,14 +59,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sub_dept_group_name like concat('%', #{subDeptGroupName}, '%') and craft_type = #{craftType} and craft_post = #{craftPost}
- and date(inTime) = date(#{inTime})
+ and date(ifNull(inTime,outTime)) = date(#{inTime}) and inData = #{inData}
- and date(outTime) = date(#{outTime})
+ and date(ifNull(outTime,inTime)) = date(#{outTime}) and outData = #{outData} and deviceNo = #{deviceNo} and is_del = #{isDel} and state = #{state} and date(create_time) between #{params.beginTime} and #{params.endTime}
+ and is_del = 0
order by id desc
@@ -80,10 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and userId = #{userId} and admitGuid = #{admitGuid} and userName like concat('%', #{userName}, '%')
-
- and (date(inTime) = date(#{inTime}) or date(outTime) = date(#{inTime}))
-
- and date(outTime) = date(#{outTime})
+ and date(ifNull(inTime,outTime)) = date(#{inTime})
+ and date(ifNull(outTime,inTime)) = date(#{outTime}) and deviceNo = #{deviceNo}
@@ -92,22 +91,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from (
select ad.`userId`
from attendance_ubi_data ad
- where
- date(ad.`inTime`)>=date(#{inTime}) and date(ad.`inTime`) < date(#{outTime})
- and ad.projectId = #{projectId}
- and ad.sub_dept_id = #{subDeptId}
+
+ and ad.projectId = #{projectId}
+ and ad.sub_dept_id = #{subDeptId}
+ and date(ifNull(ad.`inTime`,ad.`outTime`)) = ]]> date(#{inTime}) and date(ifNull(ad.`outTime`,ad.`inTime`)) date(#{outTime})
+
group by ad.`userId`
order by ad.userId) xx
+
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProPlanMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProPlanMapper.xml
index e48b9d7d..3a0d0954 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProPlanMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProPlanMapper.xml
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- left(ifnull(pp.bim_id,''),10) bim_id,
+ left(ifNull(pp.bim_id,''),10) bim_id,
pp.operator, pp.operator_id,
pp.group_id, pp.group_name, pp.schedule_node, pp.is_del, pp.create_by, pp.create_time, pp.update_by, pp.update_time, pp.remark,
@@ -360,7 +360,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JOIN (
SELECT
plan_id,
- ifnull(max(date(finish_date)),'2000-01-01') AS finish_date
+ ifNull(max(date(finish_date)),'2000-01-01') AS finish_date
FROM
pro_plan_schedule
WHERE
@@ -421,7 +421,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pp.plan_finish_date,
- left(ifnull(pp.bim_id,''),10) bim_id,
+ left(ifNull(pp.bim_id,''),10) bim_id,
pp.bim_id,
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
index b33646ae..0b0e4123 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml
@@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where psu.project_id = #{proId} and psu.user_id = #{userId}
- order by ifnull(psu.update_time, date('2099-12-31')) desc,psu.create_time desc
+ order by ifNull(psu.update_time, date('2099-12-31')) desc,psu.create_time desc
limit 1
@@ -453,7 +453,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
(
SELECT
- ifnull( craft_post, 4037 ) craft_post
+ ifNull( craft_post, 4037 ) craft_post
FROM
pro_project_info_subdepts_users
WHERE
@@ -481,10 +481,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where psu.is_del!=2 and psu.use_status=0 and psu.project_id=#{projectId}
) us
join (
- select userId,max(ifnull(inTime,outTime)) dt from attendance_ubi_data
+ select userId,max(ifNull(inTime,outTime)) dt from attendance_ubi_data
where projectid=#{projectId} and is_del!=1
group by userId
- order by max(ifnull(inTime,outTime)) ) att on us.id=att.userId
+ order by max(ifNull(inTime,outTime)) ) att on us.id=att.userId
select count(1) from pro_project_info_subdepts_users where project_id=#{prjId} and edu_status='0' and is_del=0
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 89f1b0a0..ad1947c2 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(ifnull(attendance_time,attendance_out_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(ifnull(attendance_time,attendance_out_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"
select companyTypeId,count(1) id from ( ) x2 where id in (
select min(id) from ( ) x1
- where date(ifnull(attendance_time,attendance_out_time))=#{attendanceTime}
+ where date(ifNull(attendance_time,attendance_out_time))=#{attendanceTime}
and project_id in (
SELECT id FROM pro_project_info WHERE is_del=0 AND deptid = #{subDeptId}
)
@@ -363,7 +363,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select g.companyTypeId,count(1) id 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(ifnull(attendance_time,attendance_out_time))=CURDATE()
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE()
and cfgid in (select id from attendance_cfg
@@ -431,7 +431,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 sur_project_attendance_group g on u.companyId = g.companyId and g.cfgid = u.cfgid
- where d.cfgid=#{cfgid} and date(ifnull(d.attendance_time,d.attendance_out_time)) = #{date}
+ where d.cfgid=#{cfgid} and date(ifNull(d.attendance_time,d.attendance_out_time)) = #{date}
GROUP BY d.workerId
@@ -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(ifnull(d.attendance_time,d.attendance_out_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(ifnull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime})
+ and date(ifNull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime})
@@ -575,7 +575,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ady.workerId = #{workerId} and ady.workerName like concat('%', #{workerName}, '%')
- and date(ifnull(ady.attendance_time,ady.attendance_out_time)) = date(#{attendanceTime})
+ and date(ifNull(ady.attendance_time,ady.attendance_out_time)) = date(#{attendanceTime})
and ady.is_del=0
order by ady.id desc
@@ -591,7 +591,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sp.dis_dept_id=#{deptId}
- and date(ifnull( ady.attendance_time, ady.attendance_out_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(ifnull(d.attendance_time,d.attendance_out_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(ifnull(d.attendance_time,d.attendance_out_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
@@ -651,12 +651,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT dt deptName,count(1) deptId
from (
- select DISTINCT workerId, date(ifnull(attendance_time,attendance_out_time)) dt
+ select DISTINCT workerId, date(ifNull(attendance_time,attendance_out_time)) dt
from sur_project_attendance_data_${year} where
is_del !=1
and projectid=#{prjId}
- AND DATE( ifnull( attendance_time, attendance_out_time ) ) >= date(#{dateStart})
- AND DATE( ifnull( attendance_time, attendance_out_time ) ) <= date(#{dateEnd})
+ AND DATE( ifNull( attendance_time, attendance_out_time ) ) >= date(#{dateStart})
+ AND DATE( ifNull( attendance_time, attendance_out_time ) ) <= date(#{dateEnd})
) tmp
group by dt
@@ -665,10 +665,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from sur_project_attendance_data_${year}
- where date(ifnull(attendance_time,attendance_out_time))=date(now())
+ where date(ifNull(attendance_time,attendance_out_time))=date(now())
and is_del!=1
and projectid=#{prjId}
- order by ifnull(attendance_time,attendance_out_time) DESC
+ order by ifNull(attendance_time,attendance_out_time) DESC
LIMIT 4
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceUserMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceUserMapper.xml
index 1f0d1acd..da4c8c47 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceUserMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/SurProjectAttendanceUserMapper.xml
@@ -460,7 +460,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(
- SELECT * FROM sur_project_attendance_data WHERE DATE(ifnull(attendance_time,attendance_out_time))=date(#{createBy}) AND cfgid IN (
+ SELECT * 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=#{subDeptId}
) ) xx
@@ -501,14 +501,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(ifnull(attendance_time,attendance_out_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=#{subDeptId}
) group by workerid
)
select workerid,attendance_type name,min(attendance_time) inTime,max(attendance_time) outTime from sur_project_attendance_data
- where DATE(ifnull(attendance_time,attendance_out_time))=date(#{createBy})
+ where DATE(ifNull(attendance_time,attendance_out_time))=date(#{createBy})
and workerid in
@@ -522,7 +522,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.* 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(ifnull(attendance_time,attendance_out_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=#{subDeptId}
) group by workerid
)
@@ -534,7 +534,7 @@ 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(ifnull(attendance_time,attendance_out_time))=CURDATE() group by workerid
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE() group by workerid
)
and g.companyTypeId in (1)
@@ -566,7 +566,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.* 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(ifnull(attendance_time,attendance_out_time))=CURDATE()
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE()
)
@@ -597,7 +597,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.* 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(ifnull(attendance_time,attendance_out_time))=CURDATE() group by workerid
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE() group by workerid
)
@@ -841,11 +841,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and cfg.project_id=#{projectId} ) u
join
(
- select workerId,max(ifnull(attendance_time,attendance_out_time)) dt
+ select workerId,max(ifNull(attendance_time,attendance_out_time)) dt
from sur_project_attendance_data_${year}
where projectid=#{projectId} and is_del!=1
GROUP BY workerId
- order by max(ifnull(attendance_time,attendance_out_time))
+ order by max(ifNull(attendance_time,attendance_out_time))
) att on u.workerId=att.workerId
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysDeptMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysDeptMapper.xml
index 89bcf9a6..8ccea5be 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select d.dept_id, ifnull(d.com_id,d.dept_id) com_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.dept_infos, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
+ select d.dept_id, ifNull(d.com_id,d.dept_id) com_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.dept_infos, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysMenuMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysMenuMapper.xml
index 2d67ff9b..53b4de3d 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -28,7 +28,7 @@
- select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
+ select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifNull(perms,'') as perms, icon, create_time
from sys_menu
@@ -49,13 +49,13 @@
- select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+ select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifNull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
- select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+ select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifNull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@@ -74,7 +74,7 @@
- select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+ select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifNull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml
index 7cee3b3a..44e5817d 100644
--- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml
+++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml
@@ -408,7 +408,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.workParts,
a.changeInfo,
a.lordSent,
- CONCAT(ifnull(a.lordSentUser,a.lordSent) ,'【',ifnull(b.sub_dept_name,'施工单位'),'】',ifnull(b.user_phone,'')) as lordSentUser,
+ CONCAT(ifNull(a.lordSentUser,a.lordSent) ,'【',ifNull(b.sub_dept_name,'施工单位'),'】',ifNull(b.user_phone,'')) as lordSentUser,
a.lordSentUser,
a.copySend,
a.copySendUser,
@@ -423,14 +423,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.checkUserPhone,
a.smark_url,
a.isDel,
- CONCAT(ifnull(c.nick_name,''),'【',ifnull(c.phonenumber,''),'】') as createUser,
+ CONCAT(ifNull(c.nick_name,''),'【',ifNull(c.phonenumber,''),'】') as createUser,
a.createUser as updateUser,
a.createTime,
a.updateUser,
a.updateTime,
a.danger_type,
a.recheckSend,
- CONCAT(ifnull(a.recheckSendUser,a.recheckSend) ,'【',ifnull(d.sub_dept_name,'施工单位'),'】',ifnull(d.user_phone,'')) as recheckSendUser,
+ CONCAT(ifNull(a.recheckSendUser,a.recheckSend) ,'【',ifNull(d.sub_dept_name,'施工单位'),'】',ifNull(d.user_phone,'')) as recheckSendUser,
a.recheckSendUser,
a.roleType,
a.problemType
diff --git a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml
index b26098f9..020ee06c 100644
--- a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml
+++ b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/QuartzProjectAttendanceDataMapper.xml
@@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and cfgid = #{cfgid} and app_id = #{appId} and workerId = #{workerId}
- and date(ifnull(attendance_time,attendance_out_time)) = date(#{attendanceTime})
+ and date(ifNull(attendance_time,attendance_out_time)) = date(#{attendanceTime})
order by id desc LIMIT 1
@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and scanPhoto = #{scanPhoto} and is_del = #{isDel}
- and DATE( ifnull( attendance_time, attendance_out_time ) ) = date(#{attendanceTime})
+ and DATE( ifNull( attendance_time, attendance_out_time ) ) = date(#{attendanceTime})
order by id desc
@@ -342,7 +342,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select companyTypeId,count(1) id from ( ) x2 where id in (
select min(id) from ( ) x1
- where date(ifnull(attendance_time,attendance_out_time))=#{attendanceTime}
+ where date(ifNull(attendance_time,attendance_out_time))=#{attendanceTime}
and projectId in (
SELECT id FROM pro_project_info WHERE is_del=0 AND dis_dept_id = #{subDeptId}
)
@@ -361,7 +361,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select g.companyTypeId,count(1) id 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(ifnull(attendance_time,attendance_out_time))=CURDATE()
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE()
and cfgid in (select id from attendance_cfg
@@ -429,7 +429,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 sur_project_attendance_group g on u.companyId = g.companyId and g.cfgid = u.cfgid
- where d.cfgid=#{cfgid} and date(ifnull(d.attendance_time,d.attendance_out_time)) = #{date}
+ where d.cfgid=#{cfgid} and date(ifNull(d.attendance_time,d.attendance_out_time)) = #{date}
GROUP BY d.workerId
@@ -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(ifnull(d.attendance_time,d.attendance_out_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(ifnull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime})
+ and date(ifNull(ady.attendance_time,ady.attendance_out_time)) =date(#{attendanceTime})
@@ -493,7 +493,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ady.workerId = #{workerId} and ady.workerName like concat('%', #{workerName}, '%')
- and date(ifnull(ady.attendance_time,ady.attendance_out_time)) = date(#{attendanceTime})
+ and date(ifNull(ady.attendance_time,ady.attendance_out_time)) = date(#{attendanceTime})
and ady.is_del=0
order by ady.id desc
@@ -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(ifnull(d.attendance_time,d.attendance_out_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(ifnull(d.attendance_time,d.attendance_out_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 b6149fbb..cd449c6a 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(ifnull(attendance_time,attendance_out_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
)
select workerid,attendance_type name,min(attendance_time) inTime,max(attendance_time) outTime from sur_project_attendance_data
- where DATE(ifnull(attendance_time,attendance_out_time))=date(#{createBy})
+ where DATE(ifNull(attendance_time,attendance_out_time))=date(#{createBy})
and workerid in
@@ -493,7 +493,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.* 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(ifnull(attendance_time,attendance_out_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=#{subDeptId}
) group by workerid
)
@@ -505,7 +505,7 @@ 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(ifnull(attendance_time,attendance_out_time))=CURDATE() group by workerid
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE() group by workerid
)
and g.companyTypeId in (1)
@@ -535,7 +535,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.* 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(ifnull(attendance_time,attendance_out_time))=CURDATE() group by workerid
+ SELECT workerid FROM sur_project_attendance_data WHERE DATE(ifNull(attendance_time,attendance_out_time))=CURDATE() group by workerid
)