|
@@ -65,27 +65,31 @@ and e.ITEM_PRODUCT=#para(ITEM_PRODUCT)
|
|
select round(sum((cast(PROCESSTIME as date)-cast(ACTIONTIME as date))*86400)/60) interval,FLOWNAME from T_RELATIONHIS e
|
|
select round(sum((cast(PROCESSTIME as date)-cast(ACTIONTIME as date))*86400)/60) interval,FLOWNAME from T_RELATIONHIS e
|
|
left outer join t_user on t_user.ID=auditor
|
|
left outer join t_user on t_user.ID=auditor
|
|
left outer join t_department on t_user.defaultdepartment=t_department.ID
|
|
left outer join t_department on t_user.defaultdepartment=t_department.ID
|
|
- where t_department.ID=#para(ID)
|
|
|
|
|
|
+ where t_department.ID in (select ID from t_department start with ID=#para(ID) connect by prior ID=superior)
|
|
and e.PROCESSTIME between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
and e.PROCESSTIME between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
group by FLOWNAME
|
|
group by FLOWNAME
|
|
#end
|
|
#end
|
|
|
|
|
|
###试验类型统计
|
|
###试验类型统计
|
|
#sql("type")
|
|
#sql("type")
|
|
- select #para(DOMAINID) AS DOMAINID,nvl(item_experiment_type,'其他')as item_experiment_type,count(*) as item_invalue from tlk_entrustment
|
|
|
|
- left outer join t_user on t_user.ID=author
|
|
|
|
- left outer join t_department on t_user.defaultdepartment=t_department.ID
|
|
|
|
- where t_department.ID in (select ID from t_department start with ID=#para(ID) connect by prior ID=superior)
|
|
|
|
|
|
+ select nvl(item_experiment_type,'其他')as item_experiment_type,count(*) as item_invalue from tlk_examine
|
|
|
|
+ where DOMAINID=#para(DOMAINID) and author_dept_index like #para(ID,"like")
|
|
and created between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
and created between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
|
|
+#if(ITEM_TEST_DEPT)
|
|
|
|
+ and ITEM_TEST_DEPT like #para(ITEM_TEST_DEPT,"like")
|
|
|
|
+#end
|
|
|
|
+
|
|
|
|
+#if(ITEM_PRODUCT)
|
|
|
|
+ and ITEM_PRODUCT=#para(ITEM_PRODUCT)
|
|
|
|
+#end
|
|
|
|
+
|
|
group by item_experiment_type
|
|
group by item_experiment_type
|
|
#end
|
|
#end
|
|
|
|
|
|
###试验类型统计列表
|
|
###试验类型统计列表
|
|
#sql("type_list")
|
|
#sql("type_list")
|
|
- select t_user.name,t.ID,t.ITEM_WT_NUM,t.ITEM_TITLE,nvl(t.item_experiment_type,'其他')as item_experiment_type from tlk_entrustment t
|
|
|
|
- left outer join t_user on t_user.ID=author
|
|
|
|
- left outer join t_department on t_user.defaultdepartment=t_department.ID
|
|
|
|
- where t_department.ID in (select ID from t_department start with ID=#para(ID) connect by prior ID=superior)
|
|
|
|
|
|
+ select t.ID,t.ITEM_WT_NUM,t.ITEM_TITLE,nvl(t.item_experiment_type,'其他')as item_experiment_type from tlk_examine t
|
|
|
|
+ where DOMAINID=#para(DOMAINID) and author_dept_index like #para(ID,"like")
|
|
and created between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
and created between to_date(#para(begin),'yyyy-mm-dd hh24:mi:ss') and to_date(#para(end),'yyyy-mm-dd hh24:mi:ss')
|
|
#if(name&&name!='其他')
|
|
#if(name&&name!='其他')
|
|
and item_experiment_type=#para(name)
|
|
and item_experiment_type=#para(name)
|
|
@@ -127,8 +131,12 @@ FROM
|
|
LEFT JOIN tlk_dic_prou p ON y.item_product = p.item_dic_prouname
|
|
LEFT JOIN tlk_dic_prou p ON y.item_product = p.item_dic_prouname
|
|
WHERE
|
|
WHERE
|
|
1 = 1
|
|
1 = 1
|
|
- AND y.created BETWEEN to_date(#para(begin), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
- AND to_date(#para(end), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
|
|
+ AND y.DOMAINID=#para(DOMAINID) and y.author_dept_index like #para(ID,"like")
|
|
|
|
+ AND y.created BETWEEN to_date(#para(begin), 'yyyy-mm-dd hh24:mi:ss' )AND to_date(#para(end), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
+ #if(ITEM_TEST_DEPT)
|
|
|
|
+ and y.ITEM_TEST_DEPT like #para(ITEM_TEST_DEPT,"like")
|
|
|
|
+ #end
|
|
|
|
+
|
|
GROUP BY
|
|
GROUP BY
|
|
item_product
|
|
item_product
|
|
#end
|
|
#end
|
|
@@ -142,8 +150,12 @@ FROM
|
|
LEFT JOIN tlk_dic_prou p ON y.item_product = p.item_dic_prouname
|
|
LEFT JOIN tlk_dic_prou p ON y.item_product = p.item_dic_prouname
|
|
WHERE
|
|
WHERE
|
|
1 = 1
|
|
1 = 1
|
|
- AND y.created BETWEEN to_date(#para(begin), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
- AND to_date(#para(end), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
|
|
+ AND y.DOMAINID=#para(DOMAINID) and y.author_dept_index like #para(ID,"like")
|
|
|
|
+ AND y.created BETWEEN to_date(#para(begin), 'yyyy-mm-dd hh24:mi:ss' )AND to_date(#para(end), 'yyyy-mm-dd hh24:mi:ss' )
|
|
|
|
+
|
|
|
|
+ #if(ITEM_TEST_DEPT)
|
|
|
|
+ and y.ITEM_TEST_DEPT like #para(ITEM_TEST_DEPT,"like")
|
|
|
|
+ #end
|
|
|
|
|
|
#if(name&&name!='其他')
|
|
#if(name&&name!='其他')
|
|
AND y.item_product =#para(name)
|
|
AND y.item_product =#para(name)
|