| | |
| | | <mapper namespace="com.yuanchu.limslaboratory.mapper.WorkMapper"> |
| | | <!--责任人项目数统计--> |
| | | <select id="dutyMater" resultType="java.util.Map"> |
| | | select n.name, 未完成, 已完成 |
| | | from (select distinct user.name, count(inspection_product.id) '未完成' |
| | | select n.name, unfinish, finsh |
| | | from (select distinct user.name, count(inspection_product.id) unfinish |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_pro_id = user.id |
| | | where state = 1 |
| | |
| | | and type = #{type} |
| | | and start_time between #{startTime} and #{endTime})) |
| | | group by user.name) n, |
| | | (select distinct user.name, count(inspection_product.id) '已完成' |
| | | (select distinct user.name, count(inspection_product.id) finsh |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_pro_id = user.id |
| | | where state = 1 |
| | |
| | | |
| | | <!--执行人项目数统计--> |
| | | <select id="executeMater" resultType="java.util.Map"> |
| | | select n.name, 未完成, 已完成 |
| | | from (select distinct user.name, count(inspection_product.id) '未完成' |
| | | select n.name, unfinsh, finsh |
| | | from (select distinct user.name, count(inspection_product.id) unfinsh |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_id = user.id |
| | | where state = 1 |
| | |
| | | and type = #{type} |
| | | and start_time between #{startTime} and #{endTime})) |
| | | group by user.name) n, |
| | | (select distinct user.name, count(inspection_product.id) '已完成' |
| | | (select distinct user.name, count(inspection_product.id) finsh |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_id = user.id |
| | | where state = 1 |
| | |
| | | |
| | | <!--责任人执行率--> |
| | | <select id="dutytimely" resultType="java.util.Map"> |
| | | select n.name, 项目总数, 及时完成数 / 项目总数 * 100 '及时率' |
| | | from (select distinct user.name, count(inspection_product.id) '项目总数' |
| | | select n.name, total, finshByTime / total * 100 timely |
| | | from (select distinct user.name, count(inspection_product.id) total |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_pro_id = user.id |
| | | where state = 1 |
| | |
| | | and type = #{type} |
| | | and start_time between #{startTime} and #{endTime})) |
| | | group by user.name) n, |
| | | (select distinct user.name, count(inspection_product.id) '及时完成数' |
| | | (select distinct user.name, count(inspection_product.id) finshByTime |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user |
| | | on inspection_product.user_pro_id = user.id |
| | |
| | | |
| | | <!--执行人及时率--> |
| | | <select id="executetimely" resultType="java.util.Map"> |
| | | select n.name, 项目总数, 及时完成数 / 项目总数 * 100 '及时率' |
| | | from (select distinct user.name, count(inspection_product.id) '项目总数' |
| | | select n.name, total, finshByTime / total * 100 timely |
| | | from (select distinct user.name, count(inspection_product.id) total |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user on inspection_product.user_id = user.id |
| | | where state = 1 |
| | |
| | | and type = #{type} |
| | | and start_time between #{startTime} and #{endTime})) |
| | | group by user.name) n, |
| | | (select distinct user.name, count(inspection_product.id) '及时完成数' |
| | | (select distinct user.name, count(inspection_product.id) finshByTime |
| | | from lims_laboratory.inspection_product |
| | | left join lims_laboratory.user |
| | | on inspection_product.user_id = user.id |