ftmsorderbillscarsMapper.xml 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  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.orderPlan.mapper.FtmsorderbillscarsMapper">
  6. <resultMap type="ftmsorderbillscars" id="ftmsorderbillscarsResult">
  7. <result property="id" column="id"/>
  8. <result property="pId" column="p_id"/>
  9. <result property="orgId" column="org_id"/>
  10. <result property="orderNo" column="order_no"/>
  11. <result property="cntrId" column="cntr_id"/>
  12. <result property="cntrNo" column="cntr_no"/>
  13. <result property="carcorPid" column="carcor_pid"/>
  14. <result property="mblno" column="mblno"/>
  15. <result property="carregNo" column="carreg_no"/>
  16. <result property="driverName" column="driver_name"/>
  17. <result property="driverUserId" column="driver_user_id"/>
  18. <result property="driverTel" column="driver_tel"/>
  19. <result property="planDate" column="plan_date"/>
  20. <result property="planRemarks" column="plan_remarks"/>
  21. <result property="acceptDate" column="accept_date"/>
  22. <result property="acceptRemarks" column="accept_remarks"/>
  23. <result property="loadDate" column="load_date"/>
  24. <result property="loadRemarks" column="load_remarks"/>
  25. <result property="mdLoadDate" column="md_load_date"/>
  26. <result property="offData" column="off_data"/>
  27. <result property="offRemarks" column="off_remarks"/>
  28. <result property="mdLoadRemarks" column="md_load_remarks"/>
  29. <result property="unLoadDate" column="un_load_date"/>
  30. <result property="unLoadRemarks" column="un_load_remarks"/>
  31. <result property="waybillDate" column="waybill_date"/>
  32. <result property="qtyLoad" column="qty_load"/>
  33. <result property="qtyUnLoad" column="qty_un_load"/>
  34. <result property="cntrQty" column="cntr_qty"/>
  35. <result property="gopodsLossQty" column="gopods_loss_qty"/>
  36. <result property="cntrWeight" column="cntr_weight"/>
  37. <result property="gopodsLossrate" column="gopods_lossrate"/>
  38. <result property="waybillRemarks" column="waybill_remarks"/>
  39. <result property="gopodsLossamtCr" column="gopods_lossamt_cr"/>
  40. <result property="qtyDr" column="qty_dr"/>
  41. <result property="gopodsLossamtDr" column="gopods_lossamt_dr"/>
  42. <result property="qtyCr" column="qty_cr"/>
  43. <result property="freightPriceDr" column="freight_price_dr"/>
  44. <result property="freightPriceCr" column="freight_price_cr"/>
  45. <result property="freightAmtDr" column="freight_amt_dr"/>
  46. <result property="freightAmtCr" column="freight_amt_cr"/>
  47. <result property="feeitemDr" column="feeitem_dr"/>
  48. <result property="feeitemDrRemarks" column="feeitem_dr_remarks"/>
  49. <result property="feeitemCr" column="feeitem_cr"/>
  50. <result property="feeitemCrRemarks" column="feeitem_cr_remarks"/>
  51. <result property="amtDr" column="amt_dr"/>
  52. <result property="amtCr" column="amt_cr"/>
  53. <result property="dueDateDr" column="due_date_dr"/>
  54. <result property="dueDateCr" column="due_date_cr"/>
  55. <result property="odometerFrom" column="odometer_from"/>
  56. <result property="odometerEnd" column="odometer_end"/>
  57. <result property="milesEmpty" column="miles_empty"/>
  58. <result property="milesLoad" column="miles_load"/>
  59. <result property="miles" column="miles"/>
  60. <result property="driverbonus" column="driverbonus"/>
  61. <result property="costtoll" column="costtoll"/>
  62. <result property="costmaintain" column="costmaintain"/>
  63. <result property="costOth" column="cost_oth"/>
  64. <result property="costRemarks" column="cost_remarks"/>
  65. <result property="oilQtyper" column="oil_qtyper"/>
  66. <result property="oilQty1" column="oil_qty1"/>
  67. <result property="oilPrice1" column="oil_price1"/>
  68. <result property="oilAmt1" column="oil_amt1"/>
  69. <result property="oilQty2" column="oil_qty2"/>
  70. <result property="oilPrice2" column="oil_price2"/>
  71. <result property="oilAmt2" column="oil_amt2"/>
  72. <result property="oilQty" column="oil_qty"/>
  73. <result property="oilPrice" column="oil_price"/>
  74. <result property="oilAmt" column="oil_amt"/>
  75. <result property="oilQtyBlc" column="oil_qty_blc"/>
  76. <result property="oilAmtBlc" column="oil_amt_blc"/>
  77. <result property="profit" column="profit"/>
  78. <result property="invDrNeed" column="inv_dr_need"/>
  79. <result property="invDrStatus" column="inv_dr_status"/>
  80. <result property="invDrTaxrate" column="inv_dr_taxrate"/>
  81. <result property="invDrTaxamt" column="inv_dr_taxamt"/>
  82. <result property="invDrDate" column="inv_dr_date"/>
  83. <result property="invDrNo" column="inv_dr_no"/>
  84. <result property="accchkStaus" column="accchk_staus"/>
  85. <result property="billStatus" column="bill_status"/>
  86. <result property="orderStatus" column="order_status"/>
  87. <result property="accchkDate" column="accchk_date"/>
  88. <result property="costomAmt01" column="costom_amt_01"/>
  89. <result property="stlAmtDr" column="stl_amt_dr"/>
  90. <result property="costomAmt02" column="costom_amt_02"/>
  91. <result property="stlDateDr" column="stl_date_dr"/>
  92. <result property="costomAmt03" column="costom_amt_03"/>
  93. <result property="stlAmtCr" column="stl_amt_cr"/>
  94. <result property="costomAmt04" column="costom_amt_04"/>
  95. <result property="stlDateCr" column="stl_date_cr"/>
  96. <result property="costomAmt05" column="costom_amt_05"/>
  97. <result property="costomAmt06" column="costom_amt_06"/>
  98. <result property="delFlag" column="del_flag"/>
  99. <result property="costomStr01" column="costom_str_01"/>
  100. <result property="createBy" column="create_by"/>
  101. <result property="createTime" column="create_time"/>
  102. <result property="costomStr02" column="costom_str_02"/>
  103. <result property="updateBy" column="update_by"/>
  104. <result property="updateTime" column="update_time"/>
  105. <result property="remarks" column="remarks"/>
  106. </resultMap>
  107. <sql id="selectftmsorderbillscarsVo">
  108. select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_user_id, driver_tel, plan_date, plan_remarks, accept_date, accept_remarks, load_date, load_remarks, md_load_date, off_data, off_remarks, md_load_remarks, un_load_date, un_load_remarks, waybill_date, qty_load, qty_un_load, cntr_qty, gopods_loss_qty, cntr_weight, gopods_lossrate, waybill_remarks, gopods_lossamt_cr, qty_dr, gopods_lossamt_dr, qty_cr, freight_price_dr, freight_price_cr, freight_amt_dr, freight_amt_cr, feeitem_dr, feeitem_dr_remarks, feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from, odometer_end, miles_empty, miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks, oil_qtyper, oil_qty1, oil_price1, oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt, oil_qty_blc, oil_amt_blc, profit, inv_dr_need, inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date, costom_amt_01, stl_amt_dr, costom_amt_02, stl_date_dr, costom_amt_03, stl_amt_cr, costom_amt_04, stl_date_cr, costom_amt_05, costom_amt_06, del_flag, costom_str_01, create_by, create_time, costom_str_02, update_by, update_time, remarks from F_TMSORDERBILLSCARS
  109. </sql>
  110. <select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
  111. <include refid="selectftmsorderbillscarsVo"/>
  112. <where>
  113. <if test="pId != null "> and p_id = #{pId}</if>
  114. <if test="orgId != null "> and org_id = #{orgId}</if>
  115. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  116. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  117. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  118. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  119. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  120. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  121. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  122. <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
  123. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  124. <if test="planDate != null "> and plan_date = #{planDate}</if>
  125. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  126. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  127. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  128. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  129. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  130. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  131. <if test="offData != null "> and off_data = #{offData}</if>
  132. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  133. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  134. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  135. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  136. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  137. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  138. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  139. <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
  140. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  141. <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
  142. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  143. <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
  144. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  145. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  146. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  147. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  148. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  149. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  150. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  151. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  152. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  153. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  154. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  155. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  156. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  157. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  158. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  159. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  160. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  161. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  162. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  163. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  164. <if test="miles != null "> and miles = #{miles}</if>
  165. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  166. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  167. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  168. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  169. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  170. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  171. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  172. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  173. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  174. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  175. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  176. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  177. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  178. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  179. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  180. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  181. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  182. <if test="profit != null "> and profit = #{profit}</if>
  183. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  184. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  185. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  186. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  187. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  188. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  189. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  190. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  191. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  192. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  193. <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
  194. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  195. <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
  196. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  197. <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
  198. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  199. <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
  200. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  201. <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
  202. <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
  203. <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
  204. <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
  205. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  206. </where>
  207. </select>
  208. <select id="selectftmsorderbillscarsCount" parameterType="ftmsorderbillscars" resultType="int">
  209. select count(id) from F_TMSORDERBILLSCARS
  210. <where>
  211. <if test="pId != null "> and p_id = #{pId}</if>
  212. <if test="orgId != null "> and org_id = #{orgId}</if>
  213. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  214. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  215. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  216. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  217. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  218. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  219. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  220. <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
  221. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  222. <if test="planDate != null "> and plan_date = #{planDate}</if>
  223. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  224. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  225. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  226. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  227. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  228. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  229. <if test="offData != null "> and off_data = #{offData}</if>
  230. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  231. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  232. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  233. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  234. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  235. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  236. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  237. <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
  238. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  239. <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
  240. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  241. <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
  242. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  243. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  244. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  245. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  246. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  247. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  248. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  249. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  250. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  251. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  252. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  253. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  254. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  255. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  256. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  257. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  258. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  259. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  260. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  261. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  262. <if test="miles != null "> and miles = #{miles}</if>
  263. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  264. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  265. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  266. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  267. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  268. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  269. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  270. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  271. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  272. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  273. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  274. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  275. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  276. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  277. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  278. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  279. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  280. <if test="profit != null "> and profit = #{profit}</if>
  281. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  282. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  283. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  284. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  285. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  286. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  287. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  288. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  289. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  290. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  291. <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
  292. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  293. <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
  294. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  295. <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
  296. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  297. <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
  298. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  299. <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
  300. <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
  301. <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
  302. <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
  303. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  304. </where>
  305. </select>
  306. <select id="selectftmsorderbillscarsIdList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
  307. select id from F_TMSORDERBILLSCARS
  308. <where>
  309. <if test="pId != null "> and p_id = #{pId}</if>
  310. <if test="orgId != null "> and org_id = #{orgId}</if>
  311. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  312. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  313. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  314. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  315. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  316. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  317. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  318. <if test="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
  319. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  320. <if test="planDate != null "> and plan_date = #{planDate}</if>
  321. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  322. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  323. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  324. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  325. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  326. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  327. <if test="offData != null "> and off_data = #{offData}</if>
  328. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  329. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  330. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  331. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  332. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  333. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  334. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  335. <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
  336. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  337. <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
  338. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  339. <if test="waybillRemarks != null and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
  340. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  341. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  342. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  343. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  344. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  345. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  346. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  347. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  348. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  349. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  350. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  351. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  352. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  353. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  354. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  355. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  356. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  357. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  358. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  359. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  360. <if test="miles != null "> and miles = #{miles}</if>
  361. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  362. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  363. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  364. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  365. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  366. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  367. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  368. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  369. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  370. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  371. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  372. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  373. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  374. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  375. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  376. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  377. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  378. <if test="profit != null "> and profit = #{profit}</if>
  379. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  380. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  381. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  382. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  383. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  384. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  385. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  386. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  387. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  388. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  389. <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
  390. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  391. <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
  392. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  393. <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
  394. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  395. <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
  396. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  397. <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
  398. <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
  399. <if test="costomStr01 != null and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
  400. <if test="costomStr02 != null and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
  401. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  402. </where>
  403. </select>
  404. <select id="selectftmsorderbillscarsMapList" parameterType="ftmsorderbills" resultType="Map">
  405. SELECT
  406. c.id,
  407. c.order_no orderNo,
  408. c.mblno,
  409. c.carreg_no carregNo,
  410. driver.name driverName,
  411. c.driver_tel driverTel,
  412. CASE
  413. c.order_status
  414. WHEN 10 THEN
  415. '车队安排'
  416. WHEN 20 THEN
  417. '司机受理'
  418. WHEN 40 THEN
  419. '提箱'
  420. WHEN 50 THEN
  421. '装卸货'
  422. WHEN 60 THEN
  423. '还卸柜子'
  424. WHEN 80 THEN
  425. '回单'
  426. END orderName,
  427. c.order_status orderStatus,
  428. p.f_name corpId,
  429. CASE
  430. t.bill_type
  431. WHEN 1 THEN
  432. '进口'
  433. WHEN 2 THEN
  434. '出口'
  435. WHEN 3 THEN
  436. '内贸'
  437. WHEN 4 THEN
  438. '其他'
  439. END billType,
  440. CASE
  441. t.trans_type
  442. WHEN 1 THEN
  443. '集装箱'
  444. WHEN 2 THEN
  445. '搭建'
  446. WHEN 3 THEN
  447. '散货'
  448. END transType,
  449. CASE
  450. t.trans_type
  451. WHEN 1 THEN
  452. '重去重回'
  453. WHEN 2 THEN
  454. '重去空回'
  455. WHEN 3 THEN
  456. '空去重回'
  457. END transProp,
  458. g.f_name goodsId,
  459. c.cntr_weight cntrWeight,
  460. t.qty_plan qtyPlan,
  461. t.weight_plan weightPlan,
  462. t.ysl,
  463. t.voy,
  464. t.load_addr loadAddr,
  465. t.load_date tLoadDate,
  466. t.load_attn loadAttn,
  467. t.load_attntel loadAttntel,
  468. t.md_load_addr mdLoadAddr,
  469. t.md_load_date tMdLoadDate,
  470. t.md_load_attn mdLoadAttn,
  471. t.md_load_attn_tel mdLoadAttnTel,
  472. t.un_load_addr unLoadAddr,
  473. t.un_load_date tUnLoadDate,
  474. t.un_load_attn unLoadAttn,
  475. t.un_load_attn_tel unLoadAttnTel,
  476. dic.dict_label cntrId,
  477. pol.f_name polId,
  478. pod.f_name podId,
  479. c.accept_date acceptDate,
  480. c.cntr_qty cntrQty,
  481. c.off_data offData,
  482. c.load_date loadDate,
  483. c.md_load_date mdLoadDate,
  484. c.un_load_date unLoadDate,
  485. c.waybill_date waybillDate,
  486. c.waybill_remarks waybillRemarks,
  487. c.oil_amt oilAmt,
  488. c.cost_oth costOth,
  489. c.driverbonus driverbonus,
  490. c.cost_remarks costRemarks,
  491. c.costom_amt_06 costomAmt06,
  492. c.costom_amt_05 costomAmt05,
  493. c.costom_amt_04 costomAmt04,
  494. c.costom_amt_03 costomAmt03,
  495. c.costom_amt_02 costomAmt02,
  496. c.costom_amt_01 costomAmt01,
  497. c.costom_str_02 costomStr02,
  498. c.costom_str_01 costomStr01
  499. FROM
  500. F_TMSORDERBILLSCARS c
  501. LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
  502. LEFT JOIN t_corps p ON p.f_id = t.corp_id
  503. LEFT JOIN t_goods g ON g.f_id = t.goods_id
  504. LEFT JOIN t_address pol ON pol.f_id = t.pol_id
  505. AND pol.f_types = 1
  506. LEFT JOIN t_address pod ON pod.f_id = t.pod_id
  507. AND pod.f_types = 1
  508. LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
  509. AND dic.dict_type = 'data_cntrId'
  510. LEFT JOIN fleet_driver_msg driver ON driver.id = c.driver_user_id
  511. <where>
  512. t.bill_status != 3 or t.bill_status != 30
  513. AND c.bill_status != 3
  514. <if test="corpId != null">and t.corp_id = #{corpId}</if>
  515. <if test="billType != null">and t.bill_type = #{billType}</if>
  516. <if test="transType != null">and t.trans_type = #{transType}</if>
  517. <if test="transProp != null">and t.trans_prop = #{transProp}</if>
  518. <if test="goodsId != null">and t.goods_id = #{goodsId}</if>
  519. <if test="driverTel != null">and c.driver_tel = #{driverTel}</if>
  520. <if test="orderStatus != null">and c.order_status = #{orderStatus}</if>
  521. <if test='planDate != null and planDate[0] != null and planDate[0]!= ""'>
  522. and c.plan_date &gt;= #{planDate[0]}
  523. </if>
  524. <if test='planDate != null and planDate[1] != null and planDate[1]!= ""'>
  525. and c.plan_date &lt;= #{planDate[1]}
  526. </if>
  527. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  528. and c.load_date &gt;= #{cLoadDate[0]}
  529. </if>
  530. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  531. and c.load_date &lt;= #{cLoadDate[1]}
  532. </if>
  533. <if test="mblno != null and mblno != ''">and t.mblno like concat('%', #{mblno}, '%')</if>
  534. <if test="carregNo != null and carregNo != ''">and c.carreg_no like concat('%', #{carregNo}, '%')</if>
  535. <if test="loadAddr != null and loadAddr != ''">and t.load_addr like concat('%', #{loadAddr}, '%')</if>
  536. <if test="unLoadAddr != null and unLoadAddr != ''">and t.un_load_addr like concat('%', #{unLoadAddr},'%')</if>
  537. <if test="mdLoadAddr != null and mdLoadAddr != ''">and t.md_load_addr like concat('%', #{mdLoadAddr},'%')</if>
  538. </where>
  539. ORDER BY c.id desc
  540. </select>
  541. <select id="selectftmsorderbillscarsById" parameterType="Long" resultMap="ftmsorderbillscarsResult">
  542. <include refid="selectftmsorderbillscarsVo"/>
  543. where id = #{id}
  544. </select>
  545. <select id="selectftmsorderbillscarsByPid" parameterType="Long" resultMap="ftmsorderbillscarsResult">
  546. <include refid="selectftmsorderbillscarsVo"/>
  547. where p_id = #{pId}
  548. </select>
  549. <select id="planSelectCarsCount" parameterType="ftmsorderbills" resultType="int">
  550. SELECT
  551. COUNT(id)
  552. FROM
  553. F_TMSORDERBILLSCARS
  554. WHERE
  555. org_id = #{id}
  556. AND order_status &gt;= 30
  557. </select>
  558. <select id="selectTmsorderbillsCarsByDriver" parameterType="Long" resultType="Map">
  559. SELECT
  560. c.id,
  561. c.p_id AS pId,
  562. c.org_id AS orgId,
  563. t.corp_id AS fCorpId,
  564. corp.f_name AS fCorpIds,
  565. u.nick_name AS planUserId,
  566. driver.nick_name AS driverUserIds,
  567. t.un_load_date AS tUnLoadDate,
  568. t.un_load_addr AS unLoadAddr,
  569. t.un_load_attn AS unLoadAttn,
  570. t.un_load_attn_tel AS unLoadAttnTel,
  571. t.qty_plan AS qtyPlan,
  572. t.weight_plan AS weightPlan,
  573. t.bill_type AS billType,
  574. t.trans_type AS transType,
  575. t.trans_prop AS transProp,
  576. t.md_load_addr AS tMdLoadAddr,
  577. t.md_load_attn AS tMdLoadAttn,
  578. t.md_load_date AS tMdLoadDate,
  579. t.load_addr AS tLoadAddr,
  580. t.load_date AS tLoadDate,
  581. t.load_attn AS loadAttn,
  582. t.load_attntel AS loadAttntel,
  583. c.carreg_no AS carregNo,
  584. c.mblno,
  585. c.driverbonus,
  586. g.f_name AS goodsId,
  587. c.order_status AS orderStatus,
  588. c.cntr_qty AS cntrQty,
  589. c.cntr_weight AS cntrWeight,
  590. t.ysl,
  591. t.voy,
  592. t.pol_id AS polId,
  593. t.pod_id AS podId,
  594. c.oil_amt AS oilAmt,
  595. c.cost_oth AS costOth,
  596. c.cntr_id AS cntrId,
  597. c.driver_tel AS driverTel,
  598. c.driver_name AS driverName,
  599. c.carreg_no AS carregNo,
  600. c.carcor_pid AS carcorPid,
  601. c.driver_tel AS driverTel,
  602. c.driver_name AS driverName,
  603. c.cost_remarks AS costRemarks,
  604. c.odometer_from AS odometerFrom,
  605. c.odometer_end AS odometerEnd,
  606. c.accept_date AS acceptDate,
  607. c.accept_remarks AS acceptRemarks,
  608. IFNULL(c.costom_amt_01, 0) AS costomAmt01,
  609. IFNULL(c.costom_amt_02, 0) AS costomAmt02,
  610. IFNULL(c.costom_amt_03, 0) AS costomAmt03,
  611. IFNULL(c.costom_amt_04, 0) AS costomAmt04,
  612. IFNULL(c.costom_amt_05, 0) AS costomAmt05,
  613. IFNULL(c.costom_amt_06, 0) AS costomAmt06,
  614. c.costom_str_01 AS costomStr01,
  615. c.costom_str_02 AS costomStr02,
  616. c.load_date AS loadDate,
  617. c.load_remarks AS loadRemarks,
  618. c.md_load_date AS mdLoadDate,
  619. c.md_load_remarks AS mdLoadRemarks,
  620. c.un_load_date AS unLoadDate,
  621. c.un_load_remarks AS unLoadRemarks,
  622. c.waybill_date AS waybillDate,
  623. c.waybill_remarks AS waybillRemarks
  624. FROM
  625. F_TMSORDERBILLSCARS c
  626. LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
  627. LEFT JOIN sys_user u ON u.user_id = t.plan_user_id
  628. LEFT JOIN sys_user driver ON driver.user_id = c.driver_user_id
  629. LEFT JOIN t_corps corp ON corp.f_id = t.corp_id
  630. LEFT JOIN t_goods g ON g.f_id = t.goods_id
  631. where
  632. c.id = #{id}
  633. ORDER BY c.id desc
  634. </select>
  635. <select id="selectMonthlyOrder" parameterType="ftmsorderbillscars" resultType="Map">
  636. SELECT count( p_id ) countOrders, IFNULL(SUM( miles ),0) miles, IFNULL(SUM( freight_amt_dr ), 0) freightAmtDr
  637. FROM F_TMSORDERBILLSCARS
  638. <where>
  639. driver_tel = #{driverTel}
  640. <if test='monthList != null and monthList[0] != null and monthList[0]!= ""'>
  641. and create_time &gt;= #{monthList[0]}
  642. </if>
  643. <if test='monthList != null and monthList[1] != null and monthList[1]!= ""'>
  644. and create_time &lt;= #{monthList[1]}
  645. </if>
  646. </where>
  647. </select>
  648. <select id="selectHomeUpperRightMapList" resultType="Map">
  649. SELECT
  650. car.id,
  651. car.mblno,
  652. car.carreg_no carregNo,
  653. car.order_status orderStatus,
  654. t.f_name corpName
  655. FROM
  656. F_TMSORDERBILLSCARS car
  657. LEFT JOIN F_TMSORDERBILLS bill ON bill.id = car.org_id
  658. LEFT JOIN t_corps t ON t.f_id = bill.corp_id
  659. </select>
  660. <select id="selectHomeUpperLeftCntrs" parameterType="list" resultType="Map">
  661. SELECT
  662. IFNULL(SUM( cntr_qty ), 0) planQuantity, IFNULL(SUM( cntr_blc_qty ), 0) surplusQuantity
  663. FROM
  664. F_TMSORDERBILLSCNTRS
  665. where
  666. create_time &gt;= #{currentDay[0]}
  667. and create_time &lt;= #{currentDay[1]}
  668. </select>
  669. <select id="selectHomeUpperLeftCars" parameterType="list" resultType="int">
  670. SELECT
  671. COUNT( id )
  672. FROM
  673. F_TMSORDERBILLSCARS
  674. where
  675. create_time &gt;= #{currentDay[0]}
  676. and create_time &lt;= #{currentDay[1]}
  677. </select>
  678. <insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
  679. insert into F_TMSORDERBILLSCARS
  680. <trim prefix="(" suffix=")" suffixOverrides=",">
  681. <if test="pId != null">p_id,</if>
  682. <if test="orgId != null">org_id,</if>
  683. <if test="orderNo != null">order_no,</if>
  684. <if test="cntrId != null">cntr_id,</if>
  685. <if test="cntrNo != null">cntr_no,</if>
  686. <if test="carcorPid != null">carcor_pid,</if>
  687. <if test="mblno != null">mblno,</if>
  688. <if test="carregNo != null">carreg_no,</if>
  689. <if test="driverName != null">driver_name,</if>
  690. <if test="driverUserId != null">driver_user_id,</if>
  691. <if test="driverTel != null">driver_tel,</if>
  692. <if test="planDate != null">plan_date,</if>
  693. <if test="planRemarks != null">plan_remarks,</if>
  694. <if test="acceptDate != null">accept_date,</if>
  695. <if test="acceptRemarks != null">accept_remarks,</if>
  696. <if test="loadDate != null">load_date,</if>
  697. <if test="loadRemarks != null">load_remarks,</if>
  698. <if test="mdLoadDate != null">md_load_date,</if>
  699. <if test="offData != null">off_data,</if>
  700. <if test="offRemarks != null">off_remarks,</if>
  701. <if test="mdLoadRemarks != null">md_load_remarks,</if>
  702. <if test="unLoadDate != null">un_load_date,</if>
  703. <if test="unLoadRemarks != null">un_load_remarks,</if>
  704. <if test="waybillDate != null">waybill_date,</if>
  705. <if test="qtyLoad != null">qty_load,</if>
  706. <if test="qtyUnLoad != null">qty_un_load,</if>
  707. <if test="cntrQty != null">cntr_qty,</if>
  708. <if test="gopodsLossQty != null">gopods_loss_qty,</if>
  709. <if test="cntrWeight != null">cntr_weight,</if>
  710. <if test="gopodsLossrate != null">gopods_lossrate,</if>
  711. <if test="waybillRemarks != null">waybill_remarks,</if>
  712. <if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
  713. <if test="qtyDr != null">qty_dr,</if>
  714. <if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
  715. <if test="qtyCr != null">qty_cr,</if>
  716. <if test="freightPriceDr != null">freight_price_dr,</if>
  717. <if test="freightPriceCr != null">freight_price_cr,</if>
  718. <if test="freightAmtDr != null">freight_amt_dr,</if>
  719. <if test="freightAmtCr != null">freight_amt_cr,</if>
  720. <if test="feeitemDr != null">feeitem_dr,</if>
  721. <if test="feeitemDrRemarks != null">feeitem_dr_remarks,</if>
  722. <if test="feeitemCr != null">feeitem_cr,</if>
  723. <if test="feeitemCrRemarks != null">feeitem_cr_remarks,</if>
  724. <if test="amtDr != null">amt_dr,</if>
  725. <if test="amtCr != null">amt_cr,</if>
  726. <if test="dueDateDr != null">due_date_dr,</if>
  727. <if test="dueDateCr != null">due_date_cr,</if>
  728. <if test="odometerFrom != null">odometer_from,</if>
  729. <if test="odometerEnd != null">odometer_end,</if>
  730. <if test="milesEmpty != null">miles_empty,</if>
  731. <if test="milesLoad != null">miles_load,</if>
  732. <if test="miles != null">miles,</if>
  733. <if test="driverbonus != null">driverbonus,</if>
  734. <if test="costtoll != null">costtoll,</if>
  735. <if test="costmaintain != null">costmaintain,</if>
  736. <if test="costOth != null">cost_oth,</if>
  737. <if test="costRemarks != null">cost_remarks,</if>
  738. <if test="oilQtyper != null">oil_qtyper,</if>
  739. <if test="oilQty1 != null">oil_qty1,</if>
  740. <if test="oilPrice1 != null">oil_price1,</if>
  741. <if test="oilAmt1 != null">oil_amt1,</if>
  742. <if test="oilQty2 != null">oil_qty2,</if>
  743. <if test="oilPrice2 != null">oil_price2,</if>
  744. <if test="oilAmt2 != null">oil_amt2,</if>
  745. <if test="oilQty != null">oil_qty,</if>
  746. <if test="oilPrice != null">oil_price,</if>
  747. <if test="oilAmt != null">oil_amt,</if>
  748. <if test="oilQtyBlc != null">oil_qty_blc,</if>
  749. <if test="oilAmtBlc != null">oil_amt_blc,</if>
  750. <if test="profit != null">profit,</if>
  751. <if test="invDrNeed != null">inv_dr_need,</if>
  752. <if test="invDrStatus != null">inv_dr_status,</if>
  753. <if test="invDrTaxrate != null">inv_dr_taxrate,</if>
  754. <if test="invDrTaxamt != null">inv_dr_taxamt,</if>
  755. <if test="invDrDate != null">inv_dr_date,</if>
  756. <if test="invDrNo != null">inv_dr_no,</if>
  757. <if test="accchkStaus != null">accchk_staus,</if>
  758. <if test="billStatus != null">bill_status,</if>
  759. <if test="orderStatus != null">order_status,</if>
  760. <if test="accchkDate != null">accchk_date,</if>
  761. <if test="costomAmt01 != null">costom_amt_01,</if>
  762. <if test="stlAmtDr != null">stl_amt_dr,</if>
  763. <if test="costomAmt02 != null">costom_amt_02,</if>
  764. <if test="stlDateDr != null">stl_date_dr,</if>
  765. <if test="costomAmt03 != null">costom_amt_03,</if>
  766. <if test="stlAmtCr != null">stl_amt_cr,</if>
  767. <if test="costomAmt04 != null">costom_amt_04,</if>
  768. <if test="stlDateCr != null">stl_date_cr,</if>
  769. <if test="costomAmt05 != null">costom_amt_05,</if>
  770. <if test="costomAmt06 != null">costom_amt_06,</if>
  771. <if test="delFlag != null">del_flag,</if>
  772. <if test="costomStr01 != null">costom_str_01,</if>
  773. <if test="createBy != null">create_by,</if>
  774. <if test="createTime != null">create_time,</if>
  775. <if test="costomStr02 != null">costom_str_02,</if>
  776. <if test="updateBy != null">update_by,</if>
  777. <if test="updateTime != null">update_time,</if>
  778. <if test="remarks != null">remarks,</if>
  779. </trim>
  780. <trim prefix="values (" suffix=")" suffixOverrides=",">
  781. <if test="pId != null">#{pId},</if>
  782. <if test="orgId != null">#{orgId},</if>
  783. <if test="orderNo != null">#{orderNo},</if>
  784. <if test="cntrId != null">#{cntrId},</if>
  785. <if test="cntrNo != null">#{cntrNo},</if>
  786. <if test="carcorPid != null">#{carcorPid},</if>
  787. <if test="mblno != null">#{mblno},</if>
  788. <if test="carregNo != null">#{carregNo},</if>
  789. <if test="driverName != null">#{driverName},</if>
  790. <if test="driverUserId != null">#{driverUserId},</if>
  791. <if test="driverTel != null">#{driverTel},</if>
  792. <if test="planDate != null">#{planDate},</if>
  793. <if test="planRemarks != null">#{planRemarks},</if>
  794. <if test="acceptDate != null">#{acceptDate},</if>
  795. <if test="acceptRemarks != null">#{acceptRemarks},</if>
  796. <if test="loadDate != null">#{loadDate},</if>
  797. <if test="loadRemarks != null">#{loadRemarks},</if>
  798. <if test="mdLoadDate != null">#{mdLoadDate},</if>
  799. <if test="offData != null">#{offData},</if>
  800. <if test="offRemarks != null">#{offRemarks},</if>
  801. <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
  802. <if test="unLoadDate != null">#{unLoadDate},</if>
  803. <if test="unLoadRemarks != null">#{unLoadRemarks},</if>
  804. <if test="waybillDate != null">#{waybillDate},</if>
  805. <if test="qtyLoad != null">#{qtyLoad},</if>
  806. <if test="qtyUnLoad != null">#{qtyUnLoad},</if>
  807. <if test="cntrQty != null">#{cntrQty},</if>
  808. <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
  809. <if test="cntrWeight != null">#{cntrWeight},</if>
  810. <if test="gopodsLossrate != null">#{gopodsLossrate},</if>
  811. <if test="waybillRemarks != null">#{waybillRemarks},</if>
  812. <if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
  813. <if test="qtyDr != null">#{qtyDr},</if>
  814. <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
  815. <if test="qtyCr != null">#{qtyCr},</if>
  816. <if test="freightPriceDr != null">#{freightPriceDr},</if>
  817. <if test="freightPriceCr != null">#{freightPriceCr},</if>
  818. <if test="freightAmtDr != null">#{freightAmtDr},</if>
  819. <if test="freightAmtCr != null">#{freightAmtCr},</if>
  820. <if test="feeitemDr != null">#{feeitemDr},</if>
  821. <if test="feeitemDrRemarks != null">#{feeitemDrRemarks},</if>
  822. <if test="feeitemCr != null">#{feeitemCr},</if>
  823. <if test="feeitemCrRemarks != null">#{feeitemCrRemarks},</if>
  824. <if test="amtDr != null">#{amtDr},</if>
  825. <if test="amtCr != null">#{amtCr},</if>
  826. <if test="dueDateDr != null">#{dueDateDr},</if>
  827. <if test="dueDateCr != null">#{dueDateCr},</if>
  828. <if test="odometerFrom != null">#{odometerFrom},</if>
  829. <if test="odometerEnd != null">#{odometerEnd},</if>
  830. <if test="milesEmpty != null">#{milesEmpty},</if>
  831. <if test="milesLoad != null">#{milesLoad},</if>
  832. <if test="miles != null">#{miles},</if>
  833. <if test="driverbonus != null">#{driverbonus},</if>
  834. <if test="costtoll != null">#{costtoll},</if>
  835. <if test="costmaintain != null">#{costmaintain},</if>
  836. <if test="costOth != null">#{costOth},</if>
  837. <if test="costRemarks != null">#{costRemarks},</if>
  838. <if test="oilQtyper != null">#{oilQtyper},</if>
  839. <if test="oilQty1 != null">#{oilQty1},</if>
  840. <if test="oilPrice1 != null">#{oilPrice1},</if>
  841. <if test="oilAmt1 != null">#{oilAmt1},</if>
  842. <if test="oilQty2 != null">#{oilQty2},</if>
  843. <if test="oilPrice2 != null">#{oilPrice2},</if>
  844. <if test="oilAmt2 != null">#{oilAmt2},</if>
  845. <if test="oilQty != null">#{oilQty},</if>
  846. <if test="oilPrice != null">#{oilPrice},</if>
  847. <if test="oilAmt != null">#{oilAmt},</if>
  848. <if test="oilQtyBlc != null">#{oilQtyBlc},</if>
  849. <if test="oilAmtBlc != null">#{oilAmtBlc},</if>
  850. <if test="profit != null">#{profit},</if>
  851. <if test="invDrNeed != null">#{invDrNeed},</if>
  852. <if test="invDrStatus != null">#{invDrStatus},</if>
  853. <if test="invDrTaxrate != null">#{invDrTaxrate},</if>
  854. <if test="invDrTaxamt != null">#{invDrTaxamt},</if>
  855. <if test="invDrDate != null">#{invDrDate},</if>
  856. <if test="invDrNo != null">#{invDrNo},</if>
  857. <if test="accchkStaus != null">#{accchkStaus},</if>
  858. <if test="billStatus != null">#{billStatus},</if>
  859. <if test="orderStatus != null">#{orderStatus},</if>
  860. <if test="accchkDate != null">#{accchkDate},</if>
  861. <if test="costomAmt01 != null">#{costomAmt01},</if>
  862. <if test="stlAmtDr != null">#{stlAmtDr},</if>
  863. <if test="costomAmt02 != null">#{costomAmt02},</if>
  864. <if test="stlDateDr != null">#{stlDateDr},</if>
  865. <if test="costomAmt03 != null">#{costomAmt03},</if>
  866. <if test="stlAmtCr != null">#{stlAmtCr},</if>
  867. <if test="costomAmt04 != null">#{costomAmt04},</if>
  868. <if test="stlDateCr != null">#{stlDateCr},</if>
  869. <if test="costomAmt05 != null">#{costomAmt05},</if>
  870. <if test="costomAmt06 != null">#{costomAmt06},</if>
  871. <if test="delFlag != null">#{delFlag},</if>
  872. <if test="costomStr01 != null">#{costomStr01},</if>
  873. <if test="createBy != null">#{createBy},</if>
  874. <if test="createTime != null">#{createTime},</if>
  875. <if test="costomStr02 != null">#{costomStr02},</if>
  876. <if test="updateBy != null">#{updateBy},</if>
  877. <if test="updateTime != null">#{updateTime},</if>
  878. <if test="remarks != null">#{remarks},</if>
  879. </trim>
  880. </insert>
  881. <update id="updateftmsorderbillscars" parameterType="ftmsorderbillscars">
  882. update F_TMSORDERBILLSCARS
  883. <trim prefix="SET" suffixOverrides=",">
  884. <if test="pId != null">p_id = #{pId},</if>
  885. <if test="orgId != null">org_id = #{orgId},</if>
  886. <if test="orderNo != null">order_no = #{orderNo},</if>
  887. <if test="cntrId != null">cntr_id = #{cntrId},</if>
  888. <if test="cntrNo != null">cntr_no = #{cntrNo},</if>
  889. <if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
  890. <if test="mblno != null">mblno = #{mblno},</if>
  891. <if test="carregNo != null">carreg_no = #{carregNo},</if>
  892. <if test="driverName != null">driver_name = #{driverName},</if>
  893. <if test="driverUserId != null">driver_user_id = #{driverUserId},</if>
  894. <if test="driverTel != null">driver_tel = #{driverTel},</if>
  895. <if test="planDate != null">plan_date = #{planDate},</if>
  896. <if test="planRemarks != null">plan_remarks = #{planRemarks},</if>
  897. <if test="acceptDate != null">accept_date = #{acceptDate},</if>
  898. <if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</if>
  899. <if test="loadDate != null">load_date = #{loadDate},</if>
  900. <if test="loadRemarks != null">load_remarks = #{loadRemarks},</if>
  901. <if test="mdLoadDate != null">md_load_date = #{mdLoadDate},</if>
  902. <if test="offData != null">off_data = #{offData},</if>
  903. <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
  904. <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</if>
  905. <if test="unLoadDate != null">un_load_date = #{unLoadDate},</if>
  906. <if test="unLoadRemarks != null">un_load_remarks = #{unLoadRemarks},</if>
  907. <if test="waybillDate != null">waybill_date = #{waybillDate},</if>
  908. <if test="qtyLoad != null">qty_load = #{qtyLoad},</if>
  909. <if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
  910. <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
  911. <if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
  912. <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
  913. <if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
  914. <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
  915. <if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
  916. <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
  917. <if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
  918. <if test="qtyCr != null">qty_cr = #{qtyCr},</if>
  919. <if test="freightPriceDr != null">freight_price_dr = #{freightPriceDr},</if>
  920. <if test="freightPriceCr != null">freight_price_cr = #{freightPriceCr},</if>
  921. <if test="freightAmtDr != null">freight_amt_dr = #{freightAmtDr},</if>
  922. <if test="freightAmtCr != null">freight_amt_cr = #{freightAmtCr},</if>
  923. <if test="feeitemDr != null">feeitem_dr = #{feeitemDr},</if>
  924. <if test="feeitemDrRemarks != null">feeitem_dr_remarks = #{feeitemDrRemarks},</if>
  925. <if test="feeitemCr != null">feeitem_cr = #{feeitemCr},</if>
  926. <if test="feeitemCrRemarks != null">feeitem_cr_remarks = #{feeitemCrRemarks},</if>
  927. <if test="amtDr != null">amt_dr = #{amtDr},</if>
  928. <if test="amtCr != null">amt_cr = #{amtCr},</if>
  929. <if test="dueDateDr != null">due_date_dr = #{dueDateDr},</if>
  930. <if test="dueDateCr != null">due_date_cr = #{dueDateCr},</if>
  931. <if test="odometerFrom != null">odometer_from = #{odometerFrom},</if>
  932. <if test="odometerEnd != null">odometer_end = #{odometerEnd},</if>
  933. <if test="milesEmpty != null">miles_empty = #{milesEmpty},</if>
  934. <if test="milesLoad != null">miles_load = #{milesLoad},</if>
  935. <if test="miles != null">miles = #{miles},</if>
  936. <if test="driverbonus != null">driverbonus = #{driverbonus},</if>
  937. <if test="costtoll != null">costtoll = #{costtoll},</if>
  938. <if test="costmaintain != null">costmaintain = #{costmaintain},</if>
  939. <if test="costOth != null">cost_oth = #{costOth},</if>
  940. <if test="costRemarks != null">cost_remarks = #{costRemarks},</if>
  941. <if test="oilQtyper != null">oil_qtyper = #{oilQtyper},</if>
  942. <if test="oilQty1 != null">oil_qty1 = #{oilQty1},</if>
  943. <if test="oilPrice1 != null">oil_price1 = #{oilPrice1},</if>
  944. <if test="oilAmt1 != null">oil_amt1 = #{oilAmt1},</if>
  945. <if test="oilQty2 != null">oil_qty2 = #{oilQty2},</if>
  946. <if test="oilPrice2 != null">oil_price2 = #{oilPrice2},</if>
  947. <if test="oilAmt2 != null">oil_amt2 = #{oilAmt2},</if>
  948. <if test="oilQty != null">oil_qty = #{oilQty},</if>
  949. <if test="oilPrice != null">oil_price = #{oilPrice},</if>
  950. <if test="oilAmt != null">oil_amt = #{oilAmt},</if>
  951. <if test="oilQtyBlc != null">oil_qty_blc = #{oilQtyBlc},</if>
  952. <if test="oilAmtBlc != null">oil_amt_blc = #{oilAmtBlc},</if>
  953. <if test="profit != null">profit = #{profit},</if>
  954. <if test="invDrNeed != null">inv_dr_need = #{invDrNeed},</if>
  955. <if test="invDrStatus != null">inv_dr_status = #{invDrStatus},</if>
  956. <if test="invDrTaxrate != null">inv_dr_taxrate = #{invDrTaxrate},</if>
  957. <if test="invDrTaxamt != null">inv_dr_taxamt = #{invDrTaxamt},</if>
  958. <if test="invDrDate != null">inv_dr_date = #{invDrDate},</if>
  959. <if test="invDrNo != null">inv_dr_no = #{invDrNo},</if>
  960. <if test="accchkStaus != null">accchk_staus = #{accchkStaus},</if>
  961. <if test="billStatus != null">bill_status = #{billStatus},</if>
  962. <if test="orderStatus != null">order_status = #{orderStatus},</if>
  963. <if test="accchkDate != null">accchk_date = #{accchkDate},</if>
  964. <if test="costomAmt01 != null">costom_amt_01 = #{costomAmt01},</if>
  965. <if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
  966. <if test="costomAmt02 != null">costom_amt_02 = #{costomAmt02},</if>
  967. <if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
  968. <if test="costomAmt03 != null">costom_amt_03 = #{costomAmt03},</if>
  969. <if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
  970. <if test="costomAmt04 != null">costom_amt_04 = #{costomAmt04},</if>
  971. <if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
  972. <if test="costomAmt05 != null">costom_amt_05 = #{costomAmt05},</if>
  973. <if test="costomAmt06 != null">costom_amt_06 = #{costomAmt06},</if>
  974. <if test="delFlag != null">del_flag = #{delFlag},</if>
  975. <if test="costomStr01 != null">costom_str_01 = #{costomStr01},</if>
  976. <if test="createBy != null">create_by = #{createBy},</if>
  977. <if test="createTime != null">create_time = #{createTime},</if>
  978. <if test="costomStr02 != null">costom_str_02 = #{costomStr02},</if>
  979. <if test="updateBy != null">update_by = #{updateBy},</if>
  980. <if test="updateTime != null">update_time = #{updateTime},</if>
  981. <if test="remarks != null">remarks = #{remarks},</if>
  982. </trim>
  983. where id = #{id}
  984. </update>
  985. <update id="updateTmsorderCarStatusByOrgId" parameterType="ftmsorderbillscars">
  986. update F_TMSORDERBILLSCARS
  987. set bill_status = #{billStatus}
  988. where org_id = #{orgId}
  989. </update>
  990. <update id="updateftmsorderbillscarsDriverNamePhone">
  991. UPDATE F_TMSORDERBILLSCARS car
  992. LEFT JOIN sys_user u ON u.user_id = car.driver_user_id
  993. SET car.driver_name = u.nick_name,
  994. car.driver_tel = u.phonenumber
  995. WHERE
  996. car.driver_user_id IS NOT NULL
  997. </update>
  998. <delete id="deleteftmsorderbillscarsById" parameterType="Long">
  999. delete from F_TMSORDERBILLSCARS where id = #{id}
  1000. </delete>
  1001. <delete id="deleteftmsorderbillscarsByPId" parameterType="Long">
  1002. delete from F_TMSORDERBILLSCARS where p_id = #{id}
  1003. </delete>
  1004. <delete id="deleteftmsorderbillscarsByIds" parameterType="String">
  1005. delete from F_TMSORDERBILLSCARS where id in
  1006. <foreach item="id" collection="array" open="(" separator="," close=")">
  1007. #{id}
  1008. </foreach>
  1009. </delete>
  1010. </mapper>