Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes
Commits
8e39e653
Commit
8e39e653
authored
Dec 16, 2024
by
温志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新报表查询
parent
096a3fb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
160 additions
and
5 deletions
+160
-5
DailyProductionReportMapper.xml
...n/resources/mapper/report/DailyProductionReportMapper.xml
+55
-3
MonthlyProductionReportMapper.xml
...resources/mapper/report/MonthlyProductionReportMapper.xml
+54
-2
WeeklyProductionReportMapper.xml
.../resources/mapper/report/WeeklyProductionReportMapper.xml
+51
-0
No files found.
mes/src/main/resources/mapper/report/DailyProductionReportMapper.xml
View file @
8e39e653
...
...
@@ -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,'无'),
...
...
mes/src/main/resources/mapper/report/MonthlyProductionReportMapper.xml
View file @
8e39e653
...
...
@@ -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,'无'),
...
...
mes/src/main/resources/mapper/report/WeeklyProductionReportMapper.xml
View file @
8e39e653
...
...
@@ -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,'无'),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment