懒羊羊
2023-12-11 99991a3f52eb415f226537f4cda00a5fc20bc82f
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/cm/passingStationCollection/mapper/mapping/PassingStationCollectionMapper.xml
@@ -147,4 +147,40 @@
        </if>
    </select>
    <select id="centerLeftData" resultType="cn.stylefeng.guns.modular.cm.passingStationCollection.model.result.PassingStationCollectionResult">
        SELECT ISNULL(C.num, '0') AS num, L.location_code
        FROM (
                 SELECT 'OP150' AS location_code
                 UNION ALL
                 SELECT 'OP100'
                 UNION ALL
                 SELECT 'OP140'
                 UNION ALL
                 SELECT 'OP070'
                 UNION ALL
                 SELECT 'EOP080'
                 UNION ALL
                 SELECT 'EOP090'
             ) AS L
                 LEFT JOIN (
            SELECT COUNT(*) AS num, location_code
            FROM cm_passing_station_collection
            WHERE work_order_no = #{workOrderNo}
              AND out_rs_sign = '2'
            GROUP BY location_code
        ) AS C ON L.location_code = C.location_code
        ORDER BY C.num DESC
    </select>
    <select id="getUnqualifiedQuantity" resultType="Integer">
        SELECT
            COUNT(*)
        FROM
            cm_passing_station_collection
        WHERE 1 = 1
          AND location_code IN ( 'OP150', 'OP100', 'OP140', 'OP070', 'EOP080', 'EOP090' )
          AND work_order_no = #{workOrderNo}
          AND out_rs_sign = '2'
    </select>
</mapper>