ApplyMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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.cool.bang.modules.oracle.mapper.ApplyMapper">
  4. <!-- 查询监管开户业务信息 -->
  5. <select id="selectJgkh" resultType="com.cool.bang.modules.oracle.domain.po.Jgyw">
  6. select
  7. t1.appbh as ywbh,t2.accountno,t3.qybh,t3.xmbh,t1.jbr as lxr,t1.lxdh,t1.spjssj as spsj,t1.sqsj
  8. from
  9. apply t1
  10. left join
  11. account t2 on t1.appid = t2.appid and t2.state = 1 and t2.accountno is not null
  12. left join
  13. areg t3 on t1.aregid = t3.aregid
  14. where
  15. t1.apptype = 0 and t1.flownodename = '开户申请审批通过'
  16. </select>
  17. <!-- 查询监管解除业务信息 -->
  18. <select id="selectJgjc" resultType="com.cool.bang.modules.oracle.domain.po.Jgyw">
  19. select
  20. t1.appbh as ywbh,t2.accountno,t3.qybh,t3.xmbh,t1.jbr as lxr,t1.lxdh,t1.spjssj as spsj,t1.sqsj
  21. from
  22. apply t1
  23. left join
  24. account t2 on t1.aregid = t2.aregid and t2.jgstate = -1 and t2.accountno is not null
  25. left join
  26. areg t3 on t1.aregid = t3.aregid and t3.state= 1 and t3.jgstate = -1
  27. where
  28. t1.apptype = 4 and t1.state = 1 and t1.flowstate = 0
  29. </select>
  30. <!-- 监管项目解除业务数据 -->
  31. <resultMap id="JgxmjcMap" type="com.cool.bang.modules.oracle.domain.po.Jgxmjc">
  32. <result property="ywbh" column="ywbh" jdbcType="VARCHAR"/>
  33. <result property="qybh" column="qybh" jdbcType="INTEGER"/>
  34. <result property="xmbh" column="xmbh" jdbcType="VARCHAR"/>
  35. <result property="lxr" column="lxr" jdbcType="VARCHAR"/>
  36. <result property="lxdh" column="lxdh" jdbcType="VARCHAR"/>
  37. <result property="jglx" column="jglx" jdbcType="INTEGER"/>
  38. <result property="aregid" column="aregid" jdbcType="INTEGER"/>
  39. <result property="sqrq" column="sqrq" jdbcType="TIMESTAMP"/>
  40. <result property="shrq" column="shrq" jdbcType="TIMESTAMP"/>
  41. <collection property="sFlowList" ofType="com.cool.bang.modules.oracle.domain.po.SFlow" >
  42. <result property="lcmc" column="lcmc" jdbcType="VARCHAR"/>
  43. <result property="shsj" column="shsj" jdbcType="TIMESTAMP"/>
  44. <result property="shr" column="shr" jdbcType="VARCHAR"/>
  45. <result property="bz" column="bz" jdbcType="VARCHAR"/>
  46. <result property="shzt" column="shzt" jdbcType="INTEGER"/>
  47. </collection>
  48. <collection property="aregItemList" ofType="com.cool.bang.modules.oracle.domain.AregItem" >
  49. <result property="lzbh" column="lzbh" jdbcType="VARCHAR"/>
  50. <result property="lzmc" column="lzmc" jdbcType="VARCHAR"/>
  51. </collection>
  52. <collection property="accountList" ofType="com.cool.bang.modules.mysql.domain.Account" >
  53. <result property="account" column="accountno" jdbcType="VARCHAR"/>
  54. </collection>
  55. </resultMap>
  56. <select id="selectJgxmjc" resultMap="JgxmjcMap">
  57. select
  58. t1.appbh as ywbh,t2.qybh,t2.xmbh,t1.jbr as lxr,t1.lxdh,t2.jglx,t2.aregid,t1.sqsj as sqrq,t1.spjssj as shrq,
  59. t3.flownodename as lcmc,t3.operatedate as lcshsj,t3.operator as shr,t3.remark as bz,t3.state as shzt,
  60. t4.accountno,t5.lzbh,t5.lzmc
  61. from
  62. apply t1
  63. left join
  64. areg t2 on t1.aregid = t2.aregid
  65. left join
  66. sflowlog t3 on t3.infoid = t1.appid and t3.flowid = 3
  67. left join
  68. account t4 on t1.aregid = t4.aregid and t4.accountno is not null
  69. left join
  70. aregitem t5 on t1.aregid = t5.aregid and t5.jiechuappid is null
  71. where t1.apptype = 4 and t1.state = 1 and t1.flowstate = 0
  72. </select>
  73. <select id="selectByXmbhFromAreg" resultType="com.cool.bang.modules.oracle.domain.Areg">
  74. select jgstate from areg where xmbh = #{xmbh} group by jgstate
  75. </select>
  76. <!-- 监管转托管业务数据 -->
  77. <resultMap id="JgztgMap" type="com.cool.bang.modules.oracle.domain.po.Jgztg">
  78. <result property="ywbh" column="ywbh" jdbcType="VARCHAR"/>
  79. <result property="jgzh" column="jgzh" jdbcType="VARCHAR"/>
  80. <result property="qybh" column="qybh" jdbcType="INTEGER"/>
  81. <result property="xmbh" column="xmbh" jdbcType="VARCHAR"/>
  82. <result property="lxr" column="lxr" jdbcType="VARCHAR"/>
  83. <result property="lxdh" column="lxdh" jdbcType="VARCHAR"/>
  84. <result property="tgzh" column="tgzh" jdbcType="VARCHAR"/>
  85. <result property="xmzrje" column="xmzrje" jdbcType="DECIMAL"/>
  86. <result property="bfzt" column="bfzt" jdbcType="INTEGER"/>
  87. <result property="payuse" column="payuse" jdbcType="INTEGER"/>
  88. <result property="paycode" column="paycode" jdbcType="INTEGER"/>
  89. <result property="sqrq" column="sqrq" jdbcType="TIMESTAMP"/>
  90. <result property="shrq" column="shrq" jdbcType="TIMESTAMP"/>
  91. <collection property="jgztgmxList" ofType="com.cool.bang.modules.oracle.domain.po.Jgztgmx" >
  92. <result property="lzbh" column="lzbh" jdbcType="VARCHAR"/>
  93. <result property="lzye" column="lzye" jdbcType="DECIMAL"/>
  94. <result property="lcbl" column="lcbl" jdbcType="DECIMAL"/>
  95. <result property="lcje" column="lcje" jdbcType="DECIMAL"/>
  96. <result property="lzzrje" column="lzzrje" jdbcType="DECIMAL"/>
  97. </collection>
  98. <collection property="sFlowList" ofType="com.cool.bang.modules.oracle.domain.po.SFlow" >
  99. <result property="lcmc" column="lcmc" jdbcType="VARCHAR"/>
  100. <result property="shsj" column="shsj" jdbcType="TIMESTAMP"/>
  101. <result property="shr" column="shr" jdbcType="VARCHAR"/>
  102. <result property="bz" column="bz" jdbcType="VARCHAR"/>
  103. </collection>
  104. </resultMap>
  105. <select id="selectJgztg" resultMap="JgztgMap">
  106. select
  107. t1.appbh as ywbh,t3.accountno as jgzh,t4.qybh,t4.xmbh,t1.jbr as lxr,t1.lxdh,t2.payaccountno tgzh,t1.allmoney as xmzrje,
  108. t2.payflag as bfzt,t2.payuse,t2.paycode,t1,
  109. t6.lzbh,t5.lzye,t5.lcbl,t5.lcje,t5.money as lzzrje,
  110. t7.flownodename as lcmc,t7.operatedate as shsj,t7.operator as shr,t7.remark as bz
  111. from
  112. apply t1
  113. left join
  114. payitem t2 on t1.appid = t2.appid
  115. left join
  116. account t3 on t2.accountid = t3.accountid
  117. left join
  118. areg t4 on t4.aregid = t2.regid
  119. left join
  120. payitemlz t5 on t2.payitemid = t5.payitemid
  121. left join
  122. aregitem t6 on t5.aregitemid = t6.aregitemid
  123. left join
  124. sflowlog t7 on t7.infoid = t1.appid and t7.flowid = 16
  125. where
  126. t1.apptype = 16
  127. order by
  128. t1.appid,t5.id,shsj asc
  129. </select>
  130. <!-- 查询拨付业务数据 -->
  131. <resultMap id="BfMap" type="com.cool.bang.modules.oracle.domain.po.Bfxx">
  132. <result property="ywbh" column="ywbh" jdbcType="VARCHAR"/>
  133. <result property="bfzh" column="bfzh" jdbcType="VARCHAR"/>
  134. <result property="qybh" column="qybh" jdbcType="INTEGER"/>
  135. <result property="aregid" column="aregid" jdbcType="INTEGER"/>
  136. <result property="lxr" column="lxr" jdbcType="VARCHAR"/>
  137. <result property="lxdh" column="lxdh" jdbcType="VARCHAR"/>
  138. <result property="skzh" column="skzh" jdbcType="VARCHAR"/>
  139. <result property="skhm" column="skhm" jdbcType="VARCHAR"/>
  140. <result property="skdw" column="skdw" jdbcType="VARCHAR"/>
  141. <result property="skyh" column="skyh" jdbcType="VARCHAR"/>
  142. <result property="xmsqzj" column="xmsqzj" jdbcType="DECIMAL"/>
  143. <result property="zjyt" column="zjyt" jdbcType="VARCHAR"/>
  144. <result property="sqrq" column="sqrq" jdbcType="TIMESTAMP"/>
  145. <result property="shrq" column="shrq" jdbcType="TIMESTAMP"/>
  146. <result property="bfzt1" column="bfzt1" jdbcType="INTEGER"/>
  147. <result property="bfzt2" column="bfzt2" jdbcType="INTEGER"/>
  148. <result property="gdzh" column="gdzh" jdbcType="VARCHAR"/>
  149. <result property="zgflag" column="zgflag" jdbcType="INTEGER"/>
  150. <collection property="bfmxList" ofType="com.cool.bang.modules.oracle.domain.po.Bfmx" >
  151. <result property="lzbh" column="lzbh" jdbcType="VARCHAR"/>
  152. <result property="lzye" column="lzye" jdbcType="DECIMAL"/>
  153. <result property="lcbl" column="lcbl" jdbcType="DECIMAL"/>
  154. <result property="lcje" column="lcje" jdbcType="DECIMAL"/>
  155. <result property="lzsqzj" column="lzsqzj" jdbcType="DECIMAL"/>
  156. </collection>
  157. <collection property="sFlowList" ofType="com.cool.bang.modules.oracle.domain.po.SFlow" >
  158. <result property="lcmc" column="lcmc" jdbcType="VARCHAR"/>
  159. <result property="shsj" column="lcshsj" jdbcType="TIMESTAMP"/>
  160. <result property="shr" column="shr" jdbcType="VARCHAR"/>
  161. <result property="bz" column="bz" jdbcType="VARCHAR"/>
  162. <result property="shzt" column="shzt" jdbcType="INTEGER"/>
  163. </collection>
  164. </resultMap>
  165. <select id="selectBfxx" resultMap="BfMap">
  166. select
  167. t1.appbh as ywbh,t3.accountno as bfzh,t4.qybh,t4.aregid,t1.jbr as lxr,t1.lxdh,t2.payaccountno as skzh,
  168. t2.payaccountname as skhm,t2.payee skdw,t2.payeebankname as skyh,t2.money as xmsqzj,t2.payuse as zjyt,
  169. t1.zgflag,t8.accountno as gdzh,t1.sqsj as sqrq,t1.spjssj as shsj,t2.payflag as bfzt1,t2.zt as bfzt2,
  170. t6.lzbh,t5.lzye,t5.lcbl,t5.lcje,t5.money as lzsqzj,
  171. t7.flownodename as lcmc,t7.operatedate as lcshsj,t7.operator as shr,t7.remark as bz,t7.state as shzt
  172. from
  173. apply t1
  174. left join
  175. payitem t2 on t1.appid = t2.appid and t2.state = 1
  176. left join
  177. account t3 on t2.accountid = t3.accountid
  178. left join
  179. areg t4 on t1.aregid = t4.aregid
  180. left join
  181. payitemlz t5 on t2.payitemid = t5.payitemid
  182. left join
  183. aregitem t6 on t5.aregitemid = t6.aregitemid
  184. left join
  185. sflowlog t7 on t7.infoid = t1.appid <if test="flowid != null"> and t7.flowid = #{flowid}</if>
  186. left join
  187. account t8 on t2.gdaccountid = t8.accountid
  188. where t1.state = 1 and t1.flowstate = 0 <!-- 只查询审核通过的信息 -->
  189. <if test="apptype != null"> and t1.apptype = #{apptype}</if>
  190. </select>
  191. </mapper>