StationClassStructureMapper.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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.yijia.station.mapper.StationClassStructureMapper">
  6. <resultMap type="StationClassStructure" id="StationClassStructureResult">
  7. <result property="id" column="id" />
  8. <result property="orderNo" column="order_no" />
  9. <result property="stationId" column="station_id" />
  10. <result property="stationName" column="station_name" />
  11. <result property="oilGun" column="oil_gun" />
  12. <result property="oilName" column="oil_name" />
  13. <result property="oilPirce" column="oil_pirce" />
  14. <result property="oilType" column="oil_type" />
  15. <result property="consumerId" column="consumer_id" />
  16. <result property="consumer" column="consumer" />
  17. <result property="amt" column="amt" />
  18. <result property="orderLiters" column="order_liters" />
  19. <result property="payType" column="pay_type" />
  20. <result property="payWay" column="pay_way" />
  21. <result property="payDate" column="pay_date" />
  22. <result property="oilPersonnel" column="oil_personnel" />
  23. <result property="orderType" column="order_type" />
  24. <result property="printNum" column="print_num" />
  25. <result property="classStructureNo" column="class_structure_no" />
  26. <result property="classStartDate" column="class_start_date" />
  27. <result property="classStructureDate" column="class_structure_date" />
  28. <result property="classStructureMan" column="class_structure_man" />
  29. <result property="oils" column="oils" />
  30. <result property="receivableAmt" column="receivable_amt" />
  31. <result property="receivedAmt" column="received_amt" />
  32. <result property="discountAmt" column="discount_amt" />
  33. <result property="discountCouponAmt" column="discount_coupon_amt" />
  34. <result property="discountCoupon" column="discount_coupon" />
  35. <result property="wxAmt" column="wx_amt" />
  36. <result property="zfbAmt" column="zfb_amt" />
  37. <result property="posAmt" column="pos_amt" />
  38. <result property="xjAmt" column="xj_amt" />
  39. <result property="didiAppAmt" column="didi_app_amt" />
  40. <result property="tyAppAmt" column="ty_app_amt" />
  41. <result property="otherAmt" column="other_amt" />
  42. <result property="dzkAmt" column="dzk_amt" />
  43. <result property="score" column="score" />
  44. <result property="memberNo" column="member_no" />
  45. <result property="memberAmt" column="member_amt" />
  46. <result property="carNo" column="car_no" />
  47. <result property="customerPhone" column="customer_phone" />
  48. <result property="customerGrade" column="customer_grade" />
  49. <result property="num" column="num" />
  50. <result property="wxNum" column="wx_num" />
  51. <result property="zfbNum" column="zfb_num" />
  52. <result property="xjNum" column="xj_num" />
  53. </resultMap>
  54. <sql id="selectStationClassStructureVo">
  55. select id, order_no, station_id, station_name, oil_gun, oil_name, oil_pirce, oil_type, consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, car_no, customer_phone, customer_grade from station_class_structure
  56. </sql>
  57. <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  58. <include refid="selectStationClassStructureVo"/>
  59. <where>
  60. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  61. <if test="stationId != null "> and station_id = #{stationId}</if>
  62. <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
  63. <if test="oilGun != null and oilGun != ''"> and oil_gun = #{oilGun}</if>
  64. <if test="oilName != null and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
  65. <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
  66. <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
  67. <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
  68. <if test="consumer != null and consumer != ''"> and consumer = #{consumer}</if>
  69. <if test="amt != null "> and amt = #{amt}</if>
  70. <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
  71. <if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
  72. <if test="payWay != null and payWay != ''"> and pay_way = #{payWay}</if>
  73. <if test="payDate != null "> and pay_date = #{payDate}</if>
  74. <if test="oilPersonnel != null and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
  75. <if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
  76. <if test="printNum != null "> and print_num = #{printNum}</if>
  77. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  78. <if test="classStartDate != null "> and class_start_date = #{classStartDate}</if>
  79. <if test="classStructureDate != null "> and class_structure_date = #{classStructureDate}</if>
  80. <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
  81. <if test="oils != null and oils != ''"> and oils = #{oils}</if>
  82. <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
  83. <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
  84. <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
  85. <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
  86. <if test="discountCoupon != null and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
  87. <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
  88. <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
  89. <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
  90. <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
  91. <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
  92. <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
  93. <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
  94. <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
  95. <if test="score != null "> and score = #{score}</if>
  96. <if test="memberNo != null and memberNo != ''"> and member_no = #{memberNo}</if>
  97. <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
  98. <if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
  99. <if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
  100. <if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
  101. </where>
  102. order by id desc
  103. </select>
  104. <select id="listPersonnelStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  105. SELECT a.oil_personnel,GROUP_CONCAT(DISTINCT a.oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
  106. from station_class_structure a
  107. <where>
  108. <if test="stationId != null "> and a.station_id = #{stationId}</if>
  109. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  110. </where>
  111. GROUP BY a.oil_personnel
  112. </select>
  113. <select id="listOilStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  114. SELECT a.station_id, a.oil_name,GROUP_CONCAT(DISTINCT oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(a.receivable_amt),2) as receivable_amt,ROUND(SUM(a.received_amt),2) as received_amt,ROUND(SUM(order_liters),2) as order_liters,ROUND(SUM(a.discount_amt),2) as discount_amt ,COUNT(order_no) as order_no,a.class_start_date,a.class_structure_date,a.class_structure_man,sum(a.print_num) print_num
  115. from station_class_structure a
  116. <where>
  117. <if test="stationId != null "> and a.station_id = #{stationId}</if>
  118. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  119. </where>
  120. GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man
  121. </select>
  122. <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  123. select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_structure_date, class_structure_man, oils
  124. from station_class_structure
  125. where id = (
  126. SELECT MAX(id) from station_class_structure
  127. <where>
  128. <if test="stationId != null "> and station_id = #{stationId}</if>
  129. </where>
  130. )
  131. </select>
  132. <select id="selectStationClassStructureById" parameterType="Long" resultMap="StationClassStructureResult">
  133. <include refid="selectStationClassStructureVo"/>
  134. where id = #{id}
  135. </select>
  136. <select id="selectDistnctClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  137. select count(DISTINCT class_structure_no) as num
  138. from station_class_structure
  139. <where>
  140. <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
  141. <if test="likeClassStructureNo != null and likeClassStructureNo != ''"> and class_structure_no like concat( #{likeClassStructureNo}, '%') </if>
  142. </where>
  143. </select>
  144. <!--根据班次号汇总班结数据-->
  145. <select id="selectSummyClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  146. select class_structure_no,class_start_date,class_structure_date,station_id,station_name,count(order_no) as num,
  147. sum(order_liters) as order_liters,sum(receivable_amt) as receivable_amt,sum(amt) as amt,class_structure_man,
  148. sum(print_num) as print_num,sum(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt,
  149. sum(dzk_amt) as dzk_amt,sum(discount_amt) as discount_amt,SUM(pos_amt) as pos_amt,sum(xj_amt) as xj_amt
  150. from station_class_structure
  151. <where>
  152. <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
  153. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  154. </where>
  155. GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man
  156. </select>
  157. <!--按员工/支付方式汇总数据-->
  158. <select id="listPersonnelPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  159. SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
  160. from station_class_structure
  161. <where>
  162. <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
  163. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  164. </where>
  165. GROUP BY oil_personnel
  166. </select>
  167. <select id="listClass" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  168. SELECT * from
  169. station_class_structure
  170. where id =(SELECT max(id) from station_class_structure
  171. <where>
  172. <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
  173. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  174. </where>
  175. )
  176. </select>
  177. <!--根据支付方式汇总数据-->
  178. <select id="listPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  179. SELECT dict_label as pay_type,sum(order_liters) as order_liters,sum(discount_amt) as discount_amt,count(order_no) order_no,sum(amt) as amt,sum(receivable_amt) as receivable_amt,sum(received_amt) as received_amt
  180. from station_class_structure left JOIN sys_dict_data on dict_value = pay_type and dict_type ='pay_type'
  181. <where>
  182. <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
  183. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  184. </where>
  185. GROUP BY pay_type,dict_label
  186. </select>
  187. <!-- 导出数据-->
  188. <select id="selectStationClassStructureExport" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
  189. <include refid="selectStationClassStructureVo"/>
  190. <where>
  191. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  192. <if test="stationId != null "> and station_id = #{stationId}</if>
  193. <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
  194. <if test="oilGun != null and oilGun != ''"> and oil_gun = #{oilGun}</if>
  195. <if test="oilName != null and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
  196. <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
  197. <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
  198. <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
  199. <if test="consumer != null and consumer != ''"> and consumer = #{consumer}</if>
  200. <if test="amt != null "> and amt = #{amt}</if>
  201. <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
  202. <if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
  203. <if test="payWay != null and payWay != ''"> and pay_way = #{payWay}</if>
  204. <if test="payDate != null "> and pay_date = #{payDate}</if>
  205. <if test="oilPersonnel != null and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
  206. <if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
  207. <if test="printNum != null "> and print_num = #{printNum}</if>
  208. <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
  209. <if test="classStartDate != null "> and class_start_date = #{classStartDate}</if>
  210. <if test="classStructureDate != null "> and class_structure_date = #{classStructureDate}</if>
  211. <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
  212. <if test="oils != null and oils != ''"> and oils = #{oils}</if>
  213. <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
  214. <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
  215. <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
  216. <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
  217. <if test="discountCoupon != null and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
  218. <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
  219. <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
  220. <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
  221. <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
  222. <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
  223. <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
  224. <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
  225. <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
  226. <if test="score != null "> and score = #{score}</if>
  227. <if test="memberNo != null and memberNo != ''"> and member_no = #{memberNo}</if>
  228. <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
  229. <if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
  230. <if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
  231. <if test="likePayDate != null and likePayDate != ''">
  232. and date_format(pay_date,'%Y-%m-%d') = date_format(#{likePayDate},'%Y-%m-%d')
  233. </if>
  234. </where>
  235. order by id desc
  236. </select>
  237. <insert id="insertStationClassStructure" parameterType="StationClassStructure" useGeneratedKeys="true" keyProperty="id">
  238. insert into station_class_structure
  239. <trim prefix="(" suffix=")" suffixOverrides=",">
  240. <if test="orderNo != null">order_no,</if>
  241. <if test="stationId != null">station_id,</if>
  242. <if test="stationName != null">station_name,</if>
  243. <if test="oilGun != null">oil_gun,</if>
  244. <if test="oilName != null">oil_name,</if>
  245. <if test="oilPirce != null">oil_pirce,</if>
  246. <if test="oilType != null">oil_type,</if>
  247. <if test="consumerId != null">consumer_id,</if>
  248. <if test="consumer != null">consumer,</if>
  249. <if test="amt != null">amt,</if>
  250. <if test="orderLiters != null">order_liters,</if>
  251. <if test="payType != null">pay_type,</if>
  252. <if test="payWay != null">pay_way,</if>
  253. <if test="payDate != null">pay_date,</if>
  254. <if test="oilPersonnel != null">oil_personnel,</if>
  255. <if test="orderType != null">order_type,</if>
  256. <if test="printNum != null">print_num,</if>
  257. <if test="classStructureNo != null">class_structure_no,</if>
  258. <if test="classStartDate != null">class_start_date,</if>
  259. <if test="classStructureDate != null">class_structure_date,</if>
  260. <if test="classStructureMan != null">class_structure_man,</if>
  261. <if test="oils != null">oils,</if>
  262. <if test="receivableAmt != null">receivable_amt,</if>
  263. <if test="receivedAmt != null">received_amt,</if>
  264. <if test="discountAmt != null">discount_amt,</if>
  265. <if test="discountCouponAmt != null">discount_coupon_amt,</if>
  266. <if test="discountCoupon != null">discount_coupon,</if>
  267. <if test="wxAmt != null">wx_amt,</if>
  268. <if test="zfbAmt != null">zfb_amt,</if>
  269. <if test="posAmt != null">pos_amt,</if>
  270. <if test="xjAmt != null">xj_amt,</if>
  271. <if test="didiAppAmt != null">didi_app_amt,</if>
  272. <if test="tyAppAmt != null">ty_app_amt,</if>
  273. <if test="otherAmt != null">other_amt,</if>
  274. <if test="dzkAmt != null">dzk_amt,</if>
  275. <if test="score != null">score,</if>
  276. <if test="memberNo != null">member_no,</if>
  277. <if test="memberAmt != null">member_amt,</if>
  278. <if test="carNo != null">car_no,</if>
  279. <if test="customerPhone != null">customer_phone,</if>
  280. <if test="customerGrade != null">customer_grade,</if>
  281. </trim>
  282. <trim prefix="values (" suffix=")" suffixOverrides=",">
  283. <if test="orderNo != null">#{orderNo},</if>
  284. <if test="stationId != null">#{stationId},</if>
  285. <if test="stationName != null">#{stationName},</if>
  286. <if test="oilGun != null">#{oilGun},</if>
  287. <if test="oilName != null">#{oilName},</if>
  288. <if test="oilPirce != null">#{oilPirce},</if>
  289. <if test="oilType != null">#{oilType},</if>
  290. <if test="consumerId != null">#{consumerId},</if>
  291. <if test="consumer != null">#{consumer},</if>
  292. <if test="amt != null">#{amt},</if>
  293. <if test="orderLiters != null">#{orderLiters},</if>
  294. <if test="payType != null">#{payType},</if>
  295. <if test="payWay != null">#{payWay},</if>
  296. <if test="payDate != null">#{payDate},</if>
  297. <if test="oilPersonnel != null">#{oilPersonnel},</if>
  298. <if test="orderType != null">#{orderType},</if>
  299. <if test="printNum != null">#{printNum},</if>
  300. <if test="classStructureNo != null">#{classStructureNo},</if>
  301. <if test="classStartDate != null">#{classStartDate},</if>
  302. <if test="classStructureDate != null">#{classStructureDate},</if>
  303. <if test="classStructureMan != null">#{classStructureMan},</if>
  304. <if test="oils != null">#{oils},</if>
  305. <if test="receivableAmt != null">#{receivableAmt},</if>
  306. <if test="receivedAmt != null">#{receivedAmt},</if>
  307. <if test="discountAmt != null">#{discountAmt},</if>
  308. <if test="discountCouponAmt != null">#{discountCouponAmt},</if>
  309. <if test="discountCoupon != null">#{discountCoupon},</if>
  310. <if test="wxAmt != null">#{wxAmt},</if>
  311. <if test="zfbAmt != null">#{zfbAmt},</if>
  312. <if test="posAmt != null">#{posAmt},</if>
  313. <if test="xjAmt != null">#{xjAmt},</if>
  314. <if test="didiAppAmt != null">#{didiAppAmt},</if>
  315. <if test="tyAppAmt != null">#{tyAppAmt},</if>
  316. <if test="otherAmt != null">#{otherAmt},</if>
  317. <if test="dzkAmt != null">#{dzkAmt},</if>
  318. <if test="score != null">#{score},</if>
  319. <if test="memberNo != null">#{memberNo},</if>
  320. <if test="memberAmt != null">#{memberAmt},</if>
  321. <if test="carNo != null">#{carNo},</if>
  322. <if test="customerPhone != null">#{customerPhone},</if>
  323. <if test="customerGrade != null">#{customerGrade},</if>
  324. </trim>
  325. </insert>
  326. <update id="updateStationClassStructure" parameterType="StationClassStructure">
  327. update station_class_structure
  328. <trim prefix="SET" suffixOverrides=",">
  329. <if test="orderNo != null">order_no = #{orderNo},</if>
  330. <if test="stationId != null">station_id = #{stationId},</if>
  331. <if test="stationName != null">station_name = #{stationName},</if>
  332. <if test="oilGun != null">oil_gun = #{oilGun},</if>
  333. <if test="oilName != null">oil_name = #{oilName},</if>
  334. <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>
  335. <if test="oilType != null">oil_type = #{oilType},</if>
  336. <if test="consumerId != null">consumer_id = #{consumerId},</if>
  337. <if test="consumer != null">consumer = #{consumer},</if>
  338. <if test="amt != null">amt = #{amt},</if>
  339. <if test="orderLiters != null">order_liters = #{orderLiters},</if>
  340. <if test="payType != null">pay_type = #{payType},</if>
  341. <if test="payWay != null">pay_way = #{payWay},</if>
  342. <if test="payDate != null">pay_date = #{payDate},</if>
  343. <if test="oilPersonnel != null">oil_personnel = #{oilPersonnel},</if>
  344. <if test="orderType != null">order_type = #{orderType},</if>
  345. <if test="printNum != null">print_num = #{printNum},</if>
  346. <if test="classStructureNo != null">class_structure_no = #{classStructureNo},</if>
  347. <if test="classStartDate != null">class_start_date = #{classStartDate},</if>
  348. <if test="classStructureDate != null">class_structure_date = #{classStructureDate},</if>
  349. <if test="classStructureMan != null">class_structure_man = #{classStructureMan},</if>
  350. <if test="oils != null">oils = #{oils},</if>
  351. <if test="receivableAmt != null">receivable_amt = #{receivableAmt},</if>
  352. <if test="receivedAmt != null">received_amt = #{receivedAmt},</if>
  353. <if test="discountAmt != null">discount_amt = #{discountAmt},</if>
  354. <if test="discountCouponAmt != null">discount_coupon_amt = #{discountCouponAmt},</if>
  355. <if test="discountCoupon != null">discount_coupon = #{discountCoupon},</if>
  356. <if test="wxAmt != null">wx_amt = #{wxAmt},</if>
  357. <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
  358. <if test="posAmt != null">pos_amt = #{posAmt},</if>
  359. <if test="xjAmt != null">xj_amt = #{xjAmt},</if>
  360. <if test="didiAppAmt != null">didi_app_amt = #{didiAppAmt},</if>
  361. <if test="tyAppAmt != null">ty_app_amt = #{tyAppAmt},</if>
  362. <if test="otherAmt != null">other_amt = #{otherAmt},</if>
  363. <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
  364. <if test="score != null">score = #{score},</if>
  365. <if test="memberNo != null">member_no = #{memberNo},</if>
  366. <if test="memberAmt != null">member_amt = #{memberAmt},</if>
  367. <if test="carNo != null">car_no = #{carNo},</if>
  368. <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
  369. <if test="customerGrade != null">customer_grade = #{customerGrade},</if>
  370. </trim>
  371. where id = #{id}
  372. </update>
  373. <delete id="deleteStationClassStructureById" parameterType="Long">
  374. delete from station_class_structure where id = #{id}
  375. </delete>
  376. <delete id="deleteStationClassStructureByIds" parameterType="String">
  377. delete from station_class_structure where id in
  378. <foreach item="id" collection="array" open="(" separator="," close=")">
  379. #{id}
  380. </foreach>
  381. </delete>
  382. </mapper>