chenchuang 2 年之前
父節點
當前提交
2bb5527c67

+ 20 - 6
src/main/java/org/jeecg/modules/fbsAbnormalWorkingHours/mapper/xml/FbsAbnormalWorkingHoursDescribeMapper.xml

@@ -18,7 +18,7 @@
     </select>
 
     <select id="getMonthExceptionByCategoryTwo" resultType="java.util.HashMap">
-        SELECT
+        <!--SELECT
         fawhd.materiel_name label,
         sum( fawhd.materiel_bad_number ) sum1,
         fawhd.materiel_number_of_tasks sum2
@@ -31,14 +31,28 @@
         AND fawhd.materiel_name IS NOT NULL
         AND fawhd.materiel_number_of_tasks >0
 
-       <!-- AND fawhd.product IS NOT NULL
-        AND fawhd.type='物料'
-        AND fawhd.planned_quantity >0
-        -->
         AND date_format( fawh.date, '%Y-%m' ) = DATE_FORMAT( now( ), '%Y-%m' )
         GROUP BY
+        fawhd.materiel_name-->
+        SELECT
+        fawhd.materiel_name label,
+        fawhd.defective_rate sum1
+        FROM
+        fbs_abnormal_working_hours_describe fawhd
+        LEFT JOIN fbs_abnormal_working_hours fawh ON fawhd.abnormal_working_hours_id = fawh.id
+        WHERE
+        fawhd.del_flag = '0'
+        AND fawhd.del_flag = '0'
+        AND fawhd.materiel_name IS NOT NULL
+        AND fawhd.defective_rate >0
+
+        <!-- AND fawhd.product IS NOT NULL
+         AND fawhd.type='物料'
+         AND fawhd.planned_quantity >0
+         -->
+        AND date_format( fawh.date, '%Y-%m-%d' ) = DATE_FORMAT( now( ), '%Y-%m-%d' )
+
         <!--fawhd.product,fawhd.planned_quantity-->
-        fawhd.materiel_name
     </select>
 
     <select id="getListAndMain" resultType="org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHoursDescribe">

+ 3 - 3
src/main/java/org/jeecg/modules/fbsDispatchLists/mapper/xml/FbsDispatchListsMapper.xml

@@ -50,18 +50,18 @@
         (
         SELECT
         count( ds.cItemCode ) cItemCode,
-        substring( d.cBusCode, 5, 2 ) months
+        substring( DATE_FORMAT(d.postingDate,'%Y%m%d'), 5, 2 ) months
         FROM
         rdrecords32 ds
         LEFT JOIN rdrecord32 d ON ds.ID = d.ID
         WHERE
         <!--substring( d.cBusCode, 3, 2 ) = substring( CONVERT ( VARCHAR ( 100 ), GETDATE ( ), 112 ), 3, 2 ) sql修改-->
         substring( DATE_FORMAT(d.postingDate,'%Y%m%d'), 3, 2 ) = substring( DATE_FORMAT(NOW(),'%Y%m%d'), 3, 2 )
-        AND d.cSTCode='01'
+        AND d.cSTCode='LP'
         AND ds.cItemCode <![CDATA[ <> ]]> '0002'
         and ifnull(d.cMemo,'')  <![CDATA[<> ]]> '%补发货%'
         <!--and d.cWhCode='01'sql修改-->
-        and ds.cWhCode='01'
+        and ds.cWhCode='10'
         GROUP BY
         ds.cItemCode,
         <!--substring( d.cBusCode, 5, 2 ) sql修改-->

+ 1 - 1
src/main/java/org/jeecg/modules/fbsMomOrder/mapper/xml/FbsMomOrderdetailMapper.xml

@@ -47,7 +47,7 @@
         LEFT JOIN Inventory i ON mo.cInvCode = i.cInvCode
         LEFT JOIN rdrecord10 mm ON mo.ID = mm.ID
         WHERE
-            mm.cWhCode = '01'
+            mm.cWhCode = '10'
            <!-- AND datediff( WEEK, mm.dDate, getdate ( ) ) = 0 sql修改-->
             AND YEARWEEK(date_format(mm.dDate,'%Y-%m-%d'),1) = YEARWEEK(now(),1)
         GROUP BY