update code

dev_xds
haha 2024-03-30 22:20:24 +08:00
parent 47bc7fe61a
commit 8bd551dce8
1 changed files with 8 additions and 8 deletions

View File

@ -513,15 +513,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryWorkerOnDuty" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
SELECT u.*,b.project_id,b.sub_dept_id
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,sur_project_attendance_group g
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g
WHERE u.cfgid=b.id and u.state=0 and u.companyId=g.companyId
<if test="id==101">
and g.companyTypeId in (1,6)
</if>
<if test="companyTypeId==102">
<if test="id==102">
and g.companyTypeId =8
</if>
<if test="companyTypeId==103">
<if test="id==103">
and g.companyTypeId in (0,2,3,4,5)
</if>
<if test="projectId!=null and projectId>0">
@ -539,10 +539,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="groupByWorkerOnDutyByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
select p.id, p.projectName name,g.companyTypeId companyId,count(1) cfgid
from sur_project_attendance_user u,sur_project_attendance_cfg b,sur_project_attendance_group g,sur_project p
where u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and b.project_id=p.id
and g.companyTypeId in (1,6,0,2,3,4,5,8)
SELECT p.id, p.projectName NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project p,sys_dept c
where u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.sub_dept_id
and g.companyTypeId in (1,6,0,2,3,4,5,8)
<if test="deptId!=null and deptId>0">
and b.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
</if>
@ -552,7 +552,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
group by p.projectName,g.companyTypeId,p.id
group by p.projectName,c.dept_name,g.companyTypeId,p.id
order by p.id
</select>
</mapper>