app试验管理、审查管理、检测报告管理、合格证管理

This commit is contained in:
hayu 2024-08-20 13:15:20 +08:00
parent 104ea80309
commit 11a52426cd
4 changed files with 22 additions and 18 deletions

View File

@ -230,7 +230,7 @@ public class SamplesManageAppServiceImpl implements SamplesManageAppService {
//查询是否为最后一条数据
int count = samplesManageAppDao.getCountById(data.getId());
if (count<=1){
return ServerResponse.createBySuccessMsg("不可删除,请至少保留一条数据");
return ServerResponse.createErroe("不可删除,请至少保留一条数据");
}
int res = samplesManageAppDao.delSamplesDetailsList(data);
if (res > 0) {

View File

@ -5,10 +5,10 @@
select
sum(case when team_id is null then 1 else 0 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 is_er=1 then 1 else 0 end ) as reloadReviewNUm
,sum(case when process_status='1' and is_er is null and audti_status!='2' then 1 else 0 end ) as reviewNUm
,sum(case when process_status='2' and audti_status!='2' then 1 else 0 end ) as examineNum
,sum(case when process_status='3' and audti_status!='2' then 1 else 0 end ) as approvalNum
,sum(case when process_status='1' AND ts.audti_status = 0 and is_er=1 then 1 else 0 end ) as reloadReviewNUm
,sum(case when process_status='1' and is_er is null and audti_status=0 then 1 else 0 end ) as reviewNUm
,sum(case when process_status='2' and audti_status=0 then 1 else 0 end ) as examineNum
,sum(case when process_status='3' and audti_status=0 then 1 else 0 end ) as approvalNum
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
from (
select * from tb_sample where del_flag='0'
@ -29,14 +29,18 @@
where del_flag = '0'
</select>
<select id="getATeamCostForEcharts" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
select teamName,
sum(amount) as testCost
from (select tt.team_name as teamName, ts.id, te.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
where ts.del_flag = '0') aa
group by teamName
SELECT teamName,
ROUND(SUM(amount), 2) AS testCost
FROM (SELECT tt.team_name AS teamName,
ts.id,
te.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
WHERE ts.del_flag = '0') aa
GROUP BY teamName
</select>
<select id="getCostRank" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
SELECT

View File

@ -234,6 +234,6 @@
<select id="getCountById" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM tb_sample_device
WHERE sample_id IN (SELECT tsd.sample_id FROM tb_sample_device tsd WHERE tsd.id = #{id})
WHERE sample_id IN (SELECT tsd.sample_id FROM tb_sample_device tsd WHERE tsd.id = #{id}) and del_falg=0
</select>
</mapper>

View File

@ -5,10 +5,10 @@
select
sum(case when team_id is null then 1 else 0 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 is_er=1 then 1 else 0 end ) as reloadReviewNUm
,sum(case when process_status='1' and is_er is null and audti_status!='2' then 1 else 0 end ) as reviewNUm
,sum(case when process_status='2' and audti_status!='2' then 1 else 0 end ) as examineNum
,sum(case when process_status='3' and audti_status!='2' then 1 else 0 end ) as approvalNum
,sum(case when process_status='1' AND ts.audti_status = 0 and is_er=1 then 1 else 0 end ) as reloadReviewNUm
,sum(case when process_status='1' and is_er is null and audti_status=0 then 1 else 0 end ) as reviewNUm
,sum(case when process_status='2' and audti_status=0 then 1 else 0 end ) as examineNum
,sum(case when process_status='3' and audti_status=0 then 1 else 0 end ) as approvalNum
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
from (
select * from tb_sample where del_flag='0'