Commit 556bb021 authored by 麻笑宇's avatar 麻笑宇

气瓶检验检测统计修改

parent 471b74c3
......@@ -48,25 +48,31 @@
c.equ_define
</select>
<select id="inspectTimeCount" resultType="java.lang.Integer">
SELECT COUNT(1) AS num
SELECT COUNT
( 1 ) AS num
FROM
(
SELECT
ae.sequence_nbr,
ae.equ_category,
concat ( u.PROVINCE, '#', u.CITY, '#', u.COUNTY ) AS areaCode
pc.company_code,
pc.org_code
FROM
"tz_jyjc_inspection_application_equip" ae,
tz_jyjc_inspection_application A,
"idx_biz_jg_use_info" u
privilege_company pc
INNER JOIN tz_base_enterprise_info bi ON (
( bi.supervise_org_code != '50' AND bi.supervise_org_code LIKE CONCAT ( pc.org_code, '%' ) )
OR ( bi.supervise_org_code = '50' AND bi.office_region LIKE CONCAT ( '%', pc.company_code, '%' ) )
)
INNER JOIN tz_jyjc_inspection_application A ON A.inspection_unit_code = bi.use_unit_code
INNER JOIN tz_jyjc_inspection_application_equip ae ON A.sequence_nbr = ae.application_seq
WHERE
ae.equip_unicode = u."RECORD"
AND A.sequence_nbr = ae.application_seq
AND ( A.application_date BETWEEN #{ dpFilterParamDto.beginDate } AND #{ dpFilterParamDto.endDate } )
AND A.status = '6616'
A.status = '6616'
AND ae.equ_category = '2300'
AND pc.company_code = #{dpFilterParamDto.cityCode}
AND ( A.application_date BETWEEN #{ dpFilterParamDto.beginDate } AND #{ dpFilterParamDto.endDate } )
GROUP BY
ae.sequence_nbr
) C
WHERE
C.areaCode LIKE concat ( '%', #{dpFilterParamDto.cityCode}, '%' )
GROUP BY
C.equ_category
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment