| | |
| | | select inspection_status result, |
| | | count(id) num |
| | | from lims_laboratory.inspection |
| | | where state=1 |
| | | 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> |