Commit 8e39e653 authored by 温志超's avatar 温志超

更新报表查询

parent 096a3fb1
......@@ -17,10 +17,21 @@
JOIN pro_task_workunit workunit ON workunit.task_id = f.task_id
JOIN pro_task pt ON f.task_id = pt.task_id
JOIN pro_process process ON process.process_id = pt.process_id
join md_workunit mw on workunit.workunit_id = mw.workunit_id
join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if test=" processId != null ">and process.process_id = #{processId}</if>
<if test=" processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test=" startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
GROUP BY
process.process_code,
......@@ -49,6 +60,16 @@
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test=" startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workshop_code,
......@@ -77,6 +98,16 @@
<if test=" workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test=" workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workstation_code,
......@@ -105,6 +136,17 @@
<if test=" workunitId != null">and workunit.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test=" startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
mw.workunit_code,
......@@ -133,6 +175,16 @@
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test=" nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
<if test=" startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
</where>
group by
IFNULL(f.user_name,'无'),
......
......@@ -17,10 +17,21 @@
JOIN pro_task_workunit workunit ON workunit.task_id = f.task_id
JOIN pro_task pt ON f.task_id = pt.task_id
JOIN pro_process process ON process.process_id = pt.process_id
join md_workunit mw on workunit.workunit_id = mw.workunit_id
join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if test=" processId != null ">and process.process_id = #{processId}</if>
<if test=" processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="dateYear != null">and DATE_FORMAT(f.feedback_time, '%Y') = #{dateYear}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
GROUP BY
process.process_code,
......@@ -49,6 +60,15 @@
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="dateYear != null">and DATE_FORMAT(f.feedback_time, '%Y') = #{dateYear}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workshop_code,
......@@ -77,6 +97,16 @@
<if test=" workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test=" workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test="dateYear != null">and DATE_FORMAT(f.feedback_time, '%Y') = #{dateYear}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workstation_code,
......@@ -105,6 +135,17 @@
<if test=" workunitId != null">and workunit.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="dateYear != null">and DATE_FORMAT(f.feedback_time, '%Y') = #{dateYear}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
mw.workunit_code,
......@@ -133,6 +174,17 @@
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test=" nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
<if test="dateYear != null">and DATE_FORMAT(f.feedback_time, '%Y') = #{dateYear}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
</where>
group by
IFNULL(f.user_name,'无'),
......
......@@ -17,10 +17,22 @@
JOIN pro_task_workunit workunit ON workunit.task_id = f.task_id
JOIN pro_task pt ON f.task_id = pt.task_id
JOIN pro_process process ON process.process_id = pt.process_id
join md_workunit mw on workunit.workunit_id = mw.workunit_id
join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if test=" processId != null ">and process.process_id = #{processId}</if>
<if test=" processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="dateWeekly != null">and DATE_FORMAT(f.feedback_time, '%Y-%m') = #{dateWeekly}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
GROUP BY
process.process_code,
......@@ -49,6 +61,15 @@
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="dateWeekly != null">and DATE_FORMAT(f.feedback_time, '%Y-%m') = #{dateWeekly}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workshop_code,
......@@ -77,6 +98,15 @@
<if test=" workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test=" workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test="dateWeekly != null">and DATE_FORMAT(f.feedback_time, '%Y-%m') = #{dateWeekly}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test=" workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test=" workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
workstation.workstation_code,
......@@ -105,6 +135,17 @@
<if test=" workunitId != null">and workunit.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
<if test="dateWeekly != null">and DATE_FORMAT(f.feedback_time, '%Y-%m') = #{dateWeekly}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
</where>
group by
mw.workunit_code,
......@@ -133,6 +174,16 @@
<if test="userName != null and userName != ''">and f.user_name like concat('%', #{userName}, '%')</if>
<if test=" nickName != null and nickName != '' ">and f.nick_Name like '%${nickName}%'</if>
<if test="dateWeekly != null">and DATE_FORMAT(f.feedback_time, '%Y-%m') = #{dateWeekly}</if>
<if test="processId != null ">and process.process_id = #{processId}</if>
<if test="processName != null and processName != '' ">and process.process_name like '%${processName}%'</if>
<if test="startDate != null and endDate != null">and feedback_time BETWEEN #{startDate} AND #{endDate}</if>
<if test="workshopId != null">and workstation.workshop_Id = #{workshopId}</if>
<if test="workshopName != null and workshopName != '' ">and workstation.workshop_name like '%${workshopName}%'</if>
<if test="workstationId != null">and workstation.workstation_id = #{workstationId} </if>
<if test="workstationName != null and workstationName != '' ">and workstation.workstation_name like '%${workstationName}%'</if>
<if test=" workunitId != null">and mw.workunit_id = #{workunitId}</if>
<if test=" workunitName != null and workunitName != '' ">and mw.workunit_name like '%${workunitName}%'</if>
</where>
group by
IFNULL(f.user_name,'无'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment