Commit 0fa9fef2 authored by neo's avatar neo

[dev] add My staticic attribuite xml

parent ddde41ac
<?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="pwc.taxtech.atms.dao.MyStatisticAttributeMapper">
<resultMap id="BaseResultMap"
type="pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto">
<id column="ID" jdbcType="VARCHAR" property="id"/>
<result column="ATTRIBUTE_ID" jdbcType="VARCHAR" property="attributeId"/>
<result column="ATTRIBUTE_NAME" jdbcType="NVARCHAR" property="attributeName"/>
<result column="DIMENSION_ID" jdbcType="VARCHAR" property="dimensionId"/>
<result column="DIMENSION_NAME" jdbcType="VARCHAR" property="dimensionName"/>
<result column="ORDER_INDEX" jdbcType="SMALLINT" property="orderIndex"/>
</resultMap>
<select id="selectByParentDimensionId" parameterType="map"
resultMap="BaseResultMap"><![CDATA[
SELECT
P.ID AS ATTRIBUTE_ID,
P.NAME AS ATTRIBUTE_NAME,
D.ID AS DIMENSION_ID,
D.NAME AS DIMENSION_NAME,
SD.ORDER_INDEX AS ORDER_INDEX
FROM
STATISTIC_ATTRIBUTE P
JOIN STATISTIC_ATTRIBUTE_DIMENSION SD ON P.ID = SD.STATISTICS_ATTRIBUTE_ID
JOIN DIMENSION D ON SD.DIMENSION_ID = D.ID
WHERE
P.IS_ACTIVE = 1
AND D.IS_ACTIVE = 1 AND D.ID = #{parentDimensionId,jdbcType=VARCHAR}
ORDER BY SD.ORDER_INDEX
]]></select>
<select id="selectByOrgSubChildrenID" parameterType="map"
resultMap="BaseResultMap"><![CDATA[
SELECT
P.STATISTICS_ATTRIBUTE_ID AS ATTRIBUTE_ID,
D.DICT_VALUE AS ATTRIBUTE_NAME,
#{parentDimensionId} AS DIMENSION_ID,
'' AS DIMENSION_NAME,
P.ORDER_INDEX AS ORDER_INDEX
FROM
STATISTIC_ATTRIBUTE_DIMENSION P
JOIN DICTIONARY D ON P.STATISTICS_ATTRIBUTE_ID = D.ID
WHERE
P.DIMENSION_ID=#{parentDimensionId}
]]></select>
</mapper>
\ No newline at end of file
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