|
@@ -97,8 +97,11 @@
|
|
<if test="userId != null">
|
|
<if test="userId != null">
|
|
AND a.creator_id = #{userId}
|
|
AND a.creator_id = #{userId}
|
|
</if>
|
|
</if>
|
|
- <if test="departmentId != null">
|
|
|
|
- AND department.department_id = #{departmentId}
|
|
|
|
|
|
+ <if test="branchDepartment != null">
|
|
|
|
+ AND department.department_id in
|
|
|
|
+ <foreach collection="branchDepartment" item="deptId" separator="," close=")" open="(" index="index">
|
|
|
|
+ #{deptId}
|
|
|
|
+ </foreach>
|
|
</if>
|
|
</if>
|
|
|
|
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
@@ -163,7 +166,7 @@
|
|
a.custom_data as customData
|
|
a.custom_data as customData
|
|
,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
|
|
,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
|
|
,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as
|
|
,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as
|
|
- departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as
|
|
|
|
|
|
+ departmentName,department.department_id as departmentId, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as
|
|
projectAuditTime,project_main.name as projectMainName
|
|
projectAuditTime,project_main.name as projectMainName
|
|
FROM report AS a
|
|
FROM report AS a
|
|
JOIN project AS b ON a.project_id=b.id
|
|
JOIN project AS b ON a.project_id=b.id
|
|
@@ -199,8 +202,11 @@
|
|
<if test="leaderId != null">
|
|
<if test="leaderId != null">
|
|
AND (b.incharger_id = #{leaderId} or a.creator_id=#{leaderId})
|
|
AND (b.incharger_id = #{leaderId} or a.creator_id=#{leaderId})
|
|
</if>
|
|
</if>
|
|
- <if test="departmentId != null">
|
|
|
|
- AND department.department_id = #{departmentId}
|
|
|
|
|
|
+ <if test="branchDepartment != null">
|
|
|
|
+ AND department.department_id in
|
|
|
|
+ <foreach collection="branchDepartment" item="deptId" separator="," close=")" open="(" index="index">
|
|
|
|
+ #{deptId}
|
|
|
|
+ </foreach>
|
|
</if>
|
|
</if>
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
</select>
|
|
</select>
|
|
@@ -212,7 +218,7 @@
|
|
a.department_audit_state as departmentAuditState,a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
|
|
a.department_audit_state as departmentAuditState,a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
|
|
,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
|
|
,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
|
|
, reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
|
|
, reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
|
|
- ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as projectAuditTime,project_main.name as projectMainName
|
|
|
|
|
|
+ ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName,department.department_id as departmentId, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as projectAuditTime,project_main.name as projectMainName
|
|
FROM report AS a
|
|
FROM report AS a
|
|
JOIN project AS b ON a.project_id=b.id
|
|
JOIN project AS b ON a.project_id=b.id
|
|
LEFT JOIN user AS c ON a.creator_id=c.id
|
|
LEFT JOIN user AS c ON a.creator_id=c.id
|
|
@@ -245,8 +251,11 @@
|
|
<if test="projectId != null">
|
|
<if test="projectId != null">
|
|
AND a.project_id = #{projectId}
|
|
AND a.project_id = #{projectId}
|
|
</if>
|
|
</if>
|
|
- <if test="departmentId != null">
|
|
|
|
- AND department.department_id = #{departmentId}
|
|
|
|
|
|
+ <if test="branchDepartment != null">
|
|
|
|
+ AND department.department_id in
|
|
|
|
+ <foreach collection="branchDepartment" item="deptId" separator="," close=")" open="(" index="index">
|
|
|
|
+ #{deptId}
|
|
|
|
+ </foreach>
|
|
</if>
|
|
</if>
|
|
<if test="deptIds != null">
|
|
<if test="deptIds != null">
|
|
AND c.department_id in
|
|
AND c.department_id in
|