|
|
@ -196,7 +196,8 @@ |
|
|
|
`code` AS 'code', |
|
|
|
grid_type AS 'gridType', |
|
|
|
contacts AS 'contacts', |
|
|
|
mobile AS 'mobile' |
|
|
|
mobile AS 'mobile', |
|
|
|
sort AS gridSort |
|
|
|
FROM |
|
|
|
customer_grid |
|
|
|
WHERE |
|
|
@ -256,6 +257,9 @@ |
|
|
|
<if test="centerAddress != null and centerAddress !=''"> |
|
|
|
CENTER_ADDRESS= #{centerAddress}, |
|
|
|
</if> |
|
|
|
<if test="sort != null and sort != ''"> |
|
|
|
sort = #{sort}, |
|
|
|
</if> |
|
|
|
UPDATED_TIME=NOW() |
|
|
|
where |
|
|
|
id = #{id} |
|
|
@ -314,7 +318,7 @@ |
|
|
|
DEL_FLAG = '0' |
|
|
|
AND ABANDON_FLAG='0' |
|
|
|
AND PID = #{agencyId} |
|
|
|
ORDER BY CREATED_TIME DESC |
|
|
|
ORDER BY sort,grid_name,CREATED_TIME DESC |
|
|
|
<if test="null != pageSize and pageSize > 0"> |
|
|
|
LIMIT #{pageSize} |
|
|
|
</if> |
|
|
@ -417,6 +421,8 @@ |
|
|
|
WHERE del_flag = '0' |
|
|
|
and ABANDON_FLAG='0' |
|
|
|
AND pid = #{agencyId} |
|
|
|
order by |
|
|
|
sort,grid_name |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAgencyGridMsgList" resultType="com.epmet.dto.result.AgencyGridList"> |
|
|
@ -440,6 +446,8 @@ |
|
|
|
AND ca.del_flag = '0' |
|
|
|
and cg.ABANDON_FLAG='0' |
|
|
|
AND cg.pid = #{agencyId} |
|
|
|
order by |
|
|
|
cg.sort,cg.grid_name |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 单客户-根据城市地区码前四位匹配到城市下所有网格 --> |
|
|
@ -474,8 +482,10 @@ |
|
|
|
</if> |
|
|
|
AND grid.customer_id = #{customerId} |
|
|
|
ORDER BY |
|
|
|
grid.customer_id, |
|
|
|
CONVERT ( gridName USING gbk ) ASC |
|
|
|
grid.sort, |
|
|
|
CONVERT ( gridName USING gbk ) ASC, |
|
|
|
grid.customer_id |
|
|
|
|
|
|
|
|
|
|
|
LIMIT #{pageNo}, #{pageSize} |
|
|
|
</select> |
|
|
@ -488,7 +498,9 @@ |
|
|
|
SELECT |
|
|
|
a.id AS grid_id, |
|
|
|
a.customer_id, |
|
|
|
concat( agency.fullname, '-', a.grid_name ) AS gridName |
|
|
|
concat( agency.fullname, '-', a.grid_name ) AS gridName, |
|
|
|
a.sort as sort, |
|
|
|
agency.fullname as fullName |
|
|
|
FROM |
|
|
|
CUSTOMER_GRID a |
|
|
|
LEFT JOIN ( |
|
|
@ -512,7 +524,7 @@ |
|
|
|
and a.ABANDON_FLAG='0' |
|
|
|
AND a.customer_id = #{customerId} |
|
|
|
) AS c |
|
|
|
ORDER BY CONVERT ( gridName USING gbk ) ASC |
|
|
|
ORDER BY fullName,c.sort,CONVERT ( gridName USING gbk ) ASC |
|
|
|
LIMIT #{pageNo}, #{pageSize} |
|
|
|
</select> |
|
|
|
|
|
|
|