|
@@ -6,58 +6,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="StationClassStructure" id="StationClassStructureResult">
|
|
|
<result property="id" column="id" />
|
|
|
- <result property="stationId" column="station_id" />
|
|
|
<result property="orderNo" column="order_no" />
|
|
|
+ <result property="stationId" column="station_id" />
|
|
|
+ <result property="stationName" column="station_name" />
|
|
|
<result property="oilGun" column="oil_gun" />
|
|
|
<result property="oilName" column="oil_name" />
|
|
|
+ <result property="oilPirce" column="oil_pirce" />
|
|
|
+ <result property="oilType" column="oil_type" />
|
|
|
<result property="consumerId" column="consumer_id" />
|
|
|
<result property="consumer" column="consumer" />
|
|
|
<result property="amt" column="amt" />
|
|
|
- <result property="stationName" column="station_name" />
|
|
|
<result property="orderLiters" column="order_liters" />
|
|
|
<result property="payType" column="pay_type" />
|
|
|
<result property="payWay" column="pay_way" />
|
|
|
<result property="payDate" column="pay_date" />
|
|
|
<result property="oilPersonnel" column="oil_personnel" />
|
|
|
<result property="orderType" column="order_type" />
|
|
|
- <result property="oilType" column="oil_type" />
|
|
|
<result property="printNum" column="print_num" />
|
|
|
<result property="classStructureNo" column="class_structure_no" />
|
|
|
<result property="classStartDate" column="class_start_date" />
|
|
|
<result property="classStructureDate" column="class_structure_date" />
|
|
|
<result property="classStructureMan" column="class_structure_man" />
|
|
|
<result property="oils" column="oils" />
|
|
|
+ <result property="receivableAmt" column="receivable_amt" />
|
|
|
+ <result property="receivedAmt" column="received_amt" />
|
|
|
+ <result property="discountAmt" column="discount_amt" />
|
|
|
+ <result property="discountCouponAmt" column="discount_coupon_amt" />
|
|
|
+ <result property="discountCoupon" column="discount_coupon" />
|
|
|
+ <result property="wxAmt" column="wx_amt" />
|
|
|
+ <result property="zfbAmt" column="zfb_amt" />
|
|
|
+ <result property="posAmt" column="pos_amt" />
|
|
|
+ <result property="xjAmt" column="xj_amt" />
|
|
|
+ <result property="didiAppAmt" column="didi_app_amt" />
|
|
|
+ <result property="tyAppAmt" column="ty_app_amt" />
|
|
|
+ <result property="otherAmt" column="other_amt" />
|
|
|
+ <result property="dzkAmt" column="dzk_amt" />
|
|
|
+ <result property="score" column="score" />
|
|
|
+ <result property="memberNo" column="member_no" />
|
|
|
+ <result property="memberAmt" column="member_amt" />
|
|
|
<result property="num" column="num" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectStationClassStructureVo">
|
|
|
- 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_start_date, class_structure_date, class_structure_man, oils from station_class_structure
|
|
|
+ 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 from station_class_structure
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
|
|
|
<include refid="selectStationClassStructureVo"/>
|
|
|
<where>
|
|
|
- <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
+ <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
|
<if test="oilGun != null and oilGun != ''"> and oil_gun = #{oilGun}</if>
|
|
|
<if test="oilName != null and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
|
|
|
+ <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
|
|
|
+ <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
|
|
|
<if test="consumerId != null "> and consumer_id = #{consumerId}</if>
|
|
|
<if test="consumer != null and consumer != ''"> and consumer = #{consumer}</if>
|
|
|
- <if test="amt != null and amt != ''"> and amt = #{amt}</if>
|
|
|
- <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
|
- <if test="orderLiters != null and orderLiters != ''"> and order_liters = #{orderLiters}</if>
|
|
|
+ <if test="amt != null "> and amt = #{amt}</if>
|
|
|
+ <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
|
|
|
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
|
|
<if test="payWay != null and payWay != ''"> and pay_way = #{payWay}</if>
|
|
|
<if test="payDate != null "> and pay_date = #{payDate}</if>
|
|
|
<if test="oilPersonnel != null and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
|
|
|
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
|
|
|
- <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
|
|
|
<if test="printNum != null "> and print_num = #{printNum}</if>
|
|
|
<if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
|
|
|
<if test="classStartDate != null "> and class_start_date = #{classStartDate}</if>
|
|
|
<if test="classStructureDate != null "> and class_structure_date = #{classStructureDate}</if>
|
|
|
<if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
|
|
|
<if test="oils != null and oils != ''"> and oils = #{oils}</if>
|
|
|
+ <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
|
|
|
+ <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
|
|
|
+ <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
|
|
|
+ <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
|
|
|
+ <if test="discountCoupon != null and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
|
|
|
+ <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
|
|
|
+ <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
|
|
|
+ <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
|
|
|
+ <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
|
|
|
+ <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
|
|
|
+ <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
|
|
|
+ <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
|
|
|
+ <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
|
|
|
+ <if test="score != null "> and score = #{score}</if>
|
|
|
+ <if test="memberNo != null and memberNo != ''"> and member_no = #{memberNo}</if>
|
|
|
+ <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -89,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
)
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectStationClassStructureById" parameterType="Long" resultMap="StationClassStructureResult">
|
|
|
<include refid="selectStationClassStructureVo"/>
|
|
|
where id = #{id}
|
|
@@ -114,77 +149,128 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<insert id="insertStationClassStructure" parameterType="StationClassStructure" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into station_class_structure
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="stationId != null">station_id,</if>
|
|
|
<if test="orderNo != null">order_no,</if>
|
|
|
+ <if test="stationId != null">station_id,</if>
|
|
|
+ <if test="stationName != null">station_name,</if>
|
|
|
<if test="oilGun != null">oil_gun,</if>
|
|
|
<if test="oilName != null">oil_name,</if>
|
|
|
+ <if test="oilPirce != null">oil_pirce,</if>
|
|
|
+ <if test="oilType != null">oil_type,</if>
|
|
|
<if test="consumerId != null">consumer_id,</if>
|
|
|
<if test="consumer != null">consumer,</if>
|
|
|
<if test="amt != null">amt,</if>
|
|
|
- <if test="stationName != null">station_name,</if>
|
|
|
<if test="orderLiters != null">order_liters,</if>
|
|
|
<if test="payType != null">pay_type,</if>
|
|
|
<if test="payWay != null">pay_way,</if>
|
|
|
<if test="payDate != null">pay_date,</if>
|
|
|
<if test="oilPersonnel != null">oil_personnel,</if>
|
|
|
<if test="orderType != null">order_type,</if>
|
|
|
- <if test="oilType != null">oil_type,</if>
|
|
|
<if test="printNum != null">print_num,</if>
|
|
|
<if test="classStructureNo != null">class_structure_no,</if>
|
|
|
<if test="classStartDate != null">class_start_date,</if>
|
|
|
<if test="classStructureDate != null">class_structure_date,</if>
|
|
|
<if test="classStructureMan != null">class_structure_man,</if>
|
|
|
<if test="oils != null">oils,</if>
|
|
|
+ <if test="receivableAmt != null">receivable_amt,</if>
|
|
|
+ <if test="receivedAmt != null">received_amt,</if>
|
|
|
+ <if test="discountAmt != null">discount_amt,</if>
|
|
|
+ <if test="discountCouponAmt != null">discount_coupon_amt,</if>
|
|
|
+ <if test="discountCoupon != null">discount_coupon,</if>
|
|
|
+ <if test="wxAmt != null">wx_amt,</if>
|
|
|
+ <if test="zfbAmt != null">zfb_amt,</if>
|
|
|
+ <if test="posAmt != null">pos_amt,</if>
|
|
|
+ <if test="xjAmt != null">xj_amt,</if>
|
|
|
+ <if test="didiAppAmt != null">didi_app_amt,</if>
|
|
|
+ <if test="tyAppAmt != null">ty_app_amt,</if>
|
|
|
+ <if test="otherAmt != null">other_amt,</if>
|
|
|
+ <if test="dzkAmt != null">dzk_amt,</if>
|
|
|
+ <if test="score != null">score,</if>
|
|
|
+ <if test="memberNo != null">member_no,</if>
|
|
|
+ <if test="memberAmt != null">member_amt,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="stationId != null">#{stationId},</if>
|
|
|
<if test="orderNo != null">#{orderNo},</if>
|
|
|
+ <if test="stationId != null">#{stationId},</if>
|
|
|
+ <if test="stationName != null">#{stationName},</if>
|
|
|
<if test="oilGun != null">#{oilGun},</if>
|
|
|
<if test="oilName != null">#{oilName},</if>
|
|
|
+ <if test="oilPirce != null">#{oilPirce},</if>
|
|
|
+ <if test="oilType != null">#{oilType},</if>
|
|
|
<if test="consumerId != null">#{consumerId},</if>
|
|
|
<if test="consumer != null">#{consumer},</if>
|
|
|
<if test="amt != null">#{amt},</if>
|
|
|
- <if test="stationName != null">#{stationName},</if>
|
|
|
<if test="orderLiters != null">#{orderLiters},</if>
|
|
|
<if test="payType != null">#{payType},</if>
|
|
|
<if test="payWay != null">#{payWay},</if>
|
|
|
<if test="payDate != null">#{payDate},</if>
|
|
|
<if test="oilPersonnel != null">#{oilPersonnel},</if>
|
|
|
<if test="orderType != null">#{orderType},</if>
|
|
|
- <if test="oilType != null">#{oilType},</if>
|
|
|
<if test="printNum != null">#{printNum},</if>
|
|
|
<if test="classStructureNo != null">#{classStructureNo},</if>
|
|
|
<if test="classStartDate != null">#{classStartDate},</if>
|
|
|
<if test="classStructureDate != null">#{classStructureDate},</if>
|
|
|
<if test="classStructureMan != null">#{classStructureMan},</if>
|
|
|
<if test="oils != null">#{oils},</if>
|
|
|
+ <if test="receivableAmt != null">#{receivableAmt},</if>
|
|
|
+ <if test="receivedAmt != null">#{receivedAmt},</if>
|
|
|
+ <if test="discountAmt != null">#{discountAmt},</if>
|
|
|
+ <if test="discountCouponAmt != null">#{discountCouponAmt},</if>
|
|
|
+ <if test="discountCoupon != null">#{discountCoupon},</if>
|
|
|
+ <if test="wxAmt != null">#{wxAmt},</if>
|
|
|
+ <if test="zfbAmt != null">#{zfbAmt},</if>
|
|
|
+ <if test="posAmt != null">#{posAmt},</if>
|
|
|
+ <if test="xjAmt != null">#{xjAmt},</if>
|
|
|
+ <if test="didiAppAmt != null">#{didiAppAmt},</if>
|
|
|
+ <if test="tyAppAmt != null">#{tyAppAmt},</if>
|
|
|
+ <if test="otherAmt != null">#{otherAmt},</if>
|
|
|
+ <if test="dzkAmt != null">#{dzkAmt},</if>
|
|
|
+ <if test="score != null">#{score},</if>
|
|
|
+ <if test="memberNo != null">#{memberNo},</if>
|
|
|
+ <if test="memberAmt != null">#{memberAmt},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateStationClassStructure" parameterType="StationClassStructure">
|
|
|
update station_class_structure
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="stationId != null">station_id = #{stationId},</if>
|
|
|
<if test="orderNo != null">order_no = #{orderNo},</if>
|
|
|
+ <if test="stationId != null">station_id = #{stationId},</if>
|
|
|
+ <if test="stationName != null">station_name = #{stationName},</if>
|
|
|
<if test="oilGun != null">oil_gun = #{oilGun},</if>
|
|
|
<if test="oilName != null">oil_name = #{oilName},</if>
|
|
|
+ <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>
|
|
|
+ <if test="oilType != null">oil_type = #{oilType},</if>
|
|
|
<if test="consumerId != null">consumer_id = #{consumerId},</if>
|
|
|
<if test="consumer != null">consumer = #{consumer},</if>
|
|
|
<if test="amt != null">amt = #{amt},</if>
|
|
|
- <if test="stationName != null">station_name = #{stationName},</if>
|
|
|
<if test="orderLiters != null">order_liters = #{orderLiters},</if>
|
|
|
<if test="payType != null">pay_type = #{payType},</if>
|
|
|
<if test="payWay != null">pay_way = #{payWay},</if>
|
|
|
<if test="payDate != null">pay_date = #{payDate},</if>
|
|
|
<if test="oilPersonnel != null">oil_personnel = #{oilPersonnel},</if>
|
|
|
<if test="orderType != null">order_type = #{orderType},</if>
|
|
|
- <if test="oilType != null">oil_type = #{oilType},</if>
|
|
|
<if test="printNum != null">print_num = #{printNum},</if>
|
|
|
<if test="classStructureNo != null">class_structure_no = #{classStructureNo},</if>
|
|
|
<if test="classStartDate != null">class_start_date = #{classStartDate},</if>
|
|
|
<if test="classStructureDate != null">class_structure_date = #{classStructureDate},</if>
|
|
|
<if test="classStructureMan != null">class_structure_man = #{classStructureMan},</if>
|
|
|
<if test="oils != null">oils = #{oils},</if>
|
|
|
+ <if test="receivableAmt != null">receivable_amt = #{receivableAmt},</if>
|
|
|
+ <if test="receivedAmt != null">received_amt = #{receivedAmt},</if>
|
|
|
+ <if test="discountAmt != null">discount_amt = #{discountAmt},</if>
|
|
|
+ <if test="discountCouponAmt != null">discount_coupon_amt = #{discountCouponAmt},</if>
|
|
|
+ <if test="discountCoupon != null">discount_coupon = #{discountCoupon},</if>
|
|
|
+ <if test="wxAmt != null">wx_amt = #{wxAmt},</if>
|
|
|
+ <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
|
|
|
+ <if test="posAmt != null">pos_amt = #{posAmt},</if>
|
|
|
+ <if test="xjAmt != null">xj_amt = #{xjAmt},</if>
|
|
|
+ <if test="didiAppAmt != null">didi_app_amt = #{didiAppAmt},</if>
|
|
|
+ <if test="tyAppAmt != null">ty_app_amt = #{tyAppAmt},</if>
|
|
|
+ <if test="otherAmt != null">other_amt = #{otherAmt},</if>
|
|
|
+ <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
|
|
|
+ <if test="score != null">score = #{score},</if>
|
|
|
+ <if test="memberNo != null">member_no = #{memberNo},</if>
|
|
|
+ <if test="memberAmt != null">member_amt = #{memberAmt},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|