|
@ -22,14 +22,20 @@ |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<select id="getTotal" resultType="java.lang.Long"> |
|
|
<select id="getTotal" resultType="java.lang.Long"> |
|
|
select |
|
|
SELECT |
|
|
count(*) |
|
|
count(*) |
|
|
FROM |
|
|
FROM |
|
|
pli_power_kernel_household |
|
|
pli_power_kernel_household k |
|
|
|
|
|
LEFT JOIN |
|
|
|
|
|
pli_power_axis_struct s |
|
|
|
|
|
ON |
|
|
|
|
|
s.id = k.STRUCT_REFERENCE_ID |
|
|
WHERE |
|
|
WHERE |
|
|
STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
s.DEL_FLAG = '0' |
|
|
AND |
|
|
AND k.DEL_FLAG = '0' |
|
|
customer_id = #{customerId} |
|
|
AND k.CUSTOMER_ID = #{customerId} |
|
|
|
|
|
AND (s.pids LIKE '%${axisStructId}%' |
|
|
|
|
|
OR s.id = #{axisStructId}) |
|
|
</select> |
|
|
</select> |
|
|
<select id="getListPosition" |
|
|
<select id="getListPosition" |
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO"> |
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO"> |
|
@ -41,35 +47,46 @@ |
|
|
FROM |
|
|
FROM |
|
|
pli_power_kernel_household |
|
|
pli_power_kernel_household |
|
|
WHERE |
|
|
WHERE |
|
|
STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
STRUCT_REFERENCE_ID in |
|
|
|
|
|
<foreach collection="list" item="axStrId" open="(" close=")" separator=","> |
|
|
|
|
|
#{axStrId} |
|
|
|
|
|
</foreach> |
|
|
AND |
|
|
AND |
|
|
customer_id = #{customerId} |
|
|
customer_id = #{customerId} |
|
|
limit #{limit} |
|
|
limit #{limit} |
|
|
</select> |
|
|
</select> |
|
|
<select id="getListTotal" resultType="java.lang.Long"> |
|
|
<select id="getListTotal" resultType="java.lang.Long"> |
|
|
select |
|
|
SELECT |
|
|
count(*) |
|
|
count(*) |
|
|
from |
|
|
FROM |
|
|
pli_power_kernel_household |
|
|
pli_power_axis_struct AS s |
|
|
where |
|
|
LEFT JOIN pli_power_kernel_household h ON s.id = h.STRUCT_REFERENCE_ID |
|
|
STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
WHERE |
|
|
AND |
|
|
s.DEL_FLAG = '0' |
|
|
customer_id = #{customerId} |
|
|
AND h.DEL_FLAG = '0' AND h.CUSTOMER_ID = #{customerId} |
|
|
|
|
|
and s.pids LIKE '%${axisStructId}%' |
|
|
</select> |
|
|
</select> |
|
|
<select id="getList" |
|
|
<select id="getList" |
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO"> |
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
OWNER_NAME, |
|
|
k.OWNER_NAME, |
|
|
HOUSE_ID, |
|
|
k.HOUSE_ID, |
|
|
ADDRESS |
|
|
k.ADDRESS |
|
|
FROM |
|
|
FROM |
|
|
pli_power_kernel_household |
|
|
pli_power_kernel_household k |
|
|
WHERE |
|
|
LEFT JOIN |
|
|
STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
pli_power_axis_struct s |
|
|
and |
|
|
ON |
|
|
customer_id = #{customerId} |
|
|
s.id = k.STRUCT_REFERENCE_ID |
|
|
limit |
|
|
WHERE |
|
|
#{pageNo},#{pageSize} |
|
|
s.DEL_FLAG = '0' |
|
|
|
|
|
AND k.DEL_FLAG = '0' |
|
|
|
|
|
AND k.CUSTOMER_ID = #{customerId} |
|
|
|
|
|
AND (s.pids LIKE '%${axisStructId}%' |
|
|
|
|
|
OR s.id = #{axisStructId}) |
|
|
|
|
|
GROUP BY k.id |
|
|
|
|
|
ORDER BY s.SORT |
|
|
|
|
|
limit #{pageNo},#{pageSize} |
|
|
</select> |
|
|
</select> |
|
|
<select id="queryHouseIdList" resultType="java.lang.String"> |
|
|
<select id="queryHouseIdList" resultType="java.lang.String"> |
|
|
SELECT |
|
|
SELECT |
|
@ -89,6 +106,34 @@ |
|
|
del_flag = '0' |
|
|
del_flag = '0' |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
<select id="queryIds" resultType="java.lang.String"> |
|
|
|
|
|
SELECT |
|
|
|
|
|
id |
|
|
|
|
|
FROM |
|
|
|
|
|
pli_power_axis_struct |
|
|
|
|
|
WHERE |
|
|
|
|
|
pids |
|
|
|
|
|
LIKE |
|
|
|
|
|
'%${axisStructId}%' |
|
|
|
|
|
</select> |
|
|
|
|
|
<select id="queryListPosition" |
|
|
|
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO"> |
|
|
|
|
|
SELECT |
|
|
|
|
|
h.id AS houseId, |
|
|
|
|
|
h.longitude, |
|
|
|
|
|
h.latitude, |
|
|
|
|
|
h.address |
|
|
|
|
|
FROM |
|
|
|
|
|
pli_power_axis_struct AS s |
|
|
|
|
|
LEFT JOIN pli_power_kernel_household h ON s.id = h.STRUCT_REFERENCE_ID |
|
|
|
|
|
WHERE |
|
|
|
|
|
s.DEL_FLAG = '0' |
|
|
|
|
|
AND h.DEL_FLAG = '0' AND h.CUSTOMER_ID = #{customerId} |
|
|
|
|
|
and s.pids LIKE '%${axisStructId}%' |
|
|
|
|
|
GROUP BY h.id |
|
|
|
|
|
ORDER BY s.SORT |
|
|
|
|
|
limit #{limit} |
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |