You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
<mapper namespace="com.epmet.dao.issue.StatsIssueDao">
|
|
|
|
<select id="selectAgencyIssueTotal" resultType="com.epmet.dto.issue.IssueAgencyDTO">
|
|
|
|
SELECT ORG_ID AS "agencyId",
|
|
|
|
ORG_ID_PATH AS "pIds",
|
|
|
|
ISSUE_STATUS AS "status",
|
|
|
|
COUNT(ID) AS "count"
|
|
|
|
FROM
|
|
|
|
issue
|
|
|
|
WHERE
|
|
|
|
DEL_FLAG = '0'
|
|
|
|
AND CUSTOMER_ID = #{customerId}
|
|
|
|
GROUP BY
|
|
|
|
ORG_ID, ISSUE_STATUS
|
|
|
|
</select>
|
|
|
|
<select id="selectAgencyIssueInc" resultType="com.epmet.dto.issue.IssueAgencyDTO">
|
|
|
|
SELECT
|
|
|
|
i.ORG_ID AS "agencyId",
|
|
|
|
i.ORG_ID_PATH AS "pIds",
|
|
|
|
ip.ISSUE_STATUS AS "status",
|
|
|
|
COUNT(ip.ID) AS "count"
|
|
|
|
FROM
|
|
|
|
issue i
|
|
|
|
INNER JOIN issue_process ip ON i.ID = ip.ISSUE_ID
|
|
|
|
AND ip.DEL_FLAG = '0'
|
|
|
|
WHERE
|
|
|
|
i.DEL_FLAG = '0'
|
|
|
|
AND i.CUSTOMER_ID = #{customerId}
|
|
|
|
AND DATE(ip.ip.CREATED_TIME) = #{date}
|
|
|
|
GROUP BY
|
|
|
|
i.ORG_ID,
|
|
|
|
ip.ISSUE_STATUS
|
|
|
|
</select>
|
|
|
|
<select id="selectAgencyClosedIssueTotal" resultType="com.epmet.dto.issue.IssueAgencyDTO">
|
|
|
|
SELECT
|
|
|
|
ORG_ID AS "agencyId",
|
|
|
|
ORG_ID_PATH AS "pIds",
|
|
|
|
RESOLVE_TYPE AS "status",
|
|
|
|
COUNT( ID ) AS "count"
|
|
|
|
FROM
|
|
|
|
issue
|
|
|
|
WHERE
|
|
|
|
DEL_FLAG = '0'
|
|
|
|
AND ISSUE_STATUS = 'closed'
|
|
|
|
AND CUSTOMER_ID = #{customerId}
|
|
|
|
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
|
|
|
|
GROUP BY
|
|
|
|
ORG_ID,
|
|
|
|
RESOLVE_TYPE
|
|
|
|
</select>
|
|
|
|
<select id="selectAgencyClosedIssueInc" resultType="com.epmet.dto.issue.IssueAgencyDTO">
|
|
|
|
SELECT
|
|
|
|
ORG_ID AS "agencyId",
|
|
|
|
ORG_ID_PATH AS "pIds",
|
|
|
|
RESOLVE_TYPE AS "status",
|
|
|
|
COUNT( ID ) AS "count"
|
|
|
|
FROM
|
|
|
|
issue
|
|
|
|
WHERE
|
|
|
|
DEL_FLAG = '0'
|
|
|
|
AND ISSUE_STATUS = 'closed'
|
|
|
|
AND CUSTOMER_ID = #{customerId}
|
|
|
|
AND DATE(UPDATED_TIME) = #{date}
|
|
|
|
GROUP BY
|
|
|
|
ORG_ID,
|
|
|
|
RESOLVE_TYPE
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|