|
@@ -130,26 +130,44 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getAbnormalHoursMonthReport" resultType="java.util.HashMap">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
SELECT
|
|
|
- IFNULL(sum( quality ),0) AS '质量',
|
|
|
- IFNULL(sum( design ),0) AS '设计',
|
|
|
-
|
|
|
- IFNULL(sum( materiel ),0) AS '物料',
|
|
|
- IFNULL(sum( energy ),0) AS '能源',
|
|
|
-
|
|
|
- IFNULL(sum( equipment ),0) AS '设备',
|
|
|
- IFNULL(sum( plan ),0) AS '计划'
|
|
|
- FROM
|
|
|
- fbs_abnormal_working_hours
|
|
|
+ fawhd.anomaly_classification AS type,
|
|
|
+ sum( fawhd.abnormal_working_hours ) AS working
|
|
|
+ FROM
|
|
|
+ `fbs_abnormal_working_hours_describe` fawhd
|
|
|
+ LEFT JOIN fbs_abnormal_working_hours fawh ON fawhd.abnormal_working_hours_id = fawh.id
|
|
|
WHERE
|
|
|
- del_flag = '0'
|
|
|
- <if test="dateString=='%Y-%m-%d'">
|
|
|
- AND date_format( date, #{dateString} ) = DATE_FORMAT( date_sub(curdate(),interval 1 day), #{dateString} )
|
|
|
- </if>
|
|
|
- <if test="dateString=='%Y-%m'">
|
|
|
- AND date_format( date, #{dateString} ) = DATE_FORMAT( now( ), #{dateString} )
|
|
|
- </if>
|
|
|
-
|
|
|
+ fawhd.anomaly_classification IS NOT NULL
|
|
|
+ and fawh.del_flag='0'
|
|
|
+ <if test="dateString=='%Y-%m-%d'">
|
|
|
+ AND date_format( fawh.date, #{dateString} ) = DATE_FORMAT( date_sub(curdate(),interval 1 day), #{dateString} )
|
|
|
+ </if>
|
|
|
+ <if test="dateString=='%Y-%m'">
|
|
|
+ AND date_format( fawh.date, #{dateString} ) = DATE_FORMAT( now( ), #{dateString} )
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ fawhd.anomaly_classification
|
|
|
+ ORDER BY fawhd.anomaly_classification
|
|
|
</select>
|
|
|
|
|
|
<select id="getAbnormalHoursMonthReportSameDay" resultType="java.util.HashMap">
|
|
@@ -433,6 +451,7 @@
|
|
|
*,
|
|
|
CONVERT ( IFNULL( (latest_completed_quantity), 0 )*IFNULL( (standard_working_hours_z), 0 ) / IFNULL( ( man_hours_completed ), 0 ), DECIMAL ( 15, 2 ) ) * 100 as productionEfficiency,
|
|
|
CONVERT ( IFNULL( (latest_completed_quantity), 0 ) / IFNULL( ( number_of_tasks ), 0 ), DECIMAL ( 15, 2 ) ) * 100 as achievementRate
|
|
|
+ ,(number_of_tasks-latest_completed_quantity) as remainingQuantity
|
|
|
FROM
|
|
|
fbs_workshop_dispatch_list
|
|
|
WHERE
|