统计错误修复
This commit is contained in:
parent
9a440727f9
commit
e8d2ea9df7
|
@ -352,8 +352,8 @@
|
|||
SELECT
|
||||
taa.id,
|
||||
tdr.NAME AS "resourceName",
|
||||
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN tda.attr_value ELSE tdr.type END ) AS "resourceType",
|
||||
sd.name AS "provideDept",
|
||||
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType",
|
||||
sd.NAME AS "provideDept",
|
||||
taa.unit AS "applyDept",
|
||||
taa.create_date AS "applyDate",
|
||||
taa.apply_price AS "applyPrice"
|
||||
|
@ -361,14 +361,12 @@
|
|||
t_ability_application taa
|
||||
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
||||
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND taa.approve_status IN ( '审核中', '通过' )
|
||||
AND taa.del_flag = 0
|
||||
AND tdr.del_flag = 0
|
||||
AND tda.del_flag = 0
|
||||
AND tda.attr_type = '组件类型'
|
||||
<if test = "params.startDate != null and params.startDate != ''" >
|
||||
AND taa.create_date >= #{params.startDate}
|
||||
</if>
|
||||
|
@ -432,14 +430,12 @@
|
|||
t_ability_application taa
|
||||
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
||||
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND taa.approve_status IN ( '审核中', '通过' )
|
||||
AND taa.del_flag = 0
|
||||
AND tdr.del_flag = 0
|
||||
AND tda.del_flag = 0
|
||||
AND tda.attr_type = '组件类型'
|
||||
<if test = "params.startDate != null and params.startDate != ''" >
|
||||
AND taa.create_date >= #{params.startDate}
|
||||
</if>
|
||||
|
@ -492,8 +488,8 @@
|
|||
SELECT
|
||||
taa.id,
|
||||
tdr.NAME AS "resourceName",
|
||||
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN tda.attr_value ELSE tdr.type END ) AS "resourceType",
|
||||
sd.name AS "provideDept",
|
||||
( CASE tdr.type WHEN '应用资源' THEN tdr.type WHEN '组件服务' THEN attr.attr_value ELSE tdr.type END ) AS "resourceType",
|
||||
sd.NAME AS "provideDept",
|
||||
taa.unit AS "applyDept",
|
||||
taa.create_date AS "applyDate",
|
||||
taa.apply_price AS "applyPrice"
|
||||
|
@ -501,14 +497,12 @@
|
|||
t_ability_application taa
|
||||
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
||||
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND taa.approve_status IN ( '审核中', '通过' )
|
||||
AND taa.del_flag = 0
|
||||
AND tdr.del_flag = 0
|
||||
AND tda.del_flag = 0
|
||||
AND tda.attr_type = '组件类型'
|
||||
<if test = "params.startDate != null and params.startDate != ''" >
|
||||
AND taa.create_date >= #{params.startDate}
|
||||
</if>
|
||||
|
@ -571,14 +565,12 @@
|
|||
t_ability_application taa
|
||||
LEFT JOIN tb_data_resource tdr ON taa.resource_id = tdr.id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id
|
||||
LEFT JOIN ( SELECT data_resource_id, attr_type, attr_value FROM tb_data_attr tda WHERE del_flag = 0 AND attr_type = '组件类型' ) attr ON tdr.id = attr.data_resource_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND taa.approve_status IN ( '审核中', '通过' )
|
||||
AND taa.del_flag = 0
|
||||
AND tdr.del_flag = 0
|
||||
AND tda.del_flag = 0
|
||||
AND tda.attr_type = '组件类型'
|
||||
<if test = "params.startDate != null and params.startDate != ''" >
|
||||
AND taa.create_date >= #{params.startDate}
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue