35 lines
1.8 KiB
XML
35 lines
1.8 KiB
XML
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.bonus.aqgqj.basis.dao.HomeDao">
|
||
|
|
<select id="getApprovalNum" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||
|
|
select
|
||
|
|
sum(case when team_id is null then 0 else 1 end ) as dispatchWorkNum
|
||
|
|
,sum(case when team_id is not null and process_status is null then 1 else 0 end ) as testNum
|
||
|
|
,sum(case when process_status='1' and remarks is not null then 1 else 0 end ) as reloadReviewNUm
|
||
|
|
,sum(case when process_status='1' and remarks is null then 1 else 0 end ) as reviewNUm
|
||
|
|
,sum(case when process_status='2' then 1 else 0 end ) as examineNum
|
||
|
|
,sum(case when process_status='3' then 1 else 0 end ) as approvalNum
|
||
|
|
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
|
||
|
|
from (
|
||
|
|
select * from tb_sample where del_flag='0'
|
||
|
|
) ts
|
||
|
|
</select>
|
||
|
|
<select id="getATeamNumForEcharts" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||
|
|
select tt.team_name as teamName,ts.id,DATE_FORMAT(ts.dispatch_time, '%Y-%m-%d') as testData from tb_sample ts
|
||
|
|
where ts.del_flag='0'
|
||
|
|
</select>
|
||
|
|
<select id="getATeamCostForEcharts" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||
|
|
select
|
||
|
|
teamName,sum(amount) as testCost
|
||
|
|
from (
|
||
|
|
select tt.team_name as teamName,ts.id,teis.amount from tb_exper te
|
||
|
|
left join tb_sample ts on te.sample_id=ts.id
|
||
|
|
left join tb_team tt on ts.team_id=tt.id
|
||
|
|
left join tb_exper_items teis on te.id=teis.exper_id
|
||
|
|
where ts.del_flag='0'
|
||
|
|
) aa group by teamName
|
||
|
|
</select>
|
||
|
|
<select id="getCostRank" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||
|
|
|
||
|
|
</select>
|
||
|
|
</mapper>
|