TWhgenlegMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.reportManagement.mapper.TWhgenlegMapper">
  6. <resultMap type="TWhgenleg" id="TWhgenlegResult">
  7. <result property="fAccyear" column="f_accyear"/>
  8. <result property="fId" column="f_id"/>
  9. <result property="fAccmonth" column="f_accmonth"/>
  10. <result property="fCorpid" column="f_corpid"/>
  11. <result property="fMblno" column="f_mblno"/>
  12. <result property="fOriginalbillno" column="f_originalbillno"/>
  13. <result property="fWarehouseLocationid" column="f_warehouse_locationid"/>
  14. <result property="fGoodsid" column="f_goodsid"/>
  15. <result property="fTrademodeid" column="f_trademodeid"/>
  16. <result property="fPreqty" column="f_preqty"/>
  17. <result property="fWarehouseid" column="f_warehouseid"/>
  18. <result property="fPregrossweight" column="f_pregrossweight"/>
  19. <result property="fPrenetweight" column="f_prenetweight"/>
  20. <result property="fQtyd" column="f_qtyD"/>
  21. <result property="fVolumnd" column="f_volumnD"/>
  22. <result property="fGrossweightd" column="f_grossweightD"/>
  23. <result property="fNetweightd" column="f_netweightD"/>
  24. <result property="fVolumnc" column="f_volumnC"/>
  25. <result property="fQtyc" column="f_qtyC"/>
  26. <result property="fQtyblc" column="f_qtyblc"/>
  27. <result property="fGrossweightc" column="f_grossweightC"/>
  28. <result property="fNetweightc" column="f_netweightC"/>
  29. <result property="fGrossweightblc" column="f_grossweightblc"/>
  30. <result property="fNetweightblc" column="f_netweightblc"/>
  31. <result property="fCntrno" column="f_cntrno"/>
  32. <result property="fMarks" column="f_marks"/>
  33. <result property="fStatus" column="f_status"/>
  34. <result property="delFlag" column="del_flag"/>
  35. <result property="createBy" column="create_by"/>
  36. <result property="createTime" column="create_time"/>
  37. <result property="updateBy" column="update_by"/>
  38. <result property="updateTime" column="update_time"/>
  39. <result property="fOriginalbilldate" column="f_originalbilldate"/>
  40. <result property="remark" column="remark"/>
  41. </resultMap>
  42. <sql id="selectTWhgenlegVo">
  43. select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_originalbilldate, f_warehouseid, f_originalbillno, f_marks, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty, f_pregrossweight, f_prenetweight, f_qtyD, f_volumnD, f_grossweightD, f_netweightD, f_volumnC, f_qtyC, f_qtyblc, f_grossweightC, f_netweightC, f_grossweightblc, f_netweightblc, f_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_whgenleg
  44. </sql>
  45. <select id="selectTWhgenlegList" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
  46. <include refid="selectTWhgenlegVo"/>
  47. <where>
  48. <if test="fOriginalbillno != null and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
  49. <if test="fPreqty != null ">and f_preqty = #{fPreqty}</if>
  50. <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
  51. <if test="fMblno != null ">and f_mblno = #{fMblno}</if>
  52. <if test="fPregrossweight != null ">and f_pregrossweight = #{fPregrossweight}</if>
  53. <if test="fPrenetweight != null ">and f_prenetweight = #{fPrenetweight}</if>
  54. <if test="fQtyd != null ">and f_qtyD = #{fQtyd}</if>
  55. <if test="fVolumnd != null ">and f_volumnD = #{fVolumnd}</if>
  56. <if test="fWarehouseid != null ">and f_warehouseid = #{fWarehouseid}</if>
  57. <if test="fGrossweightd != null ">and f_grossweightD = #{fGrossweightd}</if>
  58. <if test="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
  59. <if test="fNetweightd != null ">and f_netweightD = #{fNetweightd}</if>
  60. <if test="fVolumnc != null ">and f_volumnC = #{fVolumnc}</if>
  61. <if test="fQtyc != null ">and f_qtyC = #{fQtyc}</if>
  62. <if test="fMarks != null and fMarks != ''">and f_marks = #{fMarks}</if>
  63. <if test="fQtyblc != null ">and f_qtyblc = #{fQtyblc}</if>
  64. <if test="fGrossweightc != null ">and f_grossweightC = #{fGrossweightc}</if>
  65. <if test="fNetweightc != null ">and f_netweightC = #{fNetweightc}</if>
  66. <if test="fGrossweightblc != null ">and f_grossweightblc = #{fGrossweightblc}</if>
  67. <if test="fNetweightblc != null ">and f_netweightblc = #{fNetweightblc}</if>
  68. <if test="fCntrno != null and fCntrno != ''">and f_cntrno = #{fCntrno}</if>
  69. <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
  70. </where>
  71. </select>
  72. <select id="selectInventoryList" parameterType="TWhgenleg" resultType="Map">
  73. select
  74. leg.f_id AS fId,
  75. corp.f_name AS fCorpid,
  76. area.f_name AS fWarehouseLocationids,
  77. leg.f_originalbillno AS fOriginalbillno,
  78. leg.f_warehouse_locationid AS fWarehouseLocationid,
  79. leg.f_trademodeid AS fTrademodeid,
  80. goods.f_name AS fGoodsids,
  81. leg.f_goodsid AS fGoodsid,
  82. leg.f_volumnD AS fVolumnD,
  83. leg.f_qtyD AS fQtyD,
  84. leg.f_mblno AS fMblno,
  85. leg.f_grossweightD AS fGrossweightD,
  86. leg.f_netweightD AS fNetweightD,
  87. leg.f_volumnC AS fVolumnC,
  88. leg.f_qtyC AS fQtyC,
  89. leg.f_grossweightC AS fGrossweightC,
  90. leg.f_netweightC AS fNetweightC,
  91. leg.f_qtyblc AS fQtyblc,
  92. leg.f_grossweightblc AS fGrossweightblc,
  93. leg.f_netweightblc AS fNetweightblc,
  94. leg.f_marks AS fMarks,
  95. DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
  96. DATE_FORMAT( leg.f_originalbilldate, '%Y-%m-%d' ) AS fOriginalbilldate,
  97. leg.f_cntrno AS fCntrno
  98. FROM
  99. t_whgenleg leg
  100. LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
  101. LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
  102. LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
  103. <where>
  104. <if test="fOriginalbillno != null and fOriginalbillno != ''">and leg.f_originalbillno =
  105. #{fOriginalbillno}
  106. </if>
  107. <if test="fPreqty != null ">and leg.f_preqty = #{fPreqty}</if>
  108. <if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
  109. <if test="fMblno != null ">and leg.f_mblno = #{fMblno}</if>
  110. <if test='orgStorageDate != null and orgStorageDate[0] != null and orgStorageDate[0]!= ""'>
  111. and leg.f_originalbilldate &gt;= #{orgStorageDate[0]}
  112. </if>
  113. <if test='orgStorageDate != null and orgStorageDate[1] != null and orgStorageDate[1]!= ""'>
  114. and leg.f_originalbilldate &lt;= #{orgStorageDate[1]}
  115. </if>
  116. <if test="fPregrossweight != null ">and leg.f_pregrossweight = #{fPregrossweight}</if>
  117. <if test="fPrenetweight != null ">and leg.f_prenetweight = #{fPrenetweight}</if>
  118. <if test="fQtyd != null ">and leg.f_qtyD = #{fQtyd}</if>
  119. <if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
  120. <if test="fWarehouseid != null ">and leg.f_warehouseid = #{fWarehouseid}</if>
  121. <if test="fVolumnd != null ">and leg.f_volumnD = #{fVolumnd}</if>
  122. <if test="fGrossweightd != null ">and leg.f_grossweightD = #{fGrossweightd}</if>
  123. <if test="fNetweightd != null ">and leg.f_netweightD = #{fNetweightd}</if>
  124. <if test="fVolumnc != null ">and leg.f_volumnC = #{fVolumnc}</if>
  125. <if test="fQtyc != null ">and leg.f_qtyC = #{fQtyc}</if>
  126. <if test="fOriginalbilldate != null ">and leg.f_originalbilldate = #{fOriginalbilldate}</if>
  127. <if test="fMarks != null and fMarks != ''">and leg.f_marks = #{fMarks}</if>
  128. <if test="fQtyblc != null ">and leg.f_qtyblc = #{fQtyblc}</if>
  129. <if test="fGrossweightc != null ">and leg.f_grossweightC = #{fGrossweightc}</if>
  130. <if test="fNetweightc != null ">and leg.f_netweightC = #{fNetweightc}</if>
  131. <if test="fGrossweightblc != null ">and leg.f_grossweightblc = #{fGrossweightblc}</if>
  132. <if test="fNetweightblc != null ">and leg.f_netweightblc = #{fNetweightblc}</if>
  133. <if test="fCntrno != null and fCntrno != ''">and leg.f_cntrno = #{fCntrno}</if>
  134. <if test="fStatus != null and fStatus != ''">and leg.f_status = #{fStatus}</if>
  135. </where>
  136. </select>
  137. <select id="selectTWhgenleg" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
  138. <include refid="selectTWhgenlegVo"/>
  139. <where>
  140. <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
  141. <if test="fMblno != null ">and f_mblno = #{fMblno}</if>
  142. <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
  143. <if test="fTrademodeid != null ">and f_trademodeid = #{fTrademodeid}</if>
  144. <if test="fWarehouseLocationid != null ">and f_warehouse_locationid = #{fWarehouseLocationid}</if>
  145. </where>
  146. </select>
  147. <select id="selectTWhgenlegById" parameterType="Long" resultMap="TWhgenlegResult">
  148. <include refid="selectTWhgenlegVo"/>
  149. where f_accyear = #{fAccyear}
  150. </select>
  151. <insert id="insertTWhgenleg" parameterType="TWhgenleg">
  152. insert into t_whgenleg
  153. <trim prefix="(" suffix=")" suffixOverrides=",">
  154. <if test="fAccyear != null">f_accyear,</if>
  155. <if test="fId != null">f_id,</if>
  156. <if test="fAccmonth != null">f_accmonth,</if>
  157. <if test="fCorpid != null">f_corpid,</if>
  158. <if test="fMblno != null">f_mblno,</if>
  159. <if test="fOriginalbillno != null">f_originalbillno,</if>
  160. <if test="fWarehouseLocationid != null">f_warehouse_locationid,</if>
  161. <if test="fGoodsid != null">f_goodsid,</if>
  162. <if test="fTrademodeid != null">f_trademodeid,</if>
  163. <if test="fPreqty != null">f_preqty,</if>
  164. <if test="fWarehouseid != null">f_warehouseid,</if>
  165. <if test="fPregrossweight != null">f_pregrossweight,</if>
  166. <if test="fPrenetweight != null">f_prenetweight,</if>
  167. <if test="fQtyd != null">f_qtyD,</if>
  168. <if test="fVolumnd != null">f_volumnD,</if>
  169. <if test="fGrossweightd != null">f_grossweightD,</if>
  170. <if test="fNetweightd != null">f_netweightD,</if>
  171. <if test="fVolumnc != null">f_volumnC,</if>
  172. <if test="fQtyc != null">f_qtyC,</if>
  173. <if test="fGrossweightc != null">f_grossweightC,</if>
  174. <if test="fQtyblc != null">f_qtyblc,</if>
  175. <if test="fNetweightc != null">f_netweightC,</if>
  176. <if test="fGrossweightblc != null">f_grossweightblc,</if>
  177. <if test="fNetweightblc != null">f_netweightblc,</if>
  178. <if test="fCntrno != null">f_cntrno,</if>
  179. <if test="fStatus != null">f_status,</if>
  180. <if test="delFlag != null">del_flag,</if>
  181. <if test="createBy != null">create_by,</if>
  182. <if test="fMarks != null and fMarks != ''">f_marks,</if>
  183. <if test="createTime != null">create_time,</if>
  184. <if test="updateBy != null">update_by,</if>
  185. <if test="updateTime != null">update_time,</if>
  186. <if test="remark != null">remark,</if>
  187. <if test="fOriginalbilldate != null">f_originalbilldate,</if>
  188. </trim>
  189. <trim prefix="values (" suffix=")" suffixOverrides=",">
  190. <if test="fAccyear != null">#{fAccyear},</if>
  191. <if test="fId != null">#{fId},</if>
  192. <if test="fAccmonth != null">#{fAccmonth},</if>
  193. <if test="fCorpid != null">#{fCorpid},</if>
  194. <if test="fMblno != null">#{fMblno},</if>
  195. <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
  196. <if test="fWarehouseLocationid != null">#{fWarehouseLocationid},</if>
  197. <if test="fGoodsid != null">#{fGoodsid},</if>
  198. <if test="fTrademodeid != null">#{fTrademodeid},</if>
  199. <if test="fPreqty != null">#{fPreqty},</if>
  200. <if test="fWarehouseid != null">#{fWarehouseid},</if>
  201. <if test="fPregrossweight != null">#{fPregrossweight},</if>
  202. <if test="fPrenetweight != null">#{fPrenetweight},</if>
  203. <if test="fQtyd != null">#{fQtyd},</if>
  204. <if test="fVolumnd != null">#{fVolumnd},</if>
  205. <if test="fGrossweightd != null">#{fGrossweightd},</if>
  206. <if test="fNetweightd != null">#{fNetweightd},</if>
  207. <if test="fVolumnc != null">#{fVolumnc},</if>
  208. <if test="fQtyc != null">#{fQtyc},</if>
  209. <if test="fGrossweightc != null">#{fGrossweightc},</if>
  210. <if test="fQtyblc != null">#{fQtyblc},</if>
  211. <if test="fNetweightc != null">#{fNetweightc},</if>
  212. <if test="fGrossweightblc != null">#{fGrossweightblc},</if>
  213. <if test="fNetweightblc != null">#{fNetweightblc},</if>
  214. <if test="fCntrno != null">#{fCntrno},</if>
  215. <if test="fStatus != null">#{fStatus},</if>
  216. <if test="delFlag != null">#{delFlag},</if>
  217. <if test="createBy != null">#{createBy},</if>
  218. <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
  219. <if test="createTime != null">#{createTime},</if>
  220. <if test="updateBy != null">#{updateBy},</if>
  221. <if test="updateTime != null">#{updateTime},</if>
  222. <if test="remark != null">#{remark},</if>
  223. <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
  224. </trim>
  225. </insert>
  226. <update id="updateTWhgenleg" parameterType="TWhgenleg">
  227. update t_whgenleg
  228. <trim prefix="SET" suffixOverrides=",">
  229. <if test="fId != null">f_id = #{fId},</if>
  230. <if test="fAccmonth != null">f_accmonth = #{fAccmonth},</if>
  231. <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
  232. <if test="fMblno != null">f_mblno = #{fMblno},</if>
  233. <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
  234. <if test="fWarehouseLocationid != null">f_warehouse_locationid = #{fWarehouseLocationid},</if>
  235. <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
  236. <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
  237. <if test="fPreqty != null">f_preqty = #{fPreqty},</if>
  238. <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
  239. <if test="fPregrossweight != null">f_pregrossweight = #{fPregrossweight},</if>
  240. <if test="fPrenetweight != null">f_prenetweight = #{fPrenetweight},</if>
  241. <if test="fQtyd != null">f_qtyD = #{fQtyd},</if>
  242. <if test="fVolumnd != null">f_volumnD = #{fVolumnd},</if>
  243. <if test="fGrossweightd != null">f_grossweightD = #{fGrossweightd},</if>
  244. <if test="fNetweightd != null">f_netweightD = #{fNetweightd},</if>
  245. <if test="fVolumnc != null">f_volumnC = #{fVolumnc},</if>
  246. <if test="fQtyc != null">f_qtyC = #{fQtyc},</if>
  247. <if test="fGrossweightc != null">f_grossweightC = #{fGrossweightc},</if>
  248. <if test="fQtyblc != null">f_qtyblc = #{fQtyblc},</if>
  249. <if test="fNetweightc != null">f_netweightC = #{fNetweightc},</if>
  250. <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</if>
  251. <if test="fNetweightblc != null">f_netweightblc = #{fNetweightblc},</if>
  252. <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
  253. <if test="fStatus != null">f_status = #{fStatus},</if>
  254. <if test="delFlag != null">del_flag = #{delFlag},</if>
  255. <if test="createBy != null">create_by = #{createBy},</if>
  256. <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
  257. <if test="createTime != null">create_time = #{createTime},</if>
  258. <if test="updateBy != null">update_by = #{updateBy},</if>
  259. <if test="updateTime != null">update_time = #{updateTime},</if>
  260. <if test="remark != null">remark = #{remark},</if>
  261. <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
  262. </trim>
  263. where f_accyear = #{fAccyear}
  264. </update>
  265. <update id="updateTWhgenlegData" parameterType="Map">
  266. update t_whgenleg
  267. <trim prefix="SET" suffixOverrides=",">
  268. /*判断是否入库*/
  269. <if test="map.billType == 'SJRK'">
  270. f_qtyD = f_qtyD + #{map.warehousebillsitems.fQty},
  271. f_volumnD = f_volumnD + #{map.warehousebillsitems.fVolumn},
  272. f_netweightD = f_netweightD + #{map.warehousebillsitems.fNetweight},
  273. f_grossweightD = f_grossweightD + #{map.warehousebillsitems.fGrossweight},
  274. f_qtyblc = f_qtyblc + #{map.warehousebillsitems.fQty}
  275. </if>
  276. /*判断是否撤销入库*/
  277. <if test="map.billType == 'SJRKRevoke'">
  278. f_qtyD = f_qtyD - #{map.warehousebillsitems.fQty},
  279. f_volumnD = f_volumnD - #{map.warehousebillsitems.fVolumn},
  280. f_netweightD = f_netweightD - #{map.warehousebillsitems.fNetweight},
  281. f_grossweightD = f_grossweightD - #{map.warehousebillsitems.fGrossweight},
  282. f_qtyblc = f_qtyblc - #{map.warehousebillsitems.fQty}
  283. </if>
  284. /*判断是否出库*/
  285. <if test="map.billType == 'SJCK'">
  286. f_qtyC = f_qtyC + #{map.warehousebillsitems.fQty},
  287. f_volumnC = f_volumnC + #{map.warehousebillsitems.fVolumn},
  288. f_netweightC = f_netweightC + #{map.warehousebillsitems.fNetweight},
  289. f_grossweightC = f_grossweightC + #{map.warehousebillsitems.fGrossweight},
  290. f_qtyblc = f_qtyblc - #{map.warehousebillsitems.fQty}
  291. </if>
  292. /*判断是否撤销出库*/
  293. <if test="map.billType == 'SJCKRevoke'">
  294. f_qtyC = f_qtyC - #{map.warehousebillsitems.fQty},
  295. f_volumnC = f_volumnC - #{map.warehousebillsitems.fVolumn},
  296. f_netweightC = f_netweightC - #{map.warehousebillsitems.fNetweight},
  297. f_grossweightC = f_grossweightC - #{map.warehousebillsitems.fGrossweight},
  298. f_qtyblc = f_qtyblc + #{map.warehousebillsitems.fQty}
  299. </if>
  300. -- update_by = NOW()
  301. </trim>
  302. where f_id = #{map.whgenlegId}
  303. </update>
  304. <delete id="deleteTWhgenlegById" parameterType="Long">
  305. delete from t_whgenleg where f_accyear = #{fAccyear}
  306. </delete>
  307. <delete id="deleteTWhgenlegByIds" parameterType="String">
  308. delete from t_whgenleg where f_accyear in
  309. <foreach item="fAccyear" collection="array" open="(" separator="," close=")">
  310. #{fAccyear}
  311. </foreach>
  312. </delete>
  313. <select id="selectGoodsList" resultType="Map">
  314. SELECT
  315. t.f_goodsid AS fGoodsid,
  316. g.f_name AS fName,
  317. t.f_qtyblc AS fQtyblc
  318. FROM
  319. t_goods g
  320. RIGHT JOIN (
  321. SELECT
  322. f_goodsid AS f_goodsid,
  323. sum( f_qtyblc ) AS f_qtyblc
  324. FROM
  325. t_whgenleg
  326. GROUP BY
  327. f_goodsid
  328. ORDER BY
  329. f_qtyblc DESC
  330. LIMIT 5
  331. ) t ON g.f_id = t.f_goodsid
  332. </select>
  333. <select id="selectWareHouseList" resultType="Map">
  334. SELECT
  335. t.f_warehouseid AS fWarehouseid,
  336. w.f_name AS fName,
  337. t.f_qtyblc AS fQtyblc
  338. FROM
  339. t_warehouse w
  340. LEFT JOIN (
  341. SELECT
  342. f_warehouseid AS f_warehouseid,
  343. sum( f_qtyblc ) AS f_qtyblc
  344. FROM
  345. t_whgenleg
  346. GROUP BY
  347. f_warehouseid
  348. ORDER BY
  349. f_qtyblc DESC
  350. ) t ON w.f_id = t.f_warehouseid
  351. </select>
  352. <select id="selectCorpsList" resultType="Map">
  353. SELECT
  354. t.f_corpid AS fCorpid,
  355. c.f_name AS fName,
  356. t.f_qtyblc AS fQtyblc
  357. FROM
  358. t_corps c
  359. RIGHT JOIN (
  360. SELECT
  361. f_corpid AS f_corpid,
  362. sum( f_qtyblc ) AS f_qtyblc
  363. FROM
  364. t_whgenleg
  365. GROUP BY
  366. f_corpid
  367. ORDER BY
  368. f_qtyblc DESC
  369. LIMIT 7
  370. ) t ON c.f_id = t.f_corpid
  371. </select>
  372. </mapper>