TWarehousebillsMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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.TWarehouseBillsMapper">
  6. <resultMap type="TWarehousebills" id="TWarehousebillsResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fBillno" column="f_billno"/>
  9. <result property="fCustomsdeclartion" column="f_customsdeclartion"/>
  10. <result property="fOriginalbillno" column="f_originalbillno"/>
  11. <result property="fDeptid" column="f_deptid"/>
  12. <result property="fBsdeptid" column="f_bsdeptid"/>
  13. <result property="fContacts" column="f_contacts"/>
  14. <result property="fTel" column="f_tel"/>
  15. <result property="fChargedate" column="f_chargedate"/>
  16. <result property="fCorpid" column="f_corpid"/>
  17. <result property="fTocorpid" column="f_tocorpid"/>
  18. <result property="fStltypeid" column="f_stltypeid"/>
  19. <result property="fBscorpno" column="f_bscorpno"/>
  20. <result property="fWarehouseid" column="f_warehouseid"/>
  21. <result property="fStorekeeper" column="f_storekeeper"/>
  22. <result property="fBsdate" column="f_bsdate"/>
  23. <result property="fPlanqty" column="f_planqty"/>
  24. <result property="fPlangrossweight" column="f_plangrossweight"/>
  25. <result property="fPlannetweight" column="f_plannetweight"/>
  26. <result property="fPlanvolumn" column="f_planvolumn"/>
  27. <result property="fQty" column="f_qty"/>
  28. <result property="fGrossweight" column="f_grossweight"/>
  29. <result property="fNetweight" column="f_netweight"/>
  30. <result property="fVolumn" column="f_volumn"/>
  31. <result property="fTrademodeid" column="f_trademodeid"/>
  32. <result property="fBillingway" column="f_billingway"/>
  33. <result property="fSbu" column="f_sbu"/>
  34. <result property="fFeetunit" column="f_feetunit"/>
  35. <result property="fMblno" column="f_mblno"/>
  36. <result property="fVslvoy" column="f_vslvoy"/>
  37. <result property="fMarks" column="f_marks"/>
  38. <result property="fEta" column="f_eta"/>
  39. <result property="fCustomno" column="f_customno"/>
  40. <result property="fIfweigh" column="f_ifweigh"/>
  41. <result property="fIfpledge" column="f_ifpledge"/>
  42. <result property="fIfdamage" column="f_ifdamage"/>
  43. <result property="fBankcorpid" column="f_bankcorpid"/>
  44. <result property="fBilltype" column="f_billtype"/>
  45. <result property="fBillstatus" column="f_billstatus"/>
  46. <result property="delFlag" column="del_flag"/>
  47. <result property="createBy" column="create_by"/>
  48. <result property="fItemsStatus" column="f_items_status"/>
  49. <result property="createTime" column="create_time"/>
  50. <result property="updateBy" column="update_by"/>
  51. <result property="updateTime" column="update_time"/>
  52. <result property="remark" column="remark"/>
  53. <result property="fBillingDeadline" column="f_billing_deadline"/>
  54. <result property="fProductName" column="f_product_name"/>
  55. <result property="fReviewDate" column="f_review_date"/>
  56. </resultMap>
  57. <sql id="selectTWarehousebillsVo">
  58. select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_eta, f_marks, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, update_by, f_items_status, update_time, remark, f_billing_deadline, f_product_name, f_review_date from t_warehousebills
  59. </sql>
  60. <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
  61. <include refid="selectTWarehousebillsVo"/>
  62. <where>
  63. <if test="fBillno != null and fBillno != ''">and f_billno = #{fBillno}</if>
  64. <if test="fCustomsdeclartion != null and fCustomsdeclartion != ''">and f_customsdeclartion =
  65. #{fCustomsdeclartion}
  66. </if>
  67. <if test="fOriginalbillno != null and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
  68. <if test="fDeptid != null ">and f_deptid = #{fDeptid}</if>
  69. <if test="fBsdeptid != null ">and f_bsdeptid = #{fBsdeptid}</if>
  70. <if test="fContacts != null and fContacts != ''">and f_contacts = #{fContacts}</if>
  71. <if test="fTel != null and fTel != ''">and f_tel = #{fTel}</if>
  72. <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
  73. <if test="fTocorpid != null ">and f_tocorpid = #{fTocorpid}</if>
  74. <if test="fChargedate != null ">and f_chargedate = #{fChargedate}</if>
  75. <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
  76. and f_bsdate &gt;= #{timeInterval[0]}
  77. </if>
  78. <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
  79. and f_bsdate &lt;= #{timeInterval[1]}
  80. </if>
  81. <if test="fStltypeid != null ">and f_stltypeid = #{fStltypeid}</if>
  82. <if test="fBscorpno != null and fBscorpno != ''">and f_bscorpno = #{fBscorpno}</if>
  83. <if test="fWarehouseid != null ">and f_warehouseid = #{fWarehouseid}</if>
  84. <if test="fStorekeeper != null and fStorekeeper != ''">and f_storekeeper = #{fStorekeeper}</if>
  85. <if test="fBsdate != null ">and f_bsdate = #{fBsdate}</if>
  86. <if test="fPlanqty != null ">and f_planqty = #{fPlanqty}</if>
  87. <if test="fProductName != null and fProductName != ''"> and f_product_name like concat('%', #{fProductName}, '%')</if>
  88. <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
  89. <if test="fPlannetweight != null ">and f_plannetweight = #{fPlannetweight}</if>
  90. <if test="fPlanvolumn != null ">and f_planvolumn = #{fPlanvolumn}</if>
  91. <if test="fQty != null ">and f_qty = #{fQty}</if>
  92. <if test="fMarks != null and fMarks != ''">and f_marks = #{fMarks}</if>
  93. <if test="fGrossweight != null ">and f_grossweight = #{fGrossweight}</if>
  94. <if test="fNetweight != null ">and f_netweight = #{fNetweight}</if>
  95. <if test="fVolumn != null ">and f_volumn = #{fVolumn}</if>
  96. <if test="fTrademodeid != null ">and f_trademodeid = #{fTrademodeid}</if>
  97. <if test="fBillingway != null ">and f_billingway = #{fBillingway}</if>
  98. <if test="fSbu != null ">and f_sbu = #{fSbu}</if>
  99. <if test="fFeetunit != null and fFeetunit != ''">and f_feetunit = #{fFeetunit}</if>
  100. <if test="fMblno != null and fMblno != ''">and f_mblno = #{fMblno}</if>
  101. <if test="fVslvoy != null and fVslvoy != ''">and f_vslvoy = #{fVslvoy}</if>
  102. <if test="fEta != null ">and f_eta = #{fEta}</if>
  103. <if test="fCustomno != null and fCustomno != ''">and f_customno = #{fCustomno}</if>
  104. <if test="fIfweigh != null and fIfweigh != ''">and f_ifweigh = #{fIfweigh}</if>
  105. <if test="fIfpledge != null and fIfpledge != ''">and f_ifpledge = #{fIfpledge}</if>
  106. <if test="fIfdamage != null and fIfdamage != ''">and f_ifdamage = #{fIfdamage}</if>
  107. <if test="fBankcorpid != null ">and f_bankcorpid = #{fBankcorpid}</if>
  108. <if test="fBillingDeadline != null "> and f_billing_deadline = #{fBillingDeadline}</if>
  109. <if test="fBilltype != null and fBilltype != ''">and f_billtype = #{fBilltype}</if>
  110. <if test="fBillstatus != null and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
  111. </where>
  112. ORDER BY f_bsdate desc
  113. </select>
  114. <select id="selectWarehouseBusinessList" parameterType="TWarehousebills" resultType="Map">
  115. SELECT
  116. DISTINCT
  117. bill.f_id AS fId,
  118. corp.f_name AS fCorpid,
  119. corpTo.f_name AS fTocorpid,
  120. bill.f_mblno AS fMblno,
  121. corpSub.f_name AS fSbu,
  122. bill.f_marks AS fMarks,
  123. bill.f_bsdate AS fBsdate,
  124. bill.f_trademodeid AS fTrademodeid,
  125. ware.f_name AS fWarehouseid,
  126. bill.f_qty AS fQty,
  127. bill.f_grossweight AS fGrossweight,
  128. bill.f_netweight AS fNetweight,
  129. bill.f_product_name AS fProductName,
  130. bill.f_billstatus AS fBillstatus,
  131. bill.f_items_status AS fItemsStatus,
  132. bill.f_billno AS fBillno
  133. FROM
  134. t_warehousebills bill
  135. LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
  136. LEFT JOIN t_corps corpTo ON corpTo.f_id = bill.f_tocorpid
  137. LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
  138. LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
  139. LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
  140. LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
  141. <where>
  142. <if test="fBillno != null and fBillno != ''">and bill.f_billno like concat('%', #{fBillno}, '%')</if>
  143. <if test="fCustomsdeclartion != null and fCustomsdeclartion != ''">and bill.f_customsdeclartion =
  144. #{fCustomsdeclartion}
  145. </if>
  146. <if test="fOriginalbillno != null and fOriginalbillno != ''">and bill.f_originalbillno =
  147. #{fOriginalbillno}
  148. </if>
  149. <if test="fDeptid != null ">and bill.f_deptid = #{fDeptid}</if>
  150. <if test="fBsdeptid != null ">and bill.f_bsdeptid = #{fBsdeptid}</if>
  151. <if test="fChargedate != null ">and bill.f_chargedate = #{fChargedate}</if>
  152. <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
  153. and bill.f_bsdate &gt;= #{timeInterval[0]}
  154. </if>
  155. <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
  156. and bill.f_bsdate &lt;= #{timeInterval[1]}
  157. </if>
  158. <if test="fGoodsid != null and fGoodsid != ''">and item.f_goodsid = #{fGoodsid}</if>
  159. <if test="fContacts != null and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
  160. <if test="fTel != null and fTel != ''">and bill.f_tel = #{fTel}</if>
  161. <if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
  162. <if test="fBillingDeadline != null ">and bill.f_billing_deadline = #{fBillingDeadline}</if>
  163. <if test="fTocorpid != null ">and bill.f_tocorpid = #{fTocorpid}</if>
  164. <if test="fMarks != null and fMarks != ''">and bill.f_marks like concat('%', #{fMarks}, '%')</if>
  165. <if test="fStltypeid != null ">and bill.f_stltypeid = #{fStltypeid}</if>
  166. <if test="fReviewDate != null "> and f_review_date = #{fReviewDate}</if>
  167. <if test="fBscorpno != null and fBscorpno != ''">and bill.f_bscorpno = #{fBscorpno}</if>
  168. <if test="fWarehouseid != null ">and bill.f_warehouseid = #{fWarehouseid}</if>
  169. <if test="fStorekeeper != null and fStorekeeper != ''">and bill.f_storekeeper = #{fStorekeeper}</if>
  170. <if test="fBsdate != null ">and bill.f_bsdate = #{fBsdate}</if>
  171. <if test="fPlanqty != null ">and bill.f_planqty = #{fPlanqty}</if>
  172. <if test="fPlangrossweight != null ">and bill.f_plangrossweight = #{fPlangrossweight}</if>
  173. <if test="fPlannetweight != null ">and bill.f_plannetweight = #{fPlannetweight}</if>
  174. <if test="fPlanvolumn != null ">and bill.f_planvolumn = #{fPlanvolumn}</if>
  175. <if test="fQty != null ">and bill.f_qty = #{fQty}</if>
  176. <if test="fGrossweight != null ">and bill.f_grossweight = #{fGrossweight}</if>
  177. <if test="fNetweight != null ">and bill.f_netweight = #{fNetweight}</if>
  178. <if test="fVolumn != null ">and bill.f_volumn = #{fVolumn}</if>
  179. <if test="fTrademodeid != null ">and bill.f_trademodeid = #{fTrademodeid}</if>
  180. <if test="fBillingway != null ">and bill.f_billingway = #{fBillingway}</if>
  181. <if test="fSbu != null ">and bill.f_sbu = #{fSbu}</if>
  182. <if test="fFeetunit != null and fFeetunit != ''">and bill.f_feetunit = #{fFeetunit}</if>
  183. <if test="fMblno != null and fMblno != ''">and bill.f_mblno like concat('%', #{fMblno}, '%')</if>
  184. <if test="fVslvoy != null and fVslvoy != ''">and bill.f_vslvoy = #{fVslvoy}</if>
  185. <if test="fEta != null ">and bill.f_eta = #{fEta}</if>
  186. <if test="fCustomno != null and fCustomno != ''">and bill.f_customno = #{fCustomno}</if>
  187. <if test="fIfweigh != null and fIfweigh != ''">and bill.f_ifweigh = #{fIfweigh}</if>
  188. <if test="fIfpledge != null and fIfpledge != ''">and bill.f_ifpledge = #{fIfpledge}</if>
  189. <if test="fIfdamage != null and fIfdamage != ''">and bill.f_ifdamage = #{fIfdamage}</if>
  190. <if test="fBankcorpid != null ">and bill.f_bankcorpid = #{fBankcorpid}</if>
  191. <if test="fBilltype != null and fBilltype != ''">and bill.f_billtype = #{fBilltype}</if>
  192. <if test="fBillstatus != null and fBillstatus != ''">and bill.f_billstatus = #{fBillstatus}</if>
  193. <if test="createBy != null and createBy != ''">and bill.create_by = #{createBy}</if>
  194. </where>
  195. ORDER BY bill.f_bsdate desc
  196. </select>
  197. <select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult">
  198. <include refid="selectTWarehousebillsVo"/>
  199. where f_id = #{fId}
  200. ORDER BY f_bsdate desc
  201. </select>
  202. <insert id="insertTWarehousebills" parameterType="TWarehousebills" useGeneratedKeys="true" keyProperty="fId">
  203. insert into t_warehousebills
  204. <trim prefix="(" suffix=")" suffixOverrides=",">
  205. <if test="fBillno != null">f_billno,</if>
  206. <if test="fCustomsdeclartion != null">f_customsdeclartion,</if>
  207. <if test="fOriginalbillno != null">f_originalbillno,</if>
  208. <if test="fDeptid != null">f_deptid,</if>
  209. <if test="fBsdeptid != null">f_bsdeptid,</if>
  210. <if test="fContacts != null">f_contacts,</if>
  211. <if test="fTel != null">f_tel,</if>
  212. <if test="fCorpid != null">f_corpid,</if>
  213. <if test="fTocorpid != null">f_tocorpid,</if>
  214. <if test="fStltypeid != null">f_stltypeid,</if>
  215. <if test="fBscorpno != null and fBscorpno != ''">f_bscorpno,</if>
  216. <if test="fWarehouseid != null">f_warehouseid,</if>
  217. <if test="fStorekeeper != null">f_storekeeper,</if>
  218. <if test="fChargedate != null">f_chargedate,</if>
  219. <if test="fBsdate != null">f_bsdate,</if>
  220. <if test="fPlanqty != null">f_planqty,</if>
  221. <if test="fPlangrossweight != null">f_plangrossweight,</if>
  222. <if test="fPlannetweight != null">f_plannetweight,</if>
  223. <if test="fPlanvolumn != null">f_planvolumn,</if>
  224. <if test="fQty != null">f_qty,</if>
  225. <if test="fGrossweight != null">f_grossweight,</if>
  226. <if test="fNetweight != null">f_netweight,</if>
  227. <if test="fVolumn != null">f_volumn,</if>
  228. <if test="fTrademodeid != null">f_trademodeid,</if>
  229. <if test="fBillingway != null">f_billingway,</if>
  230. <if test="fSbu != null">f_sbu,</if>
  231. <if test="fFeetunit != null">f_feetunit,</if>
  232. <if test="fMblno != null">f_mblno,</if>
  233. <if test="fVslvoy != null">f_vslvoy,</if>
  234. <if test="fMarks != null and fMarks != ''">f_marks,</if>
  235. <if test="fEta != null">f_eta,</if>
  236. <if test="fCustomno != null">f_customno,</if>
  237. <if test="fIfweigh != null">f_ifweigh,</if>
  238. <if test="fIfpledge != null">f_ifpledge,</if>
  239. <if test="fIfdamage != null">f_ifdamage,</if>
  240. <if test="fBankcorpid != null">f_bankcorpid,</if>
  241. <if test="fBilltype != null">f_billtype,</if>
  242. <if test="fBillstatus != null">f_billstatus,</if>
  243. <if test="delFlag != null">del_flag,</if>
  244. <if test="createBy != null">create_by,</if>
  245. <if test="createTime != null">create_time,</if>
  246. <if test="updateBy != null">update_by,</if>
  247. <if test="fItemsStatus != null">f_items_status,</if>
  248. <if test="updateTime != null">update_time,</if>
  249. <if test="remark != null">remark,</if>
  250. <if test="fBillingDeadline != null">f_billing_deadline,</if>
  251. <if test="fProductName != null">f_product_name,</if>
  252. <if test="fReviewDate != null">f_review_date,</if>
  253. </trim>
  254. <trim prefix="values (" suffix=")" suffixOverrides=",">
  255. <if test="fBillno != null">#{fBillno},</if>
  256. <if test="fCustomsdeclartion != null">#{fCustomsdeclartion},</if>
  257. <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
  258. <if test="fDeptid != null">#{fDeptid},</if>
  259. <if test="fBsdeptid != null">#{fBsdeptid},</if>
  260. <if test="fContacts != null">#{fContacts},</if>
  261. <if test="fTel != null">#{fTel},</if>
  262. <if test="fCorpid != null">#{fCorpid},</if>
  263. <if test="fTocorpid != null">#{fTocorpid},</if>
  264. <if test="fStltypeid != null">#{fStltypeid},</if>
  265. <if test="fBscorpno != null and fBscorpno != ''">#{fBscorpno},</if>
  266. <if test="fWarehouseid != null">#{fWarehouseid},</if>
  267. <if test="fStorekeeper != null">#{fStorekeeper},</if>
  268. <if test="fChargedate != null">#{fChargedate},</if>
  269. <if test="fBsdate != null">#{fBsdate},</if>
  270. <if test="fPlanqty != null">#{fPlanqty},</if>
  271. <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
  272. <if test="fPlannetweight != null">#{fPlannetweight},</if>
  273. <if test="fPlanvolumn != null">#{fPlanvolumn},</if>
  274. <if test="fQty != null">#{fQty},</if>
  275. <if test="fGrossweight != null">#{fGrossweight},</if>
  276. <if test="fNetweight != null">#{fNetweight},</if>
  277. <if test="fVolumn != null">#{fVolumn},</if>
  278. <if test="fTrademodeid != null">#{fTrademodeid},</if>
  279. <if test="fBillingway != null">#{fBillingway},</if>
  280. <if test="fSbu != null">#{fSbu},</if>
  281. <if test="fFeetunit != null">#{fFeetunit},</if>
  282. <if test="fMblno != null">#{fMblno},</if>
  283. <if test="fVslvoy != null">#{fVslvoy},</if>
  284. <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
  285. <if test="fEta != null">#{fEta},</if>
  286. <if test="fCustomno != null">#{fCustomno},</if>
  287. <if test="fIfweigh != null">#{fIfweigh},</if>
  288. <if test="fIfpledge != null">#{fIfpledge},</if>
  289. <if test="fIfdamage != null">#{fIfdamage},</if>
  290. <if test="fBankcorpid != null">#{fBankcorpid},</if>
  291. <if test="fBilltype != null">#{fBilltype},</if>
  292. <if test="fBillstatus != null">#{fBillstatus},</if>
  293. <if test="delFlag != null">#{delFlag},</if>
  294. <if test="createBy != null">#{createBy},</if>
  295. <if test="createTime != null">#{createTime},</if>
  296. <if test="updateBy != null">#{updateBy},</if>
  297. <if test="fItemsStatus != null">#{fItemsStatus},</if>
  298. <if test="updateTime != null">#{updateTime},</if>
  299. <if test="remark != null">#{remark},</if>
  300. <if test="fBillingDeadline != null">#{fBillingDeadline},</if>
  301. <if test="fProductName != null">#{fProductName},</if>
  302. <if test="fReviewDate != null">#{fReviewDate},</if>
  303. </trim>
  304. </insert>
  305. <update id="updateTWarehousebills" parameterType="TWarehousebills">
  306. update t_warehousebills
  307. <trim prefix="SET" suffixOverrides=",">
  308. <if test="fBillno != null">f_billno = #{fBillno},</if>
  309. <if test="fCustomsdeclartion != null">f_customsdeclartion = #{fCustomsdeclartion},</if>
  310. <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
  311. <if test="fDeptid != null">f_deptid = #{fDeptid},</if>
  312. <if test="fBsdeptid != null">f_bsdeptid = #{fBsdeptid},</if>
  313. <if test="fContacts != null">f_contacts = #{fContacts},</if>
  314. <if test="fTel != null">f_tel = #{fTel},</if>
  315. <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
  316. <if test="fTocorpid != null">f_tocorpid = #{fTocorpid},</if>
  317. <if test="fStltypeid != null">f_stltypeid = #{fStltypeid},</if>
  318. <if test="fBscorpno != null and fBscorpno != ''">f_bscorpno = #{fBscorpno},</if>
  319. <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
  320. <if test="fStorekeeper != null">f_storekeeper = #{fStorekeeper},</if>
  321. <if test="fChargedate != null">f_chargedate = #{fChargedate},</if>
  322. <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
  323. <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
  324. <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
  325. <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
  326. <if test="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
  327. <if test="fQty != null">f_qty = #{fQty},</if>
  328. <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>
  329. <if test="fNetweight != null">f_netweight = #{fNetweight},</if>
  330. <if test="fVolumn != null">f_volumn = #{fVolumn},</if>
  331. <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
  332. <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
  333. <if test="fSbu != null">f_sbu = #{fSbu},</if>
  334. <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
  335. <if test="fMblno != null">f_mblno = #{fMblno},</if>
  336. <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
  337. <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
  338. <if test="fEta != null">f_eta = #{fEta},</if>
  339. <if test="fCustomno != null">f_customno = #{fCustomno},</if>
  340. <if test="fIfweigh != null">f_ifweigh = #{fIfweigh},</if>
  341. <if test="fIfpledge != null">f_ifpledge = #{fIfpledge},</if>
  342. <if test="fIfdamage != null">f_ifdamage = #{fIfdamage},</if>
  343. <if test="fBankcorpid != null">f_bankcorpid = #{fBankcorpid},</if>
  344. <if test="fBilltype != null">f_billtype = #{fBilltype},</if>
  345. <if test="fBillstatus != null">f_billstatus = #{fBillstatus},</if>
  346. <if test="delFlag != null">del_flag = #{delFlag},</if>
  347. <if test="createBy != null">create_by = #{createBy},</if>
  348. <if test="createTime != null">create_time = #{createTime},</if>
  349. <if test="updateBy != null">update_by = #{updateBy},</if>
  350. <if test="fItemsStatus != null">f_items_status = #{fItemsStatus},</if>
  351. <if test="updateTime != null">update_time = #{updateTime},</if>
  352. <if test="remark != null">remark = #{remark},</if>
  353. <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
  354. <if test="fProductName != null">f_product_name = #{fProductName},</if>
  355. <if test="fReviewDate != null">f_review_date = #{fReviewDate},</if>
  356. </trim>
  357. where f_id = #{fId}
  358. </update>
  359. <delete id="deleteTWarehousebillsById" parameterType="Long">
  360. delete from t_warehousebills where f_id = #{fId}
  361. </delete>
  362. <delete id="deleteTWarehousebillsByIds" parameterType="String">
  363. delete
  364. item.*,
  365. bill.*,
  366. fess.*,
  367. enclosure.*
  368. from
  369. t_warehousebills bill
  370. LEFT JOIN t_warehousebillsfees fess ON fess.f_pid = bill.f_id
  371. LEFT JOIN t_enclosure enclosure ON enclosure.f_pid = bill.f_id
  372. LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
  373. where
  374. bill.f_id in
  375. <foreach item="fId" collection="array" open="(" separator="," close=")">
  376. #{fId}
  377. </foreach>
  378. </delete>
  379. </mapper>