zangguocen 3 лет назад
Родитель
Сommit
856792c524
63 измененных файлов с 914 добавлено и 361 удалено
  1. BIN
      yijia-station/target/classes/com/yijia/station/controller/NoOilOrderController.class
  2. BIN
      yijia-station/target/classes/com/yijia/station/controller/PayOrderController.class
  3. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationBalanceChangeController.class
  4. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationClassStructureController.class
  5. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationClassesSummaryController.class
  6. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationDeviceManageController.class
  7. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationInfoController.class
  8. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationOilGunController.class
  9. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationOilPriceAdjustController.class
  10. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationOilPriceController.class
  11. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationPay111Controller.class
  12. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationPayController.class
  13. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationPersonnelController.class
  14. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationPicController.class
  15. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationSettlementPriceAdjustController.class
  16. BIN
      yijia-station/target/classes/com/yijia/station/controller/StationSettlementPriceController.class
  17. BIN
      yijia-station/target/classes/com/yijia/station/domain/DeptInfoDemo.class
  18. BIN
      yijia-station/target/classes/com/yijia/station/domain/PayOrder.class
  19. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationBalanceChange.class
  20. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationClassStructure.class
  21. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationDeviceManage.class
  22. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationOilPrice.class
  23. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationPay.class
  24. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationPersonnel.class
  25. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationPic.class
  26. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationSettlementPrice.class
  27. BIN
      yijia-station/target/classes/com/yijia/station/domain/StationSettlementPriceAdjust.class
  28. BIN
      yijia-station/target/classes/com/yijia/station/domain/SysDeptDemo.class
  29. BIN
      yijia-station/target/classes/com/yijia/station/mapper/PayOrderMapper.class
  30. BIN
      yijia-station/target/classes/com/yijia/station/mapper/StationBalanceChangeMapper.class
  31. BIN
      yijia-station/target/classes/com/yijia/station/mapper/StationOilPriceMapper.class
  32. BIN
      yijia-station/target/classes/com/yijia/station/mapper/StationSettlementPriceAdjustMapper.class
  33. BIN
      yijia-station/target/classes/com/yijia/station/mapper/StationSettlementPriceMapper.class
  34. BIN
      yijia-station/target/classes/com/yijia/station/service/IPayOrderService.class
  35. BIN
      yijia-station/target/classes/com/yijia/station/service/IStationBalanceChangeService.class
  36. BIN
      yijia-station/target/classes/com/yijia/station/service/IStationOilPriceService.class
  37. BIN
      yijia-station/target/classes/com/yijia/station/service/IStationSettlementPriceAdjustService.class
  38. BIN
      yijia-station/target/classes/com/yijia/station/service/IStationSettlementPriceService.class
  39. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/PayOrderServiceImpl.class
  40. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/StationBalanceChangeServiceImpl.class
  41. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/StationOilPriceServiceImpl.class
  42. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/StationPayServiceImpl.class
  43. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/StationSettlementPriceAdjustServiceImpl.class
  44. BIN
      yijia-station/target/classes/com/yijia/station/service/impl/StationSettlementPriceServiceImpl.class
  45. BIN
      yijia-station/target/classes/com/yijia/station/utils/FeiEPrinterUtil.class
  46. 257 33
      yijia-station/target/classes/mapper/station/PayOrderMapper.xml
  47. 93 0
      yijia-station/target/classes/mapper/station/StationBalanceChangeMapper.xml
  48. 94 74
      yijia-station/target/classes/mapper/station/StationClassStructureMapper.xml
  49. 20 17
      yijia-station/target/classes/mapper/station/StationDeviceManageMapper.xml
  50. 14 32
      yijia-station/target/classes/mapper/station/StationOilGunMapper.xml
  51. 30 36
      yijia-station/target/classes/mapper/station/StationOilPriceAdjustMapper.xml
  52. 50 32
      yijia-station/target/classes/mapper/station/StationOilPriceMapper.xml
  53. 12 54
      yijia-station/target/classes/mapper/station/StationPayMapper.xml
  54. 21 20
      yijia-station/target/classes/mapper/station/StationPersonnelMapper.xml
  55. 100 0
      yijia-station/target/classes/mapper/station/StationSettlementPriceAdjustMapper.xml
  56. 107 0
      yijia-station/target/classes/mapper/station/StationSettlementPriceMapper.xml
  57. 1 1
      yijia-station/target/maven-archiver/pom.properties
  58. 24 0
      yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  59. 81 57
      yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  60. BIN
      yijia-station/target/yijia-station-1.0.1.jar
  61. 1 1
      yijia-station/yijia-station.iml
  62. 7 3
      yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml
  63. 2 1
      yijia-system/src/main/resources/mapper/system/SysUserMapper.xml

BIN
yijia-station/target/classes/com/yijia/station/controller/NoOilOrderController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/PayOrderController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationBalanceChangeController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationClassStructureController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationClassesSummaryController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationDeviceManageController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationInfoController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationOilGunController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationOilPriceAdjustController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationOilPriceController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationPay111Controller.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationPayController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationPersonnelController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationPicController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationSettlementPriceAdjustController.class


BIN
yijia-station/target/classes/com/yijia/station/controller/StationSettlementPriceController.class


BIN
yijia-station/target/classes/com/yijia/station/domain/DeptInfoDemo.class


BIN
yijia-station/target/classes/com/yijia/station/domain/PayOrder.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationBalanceChange.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationClassStructure.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationDeviceManage.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationOilPrice.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationPay.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationPersonnel.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationPic.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationSettlementPrice.class


BIN
yijia-station/target/classes/com/yijia/station/domain/StationSettlementPriceAdjust.class


BIN
yijia-station/target/classes/com/yijia/station/domain/SysDeptDemo.class


BIN
yijia-station/target/classes/com/yijia/station/mapper/PayOrderMapper.class


BIN
yijia-station/target/classes/com/yijia/station/mapper/StationBalanceChangeMapper.class


BIN
yijia-station/target/classes/com/yijia/station/mapper/StationOilPriceMapper.class


BIN
yijia-station/target/classes/com/yijia/station/mapper/StationSettlementPriceAdjustMapper.class


BIN
yijia-station/target/classes/com/yijia/station/mapper/StationSettlementPriceMapper.class


BIN
yijia-station/target/classes/com/yijia/station/service/IPayOrderService.class


BIN
yijia-station/target/classes/com/yijia/station/service/IStationBalanceChangeService.class


BIN
yijia-station/target/classes/com/yijia/station/service/IStationOilPriceService.class


BIN
yijia-station/target/classes/com/yijia/station/service/IStationSettlementPriceAdjustService.class


BIN
yijia-station/target/classes/com/yijia/station/service/IStationSettlementPriceService.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/PayOrderServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/StationBalanceChangeServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/StationOilPriceServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/StationPayServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/StationSettlementPriceAdjustServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/service/impl/StationSettlementPriceServiceImpl.class


BIN
yijia-station/target/classes/com/yijia/station/utils/FeiEPrinterUtil.class


+ 257 - 33
yijia-station/target/classes/mapper/station/PayOrderMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.PayOrderMapper">
-    
+
     <resultMap type="PayOrder" id="PayOrderResult">
         <result property="orderId"    column="order_id"    />
         <result property="orderNo"    column="order_no"    />
@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="payType"    column="pay_type"    />
         <result property="payWay"    column="pay_way"    />
         <result property="oilPersonnel"    column="oil_personnel"    />
+        <result property="oilPersonnelId"    column="oil_personnel_id"    />
         <result property="payDate"    column="pay_date"    />
         <result property="createdDate"    column="created_date"    />
         <result property="orderType"    column="order_type"    />
@@ -49,22 +50,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="xjNum"    column="xj_num"  />
         <result property="qyAmt"    column="qy_amt"  />
         <result property="cyAmt"    column="cy_amt"  />
+        <result property="sellAmt"    column="sell_amt"  />
+        <result property="sellDiscountAmt"    column="sell_discount_amt"  />
+        <result property="mobilePhone"    column="mobile_phone"  />
+        <result property="sellOilPrice"    column="sell_oil_price"  />
+        <result property="driverOilPrice"    column="driver_oil_price"  />
+        <result property="countNum"    column="count_num"  />
+        <result property="driverDiscountAmt"    column="driver_discount_amt"  />
     </resultMap>
 
 
     <sql id="selectPayOrderVo">
-        select order_id, order_no, station_id, station_name, status, consumer_id, consumer, oil_gun, oil_name, oil_pirce, oil_type, order_liters, amt, 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, print_count, pay_type, pay_way, oil_personnel, pay_date, created_date, order_type, car_no, customer_phone, customer_grade from pay_order
+        select order_id, order_no, station_id,d.dept_name as station_name, p.status,consumer_id, consumer, oil_gun,
+         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,oil_personnel_id,
+          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, print_count, pay_type, pay_way, oil_personnel,
+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt,driver_discount_amt
+            from pay_order p join sys_dept d on p.station_id =d.dept_id
     </sql>
 
     <select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
         <include refid="selectPayOrderVo"/>
