|
@@ -1,6 +1,8 @@
|
|
|
-DECLARE @siteid nvarchar(20)=$siteid$,@fagentnum nvarchar(20)=$fagentnum$,@allcount int=0,@pending int =0,@processing int =0,@closed int=0
|
|
|
|
|
|
|
+DECLARE @siteid nvarchar(20)=$siteid$,@fagentnum nvarchar(20)=$fagentnum$,@allcount int=0,@pending int =0,@processing int =0,@closed int=0,@created int =0
|
|
|
select @allcount=isnull(sum(1),0) from Serviceform t
|
|
select @allcount=isnull(sum(1),0) from Serviceform t
|
|
|
where t.siteid=@siteid and t.fagentnum=@fagentnum
|
|
where t.siteid=@siteid and t.fagentnum=@fagentnum
|
|
|
|
|
+select @created=isnull(sum(1),0) from Serviceform t
|
|
|
|
|
+where t.siteid=@siteid and t.fstatus='´ýÖ¸ÅÉ' and t.fagentnum=@fagentnum
|
|
|
select @pending=isnull(sum(1),0) from Serviceform t
|
|
select @pending=isnull(sum(1),0) from Serviceform t
|
|
|
where t.siteid=@siteid and t.fstatus='´ý´¦Àí' and t.fagentnum=@fagentnum
|
|
where t.siteid=@siteid and t.fstatus='´ý´¦Àí' and t.fagentnum=@fagentnum
|
|
|
select @processing=isnull(sum(1),0) from Serviceform t
|
|
select @processing=isnull(sum(1),0) from Serviceform t
|
|
@@ -8,4 +10,5 @@ where t.siteid=@siteid and t.fstatus='
|
|
|
select @closed=isnull(sum(1),0) from Serviceform t
|
|
select @closed=isnull(sum(1),0) from Serviceform t
|
|
|
where t.siteid=@siteid and t.fstatus='ÒÑÍê³É' and t.fagentnum=@fagentnum
|
|
where t.siteid=@siteid and t.fstatus='ÒÑÍê³É' and t.fagentnum=@fagentnum
|
|
|
|
|
|
|
|
-select @allcount allcount,@pending pending,@processing processing,@closed closed
|
|
|
|
|
|
|
+select @allcount allcount,@created created,@pending pending,@processing processing,@closed closed
|
|
|
|
|
+
|