|
|
@@ -1,4 +1,4 @@
|
|
|
-DECLARE @hrid nvarchar(50)=$hrid$,@siteid nvarchar(20)=$siteid$,@tostart int =0,@starting int=0,@complete int=0,@qualitycard int=0
|
|
|
+DECLARE @hrid nvarchar(50)=$hrid$,@siteid nvarchar(20)=$siteid$,@tostart int =0,@starting int=0,@complete int=0,@qualitycard int=0,@tostop int=0
|
|
|
|
|
|
select @tostart=count(1)
|
|
|
from hyWorkorder t
|
|
|
@@ -12,9 +12,13 @@ select @complete=count(1)
|
|
|
from hyWorkorder t
|
|
|
where EXISTS(select 1 from hyworkorder_team t1 where t1.hyworkernum=@hrid and t1.fparentid=t.hyWorkorderid) and t.siteid=@siteid
|
|
|
and t.fstatus='ÒÑÍê³É'
|
|
|
+select @tostop=count(1)
|
|
|
+from hyWorkorder t
|
|
|
+where EXISTS(select 1 from hyworkorder_team t1 where t1.hyworkernum=@hrid and t1.fparentid=t.hyWorkorderid) and t.siteid=@siteid
|
|
|
+ and t.fstatus='ÔÝÍ£'
|
|
|
select @qualitycard=count(1)
|
|
|
from hyWorkorder t
|
|
|
where EXISTS(select 1 from hyworkorder_team t1 where t1.hyworkernum=@hrid and t1.fparentid=t.hyWorkorderid) and t.siteid=@siteid
|
|
|
and t.fstatus='Öʱ£¿¨ÉóÅú'
|
|
|
|
|
|
-select @tostart tostart,@starting starting,@complete complete,@qualitycard qualitycard
|
|
|
+select @tostart tostart,@starting starting,@complete complete,@tostop tostop,@qualitycard qualitycard
|