BisInspWrwxRgstrDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspWrwxRgstrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstr" id="bisInspWrwxRgstrResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objId" column="OBJ_ID"/>
  7. <result property="adCode" column="AD_CODE"/>
  8. <result property="adName" column="AD_NAME"/>
  9. <result property="adFullName" column="AD_FULL_NAME"/>
  10. <result property="adGrad" column="AD_GRAD"/>
  11. <result property="loc" column="LOC"/>
  12. <result property="bChkUnit" column="B_CHK_UNIT"/>
  13. <result property="contact" column="CONTACT"/>
  14. <result property="contactTel" column="CONTACT_TEL"/>
  15. <result property="principal" column="PRINCIPAL"/>
  16. <result property="principalTel" column="PRINCIPAL_TEL"/>
  17. <result property="note" column="NOTE"/>
  18. <result property="svwtcState" column="SVWTC_STATE"/>
  19. <result property="wtupState" column="WTUP_STATE"/>
  20. <result property="wgState" column="WG_STATE"/>
  21. <result property="wtutState" column="WTUT_STATE"/>
  22. <result property="state" column="STATE"/>
  23. <result property="centerX" column="CENTER_X"/>
  24. <result property="centerY" column="CENTER_Y"/>
  25. <result property="gdX" column="GD_X"/>
  26. <result property="gdY" column="GD_Y"/>
  27. <result property="persId" column="PERS_ID"/>
  28. <result property="groupId" column="GROUP_ID"/>
  29. <result property="intm" column="INTM"/>
  30. <result property="uptm" column="UPTM"/>
  31. <result property="dataStat" column="DATA_STAT"/>
  32. <result property="svwtcAttackState" column="SVWTC_ATTACK_STATE"/>
  33. <result property="svwtcScState" column="SVWTC_SC_STATE"/>
  34. <result property="svwtcPeState" column="SVWTC_PE_STATE"/>
  35. </resultMap>
  36. <sql id="table_columns">
  37. ID,
  38. OBJ_ID,
  39. AD_CODE,
  40. AD_NAME,
  41. AD_FULL_NAME,
  42. AD_GRAD,
  43. LOC,
  44. B_CHK_UNIT,
  45. CONTACT,
  46. CONTACT_TEL,
  47. PRINCIPAL,
  48. PRINCIPAL_TEL,
  49. NOTE,
  50. SVWTC_STATE,
  51. SVWTC_ATTACK_STATE,
  52. SVWTC_SC_STATE,
  53. SVWTC_PE_STATE,
  54. WTUP_STATE,
  55. WG_STATE,
  56. WTUT_STATE,
  57. STATE,
  58. CENTER_X,
  59. CENTER_Y,
  60. GD_X,
  61. GD_Y,
  62. PERS_ID,
  63. GROUP_ID,
  64. INTM,
  65. UPTM,
  66. DATA_STAT
  67. </sql>
  68. <sql id="entity_properties">
  69. #{id},
  70. #{objId},
  71. #{adCode},
  72. #{adName},
  73. #{adFullName},
  74. #{adGrad},
  75. #{loc},
  76. #{bChkUnit},
  77. #{contact},
  78. #{contactTel},
  79. #{principal},
  80. #{principalTel},
  81. #{note},
  82. #{svwtcState},
  83. #{svwtcAttackState},
  84. #{svwtcScState},
  85. #{svwtcPeState},
  86. #{wtupState},
  87. #{wgState},
  88. #{wtutState},
  89. #{state},
  90. #{centerX},
  91. #{centerY},
  92. #{gdX},
  93. #{gdY},
  94. #{persId},
  95. #{groupId},
  96. #{intm},
  97. #{uptm},
  98. #{dataStat}
  99. </sql>
  100. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  101. <sql id="page_where">
  102. <trim prefix="where" prefixOverrides="and | or ">
  103. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  104. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  105. <if test="adName != null and adName != ''">and AD_NAME LIKE '%' || #{adName} || '%'</if>
  106. <if test="adFullName != null and adFullName != ''">and replace(AD_FULL_NAME, '-', '') LIKE '%' || #{adFullName} || '%'</if>
  107. <if test="adGrad != null and adGrad != ''">and AD_GRAD = #{adGrad}</if>
  108. <if test="loc != null and loc != ''">and LOC = #{loc}</if>
  109. <if test="bChkUnit != null and bChkUnit != ''">and B_CHK_UNIT = #{bChkUnit}</if>
  110. <if test="contact != null and contact != ''">and CONTACT = #{contact}</if>
  111. <if test="contactTel != null and contactTel != ''">and CONTACT_TEL = #{contactTel}</if>
  112. <if test="principal != null and principal != ''">and PRINCIPAL = #{principal}</if>
  113. <if test="principalTel != null and principalTel != ''">and PRINCIPAL_TEL = #{principalTel}</if>
  114. <if test="note != null and note != ''">and NOTE = #{note}</if>
  115. <if test="svwtcState != null and svwtcState != ''">and SVWTC_STATE = #{svwtcState}</if>
  116. <if test="svwtcAttackState != null and svwtcAttackState != ''">and SVWTC_ATTACK_STATE = #{svwtcAttackState}</if>
  117. <if test="svwtcScState != null and svwtcScState != ''">and SVWTC_SC_STATE = #{svwtcScState}</if>
  118. <if test="svwtcPeState != null and svwtcPeState != ''">and SVWTC_PE_STATE = #{svwtcPeState}</if>
  119. <if test="wtupState != null and wtupState != ''">and WTUP_STATE = #{wtupState}</if>
  120. <if test="wgState != null and wgState != ''">and WG_STATE = #{wgState}</if>
  121. <if test="wtutState != null and wtutState != ''">and WTUT_STATE = #{wtutState}</if>
  122. <if test="state != null and state != ''">and STATE = #{state}</if>
  123. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  124. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  125. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  126. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  127. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  128. <if test="sttm != null and sttm != ''">and Intm &gt;= TO_DATE(#{sttm},'YYYY-MM-DD')</if>
  129. <if test="entm != null and entm != ''">and Intm &lt; To_DATE(#{entm},'yyyy-MM-dd') + 1</if>
  130. <if test="uptm != null">and UPTM = #{uptm}</if>
  131. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  132. and DATA_STAT='0'
  133. </trim>
  134. </sql>
  135. <sql id="page_where2">
  136. <trim prefix="where" prefixOverrides="and | or ">
  137. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  138. <if test="adCode != null and adCode != ''">and AD_CODE like '${adCode}%'</if>
  139. <if test="adName != null and adName != ''">and AD_NAME LIKE '%' || #{adName} || '%'</if>
  140. <if test="adFullName != null and adFullName != ''">and replace(AD_FULL_NAME, '-', '') LIKE '%' || #{adFullName} || '%'</if>
  141. <if test="adGrad != null and adGrad != ''">and AD_GRAD = #{adGrad}</if>
  142. <if test="loc != null and loc != ''">and LOC = #{loc}</if>
  143. <if test="bChkUnit != null and bChkUnit != ''">and B_CHK_UNIT = #{bChkUnit}</if>
  144. <if test="contact != null and contact != ''">and CONTACT = #{contact}</if>
  145. <if test="contactTel != null and contactTel != ''">and CONTACT_TEL = #{contactTel}</if>
  146. <if test="principal != null and principal != ''">and PRINCIPAL = #{principal}</if>
  147. <if test="principalTel != null and principalTel != ''">and PRINCIPAL_TEL = #{principalTel}</if>
  148. <if test="note != null and note != ''">and NOTE = #{note}</if>
  149. <if test="svwtcState != null and svwtcState != ''">and SVWTC_STATE = #{svwtcState}</if>
  150. <if test="svwtcAttackState != null and svwtcAttackState != ''">and SVWTC_ATTACK_STATE = #{svwtcAttackState}</if>
  151. <if test="svwtcScState != null and svwtcScState != ''">and SVWTC_SC_STATE = #{svwtcScState}</if>
  152. <if test="svwtcPeState != null and svwtcPeState != ''">and SVWTC_PE_STATE = #{svwtcPeState}</if>
  153. <if test="wtupState != null and wtupState != ''">and WTUP_STATE = #{wtupState}</if>
  154. <if test="wgState != null and wgState != ''">and WG_STATE = #{wgState}</if>
  155. <if test="wtutState != null and wtutState != ''">and WTUT_STATE = #{wtutState}</if>
  156. <if test="state != null and state != ''">and STATE = #{state}</if>
  157. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  158. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  159. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  160. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  161. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  162. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  163. <if test="uptm != null">and UPTM = #{uptm}</if>
  164. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  165. and DATA_STAT='0'
  166. </trim>
  167. </sql>
  168. <select id="get" resultMap="bisInspWrwxRgstrResultMap" parameterType="String" >
  169. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR where ID = #{id}
  170. </select>
  171. <select id="getBy" resultMap="bisInspWrwxRgstrResultMap">
  172. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR <include refid="page_where2" />
  173. </select>
  174. <select id="findAll" resultMap="bisInspWrwxRgstrResultMap">
  175. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR
  176. </select>
  177. <select id="findList" resultMap="bisInspWrwxRgstrResultMap">
  178. SELECT
  179. B.*,A.PNM groupName, B.ID as "rgstrId"
  180. FROM
  181. (
  182. select <include refid="table_columns" />
  183. from BIS_INSP_WRWX_RGSTR <include refid="page_where" />
  184. ) B
  185. LEFT JOIN BIS_INSP_ALL_OBJ O ON B.OBJ_ID = O.OBJ_ID
  186. LEFT JOIN BIS_INSP_ALL A ON A.ID = O.ID
  187. <where>
  188. <if test="groupName != null and groupName != ''">and A.PNM = #{groupName}</if>
  189. <if test="id != null and id != ''">and A.ID like '${id}%' </if>
  190. <if test="groupId != null and groupId != ''">and A.ID = #{groupId}</if>
  191. <if test="province != null and province != ''">and B.AD_CODE LIKE '' || #{province} || '%' </if>
  192. <if test="groupIds != null and groupIds.length &gt; 0">
  193. <foreach collection="groupIds" index="index" item="gId" separator=" OR " open="and (" close=")">
  194. A.ID LIKE '${gId}%'
  195. </foreach>
  196. </if>
  197. <if test="plnaId !=null and plnaId !=''">
  198. and A.ID like '${plnaId}%'
  199. </if>
  200. <if test="tabType =='2'.toString()">
  201. and A.entm &lt;to_date(#{nowTime},'yyyy-MM-dd')+1
  202. </if>
  203. <if test="tabType =='1'.toString()">
  204. and A.entm &gt;=to_date(#{nowTime},'yyyy-MM-dd')
  205. </if>
  206. <if test="null != pType">
  207. and O.PTYPE = #{pType}
  208. </if>
  209. </where>
  210. </select>
  211. <select id="selectCount" resultType="int" >
  212. select count(ID) from BIS_INSP_WRWX_RGSTR <include refid="page_where" />
  213. </select>
  214. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstr">
  215. insert into BIS_INSP_WRWX_RGSTR( <include refid="table_columns" /> )
  216. values ( <include refid="entity_properties" /> )
  217. </insert>
  218. <delete id="delete" parameterType="java.lang.String">
  219. update BIS_INSP_WRWX_RGSTR set DATA_STAT='9' where ID = #{id}
  220. </delete>
  221. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstr">
  222. update BIS_INSP_WRWX_RGSTR set DATA_STAT='9' <include refid="page_where2" />
  223. </delete>
  224. <update id="deleteInFlag" parameterType="java.lang.String">
  225. update BIS_INSP_WRWX_RGSTR set DATA_STAT = '9' where ID = #{id}
  226. </update>
  227. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstr">
  228. update BIS_INSP_WRWX_RGSTR
  229. <trim prefix="set" suffixOverrides=",">
  230. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  231. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  232. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  233. <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
  234. <if test="adGrad != null and adGrad != ''">AD_GRAD = #{adGrad},</if>
  235. <if test="loc != null and loc != ''">LOC = #{loc},</if>
  236. <if test="bChkUnit != null and bChkUnit != ''">B_CHK_UNIT = #{bChkUnit},</if>
  237. <if test="contact != null and contact != ''">CONTACT = #{contact},</if>
  238. <if test="contactTel != null and contactTel != ''">CONTACT_TEL = #{contactTel},</if>
  239. <if test="principal != null and principal != ''">PRINCIPAL = #{principal},</if>
  240. <if test="principalTel != null and principalTel != ''">PRINCIPAL_TEL = #{principalTel},</if>
  241. <if test="note != null and note != ''">NOTE = #{note},</if>
  242. <if test="svwtcState != null and svwtcState != ''">SVWTC_STATE = #{svwtcState},</if>
  243. <if test="svwtcAttackState != null and svwtcAttackState != ''">SVWTC_ATTACK_STATE = #{svwtcAttackState},</if>
  244. <if test="svwtcScState != null and svwtcScState != ''">SVWTC_SC_STATE = #{svwtcScState},</if>
  245. <if test="svwtcPeState != null and svwtcPeState != ''">SVWTC_PE_STATE = #{svwtcPeState},</if>
  246. <if test="wtupState != null and wtupState != ''">WTUP_STATE = #{wtupState},</if>
  247. <if test="wgState != null and wgState != ''">WG_STATE = #{wgState},</if>
  248. <if test="wtutState != null and wtutState != ''">WTUT_STATE = #{wtutState},</if>
  249. <if test="state != null and state != ''">STATE = #{state},</if>
  250. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  251. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  252. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  253. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  254. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  255. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  256. <if test="intm != null">INTM = #{intm},</if>
  257. <if test="uptm != null">UPTM = #{uptm},</if>
  258. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  259. </trim>
  260. <where>ID = #{id}</where>
  261. </update>
  262. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstr">
  263. update BIS_INSP_WRWX_RGSTR
  264. <trim prefix="set" suffixOverrides=",">
  265. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  266. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  267. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  268. <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
  269. <if test="adGrad != null and adGrad != ''">AD_GRAD = #{adGrad},</if>
  270. <if test="loc != null and loc != ''">LOC = #{loc},</if>
  271. <if test="bChkUnit != null and bChkUnit != ''">B_CHK_UNIT = #{bChkUnit},</if>
  272. <if test="contact != null and contact != ''">CONTACT = #{contact},</if>
  273. <if test="contactTel != null and contactTel != ''">CONTACT_TEL = #{contactTel},</if>
  274. <if test="principal != null and principal != ''">PRINCIPAL = #{principal},</if>
  275. <if test="principalTel != null and principalTel != ''">PRINCIPAL_TEL = #{principalTel},</if>
  276. <if test="note != null and note != ''">NOTE = #{note},</if>
  277. <if test="svwtcState != null and svwtcState != ''">SVWTC_STATE = #{svwtcState},</if>
  278. <if test="svwtcAttackState != null and svwtcAttackState != ''">SVWTC_ATTACK_STATE = #{svwtcAttackState},</if>
  279. <if test="svwtcScState != null and svwtcScState != ''">SVWTC_SC_STATE = #{svwtcScState},</if>
  280. <if test="svwtcPeState != null and svwtcPeState != ''">SVWTC_PE_STATE = #{svwtcPeState},</if>
  281. <if test="wtupState != null and wtupState != ''">WTUP_STATE = #{wtupState},</if>
  282. <if test="wgState != null and wgState != ''">WG_STATE = #{wgState},</if>
  283. <if test="wtutState != null and wtutState != ''">WTUT_STATE = #{wtutState},</if>
  284. <if test="state != null and state != ''">STATE = #{state},</if>
  285. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  286. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  287. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  288. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  289. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  290. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  291. <if test="intm != null">INTM = #{intm},</if>
  292. <if test="uptm != null">UPTM = #{uptm},</if>
  293. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  294. </trim>
  295. <include refid="page_where2" />
  296. </update>
  297. <!-- 其他自定义SQL -->
  298. <select id="findPageList" resultType="cn.com.goldenwater.dcproj.dto.BisInspWrwxRgstrDto">
  299. SELECT * FROM (
  300. select
  301. A.CODE, A.ID nodeId, A.NM, A.ptype, A.OBJ_ID,
  302. aw.AD_CODE as baseId, ia.pnm groupName,
  303. B.ID ID, B.id as rgstrId,
  304. (case when b.STATE is null then '0' else b.state end) STATE,
  305. B.AD_CODE,
  306. B.AD_NAME,
  307. B.AD_FULL_NAME,
  308. B.AD_GRAD,
  309. B.LOC,
  310. B.B_CHK_UNIT,
  311. B.CONTACT,
  312. B.CONTACT_TEL,
  313. B.PRINCIPAL,
  314. B.PRINCIPAL_TEL,
  315. B.NOTE,
  316. B.SVWTC_STATE,
  317. B.SVWTC_ATTACK_STATE,
  318. B.SVWTC_SC_STATE,
  319. B.SVWTC_PE_STATE,
  320. B.WTUP_STATE,
  321. B.WG_STATE,
  322. B.WTUT_STATE,
  323. B.CENTER_X,
  324. B.CENTER_Y,
  325. B.GD_X,
  326. B.GD_Y,
  327. B.PERS_ID,
  328. B.GROUP_ID,
  329. B.INTM,
  330. B.UPTM,
  331. B.DATA_STAT
  332. FROM BIS_INSP_ALL_OBJ A
  333. LEFT JOIN BIS_INSP_WRWX_RGSTR B ON A.OBJ_ID=B.OBJ_ID
  334. LEFT JOIN BIS_INSP_ALL IA ON A.ID = IA.ID
  335. LEFT JOIN ATT_AD_BASE AW ON B.AD_CODE = AW.AD_CODE
  336. where A.ptype= #{pType}
  337. and B.DATA_STAT='0'
  338. <if test="adCodes ==null or adCodes ==''">
  339. <choose>
  340. <when test='isAll =="1"'>
  341. </when>
  342. <otherwise>
  343. and
  344. A.Id in (
  345. select distinct id from (
  346. SELECT P.id FROM BIS_INSP_ALL P START WITH P.PID IN (SELECT id FROM BIS_INSP_ALL_RLATION A
  347. WHERE A.PERSID = #{presId} and TYPE = #{pType} and length(id) in (3,6,9))
  348. CONNECT BY P.PID = PRIOR P.ID
  349. union all
  350. SELECT P.id FROM BIS_INSP_ALL P where p.id in (SELECT id FROM BIS_INSP_ALL_RLATION A
  351. WHERE A.PERSID =#{presId} and TYPE = #{pType} and length(id)=12 )
  352. )
  353. )
  354. </otherwise>
  355. </choose>
  356. </if>
  357. <if test="adCodes !=null and adCodes !=''">
  358. and
  359. <foreach item="item" index="index" collection="adCodes.split(',')" open="(" separator="or" close=")">
  360. b.ad_code like concat('${item}','%')
  361. </foreach>
  362. </if>
  363. ) A WHERE a.PTYPE=#{pType}
  364. <if test="plnaId !=null and plnaId !=''">
  365. and a.nodeId like '${plnaId}%'
  366. </if>
  367. <if test="state !=null and state !=''">
  368. and STATE in (${state})
  369. </if>
  370. <if test="rsName !=null and rsName !=''">
  371. and a.nm like '%${rsName}%'
  372. </if>
  373. <if test="code !=null and code !=''">
  374. and a.code = #{code}
  375. </if>
  376. <if test="adName != null and adName != ''">and a.adName like '%${adName}%'</if>
  377. <if test="sttm != null and sttm != ''">and a.Intm&gt;= TO_DATE(#{sttm},'YYYY-MM-DD')</if>
  378. <if test="entm != null and entm != ''">and a.Intm &lt; To_DATE(#{entm},'yyyy-MM-dd') + 1</if>
  379. <if test="groupId != null and groupId != ''">and a.nodeId = #{groupId}</if>
  380. order by nodeId asc
  381. <if test="orderBy != null and orderBy != ''">
  382. ,nlssort(nm,'NLS_SORT=SCHINESE_PINYIN_M')
  383. </if>
  384. </select>
  385. </mapper>