app试验管理、审查管理、检测报告管理、合格证管理
This commit is contained in:
parent
104ea80309
commit
11a52426cd
|
|
@ -230,7 +230,7 @@ public class SamplesManageAppServiceImpl implements SamplesManageAppService {
|
||||||
//查询是否为最后一条数据
|
//查询是否为最后一条数据
|
||||||
int count = samplesManageAppDao.getCountById(data.getId());
|
int count = samplesManageAppDao.getCountById(data.getId());
|
||||||
if (count<=1){
|
if (count<=1){
|
||||||
return ServerResponse.createBySuccessMsg("不可删除,请至少保留一条数据");
|
return ServerResponse.createErroe("不可删除,请至少保留一条数据");
|
||||||
}
|
}
|
||||||
int res = samplesManageAppDao.delSamplesDetailsList(data);
|
int res = samplesManageAppDao.delSamplesDetailsList(data);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
select
|
select
|
||||||
sum(case when team_id is null then 1 else 0 end ) as dispatchWorkNum
|
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 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 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!='2' then 1 else 0 end ) as reviewNUm
|
,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!='2' then 1 else 0 end ) as examineNum
|
,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!='2' then 1 else 0 end ) as approvalNum
|
,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
|
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
|
||||||
from (
|
from (
|
||||||
select * from tb_sample where del_flag='0'
|
select * from tb_sample where del_flag='0'
|
||||||
|
|
@ -29,14 +29,18 @@
|
||||||
where del_flag = '0'
|
where del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
<select id="getATeamCostForEcharts" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
|
<select id="getATeamCostForEcharts" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
|
||||||
select teamName,
|
SELECT teamName,
|
||||||
sum(amount) as testCost
|
ROUND(SUM(amount), 2) AS testCost
|
||||||
from (select tt.team_name as teamName, ts.id, te.amount
|
FROM (SELECT tt.team_name AS teamName,
|
||||||
from tb_exper te
|
ts.id,
|
||||||
left join tb_sample ts on te.sample_id = ts.id
|
te.amount
|
||||||
left join tb_team tt on ts.team_id = tt.id
|
FROM tb_exper te
|
||||||
where ts.del_flag = '0') aa
|
LEFT JOIN
|
||||||
group by teamName
|
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>
|
||||||
<select id="getCostRank" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
|
<select id="getCostRank" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,6 @@
|
||||||
<select id="getCountById" resultType="java.lang.Integer">
|
<select id="getCountById" resultType="java.lang.Integer">
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM tb_sample_device
|
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>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
select
|
select
|
||||||
sum(case when team_id is null then 1 else 0 end ) as dispatchWorkNum
|
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 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 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!='2' then 1 else 0 end ) as reviewNUm
|
,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!='2' then 1 else 0 end ) as examineNum
|
,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!='2' then 1 else 0 end ) as approvalNum
|
,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
|
,DATE_FORMAT(NOW(), '%Y-%m-%d') as updateDate
|
||||||
from (
|
from (
|
||||||
select * from tb_sample where del_flag='0'
|
select * from tb_sample where del_flag='0'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue