zss
2023-08-22 9263a9be2c9c820c322dd734c4c18b0bcd05f91e
inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -58,5 +58,30 @@
        where state=1
        group by result
        order by num desc
    </select>
    <!--计算原材料与成品的合格率-->
    <select id="qualified" resultType="java.lang.Long">
        select count(id)
        from lims_laboratory.inspection
        where state = 1
          and type = 0
          and inspection_status = #{b}
    </select>
    <!--计算原材料检验单总数-->
    <select id="getallmater" resultType="java.lang.Integer">
        select count(id)
        from lims_laboratory.inspection
        where state = 1
          and type = 0
    </select>
    <!--计算成品检验单总数-->
    <select id="getallfin" resultType="java.lang.Integer">
        select count(id)
        from lims_laboratory.inspection
        where state = 1
          and type in (1,2)
    </select>
</mapper>