Commit caa9ab71 by lijingjing

处理sql为null的情况;

parent 95585259
...@@ -345,8 +345,8 @@ ...@@ -345,8 +345,8 @@
i.tester, i.tester,
o.org_name, o.org_name,
sum(case when i.status = 50 then 1 else 0 end ) "finish_num", sum(case when i.status = 50 then 1 else 0 end ) "finish_num",
sum(case when i.status = 20 and ii.fill_num > 0 then 1 else 0 end ) "testing_num", sum(case when i.status = 20 and coalesce (ii.fill_num,0) > 0 then 1 else 0 end ) "testing_num",
sum(case when i.status = 20 and ii.fill_num = 0 then 1 else 0 end ) "untest_num", sum(case when i.status = 20 and coalesce (ii.fill_num,0) = 0 then 1 else 0 end ) "untest_num",
sum(case when i.status = 50 and e.priority = '加急' then 1 else 0 end ) "urgent_finish_num", sum(case when i.status = 50 and e.priority = '加急' then 1 else 0 end ) "urgent_finish_num",
sum(case when i.status != 50 and e.priority = '加急' then 1 else 0 end ) "urgent_unfinish_num" sum(case when i.status != 50 and e.priority = '加急' then 1 else 0 end ) "urgent_unfinish_num"
...@@ -355,9 +355,9 @@ ...@@ -355,9 +355,9 @@
join entrust e on e.id = s.entrust_id join entrust e on e.id = s.entrust_id
join v_sys_user_org o on o.user_id = i.tester_Id join v_sys_user_org o on o.user_id = i.tester_Id
left join ( left join (
select ii.entrust_sample_item_id,count(1) "fill_num" from entrust_sample_item_index ii select ii.entrust_sample_item_id,count(1) "fill_num" from entrust_sample_item_index ii
where ii.deleted = 0 group by ii.entrust_sample_item_id where ii.deleted = 0 group by ii.entrust_sample_item_id
) ii on ii.entrust_sample_item_id = i.id ) ii on ii.entrust_sample_item_id = i.id
where s.deleted = 0 and i.deleted = 0 and e.deleted = 0 where s.deleted = 0 and i.deleted = 0 and e.deleted = 0
and i.entrust_sample_id = s.id and i.entrust_sample_id = s.id
and o.user_id = i.tester_id and o.user_id = i.tester_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment