|
@@ -157,7 +157,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 {2} --and ""t"".""CountersignPosition""<=1
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 {2} --and ""t"".""CountersignPosition""<=1
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -166,7 +166,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 {2} --and ""t"".""CountersignPosition""<=1
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 {2} --and ""t"".""CountersignPosition""<=1
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -175,7 +175,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -184,7 +184,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -193,7 +193,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -203,7 +203,7 @@ FROM (
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime""
|
|
and ""CountersignPosition"">0 {2}
|
|
and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -212,7 +212,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -221,7 +221,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
UNION ALL
|
|
UNION ALL
|
|
@@ -355,7 +355,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 {2} --and ""t"".""CountersignPosition""<=1
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 {2} --and ""t"".""CountersignPosition""<=1
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -364,7 +364,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 {2} --and ""t"".""CountersignPosition""<=1
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 {2} --and ""t"".""CountersignPosition""<=1
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -373,7 +373,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -382,7 +382,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime"" and ""t"".""CountersignPosition""=0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -391,7 +391,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""HandleTime"">""StepExpiredTime"" and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -401,7 +401,7 @@ FROM (
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and (SELECT NOW())>""StepExpiredTime""
|
|
and ""CountersignPosition"">0 {2}
|
|
and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -410,7 +410,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""TraceState"" !=10 and ""t"".""Status"">=2 and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
union ALL
|
|
union ALL
|
|
@@ -419,7 +419,7 @@ FROM (
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
select ""o"".""Id"",SUBSTRING(""t"".""HandlerOrgId"",1,{3}) ""HandlerOrgId"" from ""workflow_trace"" ""t""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
left join ""order"" ""o"" on ""o"".""Id""=""t"".""ExternalId""
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and ""CountersignPosition"">0 {2}
|
|
where ""o"".""CreationTime"">='{0}' and ""o"".""CreationTime""<='{1}' and ""t"".""ModuleCode""='OrderHandle' and ""t"".""Status""<2 and ""CountersignPosition"">0 {2}
|
|
- GROUP BY ""HandlerOrgId"",""o"".""Id""
|
|
|
|
|
|
+ GROUP BY SUBSTRING(""t"".""HandlerOrgId"",1,{3}),""o"".""Id""
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
)""s"" where ""HandlerOrgId"" IS not NULL {4}
|
|
GROUP BY ""HandlerOrgId""
|
|
GROUP BY ""HandlerOrgId""
|
|
UNION ALL
|
|
UNION ALL
|