-        <where>  
-            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and order_no like concat('%', #{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="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
-            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer like concat('%', #{consumer}, '%')</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>
@@ -91,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
             <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
             <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="oilPersonnelId != null  and oilPersonnelId != ''"> and oil_personnel_id = #{oilPersonnelId}</if>
             <if test="payDate != null "> and pay_date = #{payDate}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
@@ -119,12 +132,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <!--查询导出数据-->
     <select id="selectPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult">
-        select order_no,oil_name,oil_pirce,order_liters, amt,consumer,oil_personnel,oil_gun,pay_type,pay_way
+        select order_no,oil_name,oil_pirce,order_liters, amt,consumer,oil_personnel,oil_gun,pay_type,pay_way,sell_oil_price,driver_oil_price
         from pay_order
         <where>
             <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="status != null  and status != ''"> and status = #{status}</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
@@ -158,8 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
-            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
-            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -167,15 +179,209 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     #{item}
                 </foreach>
             </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by order_id desc
+    </select>
+    <!--用戶信息关联订单查询-->
+    <select id="selectUserPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone as customer_phone,sell_oil_price,driver_oil_price,driver_discount_amt
+        from pay_order p
+        left join sys_dept d on d.dept_id =p.station_id
+        join app_user_info a on a.user_id=p.consumer_id
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</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="orderLiters != null "> and order_liters = #{orderLiters}</if>
+            <if test="amt != null "> and amt = #{amt}</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="oilPersonnelId != null  and oilPersonnelId != ''"> and oil_personnel_id = #{oilPersonnelId}</if>
+            <if test="memberNo != null  and memberNo != ''"> and member_no = #{memberNo}</if>
+            <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
+            <if test="printCount != null "> and print_count = #{printCount}</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="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by order_id desc
+    </select>
+    <!--查询LNG导出数据-->
+    <select id="selectLNGPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone,sell_oil_price,driver_oil_price,driver_discount_amt
+        from pay_order p
+        left join sys_dept d on d.dept_id =p.station_id
+        join app_user_info a on a.user_id=p.consumer_id
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</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="orderLiters != null "> and order_liters = #{orderLiters}</if>
+            <if test="amt != null "> and amt = #{amt}</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="oilPersonnelId != null  and oilPersonnelId != ''"> and oil_personnel_id = #{oilPersonnelId}</if>
+            <if test="memberNo != null  and memberNo != ''"> and member_no = #{memberNo}</if>
+            <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
+            <if test="printCount != null "> and print_count = #{printCount}</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="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and mobile_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by order_id desc
+    </select>
+
+    <select id="LNGDeptList" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT dept_name as station_name,order_id,order_no,oil_name,p.oil_pirce,sell_oil_price,order_liters,receivable_amt,sell_amt,pay_date,driver_discount_amt,
+        concat(LEFT (mobile_phone, 3), '****', RIGHT (mobile_phone, 4))  mobile_phone
+        from pay_order p
+        left join sys_dept d on d.dept_id =p.station_id
+        join app_user_info a on a.user_id=p.consumer_id
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</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="orderLiters != null "> and order_liters = #{orderLiters}</if>
+            <if test="amt != null "> and amt = #{amt}</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>
+            <if test="printCount != null "> and print_count = #{printCount}</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="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
         </where>
         order by order_id desc
     </select>
     <select id="selectPayOrderById" parameterType="Long" resultMap="PayOrderResult">
-        <include refid="selectPayOrderVo"/>
+       select order_id, order_no, p.station_id, p.station_name, p.status,consumer_id, consumer, oil_gun,
+        oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,
+        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, print_count, pay_type, pay_way, oil_personnel,oil_personnel_id,
+        pay_date, created_date, order_type, car_no,customer_grade,sell_amt,sell_discount_amt,d.mobile_phone as customer_phone
+        from pay_order p join app_user_info d on p.consumer_id =d.user_id
         where order_id = #{orderId}
     </select>
-    <select id="selectDaySources" parameterType="Long" resultMap="PayOrderResult">
-        SELECT SUM(amt) as amt,sum(order_liters) as order_liters
+    <select id="selectDaySources" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT SUM(amt) as amt,sum(order_liters) as order_liters,sum(sell_amt) as sell_amt,count(1) count_num
         from pay_order
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
@@ -198,7 +404,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
-        SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type
+        SELECT SUM(amt) as amt,sum(order_liters) as order_liters,sum(sell_amt) sell_amt, oil_type,count(1) count_num
         from pay_order
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
@@ -248,8 +454,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         GROUP BY oil_name
     </select>
     <select id="selectOverViewData" parameterType="Long" resultMap="PayOrderResult">
-        SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt
-        from pay_order
+        SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(dzk_amt) as dzk_amt,sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt
+          from pay_order
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
@@ -272,23 +478,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <!--日报数据-->
     <select id="selectDayReport" parameterType="Long" resultMap="PayOrderResult">
-        SELECT date_format( b.created_date, '%Y-%m-%d' ) as created_date,sum(b.amt) as amt,sum(b.qyamt) as qy_amt, sum(b.cyamt) as cy_amt,sum(b.order_liters) as order_liters ,count(b.order_no) order_no ,sum(b.member_amt) as menber_amt,sum(receivable_amt) as receivable_amt,sum(received_amt) as received_amt
-        from (SELECT a.*,(SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=2) as qyamt , (SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=1) as cyamt
-        from pay_order a) b
+         SELECT
+        b.created_date,
+        sum( b.amt ) amt,
+        sum( b.order_liters ) order_liters,
+        sum( b.member_amt ) member_amt,
+        sum( b.receivable_amt ) receivable_amt,
+        sum( b.received_amt ) received_amt,
+        MAX(CASE b.oil_type WHEN '1' THEN amt ELSE 0 END) AS qy_amt,
+        MAX(CASE b.oil_type WHEN '2' THEN amt ELSE 0 END) AS cy_amt,
+        sum(b.order_no) order_no
+        from (
+        SELECT
+        date_format( a.created_date, '%Y-%m-%d' ) as created_date,
+        sum( a.amt ) amt,
+        sum( a.order_liters ) order_liters,
+        sum( a.member_amt ) member_amt,
+        sum( a.receivable_amt ) receivable_amt,
+        sum( a.received_amt ) received_amt,
+        a.oil_type,
+        count( 1 ) order_no
+        FROM
+        pay_order a
         <where>
-            <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="status != null "> and status = #{status}</if>
-            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="stationId != null "> and a.station_id = #{stationId}</if>
+            <if test="status != null "> and a.status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and a.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
         </where>
-        GROUP BY  date_format( created_date, '%Y-%m-%d' )
-        ORDER BY date_format( created_date, '%Y-%m-%d' ) DESC
+        GROUP BY
+        date_format( a.created_date, '%Y-%m-%d' ),a.oil_type
+        )  b
+        GROUP BY b.created_date
+        ORDER BY b.created_date desc
     </select>
 <!-- 日报折线图油品数据-->
     <select id="listQydata" parameterType="Long" resultMap="PayOrderResult">
@@ -406,7 +634,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <where>
                 <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="status != null  and status != ''"> and status = #{status}</if>
                 <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             </where>
@@ -417,7 +644,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">order_no,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="status != null">status,</if>
             <if test="consumerId != null">consumer_id,</if>
             <if test="consumer != null">consumer,</if>
@@ -457,7 +683,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="status != null">#{status},</if>
             <if test="consumerId != null">#{consumerId},</if>
             <if test="consumer != null">#{consumer},</if>
@@ -501,7 +726,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <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="status != null">status = #{status},</if>
             <if test="consumerId != null">consumer_id = #{consumerId},</if>
             <if test="consumer != null">consumer = #{consumer},</if>
@@ -546,10 +770,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deletePayOrderByIds" parameterType="String">
-        delete from pay_order where order_id in 
+        delete from pay_order where order_id in
         <foreach item="orderId" collection="array" open="(" separator="," close=")">
             #{orderId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 93 - 0
yijia-station/target/classes/mapper/station/StationBalanceChangeMapper.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yijia.station.mapper.StationBalanceChangeMapper">
+
+    <resultMap type="StationBalanceChange" id="StationBalanceChangeResult">
+        <result property="id"    column="id"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="type"    column="type"    />
+        <result property="amt"    column="amt"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createName"    column="create_name"    />
+        <result property="stationName"    column="station_name"    />
+    </resultMap>
+
+    <sql id="selectStationBalanceChangeVo">
+        select c.id, c.station_id, c.order_no, c.type, c.amt, c.create_time, c.create_by,dept_name as station_name,u.nick_name as create_name
+		from station_balance_change c
+		left join sys_dept d on c.station_id = d.dept_id
+		left join sys_user u on c.create_by =u.user_id
+    </sql>
+
+    <select id="selectStationBalanceChangeList" parameterType="StationBalanceChange" resultMap="StationBalanceChangeResult">
+        <include refid="selectStationBalanceChangeVo"/>
+        <where>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="amt != null "> and amt = #{amt}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectStationBalanceChangeById" parameterType="Long" resultMap="StationBalanceChangeResult">
+        <include refid="selectStationBalanceChangeVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertStationBalanceChange" parameterType="StationBalanceChange" useGeneratedKeys="true" keyProperty="id">
+        insert into station_balance_change
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="stationId != null">station_id,</if>
+            <if test="orderNo != null">order_no,</if>
+            <if test="type != null and type != ''">type,</if>
+            <if test="amt != null">amt,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="stationId != null">#{stationId},</if>
+            <if test="orderNo != null">#{orderNo},</if>
+            <if test="type != null and type != ''">#{type},</if>
+            <if test="amt != null">#{amt},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStationBalanceChange" parameterType="StationBalanceChange">
+        update station_balance_change
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="orderNo != null">order_no = #{orderNo},</if>
+            <if test="type != null and type != ''">type = #{type},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStationBalanceChangeById" parameterType="Long">
+        delete from station_balance_change where id = #{id}
+    </delete>
+
+    <delete id="deleteStationBalanceChangeByIds" parameterType="String">
+        delete from station_balance_change where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 94 - 74
yijia-station/target/classes/mapper/station/StationClassStructureMapper.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationClassStructureMapper">
-    
+
     <resultMap type="StationClassStructure" id="StationClassStructureResult">
         <result property="id"    column="id"    />
         <result property="orderNo"    column="order_no"    />
@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="payWay"    column="pay_way"    />
         <result property="payDate"    column="pay_date"    />
         <result property="oilPersonnel"    column="oil_personnel"    />
+        <result property="oilPersonnelId"    column="oil_personnel_id"    />
         <result property="orderType"    column="order_type"    />
         <result property="printNum"    column="print_num"    />
         <result property="classStructureNo"    column="class_structure_no"    />
@@ -54,27 +55,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectStationClassStructureVo">
-        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
+        select id, order_no, station_id, d.dept_name as station_name, oil_gun, oil_name, oil_pirce, oil_type,
+        consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date,oil_personnel_id, 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 s join sys_dept d on s.station_id = d.dept_id
     </sql>
 
     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         <include refid="selectStationClassStructureVo"/>
-        <where>  
+        <where>
             <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="consumer != null  and consumer != ''"> and consumer like concat('%', #{consumer}, '%')</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="oilPersonnelId != null  and oilPersonnelId != ''"> and oil_personnel_id = #{oilPersonnelId}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="printNum != null "> and print_num = #{printNum}</if>
             <if test="classStructureNo != null  and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
@@ -117,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="listOilStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-       	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
+        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
         from station_class_structure a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
@@ -126,15 +133,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man
     </select>
     <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        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
-         from station_class_structure
-       	 where id = (
-            SELECT MAX(id) from station_class_structure
-            <where>
-                <if test="stationId != null "> and station_id = #{stationId}</if>
-                <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
-            </where>
-		)
+        select id, station_id, order_no, oil_gun, 02., consumer_id, consumer, amt,d.dept_name as station_name,
+        order_liters, pay_type, pay_way, pay_date, oil_personnel,oil_personnel_id, order_type, oil_type, print_num,
+        class_structure_no, class_structure_date, class_structure_man, oils
+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id
+        where id = (
+        SELECT MAX(id) from station_class_structure
+        <where>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+        </where>
+        )
     </select>
 
     <select id="selectStationClassStructureById" parameterType="Long" resultMap="StationClassStructureResult">
@@ -142,8 +151,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </select>
     <select id="selectDistnctClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-      select count(DISTINCT class_structure_no) as num
-            from station_class_structure
+        select count(DISTINCT class_structure_no) as num
+        from station_class_structure
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="likeClassStructureNo != null  and likeClassStructureNo != ''">  and class_structure_no like concat( #{likeClassStructureNo}, '%') </if>
@@ -152,102 +161,110 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <!--根据班次号汇总班结数据-->
     <select id="selectSummyClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        select  class_structure_no,class_start_date,class_structure_date,station_id,station_name,count(order_no) as num,
+        select  class_structure_no,class_start_date,class_structure_date,station_id,d.dept_name as station_name,count(order_no) as num,
         sum(order_liters) as order_liters,sum(receivable_amt) as receivable_amt,sum(amt) as amt,class_structure_man,
         sum(print_num) as print_num,sum(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt,
         sum(dzk_amt) as dzk_amt,sum(discount_amt) as discount_amt,SUM(pos_amt) as pos_amt,sum(xj_amt) as xj_amt
-        from station_class_structure
+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
-        GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man
+        GROUP BY class_structure_no,class_start_date,station_id,d.dept_name,class_structure_date,class_structure_man
     </select>
     <!--按员工/支付方式汇总数据-->
-<!--    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-->
-<!--    from  station_class_structure-->
-<!--    <where>-->
-<!--        <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>-->
-<!--        <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>-->
-<!--        <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>-->
-<!--    </where>-->
-<!--    GROUP BY oil_personnel-->
+    <!--    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-->
+    <!--    from  station_class_structure-->
+    <!--    <where>-->
+    <!--        <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>-->
+    <!--        <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>-->
+    <!--        <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>-->
+    <!--    </where>-->
+    <!--    GROUP BY oil_personnel-->
     <select id="listPersonnelPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
+        SELECT   oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
         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,
-        (SELECT COUNT(b.order_no) from station_class_structure b
-            <where>
-                 and b.pay_type="xj"
-                <if test="classStructureNo != null and classStructureNo != ''"> and b.class_structure_no = #{classStructureNo}</if>
-            </where>
-         ) xj_num,
-        (SELECT COUNT(c.order_no) from station_class_structure c
-            <where>
-                and c.pay_type="zfb"
-                <if test="classStructureNo != null and classStructureNo != ''"> and c.class_structure_no = #{classStructureNo}</if>
-            </where>
-        ) zfb_num,
-        (SELECT COUNT(d.order_no) from station_class_structure d
-            <where>
-                and d.pay_type="wx"
-                <if test="classStructureNo != null and classStructureNo != ''"> and d.class_structure_no = #{classStructureNo}</if>
-            </where>
-        ) wx_num
-        from  station_class_structure a
+        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num
+        from (
+        SELECT station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,
+        (SELECT COUNT(b.order_no) from station_class_structure b where 1=1 and a.id = b.id and b.pay_type="xj" ) xj_num,
+        (SELECT COUNT(c.order_no) from station_class_structure c where 1=1 and a.id = c.id and c.pay_type="zfb" ) zfb_num,
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num
+        from station_class_structure  a
         <where>
+            <if test="stationId != null and stationId != ''"> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
         </where>
-        GROUP BY a.oil_personnel
+        ) e
+        <where>
+            <if test="stationId != null and stationId != ''"> and e.station_id = #{stationId}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and e.class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and e.order_type = #{orderType}</if>
+        </where>
+        GROUP BY e.oil_personnel
     </select>
 
     <select id="listClass" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         SELECT *  from
         station_class_structure
         where id =(SELECT max(id) from station_class_structure
-            <where>
-                <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
-                <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
-                <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
-            </where>
+        <where>
+            <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+        </where>
         )
     </select>
     <!--根据支付方式汇总数据-->
     <select id="listPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-      	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
-		from   station_class_structure left JOIN sys_dict_data on dict_value = pay_type and dict_type ='pay_type'
+        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
+        from   station_class_structure left JOIN sys_dict_data on dict_value = pay_type and dict_type ='pay_type'
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
-		GROUP BY pay_type,dict_label
+        GROUP BY pay_type,dict_label
     </select>
-<!--  根据支付方式汇总数据-->
+    <!--  根据支付方式汇总数据-->
     <select id="listOilStructureSum" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         SELECT SUM(amt) as amt,SUM(amt) as amt,SUM(order_liters)  as order_liters,sum(order_no) as order_no
         from (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
         from station_class_structure a
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
-            <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
         </where>
         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man) c
     </select>
 
     <!--按员工/支付方式汇总数据-->
     <select id="listPersonnelPayStructureSum" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        SELECT sum(wx_num) wx_num,sum(zfb_num) zfb_num,sum(xj_num) 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
-        from (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
-        from  station_class_structure
+        SELECT GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
+        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,
+        sum(e.xj_num)	xj_num,sum(e.zfb_num)	zfb_num,sum(e.wx_num)	wx_num
+        from (SELECT  station_id,class_structure_no, order_type,oil_personnel,oil_gun,discount_amt,discount_coupon_amt,wx_amt,zfb_amt,xj_amt,member_amt,
+        (SELECT COUNT(b.order_no) from station_class_structure b where 1=1 and a.id = b.id and b.pay_type="xj" ) xj_num,
+        (SELECT COUNT(c.order_no) from station_class_structure c where 1=1 and a.id = c.id and c.pay_type="zfb" ) zfb_num,
+        (SELECT COUNT(d.order_no) from station_class_structure d where 1=1 and a.id = d.id and d.pay_type="wx" ) wx_num
+        from station_class_structure  a
         <where>
-            <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
-            <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
-            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="stationId != null "> and a.station_id = #{stationId}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and a.order_type = #{orderType}</if>
+        </where>
+        ) e
+        <where>
+            <if test="stationId != null "> and e.station_id = #{stationId}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and e.class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and e.order_type = #{orderType}</if>
         </where>
-        GROUP BY oil_personnel) a
     </select>
 
     <select id="listPersonnelStructureSum" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
@@ -266,7 +283,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <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>
@@ -279,6 +295,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="oilPersonnelId != null  and oilPersonnelId != ''"> and oil_personnel_id = #{oilPersonnelId}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="printNum != null "> and print_num = #{printNum}</if>
             <if test="classStructureNo != null  and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
@@ -326,6 +343,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="payWay != null">pay_way,</if>
             <if test="payDate != null">pay_date,</if>
             <if test="oilPersonnel != null">oil_personnel,</if>
+            <if test="oilPersonnelId != null">oil_personnel_id,</if>
             <if test="orderType != null">order_type,</if>
             <if test="printNum != null">print_num,</if>
             <if test="classStructureNo != null">class_structure_no,</if>
@@ -352,7 +370,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">car_no,</if>
             <if test="customerPhone != null">customer_phone,</if>
             <if test="customerGrade != null">customer_grade,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="stationId != null">#{stationId},</if>
@@ -369,6 +387,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="payWay != null">#{payWay},</if>
             <if test="payDate != null">#{payDate},</if>
             <if test="oilPersonnel != null">#{oilPersonnel},</if>
+            <if test="oilPersonnelId != null">#{oilPersonnelId},</if>
             <if test="orderType != null">#{orderType},</if>
             <if test="printNum != null">#{printNum},</if>
             <if test="classStructureNo != null">#{classStructureNo},</if>
@@ -395,7 +414,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="carNo != null">#{carNo},</if>
             <if test="customerPhone != null">#{customerPhone},</if>
             <if test="customerGrade != null">#{customerGrade},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateStationClassStructure" parameterType="StationClassStructure">
@@ -416,6 +435,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="oilPersonnelId != null">oil_personnel_id = #{oilPersonnelId},</if>
             <if test="orderType != null">order_type = #{orderType},</if>
             <if test="printNum != null">print_num = #{printNum},</if>
             <if test="classStructureNo != null">class_structure_no = #{classStructureNo},</if>
@@ -451,10 +471,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationClassStructureByIds" parameterType="String">
-        delete from station_class_structure where id in 
+        delete from station_class_structure where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 20 - 17
yijia-station/target/classes/mapper/station/StationDeviceManageMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationDeviceManageMapper">
-    
+
     <resultMap type="StationDeviceManage" id="StationDeviceManageResult">
         <result property="deviceId"    column="device_id"    />
         <result property="deviceNo"    column="device_no"    />
@@ -13,65 +13,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deviceType"    column="device_type"    />
         <result property="deviceSerialNum"    column="device_serial_num"    />
         <result property="gunNo"    column="gun_no"    />
-        <result property="deviceStatus"    column="device_status"    />
         <result property="deviceFactory"    column="device_factory"    />
+        <result property="posFanoutExchange"    column="pos_fanout_exchange"    />
+        <result property="posQueue"    column="pos_queue"    />
     </resultMap>
 
     <sql id="selectStationDeviceManageVo">
-        select device_id, device_no, device_name, station_id, station_name, device_type, device_serial_num, gun_no, device_status, device_factory from station_device_manage
+        select device_id, device_no, device_name, station_id,d.dept_name as station_name, device_type, device_serial_num, gun_no,
+        pos_fanout_exchange, pos_queue, device_factory
+        from station_device_manage m join sys_dept d on m.station_id = d.dept_id
     </sql>
 
     <select id="selectStationDeviceManageList" parameterType="StationDeviceManage" resultMap="StationDeviceManageResult">
         <include refid="selectStationDeviceManageVo"/>
-        <where>  
+        <where>
             <if test="deviceNo != null  and deviceNo != ''"> and device_no = #{deviceNo}</if>
             <if test="deviceName != null  and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</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="deviceType != null  and deviceType != ''"> and device_type = #{deviceType}</if>
             <if test="deviceSerialNum != null  and deviceSerialNum != ''"> and device_serial_num = #{deviceSerialNum}</if>
             <if test="gunNo != null  and gunNo != ''"> and gun_no = #{gunNo}</if>
-            <if test="deviceStatus != null  and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
             <if test="deviceFactory != null  and deviceFactory != ''"> and device_factory = #{deviceFactory}</if>
+            <if test="posFanoutExchange != null  and posFanoutExchange != ''"> and pos_fanout_exchange = #{posFanoutExchange}</if>
+            <if test="posQueue != null  and posQueue != ''"> and pos_queue = #{posQueue}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                 and m.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
         </where>
-        order by device_id desc
+         order by device_id desc
     </select>
-    
+
     <select id="selectStationDeviceManageById" parameterType="Long" resultMap="StationDeviceManageResult">
         <include refid="selectStationDeviceManageVo"/>
         where device_id = #{deviceId}
     </select>
-        
+
     <insert id="insertStationDeviceManage" parameterType="StationDeviceManage" useGeneratedKeys="true" keyProperty="deviceId">
         insert into station_device_manage
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="deviceNo != null">device_no,</if>
             <if test="deviceName != null">device_name,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="deviceType != null">device_type,</if>
             <if test="deviceSerialNum != null">device_serial_num,</if>
             <if test="gunNo != null">gun_no,</if>
-            <if test="deviceStatus != null">device_status,</if>
             <if test="deviceFactory != null">device_factory,</if>
+            <if test="posFanoutExchange != null">pos_fanout_exchange,</if>
+            <if test="posQueue != null">pos_queue,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="deviceNo != null">#{deviceNo},</if>
             <if test="deviceName != null">#{deviceName},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="deviceType != null">#{deviceType},</if>
             <if test="deviceSerialNum != null">#{deviceSerialNum},</if>
             <if test="gunNo != null">#{gunNo},</if>
-            <if test="deviceStatus != null">#{deviceStatus},</if>
             <if test="deviceFactory != null">#{deviceFactory},</if>
+            <if test="posFanoutExchange != null">#{posFanoutExchange},</if>
+            <if test="posQueue != null">#{posQueue},</if>
          </trim>
     </insert>
 
@@ -81,12 +84,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deviceNo != null">device_no = #{deviceNo},</if>
             <if test="deviceName != null">device_name = #{deviceName},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="deviceType != null">device_type = #{deviceType},</if>
             <if test="deviceSerialNum != null">device_serial_num = #{deviceSerialNum},</if>
             <if test="gunNo != null">gun_no = #{gunNo},</if>
-            <if test="deviceStatus != null">device_status = #{deviceStatus},</if>
             <if test="deviceFactory != null">device_factory = #{deviceFactory},</if>
+            <if test="posFanoutExchange != null">pos_fanout_exchange= #{posFanoutExchange},</if>
+            <if test="posQueue != null">pos_queue=#{posQueue},</if>
         </trim>
         where device_id = #{deviceId}
     </update>
@@ -116,4 +119,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </where>
         );
     </select>
-</mapper>
+</mapper>

+ 14 - 32
yijia-station/target/classes/mapper/station/StationOilGunMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationOilGunMapper">
-    
+
     <resultMap type="StationOilGun" id="StationOilGunResult">
         <result property="oilGunId"    column="oil_gun_id"    />
         <result property="oilGunNo"    column="oil_gun_no"    />
@@ -12,25 +12,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
         <result property="date"    column="date"    />
-        <result property="status"    column="status"    />
-        <result property="oilGunType"    column="oil_gun_type"    />
     </resultMap>
 
-    <sql id="selectStationOilGunVo">
-        select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status, oil_gun_type from station_oil_gun
-    </sql>
-
     <select id="selectStationOilGunList" parameterType="StationOilGun" resultMap="StationOilGunResult">
-        <include refid="selectStationOilGunVo"/>
-        <where>  
-            <if test="oilGunNo != null  and oilGunNo != ''"> and oil_gun_no = #{oilGunNo}</if>
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="oilPrice != null "> and oil_price = #{oilPrice}</if>
+        select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id,d.dept_name as station_name, date
+        from station_oil_gun  g  join sys_dept  d on g.station_id =d.dept_id
+        <where>
+            <if test="oilGunNo != null  and oilGunNo != ''"> and g.oil_gun_no = #{oilGunNo}</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="date != null "> and date = #{date}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="oilGunType != null  and oilGunType != ''"> and oil_gun_type = #{oilGunType}</if>
+            <if test="oilName != null"> and oil_name = #{oilName}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -40,12 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
         </where>
     </select>
-    
+
     <select id="selectStationOilGunById" parameterType="Long" resultMap="StationOilGunResult">
-        <include refid="selectStationOilGunVo"/>
-        where oil_gun_id = #{oilGunId}
+      select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id,d.dept_name as station_name, date
+		from station_oil_gun  g  join sys_dept  d on g.station_id =d.dept_id
+        where g.oil_gun_id = #{oilGunId}
     </select>
-        
+
     <insert id="insertStationOilGun" parameterType="StationOilGun" useGeneratedKeys="true" keyProperty="oilGunId">
         insert into station_oil_gun
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -53,20 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilName != null">oil_name,</if>
             <if test="oilPrice != null">oil_price,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="date != null">date,</if>
-            <if test="status != null">status,</if>
-            <if test="oilGunType != null">oil_gun_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="oilGunNo != null">#{oilGunNo},</if>
             <if test="oilName != null">#{oilName},</if>
             <if test="oilPrice != null">#{oilPrice},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="date != null">#{date},</if>
-            <if test="status != null">#{status},</if>
-            <if test="oilGunType != null">#{oilGunType},</if>
          </trim>
     </insert>
 
@@ -77,10 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="oilPrice != null">oil_price = #{oilPrice},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="date != null">date = #{date},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="oilGunType != null">oil_gun_type = #{oilGunType},</if>
         </trim>
         where oil_gun_id = #{oilGunId}
     </update>
@@ -90,10 +72,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationOilGunByIds" parameterType="String">
-        delete from station_oil_gun where oil_gun_id in 
+        delete from station_oil_gun where oil_gun_id in
         <foreach item="oilGunId" collection="array" open="(" separator="," close=")">
             #{oilGunId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 30 - 36
yijia-station/target/classes/mapper/station/StationOilPriceAdjustMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationOilPriceAdjustMapper">
-    
+
     <resultMap type="StationOilPriceAdjust" id="StationOilPriceAdjustResult">
         <result property="adjustPriceId"    column="adjust_price_id"    />
         <result property="oilName"    column="oil_name"    />
@@ -18,82 +18,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="oilPriceId"    column="oil_price_id"    />
     </resultMap>
 
-    <sql id="selectStationOilPriceAdjustVo">
-        select adjust_price_id, oil_name, oil_adjust_price, take_effect_status, take_effect_date, adjust_date, station_id, station_name, operator, status, oil_price_id from station_oil_price_adjust
-    </sql>
-
     <select id="selectStationOilPriceAdjustList" parameterType="StationOilPriceAdjust" resultMap="StationOilPriceAdjustResult">
-        <include refid="selectStationOilPriceAdjustVo"/>
-        <where>  
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="oilAdjustPrice != null  and oilAdjustPrice != ''"> and oil_adjust_price = #{oilAdjustPrice}</if>
-            <if test="takeEffectStatus != null  and takeEffectStatus != ''"> and take_effect_status = #{takeEffectStatus}</if>
-            <if test="takeEffectDate != null "> and take_effect_date = #{takeEffectDate}</if>
-            <if test="adjustDate != null "> and adjust_date = #{adjustDate}</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="operator != null  and operator != ''"> and operator = #{operator}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="oilPriceId != null "> and oil_price_id = #{oilPriceId}</if>
+        select a.adjust_price_id,p.oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator, a.oil_price_id,a.status
+        from station_oil_price_adjust a
+        join sys_dept  d on a.station_id =d.dept_id
+        join station_oil_price p on p.oil_price_id =a.oil_price_id
+        <where>
+            <if test="oilName != null  and oilName != ''"> and p.oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilAdjustPrice != null  and oilAdjustPrice != ''"> and a.oil_adjust_price = #{oilAdjustPrice}</if>
+            <if test="takeEffectStatus != null  and takeEffectStatus != ''"> and a.take_effect_status = #{takeEffectStatus}</if>
+            <if test="takeEffectDate != null "> and a.take_effect_date = #{takeEffectDate}</if>
+            <if test="adjustDate != null "> and a.adjust_date = #{adjustDate}</if>
+            <if test="stationId != null "> and a.station_id = #{stationId}</if>
+            <if test="oilPriceId != null "> and a.oil_price_id = #{oilPriceId}</if>
+            <if test="status != null "> and a.status = #{status}</if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                AND date_format(take_effect_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+                AND date_format(a.take_effect_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
             </if>
             <if test="stationIdList != null ">
-                and station_id in
+                and a.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
         </where>
-        order by adjust_price_id desc
+        order by a.adjust_price_id desc
     </select>
-    
+
     <select id="selectStationOilPriceAdjustById" parameterType="Long" resultMap="StationOilPriceAdjustResult">
-        <include refid="selectStationOilPriceAdjustVo"/>
-        where adjust_price_id = #{adjustPriceId}
+        select a.adjust_price_id, p.oil_name as oil_name, a.oil_adjust_price, a.take_effect_status, a.take_effect_date, a.adjust_date, a.station_id, d.dept_name as station_name,a.operator,
+        a.oil_price_id,a.status
+        from station_oil_price_adjust a join sys_dept  d on a.station_id =d.dept_id
+         join station_oil_price p on p.oil_price_id =a.oil_price_id
+        where a.adjust_price_id = #{adjustPriceId}
     </select>
-        
+
     <insert id="insertStationOilPriceAdjust" parameterType="StationOilPriceAdjust" useGeneratedKeys="true" keyProperty="adjustPriceId">
         insert into station_oil_price_adjust
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="oilName != null">oil_name,</if>
             <if test="oilAdjustPrice != null">oil_adjust_price,</if>
             <if test="takeEffectStatus != null">take_effect_status,</if>
             <if test="takeEffectDate != null">take_effect_date,</if>
             <if test="adjustDate != null">adjust_date,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="operator != null">operator,</if>
-            <if test="status != null">status,</if>
             <if test="oilPriceId != null">oil_price_id,</if>
+            <if test="status != null "> status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="oilName != null">#{oilName},</if>
             <if test="oilAdjustPrice != null">#{oilAdjustPrice},</if>
             <if test="takeEffectStatus != null">#{takeEffectStatus},</if>
             <if test="takeEffectDate != null">#{takeEffectDate},</if>
             <if test="adjustDate != null">#{adjustDate},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="operator != null">#{operator},</if>
-            <if test="status != null">#{status},</if>
             <if test="oilPriceId != null">#{oilPriceId},</if>
+            <if test="status != null "> #{status},</if>
          </trim>
     </insert>
 
     <update id="updateStationOilPriceAdjust" parameterType="StationOilPriceAdjust">
         update station_oil_price_adjust
         <trim prefix="SET" suffixOverrides=",">
-            <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="oilAdjustPrice != null">oil_adjust_price = #{oilAdjustPrice},</if>
             <if test="takeEffectStatus != null">take_effect_status = #{takeEffectStatus},</if>
             <if test="takeEffectDate != null">take_effect_date = #{takeEffectDate},</if>
             <if test="adjustDate != null">adjust_date = #{adjustDate},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="operator != null">operator = #{operator},</if>
-            <if test="status != null">status = #{status},</if>
+            <if test="status != null "> status = #{status},</if>
             <if test="oilPriceId != null">oil_price_id = #{oilPriceId},</if>
         </trim>
         where adjust_price_id = #{adjustPriceId}
@@ -104,10 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationOilPriceAdjustByIds" parameterType="String">
-        delete from station_oil_price_adjust where adjust_price_id in 
+        delete from station_oil_price_adjust where adjust_price_id in
         <foreach item="adjustPriceId" collection="array" open="(" separator="," close=")">
             #{adjustPriceId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 50 - 32
yijia-station/target/classes/mapper/station/StationOilPriceMapper.xml

@@ -3,30 +3,26 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationOilPriceMapper">
-    
+
     <resultMap type="StationOilPrice" id="StationOilPriceResult">
         <result property="oilPriceId"    column="oil_price_id"    />
         <result property="oilName"    column="oil_name"    />
         <result property="oilPrice"    column="oil_price"    />
         <result property="stationId"    column="station_id"    />
-        <result property="stationNanme"    column="station_nanme"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="oilType"    column="oil_type"    />
         <result property="date"    column="date"    />
     </resultMap>
-
-    <sql id="selectStationOilPriceVo">
-        select oil_price_id, oil_name, oil_price, station_id, station_nanme, date from station_oil_price
-    </sql>
-
     <select id="selectStationOilPriceList" parameterType="StationOilPrice" resultMap="StationOilPriceResult">
-        <include refid="selectStationOilPriceVo"/>
-        <where>  
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="oilPrice != null  and oilPrice != ''"> and oil_price = #{oilPrice}</if>
-            <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationNanme != null  and stationNanme != ''"> and station_nanme = #{stationNanme}</if>
-            <if test="date != null "> and date = #{date}</if>
+        select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
+        from station_oil_price p join sys_dept d
+        on  p.station_id = d.dept_id
+        <where>
+            <if test="oilName != null  and oilName != ''"> and p.oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPrice != null  and oilPrice != ''"> and p.oil_price = #{oilPrice}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and p.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
@@ -35,15 +31,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="oilNameInfo" parameterType="StationOilPrice" resultMap="StationOilPriceResult">
-        <include refid="selectStationOilPriceVo"/>
+        select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
+        from station_oil_price p join sys_dept d
+        on  p.station_id = d.dept_id
         <where>
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="oilPrice != null  and oilPrice != ''"> and oil_price = #{oilPrice}</if>
-            <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationNanme != null  and stationNanme != ''"> and station_nanme = #{stationNanme}</if>
-            <if test="date != null "> and date = #{date}</if>
+            <if test="oilName != null  and oilName != ''"> and p.oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPrice != null  and oilPrice != ''"> and p.oil_price = #{oilPrice}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and p.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
@@ -53,26 +49,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
-    
+
+    <select id="selectOilPriceList" parameterType="StationOilPrice" resultMap="StationOilPriceResult">
+--         select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, s.dict_value as oil_type
+--             from station_oil_price p
+--             join sys_dept d  on  p.station_id = d.dept_id
+--             join sys_dict_data s  on s.dict_label = p.oil_name and s.dict_type = "oil_name"
+        select DISTINCT oil_name,s.dict_value as oil_type
+         from station_oil_price p
+         join sys_dept d  on  p.station_id = d.dept_id
+         join sys_dict_data s  on s.dict_label = p.oil_name and s.dict_type = "oil_name"
+        <where>
+            <if test="oilName != null  and oilName != ''"> and p.oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPrice != null  and oilPrice != ''"> and p.oil_price = #{oilPrice}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
     <select id="selectStationOilPriceById" parameterType="Long" resultMap="StationOilPriceResult">
-        <include refid="selectStationOilPriceVo"/>
-        where oil_price_id = #{oilPriceId}
+        select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
+        from station_oil_price p join sys_dept d
+        on  p.station_id = d.dept_id
+        where p.oil_price_id = #{oilPriceId}
     </select>
-        
+
     <insert id="insertStationOilPrice" parameterType="StationOilPrice" useGeneratedKeys="true" keyProperty="oilPriceId">
         insert into station_oil_price
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="oilName != null">oil_name,</if>
             <if test="oilPrice != null">oil_price,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationNanme != null">station_nanme,</if>
             <if test="date != null">date,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="oilName != null">#{oilName},</if>
             <if test="oilPrice != null">#{oilPrice},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationNanme != null">#{stationNanme},</if>
             <if test="date != null">#{date},</if>
          </trim>
     </insert>
@@ -83,7 +102,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="oilPrice != null">oil_price = #{oilPrice},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationNanme != null">station_nanme = #{stationNanme},</if>
             <if test="date != null">date = #{date},</if>
         </trim>
         where oil_price_id = #{oilPriceId}
@@ -94,10 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationOilPriceByIds" parameterType="String">
-        delete from station_oil_price where oil_price_id in 
+        delete from station_oil_price where oil_price_id in
         <foreach item="oilPriceId" collection="array" open="(" separator="," close=")">
             #{oilPriceId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 12 - 54
yijia-station/target/classes/mapper/station/StationPayMapper.xml

@@ -3,49 +3,33 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationPayMapper">
-    
+
     <resultMap type="StationPay" id="StationPayResult">
         <result property="payId"    column="pay_id"    />
-        <result property="payMode"    column="pay_mode"    />
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
-        <result property="imagePhotosFlag"    column="image_photos_flag"    />
         <result property="cardEnabledFlag"    column="card_enabled_flag"    />
-        <result property="activityPic"    column="activity_pic"    />
-        <result property="preferentialWayShareFlag"    column="preferential_way_share_flag"    />
-        <result property="otherPreferentialWay"    column="other_preferential_way"    />
-        <result property="payPrintNum"    column="pay_print_num"    />
-        <result property="payCallbackPage"    column="pay_callback_page"    />
         <result property="wsPrintFlag"    column="ws_print_flag"    />
         <result property="printSetting"    column="print_setting"    />
         <result property="discountSetting"    column="discount_setting"    />
-        <result property="isNoOil"    column="is_no_oil"    />
         <result property="notice"    column="notice"    />
         <result property="integralPrintFlag"    column="integral_print_flag"    />
         <result property="integralFlag"    column="integral_flag"    />
     </resultMap>
 
     <sql id="selectStationPayVo">
-        select integral_flag,pay_id, pay_mode, station_id, station_name, image_photos_flag, card_enabled_flag, activity_pic, preferential_way_share_flag, other_preferential_way, pay_print_num, pay_callback_page, ws_print_flag, print_setting, discount_setting, is_no_oil,notice,integral_print_flag from station_pay
+        select integral_flag,pay_id, station_id, station_name, card_enabled_flag,  ws_print_flag, print_setting, discount_setting, notice,integral_print_flag from station_pay
     </sql>
 
     <select id="selectStationPayList" parameterType="StationPay" resultMap="StationPayResult">
-        <include refid="selectStationPayVo"/>
-        <where>  
-            <if test="payMode != null  and payMode != ''"> and pay_mode = #{payMode}</if>
+        select p.integral_flag,p.pay_id, p.station_id, s.dept_name as station_name,  p.card_enabled_flag,   p.ws_print_flag,  p.print_setting,  p.discount_setting,  p.notice, p.integral_print_flag
+        from station_pay p join sys_dept s on p.station_id = s.dept_id
+        <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
-            <if test="imagePhotosFlag != null  and imagePhotosFlag != ''"> and image_photos_flag = #{imagePhotosFlag}</if>
             <if test="cardEnabledFlag != null  and cardEnabledFlag != ''"> and card_enabled_flag = #{cardEnabledFlag}</if>
-            <if test="activityPic != null  and activityPic != ''"> and activity_pic = #{activityPic}</if>
-            <if test="preferentialWayShareFlag != null  and preferentialWayShareFlag != ''"> and preferential_way_share_flag = #{preferentialWayShareFlag}</if>
-            <if test="otherPreferentialWay != null  and otherPreferentialWay != ''"> and other_preferential_way = #{otherPreferentialWay}</if>
-            <if test="payPrintNum != null "> and pay_print_num = #{payPrintNum}</if>
-            <if test="payCallbackPage != null  and payCallbackPage != ''"> and pay_callback_page = #{payCallbackPage}</if>
             <if test="wsPrintFlag != null  and wsPrintFlag != ''"> and ws_print_flag = #{wsPrintFlag}</if>
             <if test="printSetting != null  and printSetting != ''"> and print_setting = #{printSetting}</if>
             <if test="discountSetting != null  and discountSetting != ''"> and discount_setting = #{discountSetting}</if>
-            <if test="isNoOil != null  and isNoOil != ''"> and is_no_oil = #{isNoOil}</if>
             <if test="notice != null  and notice != ''"> and notice = #{notice}</if>
             <if test="integralPrintFlag != null  and integralPrintFlag != ''"> and integral_print_flag = #{integralPrintFlag}</if>
             <if test="integralFlag != null  and integralFlag != ''"> and integral_flag = #{integralFlag}</if>
@@ -59,48 +43,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by  pay_id desc
     </select>
-    
+
     <select id="selectStationPayById" parameterType="Long" resultMap="StationPayResult">
-        <include refid="selectStationPayVo"/>
+        select p.integral_flag,p.pay_id, p.station_id, s.dept_name as station_name,  p.card_enabled_flag,   p.ws_print_flag,  p.print_setting,  p.discount_setting,  p.notice, p.integral_print_flag
+        from station_pay p join sys_dept s on p.station_id = s.dept_id
         where pay_id = #{payId}
     </select>
-        
+
     <insert id="insertStationPay" parameterType="StationPay" useGeneratedKeys="true" keyProperty="payId">
         insert into station_pay
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="payMode != null">pay_mode,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
-            <if test="imagePhotosFlag != null">image_photos_flag,</if>
             <if test="cardEnabledFlag != null">card_enabled_flag,</if>
-            <if test="activityPic != null">activity_pic,</if>
-            <if test="preferentialWayShareFlag != null">preferential_way_share_flag,</if>
-            <if test="otherPreferentialWay != null">other_preferential_way,</if>
-            <if test="payPrintNum != null">pay_print_num,</if>
-            <if test="payCallbackPage != null">pay_callback_page,</if>
             <if test="wsPrintFlag != null">ws_print_flag,</if>
             <if test="printSetting != null">print_setting,</if>
             <if test="discountSetting != null">discount_setting,</if>
-            <if test="isNoOil != null">is_no_oil,</if>
             <if test="notice != null">notice,</if>
             <if test="integralPrintFlag != null">integral_print_flag,</if>
             <if test="integralFlag != null">integral_flag,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="payMode != null">#{payMode},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
-            <if test="imagePhotosFlag != null">#{imagePhotosFlag},</if>
             <if test="cardEnabledFlag != null">#{cardEnabledFlag},</if>
-            <if test="activityPic != null">#{activityPic},</if>
-            <if test="preferentialWayShareFlag != null">#{preferentialWayShareFlag},</if>
-            <if test="otherPreferentialWay != null">#{otherPreferentialWay},</if>
-            <if test="payPrintNum != null">#{payPrintNum},</if>
-            <if test="payCallbackPage != null">#{payCallbackPage},</if>
             <if test="wsPrintFlag != null">#{wsPrintFlag},</if>
             <if test="printSetting != null">#{printSetting},</if>
             <if test="discountSetting != null">#{discountSetting},</if>
-            <if test="isNoOil != null">#{isNoOil},</if>
             <if test="notice != null">#{notice},</if>
             <if test="integralPrintFlag != null">#{integralPrintFlag},</if>
             <if test="integralFlag != null">#{integralFlag},</if>
@@ -110,20 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateStationPay" parameterType="StationPay">
         update station_pay
         <trim prefix="SET" suffixOverrides=",">
-            <if test="payMode != null">pay_mode = #{payMode},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
-            <if test="imagePhotosFlag != null">image_photos_flag = #{imagePhotosFlag},</if>
             <if test="cardEnabledFlag != null">card_enabled_flag = #{cardEnabledFlag},</if>
-            <if test="activityPic != null">activity_pic = #{activityPic},</if>
-            <if test="preferentialWayShareFlag != null">preferential_way_share_flag = #{preferentialWayShareFlag},</if>
-            <if test="otherPreferentialWay != null">other_preferential_way = #{otherPreferentialWay},</if>
-            <if test="payPrintNum != null">pay_print_num = #{payPrintNum},</if>
-            <if test="payCallbackPage != null">pay_callback_page = #{payCallbackPage},</if>
             <if test="wsPrintFlag != null">ws_print_flag = #{wsPrintFlag},</if>
             <if test="printSetting != null">print_setting = #{printSetting},</if>
             <if test="discountSetting != null">discount_setting = #{discountSetting},</if>
-            <if test="isNoOil != null">is_no_oil = #{isNoOil},</if>
             <if test="notice != null">notice = #{notice},</if>
             <if test="integralPrintFlag != null">  integral_print_flag = #{integralPrintFlag},</if>
             <if test="integralFlag != null">  integral_flag = #{integralFlag},</if>
@@ -136,10 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationPayByIds" parameterType="String">
-        delete from station_pay where pay_id in 
+        delete from station_pay where pay_id in
         <foreach item="payId" collection="array" open="(" separator="," close=")">
             #{payId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 21 - 20
yijia-station/target/classes/mapper/station/StationPersonnelMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.StationPersonnelMapper">
-    
+
     <resultMap type="StationPersonnel" id="StationPersonnelResult">
         <result property="personnelId"    column="personnel_id"    />
         <result property="personnelName"    column="personnel_name"    />
@@ -12,37 +12,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationName"    column="station_name"    />
         <result property="qrCode"    column="qr_code"    />
         <result property="personnelPhone"    column="personnel_phone"    />
+        <result property="delFlag"    column="del_flag"    />
     </resultMap>
 
     <sql id="selectStationPersonnelVo">
-        select personnel_id, personnel_name, gun_no, station_id, station_name, qr_code, personnel_phone from station_personnel
+     	select personnel_id, personnel_name, gun_no, station_id, d.dept_name as station_name, qr_code, personnel_phone,p.del_flag
+        from station_personnel p join  sys_dept d on  p.station_id = d.dept_id
     </sql>
 
     <select id="selectStationPersonnelList" parameterType="StationPersonnel" resultMap="StationPersonnelResult">
         <include refid="selectStationPersonnelVo"/>
-        <where>  
-            <if test="personnelName != null  and personnelName != ''"> and personnel_name like concat('%', #{personnelName}, '%')</if>
-            <if test="gunNo != null  and gunNo != ''"> and gun_no = #{gunNo}</if>
-            <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+         where  p.del_flag ='0'
+            <if test="personnelName != null  and personnelName != ''"> and p.personnel_name like concat('%', #{personnelName}, '%')</if>
+            <if test="gunNo != null  and gunNo != ''"> and p.gun_no = #{gunNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="stationName != null  and stationName != ''"> and d.dept_name like concat('%', #{stationName}, '%')</if>
             <if test="qrCode != null  and qrCode != ''"> and qr_code = #{qrCode}</if>
             <if test="personnelPhone != null  and personnelPhone != ''"> and personnel_phone = #{personnelPhone}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and p.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
-        </where>
-        order by personnel_id desc
+            order by personnel_id desc
     </select>
-    
+
     <select id="selectStationPersonnelById" parameterType="Long" resultMap="StationPersonnelResult">
         <include refid="selectStationPersonnelVo"/>
         where personnel_id = #{personnelId}
     </select>
-        
+
     <insert id="insertStationPersonnel" parameterType="StationPersonnel">
         insert into station_personnel
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -50,18 +51,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="personnelName != null">personnel_name,</if>
             <if test="gunNo != null">gun_no,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="qrCode != null">qr_code,</if>
             <if test="personnelPhone != null">personnel_phone,</if>
+            <if test="delFlag != null">del_flag,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="personnelId != null">#{personnelId},</if>
             <if test="personnelName != null">#{personnelName},</if>
             <if test="gunNo != null">#{gunNo},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="qrCode != null">#{qrCode},</if>
             <if test="personnelPhone != null">#{personnelPhone},</if>
+            <if test="delFlag != null">#{delFlag},</if>
          </trim>
     </insert>
 
@@ -71,11 +72,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="personnelName != null">personnel_name = #{personnelName},</if>
             <if test="gunNo != null">gun_no = #{gunNo},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="qrCode != null">qr_code = #{qrCode},</if>
             <if test="personnelPhone != null">personnel_phone = #{personnelPhone},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
         </trim>
-        where personnel_id = #{personnelId}
+         where personnel_id = #{personnelId}
     </update>
 
     <delete id="deleteStationPersonnelById" parameterType="Long">
@@ -83,10 +84,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteStationPersonnelByIds" parameterType="String">
-        delete from station_personnel where personnel_id in 
-        <foreach item="personnelId" collection="array" open="(" separator="," close=")">
+        update station_personnel set del_flag = '1' where personnel_id in
+        <foreach collection="array" item="personnelId" open="(" separator="," close=")">
             #{personnelId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 100 - 0
yijia-station/target/classes/mapper/station/StationSettlementPriceAdjustMapper.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yijia.station.mapper.StationSettlementPriceAdjustMapper">
+
+    <resultMap type="StationSettlementPriceAdjust" id="StationSettlementPriceAdjustResult">
+        <result property="id"    column="id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="settlementPrice"    column="settlement_price"    />
+        <result property="settlementType"    column="settlement_type"    />
+        <result property="driverPrice"    column="driver_price"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="createName"    column="create_name"    />
+        <result property="stationName"    column="station_name"    />
+    </resultMap>
+
+    <sql id="selectStationSettlementPriceAdjustVo">
+        select c.id, c.create_by, c.create_time,c.parent_id, c.settlement_price, c.settlement_type,
+         c.driver_price,c.station_id,dept_name as station_name,u.nick_name as create_name
+		from station_settlement_price_adjust c left join sys_dept d on c.station_id = d.dept_id
+		left join sys_user u on c.create_by =u.user_id
+    </sql>
+
+    <select id="selectStationSettlementPriceAdjustList" parameterType="StationSettlementPriceAdjust" resultMap="StationSettlementPriceAdjustResult">
+        <include refid="selectStationSettlementPriceAdjustVo"/>
+        <where>
+            <if test="settlementPrice != null "> and settlement_price = #{settlementPrice}</if>
+            <if test="settlementType != null  and settlementType != ''"> and settlement_type = #{settlementType}</if>
+            <if test="driverPrice != null "> and driver_price = #{driverPrice}</if>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectStationSettlementPriceAdjustById" parameterType="Integer" resultMap="StationSettlementPriceAdjustResult">
+        <include refid="selectStationSettlementPriceAdjustVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertStationSettlementPriceAdjust" parameterType="StationSettlementPriceAdjust" useGeneratedKeys="true" keyProperty="id">
+        insert into station_settlement_price_adjust
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="settlementPrice != null">settlement_price,</if>
+            <if test="settlementType != null">settlement_type,</if>
+            <if test="driverPrice != null">driver_price,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="parentId != null">parent_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="settlementPrice != null">#{settlementPrice},</if>
+            <if test="settlementType != null">#{settlementType},</if>
+            <if test="driverPrice != null">#{driverPrice},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="parentId != null">#{parentId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStationSettlementPriceAdjust" parameterType="StationSettlementPriceAdjust">
+        update station_settlement_price_adjust
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="settlementPrice != null">settlement_price = #{settlementPrice},</if>
+            <if test="settlementType != null">settlement_type = #{settlementType},</if>
+            <if test="driverPrice != null">driver_price = #{driverPrice},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="parentId != null">parent_id = #{parentId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStationSettlementPriceAdjustById" parameterType="Integer">
+        delete from station_settlement_price_adjust where id = #{id}
+    </delete>
+
+    <delete id="deleteStationSettlementPriceAdjustByIds" parameterType="String">
+        delete from station_settlement_price_adjust where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 107 - 0
yijia-station/target/classes/mapper/station/StationSettlementPriceMapper.xml

@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yijia.station.mapper.StationSettlementPriceMapper">
+
+    <resultMap type="StationSettlementPrice" id="StationSettlementPriceResult">
+        <result property="id"    column="id"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="settlementType"    column="settlement_type"    />
+        <result property="settlementPrice"    column="settlement_price"    />
+        <result property="driverPrice"    column="driver_price"    />
+        <result property="driverPriceType"    column="driver_price_type"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="balance"    column="balance"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="stationName"    column="station_name"    />
+    </resultMap>
+
+    <sql id="selectStationSettlementPriceVo">
+        select id, station_id, settlement_type, settlement_price, driver_price,p.create_by,p.create_time,
+        p.update_by,p.update_time,d.dept_name as station_name,balance,dept_id,driver_price_type
+        from sys_dept d  left join station_settlement_price p on d.dept_id = p.station_id    </sql>
+
+    <select id="selectStationSettlementPriceList" parameterType="StationSettlementPrice" resultMap="StationSettlementPriceResult">
+        <include refid="selectStationSettlementPriceVo"/>
+        <where>
+             and d.del_flag ='0'
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="settlementType != null  and settlementType != ''"> and settlement_type = #{settlementType}</if>
+            <if test="settlementPrice != null  and settlementPrice != ''"> and settlement_price = #{settlementPrice}</if>
+            <if test="driverPrice != null  and driverPrice != ''"> and driver_price = #{driverPrice}</if>
+            <if test="driverPriceType != null  and driverPriceType != ''"> and driver_price_type = #{driverPriceType}</if>
+            <if test="stationIdList != null ">
+                and d.dept_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="selectStationSettlementPriceById" parameterType="Integer" resultMap="StationSettlementPriceResult">
+        <include refid="selectStationSettlementPriceVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertStationSettlementPrice" parameterType="StationSettlementPrice">
+        insert into station_settlement_price
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="settlementType != null">settlement_type,</if>
+            <if test="settlementPrice != null">settlement_price,</if>
+            <if test="driverPrice != null">driver_price,</if>
+            <if test="driverPriceType != null">driver_price_type,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="settlementType != null">#{settlementType},</if>
+            <if test="settlementPrice != null">#{settlementPrice},</if>
+            <if test="driverPrice != null">#{driverPrice},</if>
+            <if test="driverPriceType != null">#{driverPriceType},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStationSettlementPrice" parameterType="StationSettlementPrice">
+        update station_settlement_price
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="settlementType != null">settlement_type = #{settlementType},</if>
+            <if test="settlementPrice != null">settlement_price = #{settlementPrice},</if>
+            <if test="driverPrice != null">driver_price = #{driverPrice},</if>
+            <if test="driverPriceType != null">driver_price_type = #{driverPriceType},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStationSettlementPriceById" parameterType="Integer">
+        delete from station_settlement_price where id = #{id}
+    </delete>
+
+    <delete id="deleteStationSettlementPriceByIds" parameterType="String">
+        delete from station_settlement_price where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 1 - 1
yijia-station/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Sat Jan 23 23:41:46 CST 2021
+#Mon Aug 16 15:14:57 CST 2021
 version=1.0.1
 groupId=com.yijia
 artifactId=yijia-station

+ 24 - 0
yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,31 +1,48 @@
+com\yijia\station\controller\StationPicController.class
+com\yijia\station\controller\StationSettlementPriceController.class
+com\yijia\station\service\IStationSettlementPriceAdjustService.class
+com\yijia\station\mapper\StationBalanceChangeMapper.class
 com\yijia\station\service\impl\StationClassesSummaryServiceImpl.class
 com\yijia\station\service\IStationNoticeService.class
 com\yijia\station\service\impl\StationOilPriceAdjustServiceImpl.class
 com\yijia\station\controller\StationOilPriceAdjustController.class
+com\yijia\station\domain\StationPic.class
 com\yijia\station\service\impl\PayOrderServiceImpl.class
 com\yijia\station\service\impl\StationPayServiceImpl.class
 com\yijia\station\service\IStationClassesSummaryService.class
 com\yijia\station\mapper\StationOilGunMapper.class
 com\yijia\station\controller\StationNoticeController.class
 com\yijia\station\domain\StationClassesSummary.class
+com\yijia\station\service\IStationSettlementPriceService.class
 com\yijia\station\domain\PayOrder.class
 com\yijia\station\controller\StationDeviceManageController.class
 com\yijia\station\controller\StationPersonnelController.class
 com\yijia\station\mapper\StationNoticeMapper.class
 com\yijia\station\mapper\StationPersonnelMapper.class
+com\yijia\station\mapper\StationPicMapper.class
 com\yijia\station\controller\StationOilPriceController.class
+com\yijia\station\domain\StationSettlementPriceAdjust.class
 com\yijia\station\controller\StationClassesSummaryController.class
 com\yijia\station\controller\PayOrderController.class
+com\yijia\station\domain\StationSettlementPrice.class
+com\yijia\station\domain\StationBalanceChange.class
 com\yijia\station\service\impl\StationInfoServiceImpl.class
+com\yijia\station\controller\StationPay111Controller.class
 com\yijia\station\service\impl\StationDeviceManageServiceImpl.class
 com\yijia\station\mapper\StationPayMapper.class
 com\yijia\station\mapper\StationOilPriceMapper.class
 com\yijia\station\service\impl\StationOilGunServiceImpl.class
 com\yijia\station\service\IStationPersonnelService.class
+com\yijia\station\service\impl\StationBalanceChangeServiceImpl.class
 com\yijia\station\service\impl\StationNoticeServiceImpl.class
+com\yijia\station\controller\StationBalanceChangeController.class
 com\yijia\station\mapper\StationOilPriceAdjustMapper.class
 com\yijia\station\task\SaticScheduleTask.class
 com\yijia\station\service\IPayOrderService.class
+com\yijia\station\service\impl\StationPicServiceImpl.class
+com\yijia\station\service\IStationPicService.class
+com\yijia\station\service\IStationBalanceChangeService.class
+com\yijia\station\controller\NoOilOrderController.class
 com\yijia\station\mapper\StationInfoMapper.class
 com\yijia\station\service\IStationOilPriceAdjustService.class
 com\yijia\station\mapper\PayOrderMapper.class
@@ -33,15 +50,20 @@ com\yijia\station\mapper\StationClassStructureMapper.class
 com\yijia\station\service\IStationClassStructureService.class
 com\yijia\station\controller\StationClassStructureController.class
 com\yijia\station\service\IStationOilGunService.class
+com\yijia\station\service\impl\StationSettlementPriceAdjustServiceImpl.class
 com\yijia\station\domain\StationClassStructure.class
 com\yijia\station\service\IStationInfoService.class
 com\yijia\station\domain\StationPersonnel.class
 com\yijia\station\controller\StationOilGunController.class
 com\yijia\station\utils\FeiEPrinterUtil.class
+com\yijia\station\service\impl\StationSettlementPriceServiceImpl.class
 com\yijia\station\service\IStationOilPriceService.class
+com\yijia\station\controller\StationSettlementPriceAdjustController.class
 com\yijia\station\mapper\StationClassesSummaryMapper.class
 com\yijia\station\domain\StationNotice.class
+com\yijia\station\domain\DeptInfoDemo.class
 com\yijia\station\service\impl\StationClassStructureServiceImpl.class
+com\yijia\station\domain\SysDeptDemo.class
 com\yijia\station\domain\StationDeviceManage.class
 com\yijia\station\service\impl\StationPersonnelServiceImpl.class
 com\yijia\station\service\IStationDeviceManageService.class
@@ -50,8 +72,10 @@ com\yijia\station\domain\StationInfo.class
 com\yijia\station\service\IStationPayService.class
 com\yijia\station\domain\StationPay.class
 com\yijia\station\controller\StationInfoController.class
+com\yijia\station\mapper\StationSettlementPriceAdjustMapper.class
 com\yijia\station\domain\StationOilGun.class
 com\yijia\station\controller\StationPayController.class
 com\yijia\station\service\impl\StationOilPriceServiceImpl.class
 com\yijia\station\domain\StationOilPrice.class
 com\yijia\station\mapper\StationDeviceManageMapper.class
+com\yijia\station\mapper\StationSettlementPriceMapper.class

+ 81 - 57
yijia-station/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -1,57 +1,81 @@
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationOilPrice.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationClassStructureServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationNoticeController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationDeviceManageMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationInfoServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IPayOrderService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationOilGunService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\utils\FeiEPrinterUtil.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationOilPriceController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationPayServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationPayMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationDeviceManageController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationPay.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\PayOrderMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationClassStructureService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationPayService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationDeviceManage.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceAdjustService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationNotice.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationClassesSummaryController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilPriceAdjustServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationPersonnelMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationInfoService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationOilGunController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\PayOrderServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationNoticeService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationOilPriceAdjust.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilPriceServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationClassStructureController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationPersonnel.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationDeviceManageServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationOilPriceAdjustController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationClassesSummaryServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationOilPriceAdjustMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\task\SaticScheduleTask.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\PayOrder.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationClassesSummaryMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationNoticeServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationPersonnelController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationOilPriceMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationDeviceManageService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationPayController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationClassesSummary.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\StationInfoController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationOilGun.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationPersonnelService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationClassStructure.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationInfoMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationPersonnelServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\domain\StationInfo.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\controller\PayOrderController.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationNoticeMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilGunServiceImpl.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationClassStructureMapper.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\service\IStationClassesSummaryService.java
-E:\JDD-SAAS\Yijia-SaaS\yijia-station\src\main\java\com\yijia\station\mapper\StationOilGunMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationSettlementPriceMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationPicController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationPicServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationOilGunService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationPersonnelService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationClassesSummary.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationPersonnelMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationDeviceManageServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\NoOilOrderController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationDeviceManage.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationPicMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationPay.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationOilPriceAdjustController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationClassesSummaryServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationPersonnel.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationBalanceChange.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\PayOrderController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationOilGun.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationClassStructureController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationNoticeController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\task\SaticScheduleTask.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationInfoController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationClassStructureMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationPersonnelServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationSettlementPriceAdjustController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationSettlementPriceController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationSettlementPriceAdjustServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationPayController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationClassesSummaryController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\SysDeptDemo.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationSettlementPrice.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationOilPriceAdjustService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationClassesSummaryMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationSettlementPriceAdjustMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\PayOrder.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilPriceAdjustServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationPicService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationInfoServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationPayServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\DeptInfoDemo.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationOilPriceAdjustMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationSettlementPriceService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationSettlementPriceAdjust.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationDeviceManageMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IPayOrderService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationClassStructure.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\PayOrderMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationNoticeMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilGunServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationOilPrice.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationBalanceChangeMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationPayService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationPersonnelController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationNoticeServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationNotice.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationDeviceManageController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationOilPriceAdjust.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationClassStructureService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationBalanceChangeService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationPic.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationOilPriceServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationOilPriceController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\utils\FeiEPrinterUtil.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationNoticeService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationBalanceChangeController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\PayOrderServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationOilGunController.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\domain\StationInfo.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationClassStructureServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationDeviceManageService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationInfoMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationSettlementPriceServiceImpl.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationOilPriceMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationClassesSummaryService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationSettlementPriceAdjustService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\controller\StationPay111Controller.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\IStationInfoService.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationOilGunMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\mapper\StationPayMapper.java
+D:\开发项目\SAAS-AFTEREND\yijia-station\src\main\java\com\yijia\station\service\impl\StationBalanceChangeServiceImpl.java

BIN
yijia-station/target/yijia-station-1.0.1.jar


+ 1 - 1
yijia-station/yijia-station.iml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
   <component name="FacetManager">
     <facet type="Spring" name="Spring">
       <configuration />

+ 7 - 3
yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="balance"    column="balance" />
 		<result property="isLngFlag"    column="is_lng_flag" />
 		<result property="city"    column="city" />
+		<result property="couponEnabledFlag"    column="coupon_enabled_flag" />
 	</resultMap>
 
 	<sql id="selectDeptVo">
@@ -62,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         d.del_flag, d.create_by, d.create_time ,d.ji_bie, d.dept_address, d.oil_gun_num, d.station_pic, d.station_longitude,
         d.station_latitude, d.mno, discount_setting,card_enabled_flag,d.app_id, d.app_secret,gzh_app_id,gzh_app_secret,ali_app_id,gzh_app_secret,
         ali_app_id,ali_public_key,ali_private_key,ali_encrypt_key,image1,image2,image3,image4,image5,ws_print_flag,print_setting,notice,integral_print_flag,
-        d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type,d.balance,d.is_lng_flag,d.city
+        d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type,d.balance,d.is_lng_flag,d.city,coupon_enabled_flag
         from sys_dept d
     </sql>
 
@@ -220,7 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询集团及共享信息-->
 	<select id="selectShareGroup" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
         from sys_dept d
 		where d.del_flag = '0'
 		<if test="integralRuleFlag != null">
@@ -265,7 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<!--查询所有不共享的站点-->
 	<select id="selectNotShareDept" parameterType="SysDept" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name,card_enabled_flag,d.app_id,d.integral_flag,d.integral_rule_flag,d.card_rule_flag,
-		d.coupon_flag,d.label_flag,d.print_device_type
+		d.coupon_flag,d.label_flag,d.print_device_type,d.coupon_enabled_flag
 		from sys_dept d
 		where d.del_flag = "0"
 		and d.parent_id in (
@@ -330,6 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="balance != null">balance,</if>
 			<if test="city != null">city,</if>
 			<if test="isLngFlag != null">is_lng_flag,</if>
+			<if test="couponEnabledFlag != null">coupon_enabled_flag,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -377,6 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="balance != null">#{balance},</if>
 			<if test="city != null">#{city},</if>
 			<if test="isLngFlag != null">#{isLngFlag},</if>
+			<if test="couponEnabledFlag != null">#{couponEnabledFlag},</if>
  			sysdate()
  		)
 	</insert>
@@ -428,6 +431,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="balance != null">balance= #{balance},</if>
 			<if test="city != null">city= #{city},</if>
 			<if test="isLngFlag != null">is_lng_flag= #{isLngFlag},</if>
+			<if test="couponEnabledFlag != null">coupon_enabled_flag= #{couponEnabledFlag},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}

+ 2 - 1
yijia-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="leader"   column="leader"      />
 		<result property="status"   column="dept_status" />
 		<result property="isLngFlag"   column="is_lng_flag" />
+		<result property="couponEnabledFlag"   column="coupon_enabled_flag" />
 	</resultMap>
 
 	<resultMap id="RoleResult" type="SysRole">
@@ -51,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<sql id="selectUserVo">
         select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
         u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.agent_flag,
-        d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,d.ji_bie,d.is_lng_flag,
+        d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,d.ji_bie,d.is_lng_flag,d.coupon_enabled_flag,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
         from sys_user u
 		    left join sys_dept d on u.dept_id = d.dept_id