RecPayMapper.xml 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  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="com.dk.mdm.mapper.mac.RecPayMapper">
  4. <!-- 通用设置 -->
  5. <!-- 通用查询列 -->
  6. <sql id="Base_Column_List">
  7. rp_id, rp_no, rp_type, object_id, org_id, staff_id, sum_amt_rec, sum_amt_pay, sum_should_handle, sum_use_receipt_residue, sum_use_payment_residue, sum_amt_receivable_handle, sum_amt_payable_handle, sum_waive_amt, acc_date, annex_paths, remarks, biznis_type, biznis_id, biznis_no, flg_order_handle, flg_lock, make_staff, make_time, flg_valid, cp_id
  8. </sql>
  9. <!-- 通用查询映射结果 -->
  10. <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mac.RecPay">
  11. <id column="rp_id" property="rpId"/>
  12. <result column="rp_no" property="rpNo"/>
  13. <result column="rp_type" property="rpType"/>
  14. <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
  15. <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
  16. <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
  17. <result column="sum_amt_rec" property="sumAmtRec"/>
  18. <result column="sum_amt_pay" property="sumAmtPay"/>
  19. <result column="sum_should_handle" property="sumShouldHandle"/>
  20. <result column="sum_use_receipt_residue" property="sumUseReceiptResidue"/>
  21. <result column="sum_use_payment_residue" property="sumUsePaymentResidue"/>
  22. <result column="sum_amt_receivable_handle" property="sumAmtReceivableHandle"/>
  23. <result column="sum_amt_payable_handle" property="sumAmtPayableHandle"/>
  24. <result column="sum_waive_amt" property="sumWaiveAmt"/>
  25. <result column="acc_date" property="accDate" typeHandler="TimestampTypeHandler"/>
  26. <result column="remarks" property="remarks"/>
  27. <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
  28. <result column="biznis_type" property="biznisType"/>
  29. <result column="biznis_id" property="biznisId" typeHandler="UuidTypeHandler"/>
  30. <result column="biznis_no" property="biznisNo"/>
  31. <result column="flg_order_handle" property="flgOrderHandle"/>
  32. <result column="flg_lock" property="flgLock"/>
  33. <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
  34. <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
  35. <result column="flg_valid" property="flgValid"/>
  36. <result column="cp_id" property="cpId"/>
  37. </resultMap>
  38. <!-- Response查询映射结果 -->
  39. <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mac.RecPayResponse">
  40. <id column="rp_id" property="rpId"/>
  41. <result column="rp_no" property="rpNo"/>
  42. <result column="rp_type" property="rpType"/>
  43. <result column="object_id" property="objectId" typeHandler="UuidTypeHandler"/>
  44. <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
  45. <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
  46. <result column="sum_amt_rec" property="sumAmtRec"/>
  47. <result column="amt_pay" property="amtPay"/>
  48. <result column="sum_amt_pay" property="sumAmtPay"/>
  49. <result column="sum_should_handle" property="sumShouldHandle"/>
  50. <result column="sum_use_receipt_residue" property="sumUseReceiptResidue"/>
  51. <result column="sum_use_payment_residue" property="sumUsePaymentResidue"/>
  52. <result column="sum_amt_receivable_handle" property="sumAmtReceivableHandle"/>
  53. <result column="sum_amt_payable_handle" property="sumAmtPayableHandle"/>
  54. <result column="sum_waive_amt" property="sumWaiveAmt"/>
  55. <result column="acc_date" property="accDate" typeHandler="TimestampTypeHandler"/>
  56. <result column="remarks" property="remarks"/>
  57. <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
  58. <result column="biznis_type" property="biznisType"/>
  59. <result column="biznis_id" property="biznisId" typeHandler="UuidTypeHandler"/>
  60. <result column="biznis_no" property="biznisNo"/>
  61. <result column="flg_order_handle" property="flgOrderHandle"/>
  62. <result column="flg_lock" property="flgLock"/>
  63. <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
  64. <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
  65. <result column="flg_valid" property="flgValid"/>
  66. <result column="cp_id" property="cpId"/>
  67. <result column="receivable_residue" property="receivableResidue"/>
  68. <result column="receipt_residue" property="receiptResidue"/>
  69. <result column="payable_residue" property="payableResidue"/>
  70. <result column="payment_residue" property="paymentResidue"/>
  71. <result column="macNames" property="macNames"/>
  72. <result column="amt_rec" property="amtRec"/>
  73. <result column="sup_id" property="supId"/>
  74. <result column="sup_code" property="supCode"/>
  75. <result column="sup_name" property="supName"/>
  76. <result column="sup_type" property="supType"/>
  77. <result column="contact_name" property="contactName"/>
  78. <result column="contact_phone" property="contactPhone"/>
  79. <result column="return_address" property="returnAddress"/>
  80. <result column="address_no" property="addressNo"/>
  81. </resultMap>
  82. <!-- 通用条件列 -->
  83. <sql id="Condition">
  84. <if test="rpNo != null and rpNo != ''">
  85. AND t.rp_no LIKE concat('%',my_ex.likequery(#{rpNo}),'%')
  86. </if>
  87. <if test="rpType != null and rpType != ''">
  88. AND t.rp_type = #{rpType}
  89. </if>
  90. <if test="objectId != null and objectId != ''">
  91. AND t.object_id = #{objectId}::uuid
  92. </if>
  93. <if test="orgId != null and orgId != ''">
  94. AND t.org_id = #{orgId}::uuid
  95. </if>
  96. <if test="staffId != null and staffId != ''">
  97. AND t.staff_id = #{staffId}::uuid
  98. </if>
  99. <if test="sumAmtRec != null">
  100. AND t.sum_amt_rec = #{sumAmtRec}
  101. </if>
  102. <if test="sumAmtPay != null">
  103. AND t.sum_amt_pay = #{sumAmtPay}
  104. </if>
  105. <if test="sumShouldHandle != null">
  106. AND t.sum_should_handle = #{sumShouldHandle}
  107. </if>
  108. <if test="sumUseReceiptResidue != null">
  109. AND t.sum_use_receipt_residue = #{sumUseReceiptResidue}
  110. </if>
  111. <if test="sumUsePaymentResidue != null">
  112. AND t.sum_use_payment_residue = #{sumUsePaymentResidue}
  113. </if>
  114. <if test="sumAmtReceivableHandle != null">
  115. AND t.sum_amt_receivable_handle = #{sumAmtReceivableHandle}
  116. </if>
  117. <if test="sumAmtPayableHandle != null">
  118. AND t.sum_amt_payable_handle = #{sumAmtPayableHandle}
  119. </if>
  120. <if test="sumWaiveAmt != null">
  121. AND t.sum_waive_amt = #{sumWaiveAmt}
  122. </if>
  123. <if test="accDate != null">
  124. AND t.acc_date = #{accDate}
  125. </if>
  126. <if test="remarks != null and remarks != ''">
  127. AND t.remarks = #{remarks}
  128. </if>
  129. <if test="annexPaths != null and annexPaths != ''">
  130. AND t.annex_paths = #{annexPaths}
  131. </if>
  132. <if test="biznisType != null and biznisType != ''">
  133. AND t.biznis_type = #{biznisType}
  134. </if>
  135. <if test="biznisId != null and biznisId != ''">
  136. AND t.biznis_id = #{biznisId}::uuid
  137. </if>
  138. <if test="biznisNo != null and biznisNo != ''">
  139. AND t.biznis_no = #{biznisNo}
  140. </if>
  141. <if test="flgOrderHandle != null">
  142. AND t.flg_order_handle = #{flgOrderHandle}
  143. </if>
  144. <if test="flgLock != null">
  145. AND t.flg_lock = #{flgLock}
  146. </if>
  147. <if test="makeStaff != null and makeStaff != ''">
  148. AND t.make_staff = #{makeStaff}
  149. </if>
  150. <if test="makeTime != null">
  151. AND t.make_time = #{makeTime}
  152. </if>
  153. <if test="cpId != null">
  154. AND t.cp_id = #{cpId}
  155. </if>
  156. <if test="cusPhone != null and cusPhone != ''">
  157. AND tmc.cus_phone LIKE concat('%',my_ex.likequery(#{cusPhone}),'%')
  158. </if>
  159. <if test="cusName != null and cusName != ''">
  160. AND tmc.cus_name LIKE concat('%',my_ex.likequery(#{cusName}),'%')
  161. </if>
  162. <if test="orgIdList != null and orgIdList.size() > 0">
  163. AND t.org_id =any(#{orgIdList, typeHandler=UuidListTypeHandler})
  164. </if>
  165. <if test="staffIdList != null and staffIdList.size() > 0">
  166. AND t.staff_id =any(#{staffIdList, typeHandler=UuidListTypeHandler})
  167. </if>
  168. <if test="makeTimeStart != null and makeTimeEnd != null">
  169. AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
  170. AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
  171. </if>
  172. <if test="flgValidList != null and flgValidList.size()>0">
  173. AND t.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
  174. </if>
  175. <if test="flgValid != null ">
  176. AND t.flg_valid = #{flgValid}
  177. </if>
  178. <if test="supName != null and supName != ''">
  179. AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
  180. </if>
  181. <if test="rpTypeList != null and rpTypeList.size() > 0">
  182. AND t.rp_type =any(#{rpTypeList, typeHandler=StringListTypeHandler})
  183. </if>
  184. <if test="staffIds != null and staffIds.size() > 0">
  185. AND t.staff_id =any(#{staffIdList, typeHandler=UuidListTypeHandler})
  186. </if>
  187. <if test="createtimeStart != null and createtimeEnd != null">
  188. AND t.op_create_time &gt;= #{createtimeStart}::timestamp with time zone
  189. AND t.op_create_time &lt; #{createtimeEnd}::timestamp with time zone + interval '1 day'
  190. </if>
  191. <!-- <if test="searchText != null">-->
  192. <!-- AND ( t.rp_no like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  193. <!-- OR tmc.cus_code like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  194. <!-- OR tmc.cus_name like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  195. <!-- OR tmc.cus_phone like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  196. <!-- OR tmc.address_full like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  197. <!-- OR t.remarks like concat('%', my_ex.likequery(#{searchText}) , '%')-->
  198. <!-- )-->
  199. <!-- </if>-->
  200. <if test="staffName != null and staffName != ''">
  201. AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
  202. </if>
  203. <if test="orgName != null and orgName != ''">
  204. AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
  205. </if>
  206. <if test="sumAmtReceivableHandleFlag != null and sumAmtReceivableHandleFlag == true">
  207. AND t.sum_amt_receivable_handle > 0
  208. </if>
  209. </sql>
  210. <sql id="Condition_sup">
  211. <if test="rpNo != null and rpNo != ''">
  212. AND t.rp_no LIKE concat('%',my_ex.likequery(#{rpNo}),'%')
  213. </if>
  214. <if test="rpType != null and rpType != ''">
  215. AND t.rp_type = #{rpType}
  216. </if>
  217. <if test="objectId != null and objectId != ''">
  218. AND t.object_id = #{objectId}::uuid
  219. </if>
  220. <if test="orgId != null and orgId != ''">
  221. AND t.org_id = #{orgId}::uuid
  222. </if>
  223. <if test="staffId != null and staffId != ''">
  224. AND t.staff_id = #{staffId}::uuid
  225. </if>
  226. <if test="sumAmtRec != null">
  227. AND t.sum_amt_rec = #{sumAmtRec}
  228. </if>
  229. <if test="sumAmtPay != null">
  230. AND t.sum_amt_pay = #{sumAmtPay}
  231. </if>
  232. <if test="sumShouldHandle != null">
  233. AND t.sum_should_handle = #{sumShouldHandle}
  234. </if>
  235. <if test="sumUseReceiptResidue != null">
  236. AND t.sum_use_receipt_residue = #{sumUseReceiptResidue}
  237. </if>
  238. <if test="sumUsePaymentResidue != null">
  239. AND t.sum_use_payment_residue = #{sumUsePaymentResidue}
  240. </if>
  241. <if test="sumAmtReceivableHandle != null">
  242. AND t.sum_amt_receivable_handle = #{sumAmtReceivableHandle}
  243. </if>
  244. <if test="sumAmtPayableHandle != null">
  245. AND t.sum_amt_payable_handle = #{sumAmtPayableHandle}
  246. </if>
  247. <if test="sumWaiveAmt != null">
  248. AND t.sum_waive_amt = #{sumWaiveAmt}
  249. </if>
  250. <if test="accDate != null">
  251. AND t.acc_date = #{accDate}
  252. </if>
  253. <if test="remarks != null and remarks != ''">
  254. AND t.remarks = #{remarks}
  255. </if>
  256. <if test="annexPaths != null and annexPaths != ''">
  257. AND t.annex_paths = #{annexPaths}
  258. </if>
  259. <if test="biznisType != null and biznisType != ''">
  260. AND t.biznis_type = #{biznisType}
  261. </if>
  262. <if test="biznisId != null and biznisId != ''">
  263. AND t.biznis_id = #{biznisId}::uuid
  264. </if>
  265. <if test="biznisNo != null and biznisNo != ''">
  266. AND t.biznis_no = #{biznisNo}
  267. </if>
  268. <if test="flgOrderHandle != null">
  269. AND t.flg_order_handle = #{flgOrderHandle}
  270. </if>
  271. <if test="flgLock != null">
  272. AND t.flg_lock = #{flgLock}
  273. </if>
  274. <if test="makeStaff != null and makeStaff != ''">
  275. AND t.make_staff = #{makeStaff}
  276. </if>
  277. <if test="makeTime != null">
  278. AND t.make_time = #{makeTime}
  279. </if>
  280. <if test="cpId != null">
  281. AND t.cp_id = #{cpId}
  282. </if>
  283. <if test="orgIdList != null and orgIdList.size() > 0">
  284. AND t.org_id =any(#{orgIdList, typeHandler=UuidListTypeHandler})
  285. </if>
  286. <if test="staffIdList != null and staffIdList.size() > 0">
  287. AND t.staff_id =any(#{staffIdList, typeHandler=UuidListTypeHandler})
  288. </if>
  289. <if test="makeTimeStart != null and makeTimeEnd != null">
  290. AND t.make_time &gt;= #{makeTimeStart}::timestamp with time zone
  291. AND t.make_time &lt; #{makeTimeEnd}::timestamp with time zone + interval '1 day'
  292. </if>
  293. <if test="flgValidList != null and flgValidList.size()>0">
  294. AND t.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
  295. </if>
  296. <if test="rpTypeList != null and rpTypeList.size() > 0">
  297. AND t.rp_type =any(#{rpTypeList, typeHandler=StringListTypeHandler})
  298. </if>
  299. <if test="staffIds != null and staffIds.size() > 0">
  300. AND t.staff_id =any(#{staffIdList, typeHandler=UuidListTypeHandler})
  301. </if>
  302. <if test="makeStaffIds != null and makeStaffIds.size() > 0">
  303. AND t.make_staff =any(#{makeStaffIds, typeHandler=UuidListTypeHandler})
  304. </if>
  305. <if test="createtimeStart != null and createtimeEnd != null">
  306. AND t.op_create_time &gt;= #{createtimeStart}::timestamp with time zone
  307. AND t.op_create_time &lt; #{createtimeEnd}::timestamp with time zone + interval '1 day'
  308. </if>
  309. <if test="staffName != null and staffName != ''">
  310. AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}),'%')
  311. </if>
  312. <if test="orgName != null and orgName != ''">
  313. AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
  314. </if>
  315. <if test="sumAmtReceivableHandleFlag != null and sumAmtReceivableHandleFlag == true">
  316. AND t.sum_amt_receivable_handle > 0
  317. </if>
  318. </sql>
  319. <sql id="idsForeach">
  320. <!-- 根据主键rpId批量操作 -->
  321. WHERE rp_id in
  322. <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
  323. #{item}
  324. </foreach>
  325. </sql>
  326. <!-- 查询表t_mac_rec_pay,(条件查询+分页)列表 -->
  327. <select id="selectByCond" resultMap="BaseResultMapResponse">
  328. select t.rp_id,
  329. t.rp_no,
  330. t.rp_type,
  331. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  332. t.object_id,
  333. tmc.cus_code as "cusCode",
  334. tmc.cus_name as "cusName",
  335. tmc.cus_phone as "cusPhone",
  336. tmc.address_full as "addressFull",
  337. t.org_id,
  338. tmo.org_name as "orgName",
  339. t.staff_id,
  340. tms.staff_name as "staffName",
  341. t.sum_amt_rec,
  342. t.sum_amt_pay,
  343. t.sum_should_handle,
  344. t.sum_use_receipt_residue,
  345. t.sum_use_payment_residue,
  346. t.sum_amt_receivable_handle,
  347. t.sum_amt_payable_handle,
  348. t.sum_waive_amt,
  349. t.acc_date,
  350. t.remarks,
  351. t.annex_paths,
  352. t.biznis_type,
  353. t.biznis_id,
  354. t.biznis_no,
  355. t.flg_order_handle,
  356. t.flg_lock,
  357. t.make_staff,
  358. makestaff.staff_name as "makeStaffName",
  359. t.make_time,
  360. t.flg_valid,
  361. t.cp_id,
  362. tma.receivable_residue,
  363. tma.receipt_residue
  364. from dkic_b.t_mac_rec_pay as t
  365. left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
  366. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  367. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  368. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  369. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  370. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id and tma.object_type in ('对象类型-客户')
  371. where t.rp_type in ('收付款类型-收款', '收付款类型-退收款')
  372. <include refid="Condition"/>
  373. <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
  374. AND t.flg_valid = true
  375. </if>
  376. <if test="searchText !=null and searchText != ''">
  377. AND ( tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  378. or tmc.address_full LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  379. or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  380. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  381. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  382. )
  383. </if>
  384. order by t.op_create_time desc
  385. <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
  386. limit #{end} offset #{start}
  387. </if>
  388. </select>
  389. <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
  390. <select id="countByCond" resultType="Long">
  391. SELECT count(1)
  392. from dkic_b.t_mac_rec_pay as t
  393. left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
  394. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  395. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  396. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  397. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  398. where t.rp_type in ('收付款类型-收款', '收付款类型-退收款')
  399. <include refid="Condition"/>
  400. <if test="searchText !=null and searchText != ''">
  401. AND (
  402. t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  403. or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  404. or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  405. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  406. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  407. )
  408. </if>
  409. </select>
  410. <!-- 查询表t_mac_rec_pay,(条件查询+分页)列表 -->
  411. <select id="selectByCondCus" resultMap="BaseResultMapResponse">
  412. select t.rp_id,
  413. t.rp_no,
  414. t.rp_type,
  415. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  416. t.object_id,
  417. tmc.cus_code as "cusCode",
  418. tmc.cus_name as "cusName",
  419. tmc.cus_phone as "cusPhone",
  420. tmc.address_full as "addressFull",
  421. t.org_id,
  422. tmo.org_name as "orgName",
  423. t.staff_id,
  424. tms.staff_name as "staffName",
  425. t.sum_amt_rec,
  426. t.sum_amt_pay,
  427. t.sum_should_handle,
  428. t.sum_use_receipt_residue,
  429. t.sum_use_payment_residue,
  430. t.sum_amt_receivable_handle,
  431. t.sum_amt_payable_handle,
  432. t.sum_waive_amt,
  433. t.acc_date,
  434. t.remarks,
  435. t.annex_paths,
  436. t.biznis_type,
  437. t.biznis_id,
  438. t.biznis_no,
  439. t.flg_order_handle,
  440. t.flg_lock,
  441. t.make_staff,
  442. makestaff.staff_name as "makeStaffName",
  443. t.make_time,
  444. t.flg_valid,
  445. t.cp_id,
  446. tma.receivable_residue,
  447. tma.receipt_residue,
  448. rpi.amt_rec,
  449. concat (tmma.mac_name ) AS "macNames"
  450. from dkic_b.t_mac_rec_pay as t
  451. left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
  452. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  453. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  454. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  455. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  456. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id and tma.object_type in ('对象类型-客户')
  457. left join dkic_b.t_mac_rec_pay_item rpi on rpi.rp_id = t.rp_id
  458. left join dkic_b.t_mst_money_account tmma on tmma.mac_id = rpi.mac_id
  459. where t.rp_type in ('收付款类型-收款', '收付款类型-退收款')
  460. <include refid="Condition"/>
  461. <if test="searchText !=null and searchText != ''">
  462. AND (
  463. t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  464. or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  465. or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  466. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  467. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  468. )
  469. </if>
  470. order by t.op_create_time desc
  471. <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
  472. limit #{end} offset #{start}
  473. </if>
  474. </select>
  475. <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
  476. <select id="countByCondCus" resultType="Long">
  477. SELECT count(1)
  478. from dkic_b.t_mac_rec_pay as t
  479. left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
  480. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  481. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  482. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  483. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  484. where t.rp_type in ('收付款类型-收款', '收付款类型-退收款')
  485. <include refid="Condition"/>
  486. <if test="searchText !=null and searchText != ''">
  487. AND (
  488. t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  489. or tmc.cus_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  490. or tmc.cus_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  491. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  492. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  493. )
  494. </if>
  495. </select>
  496. <!-- 根据主键查询表t_mac_rec_pay的一行数据 -->
  497. <select id="selectById" resultMap="BaseResultMapResponse">
  498. select t.rp_id,
  499. t.rp_no,
  500. t.rp_type,
  501. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  502. t.object_id,
  503. tmc.cus_code as "cusCode",
  504. tmc.cus_name as "cusName",
  505. tmc.cus_phone as "cusPhone",
  506. tmc.address_full as "addressFull",
  507. tmc.address_no ,
  508. tmsp.sup_id,
  509. tmsp.sup_code,
  510. tmsp.sup_name,
  511. tmsp.sup_type,
  512. tmsp.contact_name,
  513. tmsp.contact_phone,
  514. tmsp.return_address,
  515. t.org_id,
  516. tmo.org_name as "orgName",
  517. t.staff_id,
  518. tms.staff_name as "staffName",
  519. t.sum_amt_rec,
  520. t.sum_amt_pay,
  521. t.sum_should_handle,
  522. t.sum_use_receipt_residue,
  523. t.sum_use_payment_residue,
  524. t.sum_amt_receivable_handle,
  525. t.sum_amt_payable_handle,
  526. t.sum_waive_amt,
  527. t.acc_date,
  528. t.remarks,
  529. t.annex_paths,
  530. t.biznis_type,
  531. t.biznis_id,
  532. t.biznis_no,
  533. t.flg_order_handle,
  534. t.flg_lock,
  535. t.make_staff,
  536. makestaff.staff_name as "makeStaffName",
  537. t.make_time,
  538. t.flg_valid,
  539. t.cp_id,
  540. tma.receivable_residue,
  541. tma.receipt_residue,
  542. tma.payable_residue,
  543. tma.payment_residue
  544. from dkic_b.t_mac_rec_pay as t
  545. left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.object_id
  546. left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
  547. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  548. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  549. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  550. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  551. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id
  552. where t.rp_id = #{id}::uuid
  553. </select>
  554. <!-- 根据主键锁定表t_mac_rec_pay的一行数据 -->
  555. <select id="selectByIdForUpdate" resultMap="BaseResultMap">
  556. SELECT
  557. <include refid="Base_Column_List"/>
  558. FROM dkic_b.t_mac_rec_pay
  559. WHERE flg_valid
  560. and rp_id = #{id}::uuid
  561. for update
  562. </select>
  563. <!-- 根据主键锁定表t_mac_rec_pay的一行数据 -->
  564. <select id="selectByBiznisIdForUpdate" resultMap="BaseResultMap">
  565. SELECT
  566. <include refid="Base_Column_List"/>
  567. FROM dkic_b.t_mac_rec_pay
  568. WHERE flg_valid
  569. and biznis_id = #{id}::uuid
  570. and flg_order_handle = #{flgOrderHandle}
  571. for update
  572. </select>
  573. <!-- 根据主键锁定表t_mac_rec_pay的一行数据 -->
  574. <select id="selectByBiznisId" resultMap="BaseResultMap">
  575. SELECT
  576. <include refid="Base_Column_List"/>
  577. FROM dkic_b.t_mac_rec_pay
  578. WHERE flg_valid
  579. and biznis_id = #{id}::uuid
  580. </select>
  581. <!-- 根据主键锁定表t_mac_rec_pay的多行数据 -->
  582. <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
  583. SELECT
  584. <include refid="Base_Column_List"/>
  585. FROM dkic_b.t_mac_rec_pay
  586. <include refid="idsForeach"/>
  587. for update
  588. </select>
  589. <insert id="insertBatch">
  590. insert into dkic_b.t_mac_rec_pay
  591. (
  592. <trim suffixOverrides=",">
  593. rp_no,
  594. rp_type,
  595. object_id,
  596. org_id,
  597. staff_id,
  598. sum_amt_rec,
  599. sum_amt_pay,
  600. sum_should_handle,
  601. sum_use_receipt_residue,
  602. sum_use_payment_residue,
  603. sum_amt_receivable_handle,
  604. sum_amt_payable_handle,
  605. sum_waive_amt,
  606. acc_date,
  607. remarks,
  608. annex_paths,
  609. biznis_type,
  610. biznis_id,
  611. biznis_no,
  612. flg_order_handle,
  613. flg_lock,
  614. make_staff,
  615. make_time,
  616. cp_id,
  617. op_app_code,
  618. </trim>
  619. )
  620. values
  621. <foreach collection="list" index="index" item="item" separator=",">
  622. (
  623. <trim suffixOverrides=",">
  624. #{item.rpNo},
  625. #{item.rpType},
  626. #{item.objectId}::uuid,
  627. #{item.orgId}::uuid,
  628. #{item.staffId}::uuid,
  629. #{item.sumAmtRec},
  630. #{item.sumAmtPay},
  631. #{item.sumShouldHandle},
  632. #{item.sumUseReceiptResidue},
  633. #{item.sumUsePaymentResidue},
  634. #{item.sumAmtReceivableHandle},
  635. #{item.sumAmtPayableHandle},
  636. #{item.sumWaiveAmt},
  637. #{item.accDate},
  638. #{item.remarks},
  639. #{item.annexPaths},
  640. #{item.biznisType},
  641. #{item.biznisId}::uuid,
  642. #{item.biznisNo},
  643. #{item.flgOrderHandle},
  644. #{item.flgLock},
  645. #{item.makeStaff}::uuid,
  646. #{item.makeTime},
  647. #{item.cpId},
  648. #{item.opAppCode},
  649. </trim>
  650. )
  651. </foreach>
  652. </insert>
  653. <!-- 查询表t_mac_rec_pay,(条件查询+分页)列表 -->
  654. <select id="selectPaymentByCond" resultMap="BaseResultMapResponse">
  655. select t.rp_id,
  656. t.rp_no,
  657. t.rp_type,
  658. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  659. t.object_id,
  660. tmp.sup_code as "supCode",
  661. tmp.sup_name as "supName",
  662. t.org_id,
  663. tmo.org_name as "orgName",
  664. t.staff_id,
  665. tms.staff_name as "staffName",
  666. t.sum_amt_rec,
  667. t.sum_amt_pay,
  668. t.sum_should_handle,
  669. t.sum_use_receipt_residue,
  670. t.sum_use_payment_residue,
  671. t.sum_amt_receivable_handle,
  672. t.sum_amt_payable_handle,
  673. t.sum_waive_amt,
  674. t.acc_date,
  675. t.remarks,
  676. t.annex_paths,
  677. t.biznis_type,
  678. t.biznis_id,
  679. t.biznis_no,
  680. t.flg_order_handle,
  681. t.flg_lock,
  682. t.make_staff,
  683. makestaff.staff_name as "makeStaffName",
  684. t.make_time,
  685. t.flg_valid,
  686. t.cp_id,
  687. tma.payable_residue,
  688. tma.payment_residue
  689. from dkic_b.t_mac_rec_pay as t
  690. Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.object_id
  691. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  692. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  693. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  694. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  695. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id and tma.object_type in ('对象类型-供应商')
  696. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  697. <include refid="Condition"/>
  698. <if test="searchText !=null and searchText != ''">
  699. AND (
  700. t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  701. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  702. or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  703. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  704. )
  705. </if>
  706. order by t.op_create_time desc
  707. <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
  708. limit #{end} offset #{start}
  709. </if>
  710. </select>
  711. <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
  712. <select id="countPaymentByCond" resultType="Long">
  713. SELECT count(1)
  714. from dkic_b.t_mac_rec_pay as t
  715. Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.object_id
  716. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  717. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  718. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  719. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  720. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  721. <include refid="Condition"/>
  722. <if test="searchText !=null and searchText != ''">
  723. AND (
  724. t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  725. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  726. or tmp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  727. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  728. )
  729. </if>
  730. </select>
  731. <!-- 删除收款单 -->
  732. <delete id="deleteById">
  733. DELETE FROM dkic_b.t_mac_rec_pay
  734. WHERE rp_id = #{id}::uuid;
  735. </delete>
  736. <!-- 查询表t_mac_rec_pay,(条件查询+分页)列表 -->
  737. <select id="getRpSupList" resultMap="BaseResultMapResponse">
  738. select t.rp_id,
  739. t.rp_no,
  740. t.rp_type,
  741. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  742. t.object_id,
  743. tmsp.sup_id,
  744. tmsp.sup_code,
  745. tmsp.sup_name,
  746. tmsp.sup_type,
  747. tmsp.contact_name,
  748. tmsp.contact_phone,
  749. tmsp.return_address,
  750. t.org_id,
  751. tmo.org_name as "orgName",
  752. t.staff_id,
  753. tms.staff_name as "staffName",
  754. t.sum_amt_rec,
  755. t.sum_amt_pay,
  756. t.sum_should_handle,
  757. t.sum_use_receipt_residue,
  758. t.sum_use_payment_residue,
  759. t.sum_amt_receivable_handle,
  760. t.sum_amt_payable_handle,
  761. t.sum_waive_amt,
  762. t.acc_date,
  763. t.remarks,
  764. t.annex_paths,
  765. t.biznis_type,
  766. t.biznis_id,
  767. t.biznis_no,
  768. t.flg_order_handle,
  769. t.flg_lock,
  770. t.make_staff,
  771. makestaff.staff_name as "makeStaffName",
  772. t.make_time,
  773. t.flg_valid,
  774. t.cp_id,
  775. tma.receivable_residue,
  776. tma.receipt_residue
  777. from dkic_b.t_mac_rec_pay as t
  778. left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
  779. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  780. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  781. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  782. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  783. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id and tma.object_type in ('对象类型-供应商')
  784. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  785. <include refid="Condition_sup"/>
  786. <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
  787. AND t.flg_valid = true
  788. </if>
  789. <if test="searchText !=null and searchText != ''">
  790. AND ( tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  791. or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  792. or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  793. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  794. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  795. or t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  796. )
  797. </if>
  798. order by t.op_create_time desc
  799. <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
  800. limit #{end} offset #{start}
  801. </if>
  802. </select>
  803. <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
  804. <select id="getRpSupListCount" resultType="Long">
  805. SELECT count(1)
  806. from dkic_b.t_mac_rec_pay as t
  807. left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
  808. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  809. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  810. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  811. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  812. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  813. <include refid="Condition_sup"/>
  814. <if test="searchText !=null and searchText != ''">
  815. AND ( tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  816. or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  817. or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  818. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  819. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  820. )
  821. </if>
  822. </select>
  823. <select id="getRpSupListDetail" resultMap="BaseResultMapResponse">
  824. select t.rp_id,
  825. t.rp_no,
  826. t.rp_type,
  827. sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
  828. t.object_id,
  829. tmsp.sup_id,
  830. tmsp.sup_code,
  831. tmsp.sup_name,
  832. tmsp.sup_type,
  833. tmsp.contact_name,
  834. tmsp.contact_phone,
  835. tmsp.return_address,
  836. t.org_id,
  837. tmo.org_name as "orgName",
  838. t.staff_id,
  839. tms.staff_name as "staffName",
  840. t.sum_amt_rec,
  841. t.sum_amt_pay,
  842. t.sum_should_handle,
  843. t.sum_use_receipt_residue,
  844. t.sum_use_payment_residue,
  845. t.sum_amt_receivable_handle,
  846. t.sum_amt_payable_handle,
  847. t.sum_waive_amt,
  848. t.acc_date,
  849. t.remarks,
  850. t.annex_paths,
  851. t.biznis_type,
  852. t.biznis_id,
  853. t.biznis_no,
  854. t.flg_order_handle,
  855. t.flg_lock,
  856. t.make_staff,
  857. makestaff.staff_name as "makeStaffName",
  858. t.make_time,
  859. t.flg_valid,
  860. t.cp_id,
  861. tma.receivable_residue,
  862. tma.receipt_residue,
  863. rpi.amt_pay,
  864. concat (tmma.mac_name ) AS "macNames"
  865. from dkic_b.t_mac_rec_pay as t
  866. left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
  867. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  868. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  869. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  870. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  871. LEFT JOIN dkic_b.t_mac_account tma on tma.object_id = t.object_id and tma.object_type in ('对象类型-供应商')
  872. left join dkic_b.t_mac_rec_pay_item rpi on rpi.rp_id = t.rp_id
  873. left join dkic_b.t_mst_money_account tmma on tmma.mac_id = rpi.mac_id
  874. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  875. <include refid="Condition_sup"/>
  876. <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
  877. AND t.flg_valid = true
  878. </if>
  879. <if test="searchText !=null and searchText != ''">
  880. AND ( tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  881. or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  882. or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  883. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  884. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  885. or t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  886. )
  887. </if>
  888. order by t.op_create_time desc
  889. <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
  890. limit #{end} offset #{start}
  891. </if>
  892. </select>
  893. <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
  894. <select id="getRpSupListCountDetail" resultType="Long">
  895. SELECT count(1)
  896. from dkic_b.t_mac_rec_pay as t
  897. left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
  898. left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
  899. left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
  900. left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
  901. left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
  902. where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
  903. <include refid="Condition_sup"/>
  904. <if test="searchText !=null and searchText != ''">
  905. AND ( tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  906. or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  907. or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  908. or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  909. or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
  910. )
  911. </if>
  912. </select>
  913. <!--根据条件查询-->
  914. <select id="selectMessageByOtherCondition" resultMap="BaseResultMapResponse">
  915. select t.rp_id
  916. from dkic_b.t_mac_rec_pay as t
  917. where t.biznis_id = #{biznisId}::uuid
  918. </select>
  919. </mapper>