XF--LRQYEJOKYDS\Administrator 4 anni fa
parent
commit
edda2fa47c

+ 1 - 92
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java

@@ -1,10 +1,6 @@
 package com.yijia.station.controller;
 
-import java.util.Date;
 import java.util.List;
-
-import com.yijia.station.domain.PayOrder;
-import com.yijia.station.service.IPayOrderService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -36,9 +32,6 @@ public class StationClassStructureController extends BaseController
 {
     @Autowired
     private IStationClassStructureService stationClassStructureService;
-    @Autowired
-    private IPayOrderService payOrderService;
-
 
     /**
      * 查询班结管理列表
@@ -52,17 +45,6 @@ public class StationClassStructureController extends BaseController
         return getDataTable(list);
     }
 
-
-    /**
-     * 根据员工汇总
-     */
-    @PreAuthorize("@ss.hasPermi('station:structure:listPersonnelStructure')")
-    @GetMapping("/listPersonnelStructure")
-    public TableDataInfo listPersonnelStructure(StationClassStructure stationClassStructure)
-    {
-        List<StationClassStructure> list = stationClassStructureService.listPersonnelStructure(stationClassStructure);
-        return getDataTable(list);
-    }
     /**
      * 导出班结管理列表
      */
@@ -94,80 +76,7 @@ public class StationClassStructureController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody StationClassStructure stationClassStructure)
     {
-        //获取当前班结油站
-       // Long stationId=stationClassStructure.getStationId();
-        Long stationId= Long.valueOf("1");
-        String stationName=stationClassStructure.getStationName();
-        String username = stationClassStructure.getClassStructureMan();
-        //根据油站查询出油站是否班结过,班结过就需要查询上次班结的时间
-        StationClassStructure classes =new StationClassStructure();
-        classes.setStationId(stationId);
-        //查询出上次班结,最后一条数据
-        StationClassStructure sss =stationClassStructureService.selectStationClassStructureMax(classes);
-        //当前时间
-        Date date= new Date();
-        int i=0;
-        if(sss!=null){
-            //获取上次班结时间
-            PayOrder order=new PayOrder();
-            order.setStationId(stationId);
-            order.setBeginTime(sss.getClassStructureDate().toString());
-            order.setEndTime(date.toString());
-            List<PayOrder> list = payOrderService.selectPayOrderList(order);
-            for(PayOrder payOrder:list){
-                StationClassStructure stationclass =new StationClassStructure();
-                stationclass.setStationId(payOrder.getStationId());
-                stationclass.setClassStructureMan(username);
-                stationclass.setClassStructureDate(date);
-                stationclass.setOrderNo(payOrder.getOrderNo());
-                stationclass.setOilGun(payOrder.getOilGun());
-                stationclass.setOilName(payOrder.getOilName());
-                stationclass.setConsumerId(payOrder.getConsumerId());
-                stationclass.setConsumer(payOrder.getConsumer());
-                stationclass.setAmt(payOrder.getAmt());
-                stationclass.setOrderLiters(payOrder.getOrderLiters());
-                stationclass.setPayWay(payOrder.getPayWay());
-                stationclass.setPayType(payOrder.getPayType());
-                stationclass.setPayDate(payOrder.getPayDate());
-                stationclass.setOilPersonnel(payOrder.getOilPersonnel());
-                stationclass.setOrderType(payOrder.getOrderType());
-                //stationclass.setOilType();
-                //stationclass.getPrintNum();
-                //stationclass
-                i= stationClassStructureService.insertStationClassStructure(stationclass);
-            }
-        }else{
-            //初次班结 班结时间默认为当前时间,班结人username
-            //根据班结时间查询订单
-
-            PayOrder order=new PayOrder();
-            order.setStationId(stationId);
-            order.setEndTime(date.toString());
-            List<PayOrder> list = payOrderService.selectPayOrderList(order);
-            for(PayOrder payOrder:list){
-                StationClassStructure stationclass =new StationClassStructure();
-                stationclass.setStationId(payOrder.getStationId());
-                stationclass.setClassStructureMan(username);
-                stationclass.setClassStructureDate(date);
-                stationclass.setOrderNo(payOrder.getOrderNo());
-                stationclass.setOilGun(payOrder.getOilGun());
-                stationclass.setOilName(payOrder.getOilName());
-                stationclass.setConsumerId(payOrder.getConsumerId());
-                stationclass.setConsumer(payOrder.getConsumer());
-                stationclass.setAmt(payOrder.getAmt());
-                stationclass.setOrderLiters(payOrder.getOrderLiters());
-                stationclass.setPayWay(payOrder.getPayWay());
-                stationclass.setPayType(payOrder.getPayType());
-                stationclass.setPayDate(payOrder.getPayDate());
-                stationclass.setOilPersonnel(payOrder.getOilPersonnel());
-                stationclass.setOrderType(payOrder.getOrderType());
-                //stationclass.setOilType();
-                //stationclass.getPrintNum();
-               //stationclass
-               i= stationClassStructureService.insertStationClassStructure(stationclass);
-            }
-        }
-        return toAjax(i);
+        return toAjax(stationClassStructureService.insertStationClassStructure(stationClassStructure));
     }
 
     /**

+ 72 - 157
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationClassStructure.java

@@ -11,7 +11,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 班结管理对象 station_class_structure
  * 
  * @author yijia
- * @date 2020-12-24
+ * @date 2020-12-14
  */
 public class StationClassStructure extends BaseEntity
 {
@@ -20,66 +20,45 @@ public class StationClassStructure extends BaseEntity
     /** $column.columnComment */
     private Long id;
 
-    /** 油站id */
-    @Excel(name = "油站id")
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
     private Long stationId;
 
-    /** 订单号 */
-    @Excel(name = "订单号")
-    private String orderNo;
-
-    /** 加油枪号 */
-    @Excel(name = "加油枪号")
-    private String oilGun;
-
-    /** 油品名称 */
-    @Excel(name = "油品名称")
-    private String oilName;
-
-    /** 用户(app_user_info  id消费者id) */
-    @Excel(name = "用户", readConverterExp = "a=pp_user_info,i=d消费者id")
-    private Long consumerId;
-
-    /** 消费者 */
-    @Excel(name = "消费者")
-    private String consumer;
-
-    /** 金额 */
-    @Excel(name = "金额")
-    private String amt;
-
     /** 油站名称 */
     @Excel(name = "油站名称")
     private String stationName;
 
-    /** 加油升数· */
-    @Excel(name = "加油升数·")
-    private String orderLiters;
+    /** 员工姓名 */
+    @Excel(name = "员工姓名")
+    private String person;
 
-    /** 支付类型 sxf */
-    @Excel(name = "支付类型 sxf")
-    private String payType;
+    /** 负责枪号 */
+    @Excel(name = "负责枪号")
+    private String gunNo;
 
-    /** 支付方式:02公众号 03小程序 */
-    @Excel(name = "支付方式:02公众号 03小程序")
-    private String payWay;
+    /** 销量 */
+    @Excel(name = "销量")
+    private String salesVolume;
 
-    /** 支付时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date payDate;
+    /** 销额 */
+    @Excel(name = "销额")
+    private String salesAmount;
+
+    /** 优惠 */
+    @Excel(name = "优惠")
+    private String discount;
 
-    /** 加油员人名 */
-    @Excel(name = "加油员人名")
-    private String oilPersonnel;
+    /** 优惠券 */
+    @Excel(name = "优惠券")
+    private String coupon;
 
-    /** 订单类型订单类型(1.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分) */
-    @Excel(name = "订单类型订单类型", readConverterExp = "1=.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分")
-    private String orderType;
+    /** 实收 */
+    @Excel(name = "实收")
+    private String netReceipts;
 
-    /** 油品类型(柴油,汽油) */
-    @Excel(name = "油品类型", readConverterExp = "柴=油,汽油")
-    private String oilType;
+    /** 销售笔数 */
+    @Excel(name = "销售笔数")
+    private Long salesNum;
 
     /** 打印小票数(含重复) */
     @Excel(name = "打印小票数", readConverterExp = "含=重复")
@@ -98,10 +77,6 @@ public class StationClassStructure extends BaseEntity
     @Excel(name = "班结人")
     private String classStructureMan;
 
-    /** 油品 */
-    @Excel(name = "油品")
-    private String oils;
-
     public void setId(Long id) 
     {
         this.id = id;
@@ -120,131 +95,86 @@ public class StationClassStructure extends BaseEntity
     {
         return stationId;
     }
-    public void setOrderNo(String orderNo) 
-    {
-        this.orderNo = orderNo;
-    }
-
-    public String getOrderNo() 
-    {
-        return orderNo;
-    }
-    public void setOilGun(String oilGun) 
-    {
-        this.oilGun = oilGun;
-    }
-
-    public String getOilGun() 
-    {
-        return oilGun;
-    }
-    public void setOilName(String oilName) 
-    {
-        this.oilName = oilName;
-    }
-
-    public String getOilName() 
-    {
-        return oilName;
-    }
-    public void setConsumerId(Long consumerId) 
-    {
-        this.consumerId = consumerId;
-    }
-
-    public Long getConsumerId() 
-    {
-        return consumerId;
-    }
-    public void setConsumer(String consumer) 
-    {
-        this.consumer = consumer;
-    }
-
-    public String getConsumer() 
-    {
-        return consumer;
-    }
-    public void setAmt(String amt) 
+    public void setStationName(String stationName) 
     {
-        this.amt = amt;
+        this.stationName = stationName;
     }
 
-    public String getAmt() 
+    public String getStationName() 
     {
-        return amt;
+        return stationName;
     }
-    public void setStationName(String stationName) 
+    public void setPerson(String person) 
     {
-        this.stationName = stationName;
+        this.person = person;
     }
 
-    public String getStationName() 
+    public String getPerson() 
     {
-        return stationName;
+        return person;
     }
-    public void setOrderLiters(String orderLiters) 
+    public void setGunNo(String gunNo) 
     {
-        this.orderLiters = orderLiters;
+        this.gunNo = gunNo;
     }
 
-    public String getOrderLiters() 
+    public String getGunNo() 
     {
-        return orderLiters;
+        return gunNo;
     }
-    public void setPayType(String payType) 
+    public void setSalesVolume(String salesVolume) 
     {
-        this.payType = payType;
+        this.salesVolume = salesVolume;
     }
 
-    public String getPayType() 
+    public String getSalesVolume() 
     {
-        return payType;
+        return salesVolume;
     }
-    public void setPayWay(String payWay) 
+    public void setSalesAmount(String salesAmount) 
     {
-        this.payWay = payWay;
+        this.salesAmount = salesAmount;
     }
 
-    public String getPayWay() 
+    public String getSalesAmount() 
     {
-        return payWay;
+        return salesAmount;
     }
-    public void setPayDate(Date payDate) 
+    public void setDiscount(String discount) 
     {
-        this.payDate = payDate;
+        this.discount = discount;
     }
 
-    public Date getPayDate() 
+    public String getDiscount() 
     {
-        return payDate;
+        return discount;
     }
-    public void setOilPersonnel(String oilPersonnel) 
+    public void setCoupon(String coupon) 
     {
-        this.oilPersonnel = oilPersonnel;
+        this.coupon = coupon;
     }
 
-    public String getOilPersonnel() 
+    public String getCoupon() 
     {
-        return oilPersonnel;
+        return coupon;
     }
-    public void setOrderType(String orderType) 
+    public void setNetReceipts(String netReceipts) 
     {
-        this.orderType = orderType;
+        this.netReceipts = netReceipts;
     }
 
-    public String getOrderType() 
+    public String getNetReceipts() 
     {
-        return orderType;
+        return netReceipts;
     }
-    public void setOilType(String oilType) 
+    public void setSalesNum(Long salesNum) 
     {
-        this.oilType = oilType;
+        this.salesNum = salesNum;
     }
 
-    public String getOilType() 
+    public Long getSalesNum() 
     {
-        return oilType;
+        return salesNum;
     }
     public void setPrintNum(Long printNum) 
     {
@@ -282,40 +212,25 @@ public class StationClassStructure extends BaseEntity
     {
         return classStructureMan;
     }
-    public void setOils(String oils) 
-    {
-        this.oils = oils;
-    }
-
-    public String getOils() 
-    {
-        return oils;
-    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
             .append("stationId", getStationId())
-            .append("orderNo", getOrderNo())
-            .append("oilGun", getOilGun())
-            .append("oilName", getOilName())
-            .append("consumerId", getConsumerId())
-            .append("consumer", getConsumer())
-            .append("amt", getAmt())
             .append("stationName", getStationName())
-            .append("orderLiters", getOrderLiters())
-            .append("payType", getPayType())
-            .append("payWay", getPayWay())
-            .append("payDate", getPayDate())
-            .append("oilPersonnel", getOilPersonnel())
-            .append("orderType", getOrderType())
-            .append("oilType", getOilType())
+            .append("person", getPerson())
+            .append("gunNo", getGunNo())
+            .append("salesVolume", getSalesVolume())
+            .append("salesAmount", getSalesAmount())
+            .append("discount", getDiscount())
+            .append("coupon", getCoupon())
+            .append("netReceipts", getNetReceipts())
+            .append("salesNum", getSalesNum())
             .append("printNum", getPrintNum())
             .append("classStructureNo", getClassStructureNo())
             .append("classStructureDate", getClassStructureDate())
             .append("classStructureMan", getClassStructureMan())
-            .append("oils", getOils())
             .toString();
     }
 }

+ 1 - 10
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/StationClassStructureMapper.java

@@ -7,7 +7,7 @@ import com.yijia.station.domain.StationClassStructure;
  * 班结管理Mapper接口
  * 
  * @author yijia
- * @date 2020-12-24
+ * @date 2020-12-14
  */
 public interface StationClassStructureMapper 
 {
@@ -58,13 +58,4 @@ public interface StationClassStructureMapper
      * @return 结果
      */
     public int deleteStationClassStructureByIds(Long[] ids);
-
-    public StationClassStructure selectStationClassStructureMax(StationClassStructure classes);
-
-    /**
-     * 根据员工汇总班结数据
-     * @param stationClassStructure
-     * @return
-     */
-    public  List<StationClassStructure> listPersonnelStructure(StationClassStructure stationClassStructure);
 }

+ 1 - 10
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationClassStructureService.java

@@ -7,7 +7,7 @@ import com.yijia.station.domain.StationClassStructure;
  * 班结管理Service接口
  * 
  * @author yijia
- * @date 2020-12-24
+ * @date 2020-12-14
  */
 public interface IStationClassStructureService 
 {
@@ -58,13 +58,4 @@ public interface IStationClassStructureService
      * @return 结果
      */
     public int deleteStationClassStructureById(Long id);
-
-    public StationClassStructure selectStationClassStructureMax(StationClassStructure classes);
-
-    /**
-     * 根据员工汇总班结数据
-     * @param stationClassStructure
-     * @return
-     */
-    public List<StationClassStructure> listPersonnelStructure(StationClassStructure stationClassStructure);
 }

+ 1 - 24
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationClassStructureServiceImpl.java

@@ -11,7 +11,7 @@ import com.yijia.station.service.IStationClassStructureService;
  * 班结管理Service业务层处理
  * 
  * @author yijia
- * @date 2020-12-24
+ * @date 2020-12-14
  */
 @Service
 public class StationClassStructureServiceImpl implements IStationClassStructureService 
@@ -90,27 +90,4 @@ public class StationClassStructureServiceImpl implements IStationClassStructureS
     {
         return stationClassStructureMapper.deleteStationClassStructureById(id);
     }
-
-    /**
-     * 查询班结数据
-     * @param classes
-     * @return
-     */
-    @Override
-    public StationClassStructure selectStationClassStructureMax(StationClassStructure classes) {
-
-        return stationClassStructureMapper.selectStationClassStructureMax(classes);
-    }
-
-    /**
-     * 根据员工汇总
-     * @param stationClassStructure
-     * @return
-     */
-    @Override
-    public List<StationClassStructure> listPersonnelStructure(StationClassStructure stationClassStructure) {
-        stationClassStructure.setStationId(Long.valueOf("1"));
-        List<StationClassStructure>  list =stationClassStructureMapper.listPersonnelStructure(stationClassStructure);
-        return list;
-    }
 }

+ 42 - 84
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -7,119 +7,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="StationClassStructure" id="StationClassStructureResult">
         <result property="id"    column="id"    />
         <result property="stationId"    column="station_id"    />
-        <result property="orderNo"    column="order_no"    />
-        <result property="oilGun"    column="oil_gun"    />
-        <result property="oilName"    column="oil_name"    />
-        <result property="consumerId"    column="consumer_id"    />
-        <result property="consumer"    column="consumer"    />
-        <result property="amt"    column="amt"    />
         <result property="stationName"    column="station_name"    />
-        <result property="orderLiters"    column="order_liters"    />
-        <result property="payType"    column="pay_type"    />
-        <result property="payWay"    column="pay_way"    />
-        <result property="payDate"    column="pay_date"    />
-        <result property="oilPersonnel"    column="oil_personnel"    />
-        <result property="orderType"    column="order_type"    />
-        <result property="oilType"    column="oil_type"    />
+        <result property="person"    column="person"    />
+        <result property="gunNo"    column="gun_no"    />
+        <result property="salesVolume"    column="sales_volume"    />
+        <result property="salesAmount"    column="sales_amount"    />
+        <result property="discount"    column="discount"    />
+        <result property="coupon"    column="coupon"    />
+        <result property="netReceipts"    column="net_receipts"    />
+        <result property="salesNum"    column="sales_num"    />
         <result property="printNum"    column="print_num"    />
         <result property="classStructureNo"    column="class_structure_no"    />
         <result property="classStructureDate"    column="class_structure_date"    />
         <result property="classStructureMan"    column="class_structure_man"    />
-        <result property="oils"    column="oils"    />
     </resultMap>
 
     <sql id="selectStationClassStructureVo">
-        select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_structure_date, class_structure_man, oils from station_class_structure
+        select id, station_id, station_name, person, gun_no, sales_volume, sales_amount, discount, coupon, net_receipts, sales_num, print_num, class_structure_no, class_structure_date, class_structure_man from station_class_structure
     </sql>
 
     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         <include refid="selectStationClassStructureVo"/>
         <where>  
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
-            <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
-            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
-            <if test="amt != null  and amt != ''"> and amt = #{amt}</if>
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
-            <if test="orderLiters != null  and orderLiters != ''"> and order_liters = #{orderLiters}</if>
-            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
-            <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
-            <if test="payDate != null "> and pay_date = #{payDate}</if>
-            <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
-            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
-            <if test="oilType != null  and oilType != ''"> and oil_type = #{oilType}</if>
+            <if test="person != null  and person != ''"> and person = #{person}</if>
+            <if test="gunNo != null  and gunNo != ''"> and gun_no = #{gunNo}</if>
+            <if test="salesVolume != null  and salesVolume != ''"> and sales_volume = #{salesVolume}</if>
+            <if test="salesAmount != null  and salesAmount != ''"> and sales_amount = #{salesAmount}</if>
+            <if test="discount != null  and discount != ''"> and discount = #{discount}</if>
+            <if test="coupon != null  and coupon != ''"> and coupon = #{coupon}</if>
+            <if test="netReceipts != null  and netReceipts != ''"> and net_receipts = #{netReceipts}</if>
+            <if test="salesNum != null "> and sales_num = #{salesNum}</if>
             <if test="printNum != null "> and print_num = #{printNum}</if>
             <if test="classStructureNo != null  and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="classStructureDate != null "> and class_structure_date = #{classStructureDate}</if>
             <if test="classStructureMan != null  and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
-            <if test="oils != null  and oils != ''"> and oils = #{oils}</if>
         </where>
     </select>
-    <select id="selectStationClassStructureMax" parameterType="Long" 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 station_id = #{stationId});
-    </select>
+    
     <select id="selectStationClassStructureById" parameterType="Long" resultMap="StationClassStructureResult">
         <include refid="selectStationClassStructureVo"/>
         where id = #{id}
     </select>
-    <!--根据盐工汇总班结数据-->
-    <select id="listPersonnelStructure" parameterType="Long" resultMap="StationClassStructureResult">
-        SELECT a.oil_personnel,b.gun_no,ROUND(sum(a.order_liters),2) as order_liters,ROUND(SUM(a.amt),2) as amt,COUNT(a.order_no) counts
-        from station_class_structure a
-        join station_personnel b  on a.oil_personnel=b.personnel_name and a.station_id = b.station_id
-        where a.station_id = #{stationId}
-        GROUP BY a.oil_personnel,b.gun_no
-    </select>
         
     <insert id="insertStationClassStructure" parameterType="StationClassStructure" useGeneratedKeys="true" keyProperty="id">
         insert into station_class_structure
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="stationId != null">station_id,</if>
-            <if test="orderNo != null">order_no,</if>
-            <if test="oilGun != null">oil_gun,</if>
-            <if test="oilName != null">oil_name,</if>
-            <if test="consumerId != null">consumer_id,</if>
-            <if test="consumer != null">consumer,</if>
-            <if test="amt != null">amt,</if>
             <if test="stationName != null">station_name,</if>
-            <if test="orderLiters != null">order_liters,</if>
-            <if test="payType != null">pay_type,</if>
-            <if test="payWay != null">pay_way,</if>
-            <if test="payDate != null">pay_date,</if>
-            <if test="oilPersonnel != null">oil_personnel,</if>
-            <if test="orderType != null">order_type,</if>
-            <if test="oilType != null">oil_type,</if>
+            <if test="person != null">person,</if>
+            <if test="gunNo != null">gun_no,</if>
+            <if test="salesVolume != null">sales_volume,</if>
+            <if test="salesAmount != null">sales_amount,</if>
+            <if test="discount != null">discount,</if>
+            <if test="coupon != null">coupon,</if>
+            <if test="netReceipts != null">net_receipts,</if>
+            <if test="salesNum != null">sales_num,</if>
             <if test="printNum != null">print_num,</if>
             <if test="classStructureNo != null">class_structure_no,</if>
             <if test="classStructureDate != null">class_structure_date,</if>
             <if test="classStructureMan != null">class_structure_man,</if>
-            <if test="oils != null">oils,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="stationId != null">#{stationId},</if>
-            <if test="orderNo != null">#{orderNo},</if>
-            <if test="oilGun != null">#{oilGun},</if>
-            <if test="oilName != null">#{oilName},</if>
-            <if test="consumerId != null">#{consumerId},</if>
-            <if test="consumer != null">#{consumer},</if>
-            <if test="amt != null">#{amt},</if>
             <if test="stationName != null">#{stationName},</if>
-            <if test="orderLiters != null">#{orderLiters},</if>
-            <if test="payType != null">#{payType},</if>
-            <if test="payWay != null">#{payWay},</if>
-            <if test="payDate != null">#{payDate},</if>
-            <if test="oilPersonnel != null">#{oilPersonnel},</if>
-            <if test="orderType != null">#{orderType},</if>
-            <if test="oilType != null">#{oilType},</if>
+            <if test="person != null">#{person},</if>
+            <if test="gunNo != null">#{gunNo},</if>
+            <if test="salesVolume != null">#{salesVolume},</if>
+            <if test="salesAmount != null">#{salesAmount},</if>
+            <if test="discount != null">#{discount},</if>
+            <if test="coupon != null">#{coupon},</if>
+            <if test="netReceipts != null">#{netReceipts},</if>
+            <if test="salesNum != null">#{salesNum},</if>
             <if test="printNum != null">#{printNum},</if>
             <if test="classStructureNo != null">#{classStructureNo},</if>
             <if test="classStructureDate != null">#{classStructureDate},</if>
             <if test="classStructureMan != null">#{classStructureMan},</if>
-            <if test="oils != null">#{oils},</if>
          </trim>
     </insert>
 
@@ -127,25 +91,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update station_class_structure
         <trim prefix="SET" suffixOverrides=",">
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="orderNo != null">order_no = #{orderNo},</if>
-            <if test="oilGun != null">oil_gun = #{oilGun},</if>
-            <if test="oilName != null">oil_name = #{oilName},</if>
-            <if test="consumerId != null">consumer_id = #{consumerId},</if>
-            <if test="consumer != null">consumer = #{consumer},</if>
-            <if test="amt != null">amt = #{amt},</if>
             <if test="stationName != null">station_name = #{stationName},</if>
-            <if test="orderLiters != null">order_liters = #{orderLiters},</if>
-            <if test="payType != null">pay_type = #{payType},</if>
-            <if test="payWay != null">pay_way = #{payWay},</if>
-            <if test="payDate != null">pay_date = #{payDate},</if>
-            <if test="oilPersonnel != null">oil_personnel = #{oilPersonnel},</if>
-            <if test="orderType != null">order_type = #{orderType},</if>
-            <if test="oilType != null">oil_type = #{oilType},</if>
+            <if test="person != null">person = #{person},</if>
+            <if test="gunNo != null">gun_no = #{gunNo},</if>
+            <if test="salesVolume != null">sales_volume = #{salesVolume},</if>
+            <if test="salesAmount != null">sales_amount = #{salesAmount},</if>
+            <if test="discount != null">discount = #{discount},</if>
+            <if test="coupon != null">coupon = #{coupon},</if>
+            <if test="netReceipts != null">net_receipts = #{netReceipts},</if>
+            <if test="salesNum != null">sales_num = #{salesNum},</if>
             <if test="printNum != null">print_num = #{printNum},</if>
             <if test="classStructureNo != null">class_structure_no = #{classStructureNo},</if>
             <if test="classStructureDate != null">class_structure_date = #{classStructureDate},</if>
             <if test="classStructureMan != null">class_structure_man = #{classStructureMan},</if>
-            <if test="oils != null">oils = #{oils},</if>
         </trim>
         where id = #{id}
     </update>