TWarehousebillsitemsMapper.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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.warehouseBusiness.mapper.TWarehousebillsitemsMapper">
  6. <resultMap type="TWarehousebillsitems" id="TWarehousebillsitemsResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fPid" column="f_pid"/>
  9. <result property="fSrcid" column="f_srcid" />
  10. <result property="fLineno" column="f_lineno"/>
  11. <result property="fGoodsid" column="f_goodsid"/>
  12. <result property="fBillno" column="f_billno"/>
  13. <result property="fMblno" column="f_mblno"/>
  14. <result property="fWarehouselocid" column="f_warehouselocid"/>
  15. <result property="fOriginalbillno" column="f_originalbillno"/>
  16. <result property="fTransferWarehouselocid" column="f_transfer_warehouselocid"/>
  17. <result property="fBsdate" column="f_bsdate"/>
  18. <result property="fBoxno" column="f_boxno"/>
  19. <result property="fCntqty" column="f_cntqty"/>
  20. <result property="fGoodsval" column="f_goodsval"/>
  21. <result property="fCntrtype" column="f_cntrtype"/>
  22. <result property="fPlanqty" column="f_planqty"/>
  23. <result property="fBillingway" column="f_billingway"/>
  24. <result property="fPlanvolumn" column="f_planvolumn"/>
  25. <result property="fOriginalbilldate" column="f_originalbilldate"/>
  26. <result property="fPackagespecs" column="f_packagespecs"/>
  27. <result property="fPlangrossweight" column="f_plangrossweight"/>
  28. <result property="fChargedate" column="f_chargedate"/>
  29. <result property="fPlannetweight" column="f_plannetweight"/>
  30. <result property="fQty" column="f_qty"/>
  31. <result property="fVolumn" column="f_volumn"/>
  32. <result property="fGrossweight" column="f_grossweight"/>
  33. <result property="fStorageFeeDeadline" column="f_storage_fee_deadline"/>
  34. <result property="fNetweight" column="f_netweight"/>
  35. <result property="fCntrno" column="f_cntrno"/>
  36. <result property="fTruckno" column="f_truckno"/>
  37. <result property="fBillstatus" column="f_billstatus"/>
  38. <result property="delFlag" column="del_flag"/>
  39. <result property="createBy" column="create_by"/>
  40. <result property="createTime" column="create_time"/>
  41. <result property="updateBy" column="update_by"/>
  42. <result property="updateTime" column="update_time"/>
  43. <result property="remark" column="remark"/>
  44. <result property="fMarks" column="f_marks"/>
  45. <result property="fInventoryDays" column="f_inventory_days"/>
  46. <result property="fAmt" column="f_amt"/>
  47. <result property="fBillingDays" column="f_billing_days"/>
  48. <result property="fDriverName" column="f_driver_name"/>
  49. <result property="fDriverTel" column="f_driver_tel"/>
  50. <result property="fDriverIdCar" column="f_driver_id_car"/>
  51. <result property="fSerialNumber" column="f_serial_number"/>
  52. <result property="fIsPass" column="f_is_pass"/>
  53. <result property="fBilltype" column="f_billtype"/>
  54. <result property="fBillingQty" column="f_billing_qty"/>
  55. <result property="fBillingDeadline" column="f_billing_deadline"/>
  56. </resultMap>
  57. <sql id="selectTWarehousebillsitemsVo">
  58. select f_id, f_pid, f_srcid, f_lineno, f_billno, f_goodsid, f_warehouselocid, f_mblno, f_bsdate, f_originalbillno, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_billingway, f_transfer_warehouselocid, f_planvolumn, f_planqty, f_originalbilldate, f_plangrossweight, f_packagespecs, f_chargedate, f_plannetweight, f_qty, f_volumn, f_grossweight, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark, f_marks, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days, f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline from t_warehousebillsitems
  59. </sql>
  60. <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
  61. resultMap="TWarehousebillsitemsResult">
  62. <include refid="selectTWarehousebillsitemsVo"/>
  63. <where>
  64. <if test="fPid != null ">and f_pid = #{fPid}</if>
  65. <if test="fLineno != null ">and f_lineno = #{fLineno}</if>
  66. <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
  67. <if test="fMblno != null and fMblno != ''">and f_mblno = #{fMblno}</if>
  68. <if test="fBillno != null and fBillno != ''">and f_billno = #{fBillno}</if>
  69. <if test="fWarehouselocid != null ">and f_warehouselocid = #{fWarehouselocid}</if>
  70. <if test="fBsdate != null ">and f_bsdate = #{fBsdate}</if>
  71. <if test="fOriginalbillno != null and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
  72. <if test="fBoxno != null and fBoxno != ''">and f_boxno = #{fBoxno}</if>
  73. <if test="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
  74. <if test="fStorageFeeDeadline != null "> and f_storage_fee_deadline = #{fStorageFeeDeadline}</if>
  75. <if test="fTransferWarehouselocid != null "> and f_transfer_warehouselocid = #{fTransferWarehouselocid}</if>
  76. <if test="fCntqty != null ">and f_cntqty = #{fCntqty}</if>
  77. <if test="fGoodsval != null ">and f_goodsval = #{fGoodsval}</if>
  78. <if test="fCntrtype != null and fCntrtype != ''">and f_cntrtype = #{fCntrtype}</if>
  79. <if test="fPlanqty != null ">and f_planqty = #{fPlanqty}</if>
  80. <if test="fPlanvolumn != null ">and f_planvolumn = #{fPlanvolumn}</if>
  81. <if test="fChargedate != null ">and f_chargedate = #{fChargedate}</if>
  82. <if test="fPackagespecs != null ">and f_packagespecs = #{fPackagespecs}</if>
  83. <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
  84. <if test="fPlannetweight != null ">and f_plannetweight = #{fPlannetweight}</if>
  85. <if test="fQty != null ">and f_qty = #{fQty}</if>
  86. <if test="fVolumn != null ">and f_volumn = #{fVolumn}</if>
  87. <if test="fGrossweight != null ">and f_grossweight = #{fGrossweight}</if>
  88. <if test="fNetweight != null ">and f_netweight = #{fNetweight}</if>
  89. <if test="fCntrno != null and fCntrno != ''">and f_cntrno = #{fCntrno}</if>
  90. <if test="fTruckno != null and fTruckno != ''">and f_truckno = #{fTruckno}</if>
  91. <if test="fBillstatus != null and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
  92. <if test="fMarks != null and fMarks != ''">and f_marks = #{fMarks}</if>
  93. <if test="fInventoryDays != null ">and f_inventory_days = #{fInventoryDays}</if>
  94. <if test="fAmt != null ">and f_amt = #{fAmt}</if>
  95. <if test="fBillingDays != null ">and f_billing_days = #{fBillingDays}</if>
  96. <if test="fDriverName != null and fDriverName != ''">and f_driver_name like concat('%',
  97. #{fDriverName},'%')
  98. </if>
  99. <if test="fDriverTel != null and fDriverTel != ''">and f_driver_tel = #{fDriverTel}</if>
  100. <if test="fDriverIdCar != null and fDriverIdCar != ''">and f_driver_id_car = #{fDriverIdCar}</if>
  101. <if test="fSerialNumber != null and fSerialNumber != ''">and f_serial_number = #{fSerialNumber}</if>
  102. <if test="fIsPass != null and fIsPass != ''">and f_is_pass = #{fIsPass}</if>
  103. </where>
  104. </select>
  105. <select id="selectGoodsTransferitemsList" parameterType="TWarehousebillsitems" resultType="Map">
  106. select
  107. DISTINCT
  108. item.f_id AS fId,
  109. item.f_pid AS fPid,
  110. item.f_srcid AS fSrcid,
  111. item.f_lineno AS fLineno,
  112. item.f_billno AS fBillno,
  113. item.f_goodsid AS fGoodsid,
  114. goods.f_name AS fGoodsids,
  115. item.f_warehouselocid AS fWarehouselocid,
  116. area.f_name AS fWarehouselocids,
  117. item.f_is_pass AS fIsPass,
  118. item.f_originalbillno AS fOriginalbillno,
  119. item.f_mblno AS fMblno,
  120. item.f_bsdate AS fBsdate,
  121. item.f_boxno AS fBoxno,
  122. item.f_cntqty AS fCntqty,
  123. item.f_goodsval AS fGoodsval,
  124. item.f_cntrtype AS fCntrtype,
  125. item.f_planqty AS fPlanqty,
  126. item.f_planvolumn AS fPlanvolumn,
  127. item.f_billingway AS fBillingway,
  128. item.f_chargedate AS fChargedate,
  129. item.f_packagespecs AS fPackagespecs,
  130. item.f_plangrossweight AS fPlangrossweight,
  131. item.f_originalbilldate AS fOriginalbilldate,
  132. item.f_plannetweight AS fPlannetweight,
  133. item.f_transfer_warehouselocid AS fTransferWarehouselocid,
  134. item.f_qty AS fQty,
  135. item.f_volumn AS fVolumn,
  136. item.f_driver_name AS fDriverName,
  137. item.f_driver_tel AS fDriverTel,
  138. item.f_driver_id_car AS fDriverIdCar,
  139. item.f_serial_number AS fSerialNumber,
  140. item.f_marks AS fMarks,
  141. item.f_grossweight AS fGrossweight,
  142. item.f_netweight AS fNetweight,
  143. item.f_cntrno AS fCntrno,
  144. item.f_truckno AS fTruckno,
  145. item.f_billstatus AS fBillstatus,
  146. item.remark
  147. from
  148. t_warehousebillsitems item
  149. LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
  150. LEFT JOIN t_warehouse_area area ON area.f_id = item.f_warehouselocid
  151. <where>
  152. <if test="fPid != null ">and item.f_pid = #{fPid}</if>
  153. </where>
  154. </select>
  155. <select id="selectTWarehousebillsitemsById" parameterType="Long" resultMap="TWarehousebillsitemsResult">
  156. <include refid="selectTWarehousebillsitemsVo"/>
  157. where f_id = #{fId}
  158. </select>
  159. <insert id="insertTWarehousebillsitems" parameterType="TWarehousebillsitems" useGeneratedKeys="true"
  160. keyProperty="fId">
  161. insert into t_warehousebillsitems
  162. <trim prefix="(" suffix=")" suffixOverrides=",">
  163. <if test="fPid != null">f_pid,</if>
  164. <if test="fSrcid != null">f_srcid,</if>
  165. <if test="fLineno != null">f_lineno,</if>
  166. <if test="fBillno != null">f_billno,</if>
  167. <if test="fGoodsid != null">f_goodsid,</if>
  168. <if test="fWarehouselocid != null">f_warehouselocid,</if>
  169. <if test="fMblno != null">f_mblno,</if>
  170. <if test="fBsdate != null">f_bsdate,</if>
  171. <if test="fOriginalbillno != null">f_originalbillno,</if>
  172. <if test="fBoxno != null">f_boxno,</if>
  173. <if test="fCntqty != null">f_cntqty,</if>
  174. <if test="fGoodsval != null">f_goodsval,</if>
  175. <if test="fCntrtype != null">f_cntrtype,</if>
  176. <if test="fBillingway != null">f_billingway,</if>
  177. <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid,</if>
  178. <if test="fPlanvolumn != null">f_planvolumn,</if>
  179. <if test="fPlanqty != null">f_planqty,</if>
  180. <if test="fOriginalbilldate != null">f_originalbilldate,</if>
  181. <if test="fPlangrossweight != null">f_plangrossweight,</if>
  182. <if test="fPackagespecs != null">f_packagespecs,</if>
  183. <if test="fChargedate != null">f_chargedate,</if>
  184. <if test="fPlannetweight != null">f_plannetweight,</if>
  185. <if test="fQty != null">f_qty,</if>
  186. <if test="fVolumn != null">f_volumn,</if>
  187. <if test="fGrossweight != null">f_grossweight,</if>
  188. <if test="fNetweight != null">f_netweight,</if>
  189. <if test="fCntrno != null">f_cntrno,</if>
  190. <if test="fTruckno != null">f_truckno,</if>
  191. <if test="fBillstatus != null and fBillstatus != ''">f_billstatus,</if>
  192. <if test="delFlag != null">del_flag,</if>
  193. <if test="createBy != null">create_by,</if>
  194. <if test="createTime != null">create_time,</if>
  195. <if test="updateBy != null">update_by,</if>
  196. <if test="updateTime != null">update_time,</if>
  197. <if test="remark != null">remark,</if>
  198. <if test="fMarks != null">f_marks,</if>
  199. <if test="fInventoryDays != null">f_inventory_days,</if>
  200. <if test="fStorageFeeDeadline != null">f_storage_fee_deadline,</if>
  201. <if test="fAmt != null">f_amt,</if>
  202. <if test="fBillingDays != null">f_billing_days,</if>
  203. <if test="fDriverName != null">f_driver_name,</if>
  204. <if test="fDriverTel != null">f_driver_tel,</if>
  205. <if test="fDriverIdCar != null">f_driver_id_car,</if>
  206. <if test="fSerialNumber != null">f_serial_number,</if>
  207. <if test="fIsPass != null">f_is_pass,</if>
  208. <if test="fBilltype != null">f_billtype,</if>
  209. <if test="fBillingQty != null">f_billing_qty,</if>
  210. <if test="fBillingDeadline != null">f_billing_deadline,</if>
  211. </trim>
  212. <trim prefix="values (" suffix=")" suffixOverrides=",">
  213. <if test="fPid != null">#{fPid},</if>
  214. <if test="fSrcid != null">#{fSrcid},</if>
  215. <if test="fLineno != null">#{fLineno},</if>
  216. <if test="fBillno != null">#{fBillno},</if>
  217. <if test="fGoodsid != null">#{fGoodsid},</if>
  218. <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
  219. <if test="fMblno != null">#{fMblno},</if>
  220. <if test="fBsdate != null">#{fBsdate},</if>
  221. <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
  222. <if test="fBoxno != null">#{fBoxno},</if>
  223. <if test="fCntqty != null">#{fCntqty},</if>
  224. <if test="fGoodsval != null">#{fGoodsval},</if>
  225. <if test="fCntrtype != null">#{fCntrtype},</if>
  226. <if test="fBillingway != null">#{fBillingway},</if>
  227. <if test="fTransferWarehouselocid != null">#{fTransferWarehouselocid},</if>
  228. <if test="fPlanvolumn != null">#{fPlanvolumn},</if>
  229. <if test="fPlanqty != null">#{fPlanqty},</if>
  230. <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
  231. <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
  232. <if test="fPackagespecs != null">#{fPackagespecs},</if>
  233. <if test="fChargedate != null">#{fChargedate},</if>
  234. <if test="fPlannetweight != null">#{fPlannetweight},</if>
  235. <if test="fQty != null">#{fQty},</if>
  236. <if test="fVolumn != null">#{fVolumn},</if>
  237. <if test="fGrossweight != null">#{fGrossweight},</if>
  238. <if test="fNetweight != null">#{fNetweight},</if>
  239. <if test="fCntrno != null">#{fCntrno},</if>
  240. <if test="fTruckno != null">#{fTruckno},</if>
  241. <if test="fBillstatus != null and fBillstatus != ''">#{fBillstatus},</if>
  242. <if test="delFlag != null">#{delFlag},</if>
  243. <if test="createBy != null">#{createBy},</if>
  244. <if test="createTime != null">#{createTime},</if>
  245. <if test="updateBy != null">#{updateBy},</if>
  246. <if test="updateTime != null">#{updateTime},</if>
  247. <if test="remark != null">#{remark},</if>
  248. <if test="fMarks != null">#{fMarks},</if>
  249. <if test="fInventoryDays != null">#{fInventoryDays},</if>
  250. <if test="fStorageFeeDeadline != null">#{fStorageFeeDeadline},</if>
  251. <if test="fAmt != null">#{fAmt},</if>
  252. <if test="fBillingDays != null">#{fBillingDays},</if>
  253. <if test="fDriverName != null">#{fDriverName},</if>
  254. <if test="fDriverTel != null">#{fDriverTel},</if>
  255. <if test="fDriverIdCar != null">#{fDriverIdCar},</if>
  256. <if test="fSerialNumber != null">#{fSerialNumber},</if>
  257. <if test="fIsPass != null">#{fIsPass},</if>
  258. <if test="fBilltype != null">#{fBilltype},</if>
  259. <if test="fBillingQty != null">#{fBillingQty},</if>
  260. <if test="fBillingDeadline != null">#{fBillingDeadline},</if>
  261. </trim>
  262. </insert>
  263. <update id="updateTWarehousebillsitems" parameterType="TWarehousebillsitems">
  264. update t_warehousebillsitems
  265. <trim prefix="SET" suffixOverrides=",">
  266. <if test="fPid != null">f_pid = #{fPid},</if>
  267. <if test="fSrcid != null">f_srcid = #{fSrcid},</if>
  268. <if test="fLineno != null">f_lineno = #{fLineno},</if>
  269. <if test="fBillno != null">f_billno = #{fBillno},</if>
  270. <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
  271. <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
  272. <if test="fMblno != null">f_mblno = #{fMblno},</if>
  273. <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
  274. <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
  275. <if test="fBoxno != null">f_boxno = #{fBoxno},</if>
  276. <if test="fCntqty != null">f_cntqty = #{fCntqty},</if>
  277. <if test="fGoodsval != null">f_goodsval = #{fGoodsval},</if>
  278. <if test="fCntrtype != null">f_cntrtype = #{fCntrtype},</if>
  279. <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
  280. <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid = #{fTransferWarehouselocid},</if>
  281. <if test="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
  282. <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
  283. <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
  284. <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
  285. <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</if>
  286. <if test="fChargedate != null">f_chargedate = #{fChargedate},</if>
  287. <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
  288. <if test="fQty != null">f_qty = #{fQty},</if>
  289. <if test="fVolumn != null">f_volumn = #{fVolumn},</if>
  290. <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>
  291. <if test="fNetweight != null">f_netweight = #{fNetweight},</if>
  292. <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
  293. <if test="fTruckno != null">f_truckno = #{fTruckno},</if>
  294. <if test="fBillstatus != null and fBillstatus != ''">f_billstatus = #{fBillstatus},</if>
  295. <if test="delFlag != null">del_flag = #{delFlag},</if>
  296. <if test="createBy != null">create_by = #{createBy},</if>
  297. <if test="createTime != null">create_time = #{createTime},</if>
  298. <if test="updateBy != null">update_by = #{updateBy},</if>
  299. <if test="updateTime != null">update_time = #{updateTime},</if>
  300. <if test="remark != null">remark = #{remark},</if>
  301. <if test="fMarks != null">f_marks = #{fMarks},</if>
  302. <if test="fInventoryDays != null">f_inventory_days = #{fInventoryDays},</if>
  303. <if test="fStorageFeeDeadline != null">f_storage_fee_deadline = #{fStorageFeeDeadline},</if>
  304. <if test="fAmt != null">f_amt = #{fAmt},</if>
  305. <if test="fBillingDays != null">f_billing_days = #{fBillingDays},</if>
  306. <if test="fDriverName != null">f_driver_name = #{fDriverName},</if>
  307. <if test="fDriverTel != null">f_driver_tel = #{fDriverTel},</if>
  308. <if test="fDriverIdCar != null">f_driver_id_car = #{fDriverIdCar},</if>
  309. <if test="fSerialNumber != null">f_serial_number = #{fSerialNumber},</if>
  310. <if test="fIsPass != null">f_is_pass = #{fIsPass},</if>
  311. <if test="fBilltype != null">f_billtype = #{fBilltype},</if>
  312. <if test="fBillingQty != null">f_billing_qty = #{fBillingQty},</if>
  313. <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
  314. </trim>
  315. where f_id = #{fId}
  316. </update>
  317. <delete id="deleteTWarehousebillsitemsById" parameterType="Long">
  318. delete from t_warehousebillsitems where f_id = #{fId}
  319. </delete>
  320. <delete id="deleteTWarehousebillsitemsByIds" parameterType="String">
  321. delete from t_warehousebillsitems where f_id in
  322. <foreach item="fId" collection="array" open="(" separator="," close=")">
  323. #{fId}
  324. </foreach>
  325. </delete>
  326. <delete id="deleteByFPid" parameterType="Long">
  327. delete from t_warehousebillsitems where f_pid = #{fId}
  328. </delete>
  329. <select id="selectStorageFeeItemList" parameterType="com.ruoyi.warehouseBusiness.domain.TWarehouseBills"
  330. resultType="Map">
  331. SELECT
  332. item.f_id AS fId,
  333. item.f_billno AS fBillno,
  334. item.f_goodsid AS fGoodsid,
  335. item.f_bsdate AS fBsdate,
  336. item.f_billingway AS fBillingway,
  337. item.f_chargedate AS fChargedate,
  338. item.f_originalbilldate AS fOriginalbilldate,
  339. item.f_volumn AS fVolumn,
  340. item.f_marks AS fMarks,
  341. item.f_qty AS fQty,
  342. item.f_grossweight AS fGrossweight,
  343. item.f_netweight AS fNetweight,
  344. item.f_billtype AS fBilltype,
  345. goods.f_typeid AS fTypeid
  346. FROM
  347. t_warehousebills ware
  348. LEFT JOIN t_warehousebillsitems item ON item.f_pid = ware.f_id
  349. LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
  350. <where>
  351. ware.f_corpid = #{warehouse.fCorpid}
  352. and ware.f_billtype in ("HQZY", "SJCK")
  353. and item.f_billstatus = 40
  354. and item.f_chargedate &lt;= #{warehouse.fBillingDeadline}
  355. <if test="warehouse.fGoodsid != null">and item.f_goodsid = #{warehouse.fGoodsid}</if>
  356. <if test="warehouse.fMblno != null">and ware.f_mblno = #{warehouse.fMblno}</if>
  357. </where>
  358. </select>
  359. <update id="warehouseItemFollowUpdate" parameterType="Long">
  360. update
  361. t_warehousebillsitems
  362. SET f_billstatus = IF
  363. ( f_billtype = 'SJCK' || f_billtype = 'SJRK', 40, #{fettle} )
  364. where
  365. f_pid = #{fPid}
  366. </update>
  367. </mapper>