ftmsorderbillscarsMapper.xml 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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="offData" column="off_data"/>
  24. <result property="offRemarks" column="off_remarks"/>
  25. <result property="loadDate" column="load_date"/>
  26. <result property="loadRemarks" column="load_remarks"/>
  27. <result property="mdLoadDate" column="md_load_date"/>
  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="waybillRemarks" column="waybill_remarks"/>
  33. <result property="qtyLoad" column="qty_load"/>
  34. <result property="cntrQty" column="cntr_qty"/>
  35. <result property="qtyUnLoad" column="qty_un_load"/>
  36. <result property="cntrWeight" column="cntr_weight"/>
  37. <result property="gopodsLossQty" column="gopods_loss_qty"/>
  38. <result property="gopodsLossrate" column="gopods_lossrate"/>
  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="stlAmtDr" column="stl_amt_dr"/>
  89. <result property="stlDateDr" column="stl_date_dr"/>
  90. <result property="stlAmtCr" column="stl_amt_cr"/>
  91. <result property="stlDateCr" column="stl_date_cr"/>
  92. <result property="delFlag" column="del_flag"/>
  93. <result property="createBy" column="create_by"/>
  94. <result property="createTime" column="create_time"/>
  95. <result property="updateBy" column="update_by"/>
  96. <result property="updateTime" column="update_time"/>
  97. <result property="remarks" column="remarks"/>
  98. </resultMap>
  99. <sql id="selectftmsorderbillscarsVo">
  100. select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_user_id, driver_name, driver_tel, plan_date, plan_remarks, accept_date, off_data, off_remarks, accept_remarks, load_date, load_remarks, md_load_date, md_load_remarks, un_load_date, un_load_remarks, waybill_date, waybill_remarks, qty_load, cntr_qty, qty_un_load, cntr_weight, gopods_loss_qty, gopods_lossrate, 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, stl_amt_dr, stl_date_dr, stl_amt_cr, stl_date_cr, del_flag, create_by, create_time, update_by, update_time, remarks from F_TMSORDERBILLSCARS
  101. </sql>
  102. <select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
  103. <include refid="selectftmsorderbillscarsVo"/>
  104. <where>
  105. <if test="pId != null "> and p_id = #{pId}</if>
  106. <if test="orgId != null "> and org_id = #{orgId}</if>
  107. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  108. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  109. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  110. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  111. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  112. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  113. <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
  114. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  115. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  116. <if test="planDate != null "> and plan_date = #{planDate}</if>
  117. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  118. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  119. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  120. <if test="offData != null "> and off_data = #{offData}</if>
  121. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  122. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  123. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  124. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  125. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  126. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  127. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  128. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  129. <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
  130. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  131. <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
  132. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  133. <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
  134. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  135. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  136. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  137. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  138. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  139. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  140. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  141. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  142. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  143. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  144. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  145. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  146. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  147. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  148. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  149. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  150. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  151. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  152. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  153. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  154. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  155. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  156. <if test="miles != null "> and miles = #{miles}</if>
  157. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  158. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  159. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  160. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  161. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  162. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  163. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  164. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  165. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  166. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  167. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  168. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  169. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  170. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  171. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  172. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  173. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  174. <if test="profit != null "> and profit = #{profit}</if>
  175. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  176. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  177. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  178. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  179. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  180. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  181. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  182. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  183. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  184. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  185. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  186. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  187. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  188. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  189. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  190. </where>
  191. </select>
  192. <select id="selectftmsorderbillscarsCount" parameterType="ftmsorderbillscars" resultType="int">
  193. select count(id) from F_TMSORDERBILLSCARS
  194. <where>
  195. <if test="pId != null "> and p_id = #{pId}</if>
  196. <if test="orgId != null "> and org_id = #{orgId}</if>
  197. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  198. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  199. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  200. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  201. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  202. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  203. <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
  204. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  205. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  206. <if test="planDate != null "> and plan_date = #{planDate}</if>
  207. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  208. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  209. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  210. <if test="offData != null "> and off_data = #{offData}</if>
  211. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  212. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  213. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  214. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  215. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  216. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  217. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  218. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  219. <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
  220. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  221. <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
  222. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  223. <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
  224. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  225. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  226. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  227. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  228. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  229. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  230. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  231. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  232. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  233. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  234. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  235. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  236. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  237. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  238. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  239. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  240. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  241. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  242. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  243. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  244. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  245. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  246. <if test="miles != null "> and miles = #{miles}</if>
  247. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  248. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  249. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  250. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  251. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  252. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  253. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  254. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  255. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  256. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  257. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  258. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  259. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  260. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  261. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  262. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  263. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  264. <if test="profit != null "> and profit = #{profit}</if>
  265. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  266. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  267. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  268. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  269. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  270. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  271. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  272. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  273. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  274. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  275. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  276. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  277. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  278. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  279. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  280. </where>
  281. </select>
  282. <select id="selectftmsorderbillscarsIdList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
  283. select id from F_TMSORDERBILLSCARS
  284. <where>
  285. <if test="pId != null "> and p_id = #{pId}</if>
  286. <if test="orgId != null "> and org_id = #{orgId}</if>
  287. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  288. <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
  289. <if test="cntrNo != null and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
  290. <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
  291. <if test="mblno != null and mblno != ''"> and mblno = #{mblno}</if>
  292. <if test="carregNo != null and carregNo != ''"> and carreg_no = #{carregNo}</if>
  293. <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
  294. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  295. <if test="driverTel != null and driverTel != ''"> and driver_tel = #{driverTel}</if>
  296. <if test="planDate != null "> and plan_date = #{planDate}</if>
  297. <if test="planRemarks != null and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
  298. <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
  299. <if test="acceptRemarks != null and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
  300. <if test="offData != null "> and off_data = #{offData}</if>
  301. <if test="offRemarks != null and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
  302. <if test="loadDate != null "> and load_date = #{loadDate}</if>
  303. <if test="loadRemarks != null and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
  304. <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
  305. <if test="mdLoadRemarks != null and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
  306. <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
  307. <if test="unLoadRemarks != null and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
  308. <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
  309. <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
  310. <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
  311. <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
  312. <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
  313. <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
  314. <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
  315. <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
  316. <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
  317. <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
  318. <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
  319. <if test="freightPriceCr != null "> and freight_price_cr = #{freightPriceCr}</if>
  320. <if test="freightAmtDr != null "> and freight_amt_dr = #{freightAmtDr}</if>
  321. <if test="freightAmtCr != null "> and freight_amt_cr = #{freightAmtCr}</if>
  322. <if test="feeitemDr != null "> and feeitem_dr = #{feeitemDr}</if>
  323. <if test="feeitemDrRemarks != null and feeitemDrRemarks != ''"> and feeitem_dr_remarks = #{feeitemDrRemarks}</if>
  324. <if test="feeitemCr != null "> and feeitem_cr = #{feeitemCr}</if>
  325. <if test="feeitemCrRemarks != null and feeitemCrRemarks != ''"> and feeitem_cr_remarks = #{feeitemCrRemarks}</if>
  326. <if test="amtDr != null "> and amt_dr = #{amtDr}</if>
  327. <if test="amtCr != null "> and amt_cr = #{amtCr}</if>
  328. <if test="dueDateDr != null "> and due_date_dr = #{dueDateDr}</if>
  329. <if test="dueDateCr != null "> and due_date_cr = #{dueDateCr}</if>
  330. <if test="odometerFrom != null "> and odometer_from = #{odometerFrom}</if>
  331. <if test="odometerEnd != null "> and odometer_end = #{odometerEnd}</if>
  332. <if test="milesEmpty != null "> and miles_empty = #{milesEmpty}</if>
  333. <if test="milesLoad != null "> and miles_load = #{milesLoad}</if>
  334. <if test="miles != null "> and miles = #{miles}</if>
  335. <if test="driverbonus != null "> and driverbonus = #{driverbonus}</if>
  336. <if test="costtoll != null "> and costtoll = #{costtoll}</if>
  337. <if test="costmaintain != null "> and costmaintain = #{costmaintain}</if>
  338. <if test="costOth != null "> and cost_oth = #{costOth}</if>
  339. <if test="costRemarks != null and costRemarks != ''"> and cost_remarks = #{costRemarks}</if>
  340. <if test="oilQtyper != null "> and oil_qtyper = #{oilQtyper}</if>
  341. <if test="oilQty1 != null "> and oil_qty1 = #{oilQty1}</if>
  342. <if test="oilPrice1 != null "> and oil_price1 = #{oilPrice1}</if>
  343. <if test="oilAmt1 != null "> and oil_amt1 = #{oilAmt1}</if>
  344. <if test="oilQty2 != null "> and oil_qty2 = #{oilQty2}</if>
  345. <if test="oilPrice2 != null "> and oil_price2 = #{oilPrice2}</if>
  346. <if test="oilAmt2 != null "> and oil_amt2 = #{oilAmt2}</if>
  347. <if test="oilQty != null "> and oil_qty = #{oilQty}</if>
  348. <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
  349. <if test="oilAmt != null "> and oil_amt = #{oilAmt}</if>
  350. <if test="oilQtyBlc != null "> and oil_qty_blc = #{oilQtyBlc}</if>
  351. <if test="oilAmtBlc != null "> and oil_amt_blc = #{oilAmtBlc}</if>
  352. <if test="profit != null "> and profit = #{profit}</if>
  353. <if test="invDrNeed != null and invDrNeed != ''"> and inv_dr_need = #{invDrNeed}</if>
  354. <if test="invDrStatus != null and invDrStatus != ''"> and inv_dr_status = #{invDrStatus}</if>
  355. <if test="invDrTaxrate != null "> and inv_dr_taxrate = #{invDrTaxrate}</if>
  356. <if test="invDrTaxamt != null "> and inv_dr_taxamt = #{invDrTaxamt}</if>
  357. <if test="invDrDate != null "> and inv_dr_date = #{invDrDate}</if>
  358. <if test="invDrNo != null and invDrNo != ''"> and inv_dr_no = #{invDrNo}</if>
  359. <if test="accchkStaus != null and accchkStaus != ''"> and accchk_staus = #{accchkStaus}</if>
  360. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  361. <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
  362. <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
  363. <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
  364. <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
  365. <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
  366. <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
  367. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  368. </where>
  369. </select>
  370. <select id="selectftmsorderbillscarsMapList" parameterType="ftmsorderbills" resultType="Map">
  371. SELECT
  372. c.id,
  373. c.order_no orderNo,
  374. c.mblno,
  375. c.load_date loadDate,
  376. c.carreg_no carregNo,
  377. c.order_status orderStatus,
  378. p.f_name corpId,
  379. t.bill_type billType,
  380. t.trans_type transType,
  381. t.trans_prop transProp,
  382. g.f_name goodsId,
  383. t.qty_plan qtyPlan,
  384. t.weight_plan weightPlan,
  385. t.ysl,
  386. t.voy,
  387. t.pol_id polId,
  388. t.pod_id podId,
  389. t.load_addr loadAddr,
  390. t.load_date tLoadDate,
  391. t.load_attn loadAttn,
  392. t.load_attntel loadAttntel,
  393. t.md_load_addr mdLoadAddr,
  394. t.md_load_date tMdLoadDate,
  395. t.md_load_attn mdLoadAttn,
  396. t.md_load_attn_tel mdLoadAttnTel,
  397. t.un_load_addr unLoadAddr,
  398. t.un_load_date tUnLoadDate,
  399. t.un_load_attn unLoadAttn,
  400. t.un_load_attn_tel unLoadAttnTel,
  401. c.accept_date acceptDate,
  402. c.off_data offData,
  403. c.load_date cLoadDate,
  404. c.md_load_date mdLoadDate,
  405. c.un_load_date unLoadDate,
  406. c.waybill_date waybillDate,
  407. c.waybill_remarks waybillRemarks
  408. FROM
  409. F_TMSORDERBILLSCARS c
  410. LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
  411. LEFT JOIN t_corps p ON p.f_id = t.corp_id
  412. LEFT JOIN t_goods g ON g.f_id = t.goods_id
  413. <where>
  414. <if test="corpId != null"> and t.corp_id = #{corpId}</if>
  415. <if test="billType != null"> and t.bill_type = #{billType}</if>
  416. <if test="transType != null"> and t.trans_type = #{transType}</if>
  417. <if test="transProp != null"> and t.trans_prop = #{transProp}</if>
  418. <if test="goodsId != null"> and t.goods_id = #{goodsId}</if>
  419. <if test="orderStatus != null"> and c.order_status = #{orderStatus}</if>
  420. <if test='planDate != null and planDate[0] != null and planDate[0]!= ""'>
  421. and c.plan_date &gt;= #{planDate[0]}
  422. </if>
  423. <if test='planDate != null and planDate[1] != null and planDate[1]!= ""'>
  424. and c.plan_date &lt;= #{planDate[1]}
  425. </if>
  426. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  427. and c.load_date &gt;= #{cLoadDate[0]}
  428. </if>
  429. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  430. and c.load_date &lt;= #{cLoadDate[1]}
  431. </if>
  432. <if test="mblno != null and mblno != ''"> and t.mblno like concat('%', #{mblno}, '%')</if>
  433. <if test="carregNo != null and carregNo != ''"> and c.carreg_no like concat('%', #{carregNo}, '%')</if>
  434. <if test="loadAddr != null and loadAddr != ''"> and t.load_addr like concat('%', #{loadAddr}, '%')</if>
  435. <if test="unLoadAddr != null and unLoadAddr != ''"> and t.un_load_addr like concat('%', #{unLoadAddr}, '%')</if>
  436. <if test="mdLoadAddr != null and mdLoadAddr != ''"> and t.md_load_addr like concat('%', #{mdLoadAddr}, '%')</if>
  437. </where>
  438. </select>
  439. <select id="selectftmsorderbillscarsById" parameterType="Long" resultMap="ftmsorderbillscarsResult">
  440. <include refid="selectftmsorderbillscarsVo"/>
  441. where id = #{id}
  442. </select>
  443. <select id="selectftmsorderbillscarsByPid" parameterType="Long" resultMap="ftmsorderbillscarsResult">
  444. <include refid="selectftmsorderbillscarsVo"/>
  445. where p_id = #{pId}
  446. </select>
  447. <select id="planSelectCarsCount" parameterType="ftmsorderbills" resultType="int">
  448. SELECT
  449. COUNT(id)
  450. FROM
  451. F_TMSORDERBILLSCARS
  452. WHERE
  453. org_id = #{id}
  454. AND order_status &gt;= 30
  455. </select>
  456. <select id="selectTmsorderbillsCarsByDriver" parameterType="Long" resultType="Map">
  457. SELECT
  458. c.id,
  459. c.p_id AS pId,
  460. c.org_id AS orgId,
  461. t.corp_id AS fCorpId,
  462. corp.f_name AS fCorpIds,
  463. u.nick_name AS planUserId,
  464. driver.nick_name AS driverUserId,
  465. t.un_load_date AS tUnLoadDate,
  466. t.un_load_addr AS unLoadAddr,
  467. t.un_load_attn AS unLoadAttn,
  468. t.un_load_attn_tel AS unLoadAttnTel,
  469. t.qty_plan AS qtyPlan,
  470. t.weight_plan AS weightPlan,
  471. t.bill_type AS billType,
  472. t.trans_type AS transType,
  473. t.trans_prop AS transProp,
  474. t.load_addr AS tLoadAddr,
  475. t.load_date AS tLoadDate,
  476. t.load_attn AS loadAttn,
  477. t.load_attntel AS loadAttntel,
  478. c.carreg_no AS carregNo,
  479. c.mblno,
  480. g.f_name AS goodsId,
  481. c.order_status AS orderStatus,
  482. c.cntr_qty AS cntrQty,
  483. c.cntr_weight AS cntrWeight,
  484. t.ysl,
  485. t.voy,
  486. t.pol_id AS polId,
  487. t.pod_id AS podId,
  488. c.cntr_id AS cntrId,
  489. c.driver_tel AS driverTel,
  490. c.driver_name AS driverName,
  491. c.carreg_no AS carregNo,
  492. c.carcor_pid AS carcorPid,
  493. c.driver_tel AS driverTel,
  494. c.driver_name AS driverName,
  495. c.odometer_from AS odometerFrom,
  496. c.odometer_end AS odometerEnd,
  497. c.accept_date AS acceptDate,
  498. c.accept_remarks AS acceptRemarks,
  499. c.load_date AS loadDate,
  500. c.load_remarks AS loadRemarks,
  501. c.md_load_date AS mdLoadDate,
  502. c.md_load_remarks AS mdLoadRemarks,
  503. c.un_load_date AS unLoadDate,
  504. c.un_load_remarks AS unLoadRemarks,
  505. c.waybill_date AS waybillDate,
  506. c.waybill_remarks AS waybillRemarks
  507. FROM
  508. F_TMSORDERBILLSCARS c
  509. LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
  510. LEFT JOIN sys_user u ON u.user_id = t.plan_user_id
  511. LEFT JOIN sys_user driver ON driver.user_id = c.driver_user_id
  512. LEFT JOIN t_corps corp ON corp.f_id = t.corp_id
  513. LEFT JOIN t_goods g ON g.f_id = t.goods_id
  514. where
  515. c.id = #{id}
  516. </select>
  517. <insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
  518. insert into F_TMSORDERBILLSCARS
  519. <trim prefix="(" suffix=")" suffixOverrides=",">
  520. <if test="pId != null">p_id,</if>
  521. <if test="orgId != null">org_id,</if>
  522. <if test="orderNo != null">order_no,</if>
  523. <if test="cntrId != null">cntr_id,</if>
  524. <if test="cntrNo != null">cntr_no,</if>
  525. <if test="carcorPid != null">carcor_pid,</if>
  526. <if test="carregNo != null">carreg_no,</if>
  527. <if test="mblno != null">mblno,</if>
  528. <if test="driverName != null">driver_name,</if>
  529. <if test="driverUserId != null">driver_user_id,</if>
  530. <if test="driverTel != null">driver_tel,</if>
  531. <if test="planDate != null">plan_date,</if>
  532. <if test="planRemarks != null">plan_remarks,</if>
  533. <if test="acceptDate != null">accept_date,</if>
  534. <if test="acceptRemarks != null">accept_remarks,</if>
  535. <if test="loadDate != null">load_date,</if>
  536. <if test="loadRemarks != null">load_remarks,</if>
  537. <if test="offData != null">off_data,</if>
  538. <if test="mdLoadDate != null">md_load_date,</if>
  539. <if test="mdLoadRemarks != null">md_load_remarks,</if>
  540. <if test="offRemarks != null">off_remarks,</if>
  541. <if test="unLoadDate != null">un_load_date,</if>
  542. <if test="unLoadRemarks != null">un_load_remarks,</if>
  543. <if test="waybillDate != null">waybill_date,</if>
  544. <if test="qtyLoad != null">qty_load,</if>
  545. <if test="qtyUnLoad != null">qty_un_load,</if>
  546. <if test="cntrQty != null">cntr_qty,</if>
  547. <if test="gopodsLossQty != null">gopods_loss_qty,</if>
  548. <if test="cntrWeight != null">cntr_weight,</if>
  549. <if test="gopodsLossrate != null">gopods_lossrate,</if>
  550. <if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
  551. <if test="qtyDr != null">qty_dr,</if>
  552. <if test="waybillRemarks != null">waybill_remarks,</if>
  553. <if test="qtyCr != null">qty_cr,</if>
  554. <if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
  555. <if test="freightPriceDr != null">freight_price_dr,</if>
  556. <if test="freightPriceCr != null">freight_price_cr,</if>
  557. <if test="freightAmtDr != null">freight_amt_dr,</if>
  558. <if test="freightAmtCr != null">freight_amt_cr,</if>
  559. <if test="feeitemDr != null">feeitem_dr,</if>
  560. <if test="feeitemDrRemarks != null">feeitem_dr_remarks,</if>
  561. <if test="feeitemCr != null">feeitem_cr,</if>
  562. <if test="feeitemCrRemarks != null">feeitem_cr_remarks,</if>
  563. <if test="amtDr != null">amt_dr,</if>
  564. <if test="amtCr != null">amt_cr,</if>
  565. <if test="dueDateDr != null">due_date_dr,</if>
  566. <if test="dueDateCr != null">due_date_cr,</if>
  567. <if test="odometerFrom != null">odometer_from,</if>
  568. <if test="odometerEnd != null">odometer_end,</if>
  569. <if test="milesEmpty != null">miles_empty,</if>
  570. <if test="milesLoad != null">miles_load,</if>
  571. <if test="miles != null">miles,</if>
  572. <if test="driverbonus != null">driverbonus,</if>
  573. <if test="costtoll != null">costtoll,</if>
  574. <if test="costmaintain != null">costmaintain,</if>
  575. <if test="costOth != null">cost_oth,</if>
  576. <if test="costRemarks != null">cost_remarks,</if>
  577. <if test="oilQtyper != null">oil_qtyper,</if>
  578. <if test="oilQty1 != null">oil_qty1,</if>
  579. <if test="oilPrice1 != null">oil_price1,</if>
  580. <if test="oilAmt1 != null">oil_amt1,</if>
  581. <if test="oilQty2 != null">oil_qty2,</if>
  582. <if test="oilPrice2 != null">oil_price2,</if>
  583. <if test="oilAmt2 != null">oil_amt2,</if>
  584. <if test="oilQty != null">oil_qty,</if>
  585. <if test="oilPrice != null">oil_price,</if>
  586. <if test="oilAmt != null">oil_amt,</if>
  587. <if test="oilQtyBlc != null">oil_qty_blc,</if>
  588. <if test="oilAmtBlc != null">oil_amt_blc,</if>
  589. <if test="profit != null">profit,</if>
  590. <if test="invDrNeed != null">inv_dr_need,</if>
  591. <if test="invDrStatus != null">inv_dr_status,</if>
  592. <if test="invDrTaxrate != null">inv_dr_taxrate,</if>
  593. <if test="invDrTaxamt != null">inv_dr_taxamt,</if>
  594. <if test="invDrDate != null">inv_dr_date,</if>
  595. <if test="invDrNo != null">inv_dr_no,</if>
  596. <if test="accchkStaus != null">accchk_staus,</if>
  597. <if test="billStatus != null">bill_status,</if>
  598. <if test="orderStatus != null">order_status,</if>
  599. <if test="accchkDate != null">accchk_date,</if>
  600. <if test="stlAmtDr != null">stl_amt_dr,</if>
  601. <if test="stlDateDr != null">stl_date_dr,</if>
  602. <if test="stlAmtCr != null">stl_amt_cr,</if>
  603. <if test="stlDateCr != null">stl_date_cr,</if>
  604. <if test="delFlag != null">del_flag,</if>
  605. <if test="createBy != null">create_by,</if>
  606. <if test="createTime != null">create_time,</if>
  607. <if test="updateBy != null">update_by,</if>
  608. <if test="updateTime != null">update_time,</if>
  609. <if test="remarks != null">remarks,</if>
  610. </trim>
  611. <trim prefix="values (" suffix=")" suffixOverrides=",">
  612. <if test="pId != null">#{pId},</if>
  613. <if test="orgId != null">#{orgId},</if>
  614. <if test="orderNo != null">#{orderNo},</if>
  615. <if test="cntrId != null">#{cntrId},</if>
  616. <if test="cntrNo != null">#{cntrNo},</if>
  617. <if test="carcorPid != null">#{carcorPid},</if>
  618. <if test="carregNo != null">#{carregNo},</if>
  619. <if test="mblno != null">#{mblno},</if>
  620. <if test="driverName != null">#{driverName},</if>
  621. <if test="driverUserId != null">#{driverUserId},</if>
  622. <if test="driverTel != null">#{driverTel},</if>
  623. <if test="planDate != null">#{planDate},</if>
  624. <if test="planRemarks != null">#{planRemarks},</if>
  625. <if test="acceptDate != null">#{acceptDate},</if>
  626. <if test="acceptRemarks != null">#{acceptRemarks},</if>
  627. <if test="loadDate != null">#{loadDate},</if>
  628. <if test="loadRemarks != null">#{loadRemarks},</if>
  629. <if test="offData != null">#{offData},</if>
  630. <if test="mdLoadDate != null">#{mdLoadDate},</if>
  631. <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
  632. <if test="offRemarks != null">#{offRemarks},</if>
  633. <if test="unLoadDate != null">#{unLoadDate},</if>
  634. <if test="unLoadRemarks != null">#{unLoadRemarks},</if>
  635. <if test="waybillDate != null">#{waybillDate},</if>
  636. <if test="qtyLoad != null">#{qtyLoad},</if>
  637. <if test="qtyUnLoad != null">#{qtyUnLoad},</if>
  638. <if test="cntrQty != null">#{cntrQty},</if>
  639. <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
  640. <if test="cntrWeight != null">#{cntrWeight},</if>
  641. <if test="gopodsLossrate != null">#{gopodsLossrate},</if>
  642. <if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
  643. <if test="qtyDr != null">#{qtyDr},</if>
  644. <if test="waybillRemarks != null">#{waybillRemarks},</if>
  645. <if test="qtyCr != null">#{qtyCr},</if>
  646. <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
  647. <if test="freightPriceDr != null">#{freightPriceDr},</if>
  648. <if test="freightPriceCr != null">#{freightPriceCr},</if>
  649. <if test="freightAmtDr != null">#{freightAmtDr},</if>
  650. <if test="freightAmtCr != null">#{freightAmtCr},</if>
  651. <if test="feeitemDr != null">#{feeitemDr},</if>
  652. <if test="feeitemDrRemarks != null">#{feeitemDrRemarks},</if>
  653. <if test="feeitemCr != null">#{feeitemCr},</if>
  654. <if test="feeitemCrRemarks != null">#{feeitemCrRemarks},</if>
  655. <if test="amtDr != null">#{amtDr},</if>
  656. <if test="amtCr != null">#{amtCr},</if>
  657. <if test="dueDateDr != null">#{dueDateDr},</if>
  658. <if test="dueDateCr != null">#{dueDateCr},</if>
  659. <if test="odometerFrom != null">#{odometerFrom},</if>
  660. <if test="odometerEnd != null">#{odometerEnd},</if>
  661. <if test="milesEmpty != null">#{milesEmpty},</if>
  662. <if test="milesLoad != null">#{milesLoad},</if>
  663. <if test="miles != null">#{miles},</if>
  664. <if test="driverbonus != null">#{driverbonus},</if>
  665. <if test="costtoll != null">#{costtoll},</if>
  666. <if test="costmaintain != null">#{costmaintain},</if>
  667. <if test="costOth != null">#{costOth},</if>
  668. <if test="costRemarks != null">#{costRemarks},</if>
  669. <if test="oilQtyper != null">#{oilQtyper},</if>
  670. <if test="oilQty1 != null">#{oilQty1},</if>
  671. <if test="oilPrice1 != null">#{oilPrice1},</if>
  672. <if test="oilAmt1 != null">#{oilAmt1},</if>
  673. <if test="oilQty2 != null">#{oilQty2},</if>
  674. <if test="oilPrice2 != null">#{oilPrice2},</if>
  675. <if test="oilAmt2 != null">#{oilAmt2},</if>
  676. <if test="oilQty != null">#{oilQty},</if>
  677. <if test="oilPrice != null">#{oilPrice},</if>
  678. <if test="oilAmt != null">#{oilAmt},</if>
  679. <if test="oilQtyBlc != null">#{oilQtyBlc},</if>
  680. <if test="oilAmtBlc != null">#{oilAmtBlc},</if>
  681. <if test="profit != null">#{profit},</if>
  682. <if test="invDrNeed != null">#{invDrNeed},</if>
  683. <if test="invDrStatus != null">#{invDrStatus},</if>
  684. <if test="invDrTaxrate != null">#{invDrTaxrate},</if>
  685. <if test="invDrTaxamt != null">#{invDrTaxamt},</if>
  686. <if test="invDrDate != null">#{invDrDate},</if>
  687. <if test="invDrNo != null">#{invDrNo},</if>
  688. <if test="accchkStaus != null">#{accchkStaus},</if>
  689. <if test="billStatus != null">#{billStatus},</if>
  690. <if test="orderStatus != null">#{orderStatus},</if>
  691. <if test="accchkDate != null">#{accchkDate},</if>
  692. <if test="stlAmtDr != null">#{stlAmtDr},</if>
  693. <if test="stlDateDr != null">#{stlDateDr},</if>
  694. <if test="stlAmtCr != null">#{stlAmtCr},</if>
  695. <if test="stlDateCr != null">#{stlDateCr},</if>
  696. <if test="delFlag != null">#{delFlag},</if>
  697. <if test="createBy != null">#{createBy},</if>
  698. <if test="createTime != null">#{createTime},</if>
  699. <if test="updateBy != null">#{updateBy},</if>
  700. <if test="updateTime != null">#{updateTime},</if>
  701. <if test="remarks != null">#{remarks},</if>
  702. </trim>
  703. </insert>
  704. <update id="updateftmsorderbillscars" parameterType="ftmsorderbillscars">
  705. update F_TMSORDERBILLSCARS
  706. <trim prefix="SET" suffixOverrides=",">
  707. <if test="pId != null">p_id = #{pId},</if>
  708. <if test="orgId != null">org_id = #{orgId},</if>
  709. <if test="orderNo != null">order_no = #{orderNo},</if>
  710. <if test="cntrId != null">cntr_id = #{cntrId},</if>
  711. <if test="cntrNo != null">cntr_no = #{cntrNo},</if>
  712. <if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
  713. <if test="carregNo != null">carreg_no = #{carregNo},</if>
  714. <if test="mblno != null">mblno = #{mblno},</if>
  715. <if test="driverName != null">driver_name = #{driverName},</if>
  716. <if test="driverUserId != null">driver_user_id = #{driverUserId},</if>
  717. <if test="driverTel != null">driver_tel = #{driverTel},</if>
  718. <if test="planDate != null">plan_date = #{planDate},</if>
  719. <if test="planRemarks != null">plan_remarks = #{planRemarks},</if>
  720. <if test="acceptDate != null">accept_date = #{acceptDate},</if>
  721. <if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</if>
  722. <if test="loadDate != null">load_date = #{loadDate},</if>
  723. <if test="loadRemarks != null">load_remarks = #{loadRemarks},</if>
  724. <if test="offData != null">off_data = #{offData},</if>
  725. <if test="mdLoadDate != null">md_load_date = #{mdLoadDate},</if>
  726. <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</if>
  727. <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
  728. <if test="unLoadDate != null">un_load_date = #{unLoadDate},</if>
  729. <if test="unLoadRemarks != null">un_load_remarks = #{unLoadRemarks},</if>
  730. <if test="waybillDate != null">waybill_date = #{waybillDate},</if>
  731. <if test="qtyLoad != null">qty_load = #{qtyLoad},</if>
  732. <if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
  733. <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
  734. <if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
  735. <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
  736. <if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
  737. <if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
  738. <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
  739. <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
  740. <if test="qtyCr != null">qty_cr = #{qtyCr},</if>
  741. <if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
  742. <if test="freightPriceDr != null">freight_price_dr = #{freightPriceDr},</if>
  743. <if test="freightPriceCr != null">freight_price_cr = #{freightPriceCr},</if>
  744. <if test="freightAmtDr != null">freight_amt_dr = #{freightAmtDr},</if>
  745. <if test="freightAmtCr != null">freight_amt_cr = #{freightAmtCr},</if>
  746. <if test="feeitemDr != null">feeitem_dr = #{feeitemDr},</if>
  747. <if test="feeitemDrRemarks != null">feeitem_dr_remarks = #{feeitemDrRemarks},</if>
  748. <if test="feeitemCr != null">feeitem_cr = #{feeitemCr},</if>
  749. <if test="feeitemCrRemarks != null">feeitem_cr_remarks = #{feeitemCrRemarks},</if>
  750. <if test="amtDr != null">amt_dr = #{amtDr},</if>
  751. <if test="amtCr != null">amt_cr = #{amtCr},</if>
  752. <if test="dueDateDr != null">due_date_dr = #{dueDateDr},</if>
  753. <if test="dueDateCr != null">due_date_cr = #{dueDateCr},</if>
  754. <if test="odometerFrom != null">odometer_from = #{odometerFrom},</if>
  755. <if test="odometerEnd != null">odometer_end = #{odometerEnd},</if>
  756. <if test="milesEmpty != null">miles_empty = #{milesEmpty},</if>
  757. <if test="milesLoad != null">miles_load = #{milesLoad},</if>
  758. <if test="miles != null">miles = #{miles},</if>
  759. <if test="driverbonus != null">driverbonus = #{driverbonus},</if>
  760. <if test="costtoll != null">costtoll = #{costtoll},</if>
  761. <if test="costmaintain != null">costmaintain = #{costmaintain},</if>
  762. <if test="costOth != null">cost_oth = #{costOth},</if>
  763. <if test="costRemarks != null">cost_remarks = #{costRemarks},</if>
  764. <if test="oilQtyper != null">oil_qtyper = #{oilQtyper},</if>
  765. <if test="oilQty1 != null">oil_qty1 = #{oilQty1},</if>
  766. <if test="oilPrice1 != null">oil_price1 = #{oilPrice1},</if>
  767. <if test="oilAmt1 != null">oil_amt1 = #{oilAmt1},</if>
  768. <if test="oilQty2 != null">oil_qty2 = #{oilQty2},</if>
  769. <if test="oilPrice2 != null">oil_price2 = #{oilPrice2},</if>
  770. <if test="oilAmt2 != null">oil_amt2 = #{oilAmt2},</if>
  771. <if test="oilQty != null">oil_qty = #{oilQty},</if>
  772. <if test="oilPrice != null">oil_price = #{oilPrice},</if>
  773. <if test="oilAmt != null">oil_amt = #{oilAmt},</if>
  774. <if test="oilQtyBlc != null">oil_qty_blc = #{oilQtyBlc},</if>
  775. <if test="oilAmtBlc != null">oil_amt_blc = #{oilAmtBlc},</if>
  776. <if test="profit != null">profit = #{profit},</if>
  777. <if test="invDrNeed != null">inv_dr_need = #{invDrNeed},</if>
  778. <if test="invDrStatus != null">inv_dr_status = #{invDrStatus},</if>
  779. <if test="invDrTaxrate != null">inv_dr_taxrate = #{invDrTaxrate},</if>
  780. <if test="invDrTaxamt != null">inv_dr_taxamt = #{invDrTaxamt},</if>
  781. <if test="invDrDate != null">inv_dr_date = #{invDrDate},</if>
  782. <if test="invDrNo != null">inv_dr_no = #{invDrNo},</if>
  783. <if test="accchkStaus != null">accchk_staus = #{accchkStaus},</if>
  784. <if test="billStatus != null">bill_status = #{billStatus},</if>
  785. <if test="orderStatus != null">order_status = #{orderStatus},</if>
  786. <if test="accchkDate != null">accchk_date = #{accchkDate},</if>
  787. <if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
  788. <if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
  789. <if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
  790. <if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
  791. <if test="delFlag != null">del_flag = #{delFlag},</if>
  792. <if test="createBy != null">create_by = #{createBy},</if>
  793. <if test="createTime != null">create_time = #{createTime},</if>
  794. <if test="updateBy != null">update_by = #{updateBy},</if>
  795. <if test="updateTime != null">update_time = #{updateTime},</if>
  796. <if test="remarks != null">remarks = #{remarks},</if>
  797. </trim>
  798. where id = #{id}
  799. </update>
  800. <update id="updateTmsorderCarStatusByOrgId" parameterType="ftmsorderbillscars">
  801. update F_TMSORDERBILLSCARS
  802. set bill_status = #{billStatus}
  803. where org_id = #{orgId}
  804. </update>
  805. <delete id="deleteftmsorderbillscarsById" parameterType="Long">
  806. delete from F_TMSORDERBILLSCARS where id = #{id}
  807. </delete>
  808. <delete id="deleteftmsorderbillscarsByPId" parameterType="Long">
  809. delete from F_TMSORDERBILLSCARS where p_id = #{id}
  810. </delete>
  811. <delete id="deleteftmsorderbillscarsByIds" parameterType="String">
  812. delete from F_TMSORDERBILLSCARS where id in
  813. <foreach item="id" collection="array" open="(" separator="," close=")">
  814. #{id}
  815. </foreach>
  816. </delete>
  817. </mapper>