XF--LRQYEJOKYDS\Administrator %!s(int64=4) %!d(string=hai) anos
pai
achega
9aebece1ee
Modificáronse 18 ficheiros con 1304 adicións e 135 borrados
  1. 39 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java
  2. 1 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java
  3. 103 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassesSummaryController.java
  4. 313 75
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java
  5. 32 17
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationClassStructure.java
  6. 231 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationClassesSummary.java
  7. 21 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/PayOrderMapper.java
  8. 1 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/StationClassStructureMapper.java
  9. 61 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/StationClassesSummaryMapper.java
  10. 21 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java
  11. 1 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationClassStructureService.java
  12. 61 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationClassesSummaryService.java
  13. 33 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java
  14. 1 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationClassStructureServiceImpl.java
  15. 93 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationClassesSummaryServiceImpl.java
  16. 169 38
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml
  17. 6 1
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml
  18. 117 0
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassesSummaryMapper.xml

+ 39 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java

@@ -46,6 +46,45 @@ public class PayOrderController extends BaseController
     }
 
     /**
+     * 查询总金额,总升数
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:selectDaySources')")
+    @GetMapping("/selectDaySources")
+    public AjaxResult selectDaySources(PayOrder payOrder)
+    {
+        PayOrder order = payOrderService.selectDaySources(payOrder);
+        return AjaxResult.success(order);
+    }
+
+    /***
+     * 根据油品分类,查询油品的总金额,总升数
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:selectOilTypeSources')")
+    @GetMapping("/selectOilTypeSources")
+    public AjaxResult selectOilTypeSources(PayOrder payOrder)
+    {
+        PayOrder order = payOrderService.selectOilTypeSources(payOrder);
+        return AjaxResult.success(order);
+    }
+
+    /***
+     * 根据油品分类,查询油品的总金额,总升数
+     * @param payOrder
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('station:order:selectOverViewData')")
+    @GetMapping("/selectOverViewData")
+    public AjaxResult selectOverViewData(PayOrder payOrder)
+    {
+        PayOrder order = payOrderService.selectOverViewData(payOrder);
+        return AjaxResult.success(order);
+    }
+
+    /**
      * 导出订单支付列表
      */
     @PreAuthorize("@ss.hasPermi('station:order:export')")

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

@@ -29,7 +29,7 @@ import com.yijia.common.core.page.TableDataInfo;
  * 班结管理Controller
  * 
  * @author yijia
- * @date 2020-12-14
+ * @date 2020-12-31
  */
 @RestController
 @RequestMapping("/station/structure")

+ 103 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassesSummaryController.java

@@ -0,0 +1,103 @@
+package com.yijia.station.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.yijia.common.annotation.Log;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
+import com.yijia.common.enums.BusinessType;
+import com.yijia.station.domain.StationClassesSummary;
+import com.yijia.station.service.IStationClassesSummaryService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author yijia
+ * @date 2020-12-28
+ */
+@RestController
+@RequestMapping("/station/summary")
+public class StationClassesSummaryController extends BaseController
+{
+    @Autowired
+    private IStationClassesSummaryService stationClassesSummaryService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(StationClassesSummary stationClassesSummary)
+    {
+        startPage();
+        List<StationClassesSummary> list = stationClassesSummaryService.selectStationClassesSummaryList(stationClassesSummary);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StationClassesSummary stationClassesSummary)
+    {
+        List<StationClassesSummary> list = stationClassesSummaryService.selectStationClassesSummaryList(stationClassesSummary);
+        ExcelUtil<StationClassesSummary> util = new ExcelUtil<StationClassesSummary>(StationClassesSummary.class);
+        return util.exportExcel(list, "summary");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(stationClassesSummaryService.selectStationClassesSummaryById(id));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StationClassesSummary stationClassesSummary)
+    {
+        return toAjax(stationClassesSummaryService.insertStationClassesSummary(stationClassesSummary));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StationClassesSummary stationClassesSummary)
+    {
+        return toAjax(stationClassesSummaryService.updateStationClassesSummary(stationClassesSummary));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('station:summary:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(stationClassesSummaryService.deleteStationClassesSummaryByIds(ids));
+    }
+}

+ 313 - 75
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java

@@ -9,9 +9,9 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 订单支付对象 pay_order
- *
+ * 
  * @author yijia
- * @date 2020-12-10
+ * @date 2020-12-31
  */
 public class PayOrder extends BaseEntity
 {
@@ -24,13 +24,17 @@ public class PayOrder extends BaseEntity
     @Excel(name = "订单号")
     private String orderNo;
 
-    /** 加油枪号 */
-    @Excel(name = "加油枪号")
-    private String oilGun;
+    /** 油站id */
+    @Excel(name = "油站id")
+    private Long stationId;
 
-    /** 油品名称 */
-    @Excel(name = "油品名称")
-    private String oilName;
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 状态(0未支付,1,已支付) */
+    @Excel(name = "状态(0未支付,1,已支付)")
+    private String status;
 
     /** 用户id(消费者) */
     @Excel(name = "用户id(消费者)")
@@ -40,21 +44,89 @@ public class PayOrder extends BaseEntity
     @Excel(name = "消费者")
     private String consumer;
 
-    /** 金额 */
-    @Excel(name = "金额")
-    private String amt;
+    /** 加油枪号 */
+    @Excel(name = "加油枪号")
+    private String oilGun;
 
-    /** 油站id */
-    @Excel(name = "油站id")
-    private Long stationId;
+    /** 油品名称 */
+    @Excel(name = "油品名称")
+    private String oilName;
 
-    /** 状态(0未支付,1,已支付) */
-    @Excel(name = "状态(0未支付,1,已支付)")
-    private String status;
+    /** 油品价格 */
+    @Excel(name = "油品价格")
+    private String oilPirce;
+
+    /** 油品类型(1.柴油 2 汽油) */
+    @Excel(name = "油品类型", readConverterExp = "1=.柴油,2=,汽=油")
+    private String oilType;
 
     /** 加油升数 */
     @Excel(name = "加油升数")
-    private String orderLiters;
+    private Double orderLiters;
+
+    /** 实收金额 */
+    @Excel(name = "实收金额")
+    private Double amt;
+
+    /** 应收金额 */
+    @Excel(name = "应收金额")
+    private Double receivableAmt;
+
+    /** 优惠金额 */
+    @Excel(name = "优惠金额")
+    private Double discountAmt;
+
+    /** 优惠券金额 */
+    @Excel(name = "优惠券金额")
+    private Double discountCouponAmt;
+
+    /** 优惠券 */
+    @Excel(name = "优惠券")
+    private Double discountCoupon;
+
+    /** 微信支付金额 */
+    @Excel(name = "微信支付金额")
+    private Double wxAmt;
+
+    /** 支付宝支付金额 */
+    @Excel(name = "支付宝支付金额")
+    private Double zfbAmt;
+
+    /** pos支付金额 */
+    @Excel(name = "pos支付金额")
+    private Double posAmt;
+
+    /** 现金支付金额 */
+    @Excel(name = "现金支付金额")
+    private Double xjAmt;
+
+    /** 滴滴app支付金额 */
+    @Excel(name = "滴滴app支付金额")
+    private Double didiAppAmt;
+
+    /** 团油app支付金额 */
+    @Excel(name = "团油app支付金额")
+    private Double tyAppAmt;
+
+    /** 其他支付金额 */
+    @Excel(name = "其他支付金额")
+    private Double otherAmt;
+
+    /** 电子卡祝福金额 */
+    @Excel(name = "电子卡祝福金额")
+    private Double dzkAmt;
+
+    /** 消费积分 */
+    @Excel(name = "消费积分")
+    private Long score;
+
+    /** 会员支付金额 */
+    @Excel(name = "会员支付金额")
+    private Double memberAmt;
+
+    /** 打印小票数量 */
+    @Excel(name = "打印小票数量")
+    private Long printCount;
 
     /** 支付类型:随行付:sxf */
     @Excel(name = "支付类型:随行付:sxf")
@@ -64,15 +136,15 @@ public class PayOrder extends BaseEntity
     @Excel(name = "支付方式:02公众号,03小程序")
     private String payWay;
 
+    /** 加油员 */
+    @Excel(name = "加油员")
+    private String oilPersonnel;
+
     /** 支付时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date payDate;
 
-    /** 加油员 */
-    @Excel(name = "加油员")
-    private String oilPersonnel;
-
     /** 创建时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@@ -82,147 +154,295 @@ public class PayOrder extends BaseEntity
     @Excel(name = "订单类型", readConverterExp = "1=.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分")
     private String orderType;
 
-    public void setOrderId(Long orderId)
+    public void setOrderId(Long orderId) 
     {
         this.orderId = orderId;
     }
 
-    public Long getOrderId()
+    public Long getOrderId() 
     {
         return orderId;
     }
-    public void setOrderNo(String orderNo)
+    public void setOrderNo(String orderNo) 
     {
         this.orderNo = orderNo;
     }
 
-    public String getOrderNo()
+    public String getOrderNo() 
     {
         return orderNo;
     }
-    public void setOilGun(String oilGun)
+    public void setStationId(Long stationId) 
     {
-        this.oilGun = oilGun;
+        this.stationId = stationId;
     }
 
-    public String getOilGun()
+    public Long getStationId() 
     {
-        return oilGun;
+        return stationId;
     }
-    public void setOilName(String oilName)
+    public void setStationName(String stationName) 
     {
-        this.oilName = oilName;
+        this.stationName = stationName;
     }
 
-    public String getOilName()
+    public String getStationName() 
     {
-        return oilName;
+        return stationName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
     }
-    public void setConsumerId(Long consumerId)
+    public void setConsumerId(Long consumerId) 
     {
         this.consumerId = consumerId;
     }
 
-    public Long getConsumerId()
+    public Long getConsumerId() 
     {
         return consumerId;
     }
-    public void setConsumer(String consumer)
+    public void setConsumer(String consumer) 
     {
         this.consumer = consumer;
     }
 
-    public String getConsumer()
+    public String getConsumer() 
     {
         return consumer;
     }
-    public void setAmt(String amt)
+    public void setOilGun(String oilGun) 
     {
-        this.amt = amt;
+        this.oilGun = oilGun;
     }
 
-    public String getAmt()
+    public String getOilGun() 
     {
-        return amt;
+        return oilGun;
     }
-    public void setStationId(Long stationId)
+    public void setOilName(String oilName) 
     {
-        this.stationId = stationId;
+        this.oilName = oilName;
     }
 
-    public Long getStationId()
+    public String getOilName() 
     {
-        return stationId;
+        return oilName;
     }
-    public void setStatus(String status)
+    public void setOilPirce(String oilPirce) 
     {
-        this.status = status;
+        this.oilPirce = oilPirce;
     }
 
-    public String getStatus()
+    public String getOilPirce() 
     {
-        return status;
+        return oilPirce;
     }
-    public void setOrderLiters(String orderLiters)
+    public void setOilType(String oilType) 
     {
-        this.orderLiters = orderLiters;
+        this.oilType = oilType;
     }
 
-    public String getOrderLiters()
+    public String getOilType() 
     {
+        return oilType;
+    }
+
+    public Double getOrderLiters() {
         return orderLiters;
     }
-    public void setPayType(String payType)
+
+    public void setOrderLiters(Double orderLiters) {
+        this.orderLiters = orderLiters;
+    }
+
+    public Double getAmt() {
+        return amt;
+    }
+
+    public void setAmt(Double amt) {
+        this.amt = amt;
+    }
+
+    public Double getReceivableAmt() {
+        return receivableAmt;
+    }
+
+    public void setReceivableAmt(Double receivableAmt) {
+        this.receivableAmt = receivableAmt;
+    }
+
+    public Double getDiscountAmt() {
+        return discountAmt;
+    }
+
+    public void setDiscountAmt(Double discountAmt) {
+        this.discountAmt = discountAmt;
+    }
+
+    public Double getDiscountCouponAmt() {
+        return discountCouponAmt;
+    }
+
+    public void setDiscountCouponAmt(Double discountCouponAmt) {
+        this.discountCouponAmt = discountCouponAmt;
+    }
+
+    public Double getDiscountCoupon() {
+        return discountCoupon;
+    }
+
+    public void setDiscountCoupon(Double discountCoupon) {
+        this.discountCoupon = discountCoupon;
+    }
+
+    public Double getWxAmt() {
+        return wxAmt;
+    }
+
+    public void setWxAmt(Double wxAmt) {
+        this.wxAmt = wxAmt;
+    }
+
+    public Double getZfbAmt() {
+        return zfbAmt;
+    }
+
+    public void setZfbAmt(Double zfbAmt) {
+        this.zfbAmt = zfbAmt;
+    }
+
+    public Double getPosAmt() {
+        return posAmt;
+    }
+
+    public void setPosAmt(Double posAmt) {
+        this.posAmt = posAmt;
+    }
+
+    public Double getXjAmt() {
+        return xjAmt;
+    }
+
+    public void setXjAmt(Double xjAmt) {
+        this.xjAmt = xjAmt;
+    }
+
+    public Double getDidiAppAmt() {
+        return didiAppAmt;
+    }
+
+    public void setDidiAppAmt(Double didiAppAmt) {
+        this.didiAppAmt = didiAppAmt;
+    }
+
+    public Double getTyAppAmt() {
+        return tyAppAmt;
+    }
+
+    public void setTyAppAmt(Double tyAppAmt) {
+        this.tyAppAmt = tyAppAmt;
+    }
+
+    public Double getOtherAmt() {
+        return otherAmt;
+    }
+
+    public void setOtherAmt(Double otherAmt) {
+        this.otherAmt = otherAmt;
+    }
+
+    public Double getDzkAmt() {
+        return dzkAmt;
+    }
+
+    public void setDzkAmt(Double dzkAmt) {
+        this.dzkAmt = dzkAmt;
+    }
+
+    public Double getMemberAmt() {
+        return memberAmt;
+    }
+
+    public void setMemberAmt(Double memberAmt) {
+        this.memberAmt = memberAmt;
+    }
+
+    public Long getScore() {
+        return score;
+    }
+
+    public void setScore(Long score) {
+        this.score = score;
+    }
+
+
+    public void setPrintCount(Long printCount)
+    {
+        this.printCount = printCount;
+    }
+
+    public Long getPrintCount() 
+    {
+        return printCount;
+    }
+    public void setPayType(String payType) 
     {
         this.payType = payType;
     }
 
-    public String getPayType()
+    public String getPayType() 
     {
         return payType;
     }
-    public void setPayWay(String payWay)
+    public void setPayWay(String payWay) 
     {
         this.payWay = payWay;
     }
 
-    public String getPayWay()
+    public String getPayWay() 
     {
         return payWay;
     }
-    public void setPayDate(Date payDate)
+    public void setOilPersonnel(String oilPersonnel) 
     {
-        this.payDate = payDate;
+        this.oilPersonnel = oilPersonnel;
     }
 
-    public Date getPayDate()
+    public String getOilPersonnel() 
     {
-        return payDate;
+        return oilPersonnel;
     }
-    public void setOilPersonnel(String oilPersonnel)
+    public void setPayDate(Date payDate) 
     {
-        this.oilPersonnel = oilPersonnel;
+        this.payDate = payDate;
     }
 
-    public String getOilPersonnel()
+    public Date getPayDate() 
     {
-        return oilPersonnel;
+        return payDate;
     }
-    public void setCreatedDate(Date createdDate)
+    public void setCreatedDate(Date createdDate) 
     {
         this.createdDate = createdDate;
     }
 
-    public Date getCreatedDate()
+    public Date getCreatedDate() 
     {
         return createdDate;
     }
-    public void setOrderType(String orderType)
+    public void setOrderType(String orderType) 
     {
         this.orderType = orderType;
     }
 
-    public String getOrderType()
+    public String getOrderType() 
     {
         return orderType;
     }
@@ -232,18 +452,36 @@ public class PayOrder extends BaseEntity
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("orderId", getOrderId())
             .append("orderNo", getOrderNo())
-            .append("oilGun", getOilGun())
-            .append("oilName", getOilName())
-            .append("consumerId", getConsumerId())
-            .append("consumer", getConsumer())
-            .append("amt", getAmt())
             .append("stationId", getStationId())
+            .append("stationName", getStationName())
             .append("status", getStatus())
+            .append("consumerId", getConsumerId())
+            .append("consumer", getConsumer())
+            .append("oilGun", getOilGun())
+            .append("oilName", getOilName())
+            .append("oilPirce", getOilPirce())
+            .append("oilType", getOilType())
             .append("orderLiters", getOrderLiters())
+            .append("amt", getAmt())
+            .append("receivableAmt", getReceivableAmt())
+            .append("discountAmt", getDiscountAmt())
+            .append("discountCouponAmt", getDiscountCouponAmt())
+            .append("discountCoupon", getDiscountCoupon())
+            .append("wxAmt", getWxAmt())
+            .append("zfbAmt", getZfbAmt())
+            .append("posAmt", getPosAmt())
+            .append("xjAmt", getXjAmt())
+            .append("didiAppAmt", getDidiAppAmt())
+            .append("tyAppAmt", getTyAppAmt())
+            .append("otherAmt", getOtherAmt())
+            .append("dzkAmt", getDzkAmt())
+            .append("score", getScore())
+            .append("memberAmt", getMemberAmt())
+            .append("printCount", getPrintCount())
             .append("payType", getPayType())
             .append("payWay", getPayWay())
-            .append("payDate", getPayDate())
             .append("oilPersonnel", getOilPersonnel())
+            .append("payDate", getPayDate())
             .append("createdDate", getCreatedDate())
             .append("orderType", getOrderType())
             .toString();

+ 32 - 17
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-31
  */
 public class StationClassStructure extends BaseEntity
 {
@@ -46,7 +46,7 @@ public class StationClassStructure extends BaseEntity
 
     /** 金额 */
     @Excel(name = "金额")
-    private String amt;
+    private Double amt;
 
     /** 油站名称 */
     @Excel(name = "油站名称")
@@ -54,7 +54,7 @@ public class StationClassStructure extends BaseEntity
 
     /** 加油升数· */
     @Excel(name = "加油升数·")
-    private String orderLiters;
+    private Double orderLiters;
 
     /** 支付类型 sxf */
     @Excel(name = "支付类型 sxf")
@@ -89,6 +89,11 @@ public class StationClassStructure extends BaseEntity
     @Excel(name = "班次号")
     private String classStructureNo;
 
+    /** 班结开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "班结开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date classStartDate;
+
     /** 班结时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "班结时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -165,15 +170,7 @@ public class StationClassStructure extends BaseEntity
     {
         return consumer;
     }
-    public void setAmt(String amt) 
-    {
-        this.amt = amt;
-    }
 
-    public String getAmt() 
-    {
-        return amt;
-    }
     public void setStationName(String stationName) 
     {
         this.stationName = stationName;
@@ -183,16 +180,24 @@ public class StationClassStructure extends BaseEntity
     {
         return stationName;
     }
-    public void setOrderLiters(String orderLiters) 
-    {
-        this.orderLiters = orderLiters;
+
+    public Double getAmt() {
+        return amt;
     }
 
-    public String getOrderLiters() 
-    {
+    public void setAmt(Double amt) {
+        this.amt = amt;
+    }
+
+    public Double getOrderLiters() {
         return orderLiters;
     }
-    public void setPayType(String payType) 
+
+    public void setOrderLiters(Double orderLiters) {
+        this.orderLiters = orderLiters;
+    }
+
+    public void setPayType(String payType)
     {
         this.payType = payType;
     }
@@ -264,6 +269,15 @@ public class StationClassStructure extends BaseEntity
     {
         return classStructureNo;
     }
+    public void setClassStartDate(Date classStartDate) 
+    {
+        this.classStartDate = classStartDate;
+    }
+
+    public Date getClassStartDate() 
+    {
+        return classStartDate;
+    }
     public void setClassStructureDate(Date classStructureDate) 
     {
         this.classStructureDate = classStructureDate;
@@ -313,6 +327,7 @@ public class StationClassStructure extends BaseEntity
             .append("oilType", getOilType())
             .append("printNum", getPrintNum())
             .append("classStructureNo", getClassStructureNo())
+            .append("classStartDate", getClassStartDate())
             .append("classStructureDate", getClassStructureDate())
             .append("classStructureMan", getClassStructureMan())
             .append("oils", getOils())

+ 231 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationClassesSummary.java

@@ -0,0 +1,231 @@
+package com.yijia.station.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 station_classes_summary
+ * 
+ * @author yijia
+ * @date 2020-12-28
+ */
+public class StationClassesSummary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 班结主键id */
+    private Long id;
+
+    /** 班次号 */
+    @Excel(name = "班次号")
+    private String classesNo;
+    /** 班次号 */
+    @Excel(name = "模糊查询班次号")
+    private String likeClassesNo;
+
+    /** 班次开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "班次开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date startDate;
+
+    /** 班次结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "班次结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date endDate;
+
+    /** 油站id */
+    @Excel(name = "油站id")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 订单数 */
+    @Excel(name = "订单数")
+    private Long orderNum;
+
+    /** 小票数量 */
+    @Excel(name = "小票数量")
+    private Long printNum;
+
+    /** 销量L */
+    @Excel(name = "销量L")
+    private String saleLiters;
+
+    /** 销售额元 */
+    @Excel(name = "销售额元")
+    private Double saleAmt;
+
+    /** 微信销售金额 */
+    @Excel(name = "微信销售金额")
+    private Double wxAmt;
+
+    /** 支付宝销售金额 */
+    @Excel(name = "支付宝销售金额")
+    private Double zfbAmt;
+
+    /** 电子卡销售金额 */
+    @Excel(name = "电子卡销售金额")
+    private Double dzkAmt;
+
+    /** 班结人 */
+    @Excel(name = "班结人")
+    private String classesMan;
+
+    public Double getSaleAmt() {
+        return saleAmt;
+    }
+
+    public void setSaleAmt(Double saleAmt) {
+        this.saleAmt = saleAmt;
+    }
+
+    public Double getWxAmt() {
+        return wxAmt;
+    }
+
+    public void setWxAmt(Double wxAmt) {
+        this.wxAmt = wxAmt;
+    }
+
+    public Double getZfbAmt() {
+        return zfbAmt;
+    }
+
+    public void setZfbAmt(Double zfbAmt) {
+        this.zfbAmt = zfbAmt;
+    }
+
+    public Double getDzkAmt() {
+        return dzkAmt;
+    }
+
+    public void setDzkAmt(Double dzkAmt) {
+        this.dzkAmt = dzkAmt;
+    }
+
+    public String getLikeClassesNo() {
+        return likeClassesNo;
+    }
+
+    public void setLikeClassesNo(String likeClassesNo) {
+        this.likeClassesNo = likeClassesNo;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setClassesNo(String classesNo) 
+    {
+        this.classesNo = classesNo;
+    }
+
+    public String getClassesNo() 
+    {
+        return classesNo;
+    }
+    public void setStartDate(Date startDate) 
+    {
+        this.startDate = startDate;
+    }
+
+    public Date getStartDate() 
+    {
+        return startDate;
+    }
+    public void setEndDate(Date endDate) 
+    {
+        this.endDate = endDate;
+    }
+
+    public Date getEndDate() 
+    {
+        return endDate;
+    }
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setOrderNum(Long orderNum) 
+    {
+        this.orderNum = orderNum;
+    }
+
+    public Long getOrderNum() 
+    {
+        return orderNum;
+    }
+    public void setPrintNum(Long printNum) 
+    {
+        this.printNum = printNum;
+    }
+
+    public Long getPrintNum() 
+    {
+        return printNum;
+    }
+    public void setSaleLiters(String saleLiters) 
+    {
+        this.saleLiters = saleLiters;
+    }
+
+    public String getSaleLiters() 
+    {
+        return saleLiters;
+    }
+
+    public void setClassesMan(String classesMan) 
+    {
+        this.classesMan = classesMan;
+    }
+
+    public String getClassesMan() 
+    {
+        return classesMan;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("classesNo", getClassesNo())
+            .append("startDate", getStartDate())
+            .append("endDate", getEndDate())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("orderNum", getOrderNum())
+            .append("printNum", getPrintNum())
+            .append("saleLiters", getSaleLiters())
+            .append("saleAmt", getSaleAmt())
+            .append("wxAmt", getWxAmt())
+            .append("zfbAmt", getZfbAmt())
+            .append("dzkAmt", getDzkAmt())
+            .append("classesMan", getClassesMan())
+            .toString();
+    }
+}

+ 21 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/PayOrderMapper.java

@@ -58,4 +58,25 @@ public interface PayOrderMapper
      * @return 结果
      */
     public int deletePayOrderByIds(Long[] orderIds);
+
+    /**
+     * 汇总今天销售金额,销售量
+     * @param payOrder
+     * @return
+     */
+    public PayOrder selectDaySources(PayOrder payOrder);
+
+    /**
+     * 根据油品分类获取数据
+     * @param payOrder
+     * @return
+     */
+    public PayOrder selectOilTypeSources(PayOrder payOrder);
+
+    /**
+     * 收入概览
+     * @param payOrder
+     * @return
+     */
+    public PayOrder selectOverViewData(PayOrder payOrder);
 }

+ 1 - 1
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-14
+ * @date 2020-12-31
  */
 public interface StationClassStructureMapper 
 {

+ 61 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/StationClassesSummaryMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.station.mapper;
+
+import java.util.List;
+import com.yijia.station.domain.StationClassesSummary;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author yijia
+ * @date 2020-12-28
+ */
+public interface StationClassesSummaryMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 【请填写功能名称】
+     */
+    public StationClassesSummary selectStationClassesSummaryById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<StationClassesSummary> selectStationClassesSummaryList(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertStationClassesSummary(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateStationClassesSummary(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 结果
+     */
+    public int deleteStationClassesSummaryById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStationClassesSummaryByIds(Long[] ids);
+}

+ 21 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java

@@ -58,4 +58,25 @@ public interface IPayOrderService
      * @return 结果
      */
     public int deletePayOrderById(Long orderId);
+
+    /**
+     * 查询当天的油品信息
+     * @param payOrder
+     * @return
+     */
+    public PayOrder selectDaySources(PayOrder payOrder);
+
+    /**
+     * 按照油品分类获取数据
+     * @param payOrder
+     * @return
+     */
+    public PayOrder selectOilTypeSources(PayOrder payOrder);
+
+    /**
+     * 收入数据概览,获取数据
+     * @param payOrder
+     * @return
+     */
+    public  PayOrder selectOverViewData(PayOrder payOrder);
 }

+ 1 - 1
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-14
+ * @date 2020-12-31
  */
 public interface IStationClassStructureService 
 {

+ 61 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/IStationClassesSummaryService.java

@@ -0,0 +1,61 @@
+package com.yijia.station.service;
+
+import java.util.List;
+import com.yijia.station.domain.StationClassesSummary;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author yijia
+ * @date 2020-12-28
+ */
+public interface IStationClassesSummaryService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 【请填写功能名称】
+     */
+    public StationClassesSummary selectStationClassesSummaryById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<StationClassesSummary> selectStationClassesSummaryList(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertStationClassesSummary(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateStationClassesSummary(StationClassesSummary stationClassesSummary);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】ID
+     * @return 结果
+     */
+    public int deleteStationClassesSummaryByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 结果
+     */
+    public int deleteStationClassesSummaryById(Long id);
+}

+ 33 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java

@@ -90,4 +90,37 @@ public class PayOrderServiceImpl implements IPayOrderService
     {
         return payOrderMapper.deletePayOrderById(orderId);
     }
+
+    /**
+     * 汇总今天的数据
+     * @param payOrder
+     * @return
+     */
+    @Override
+    public PayOrder selectDaySources(PayOrder payOrder) {
+        return payOrderMapper.selectDaySources(payOrder);
+    }
+
+    /***
+     * 获取数据
+     * @param payOrder
+     * @return
+     */
+    @Override
+    public PayOrder selectOilTypeSources(PayOrder payOrder) {
+        return payOrderMapper.selectOilTypeSources(payOrder);
+    }
+
+    /**
+     * 数据概览,获取数据
+     * @param payOrder
+     * @return
+     */
+
+    @Override
+    public PayOrder selectOverViewData(PayOrder payOrder) {
+        return payOrderMapper.selectOverViewData(payOrder);
+    }
+
+
 }

+ 1 - 1
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-14
+ * @date 2020-12-31
  */
 @Service
 public class StationClassStructureServiceImpl implements IStationClassStructureService 

+ 93 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationClassesSummaryServiceImpl.java

@@ -0,0 +1,93 @@
+package com.yijia.station.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.station.mapper.StationClassesSummaryMapper;
+import com.yijia.station.domain.StationClassesSummary;
+import com.yijia.station.service.IStationClassesSummaryService;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author yijia
+ * @date 2020-12-28
+ */
+@Service
+public class StationClassesSummaryServiceImpl implements IStationClassesSummaryService 
+{
+    @Autowired
+    private StationClassesSummaryMapper stationClassesSummaryMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public StationClassesSummary selectStationClassesSummaryById(Long id)
+    {
+        return stationClassesSummaryMapper.selectStationClassesSummaryById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<StationClassesSummary> selectStationClassesSummaryList(StationClassesSummary stationClassesSummary)
+    {
+        return stationClassesSummaryMapper.selectStationClassesSummaryList(stationClassesSummary);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertStationClassesSummary(StationClassesSummary stationClassesSummary)
+    {
+        return stationClassesSummaryMapper.insertStationClassesSummary(stationClassesSummary);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param stationClassesSummary 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateStationClassesSummary(StationClassesSummary stationClassesSummary)
+    {
+        return stationClassesSummaryMapper.updateStationClassesSummary(stationClassesSummary);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationClassesSummaryByIds(Long[] ids)
+    {
+        return stationClassesSummaryMapper.deleteStationClassesSummaryByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationClassesSummaryById(Long id)
+    {
+        return stationClassesSummaryMapper.deleteStationClassesSummaryById(id);
+    }
+}

+ 169 - 38
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -3,42 +3,78 @@
 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"    />
-        <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="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
         <result property="status"    column="status"    />
+        <result property="consumerId"    column="consumer_id"    />
+        <result property="consumer"    column="consumer"    />
+        <result property="oilGun"    column="oil_gun"    />
+        <result property="oilName"    column="oil_name"    />
+        <result property="oilPirce"    column="oil_pirce"    />
+        <result property="oilType"    column="oil_type"    />
         <result property="orderLiters"    column="order_liters"    />
+        <result property="amt"    column="amt"    />
+        <result property="receivableAmt"    column="receivable_amt"    />
+        <result property="discountAmt"    column="discount_amt"    />
+        <result property="discountCouponAmt"    column="discount_coupon_amt"    />
+        <result property="discountCoupon"    column="discount_coupon"    />
+        <result property="wxAmt"    column="wx_amt"    />
+        <result property="zfbAmt"    column="zfb_amt"    />
+        <result property="posAmt"    column="pos_amt"    />
+        <result property="xjAmt"    column="xj_amt"    />
+        <result property="didiAppAmt"    column="didi_app_amt"    />
+        <result property="tyAppAmt"    column="ty_app_amt"    />
+        <result property="otherAmt"    column="other_amt"    />
+        <result property="dzkAmt"    column="dzk_amt"    />
+        <result property="score"    column="score"    />
+        <result property="memberAmt"    column="member_amt"    />
+        <result property="printCount"    column="print_count"    />
         <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="payDate"    column="pay_date"    />
         <result property="createdDate"    column="created_date"    />
         <result property="orderType"    column="order_type"    />
     </resultMap>
 
     <sql id="selectPayOrderVo">
-        select order_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_id, status, order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type from pay_order
+        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, 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_amt, print_count, pay_type, pay_way, oil_personnel, pay_date, created_date, order_type from pay_order
     </sql>
 
     <select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
         <include refid="selectPayOrderVo"/>
-        <where>
+        <where>  
             <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="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="orderLiters != null  and orderLiters != ''"> and order_liters = #{orderLiters}</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 oilPirce != ''"> 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="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="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="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
@@ -49,8 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
 <!--            <if test="payDate != null "> and pay_date = #{payDate}</if>-->
             <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
-<!--            <if test="createdDate != null "> and created_date = #{createdDate}</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>
+
         </where>
         ORDER BY created_date DESC
     </select>
@@ -59,40 +97,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectPayOrderVo"/>
         where order_id = #{orderId}
     </select>
-
+    <select id="selectDaySources" parameterType="Long" resultMap="PayOrderResult">
+        SELECT SUM(amt) as amt,sum(order_liters) as liters
+        from pay_order
+        <where>
+            <if test="createdDate != null "> and created_date = #{createdDate}</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>
+    </select>
+    <select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
+        SELECT SUM(amt) as amt,sum(order_liters) as liters, oil_type
+        from pay_order
+        <where>
+            <if test="createdDate != null "> and created_date = #{createdDate}</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>
+        GROUP BY oil_type
+    </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
+        <where>
+            <if test="createdDate != null "> and created_date = #{createdDate}</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>
+    </select>
     <insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
         insert into pay_order
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <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="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>
+            <if test="oilGun != null">oil_gun,</if>
+            <if test="oilName != null">oil_name,</if>
+            <if test="oilPirce != null">oil_pirce,</if>
+            <if test="oilType != null">oil_type,</if>
             <if test="orderLiters != null">order_liters,</if>
+            <if test="amt != null">amt,</if>
+            <if test="receivableAmt != null">receivable_amt,</if>
+            <if test="discountAmt != null">discount_amt,</if>
+            <if test="discountCouponAmt != null">discount_coupon_amt,</if>
+            <if test="discountCoupon != null">discount_coupon,</if>
+            <if test="wxAmt != null">wx_amt,</if>
+            <if test="zfbAmt != null">zfb_amt,</if>
+            <if test="posAmt != null">pos_amt,</if>
+            <if test="xjAmt != null">xj_amt,</if>
+            <if test="didiAppAmt != null">didi_app_amt,</if>
+            <if test="tyAppAmt != null">ty_app_amt,</if>
+            <if test="otherAmt != null">other_amt,</if>
+            <if test="dzkAmt != null">dzk_amt,</if>
+            <if test="score != null">score,</if>
+            <if test="memberAmt != null">member_amt,</if>
+            <if test="printCount != null">print_count,</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="payDate != null">pay_date,</if>
             <if test="createdDate != null">created_date,</if>
             <if test="orderType != null">order_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <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="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>
+            <if test="oilGun != null">#{oilGun},</if>
+            <if test="oilName != null">#{oilName},</if>
+            <if test="oilPirce != null">#{oilPirce},</if>
+            <if test="oilType != null">#{oilType},</if>
             <if test="orderLiters != null">#{orderLiters},</if>
+            <if test="amt != null">#{amt},</if>
+            <if test="receivableAmt != null">#{receivableAmt},</if>
+            <if test="discountAmt != null">#{discountAmt},</if>
+            <if test="discountCouponAmt != null">#{discountCouponAmt},</if>
+            <if test="discountCoupon != null">#{discountCoupon},</if>
+            <if test="wxAmt != null">#{wxAmt},</if>
+            <if test="zfbAmt != null">#{zfbAmt},</if>
+            <if test="posAmt != null">#{posAmt},</if>
+            <if test="xjAmt != null">#{xjAmt},</if>
+            <if test="didiAppAmt != null">#{didiAppAmt},</if>
+            <if test="tyAppAmt != null">#{tyAppAmt},</if>
+            <if test="otherAmt != null">#{otherAmt},</if>
+            <if test="dzkAmt != null">#{dzkAmt},</if>
+            <if test="score != null">#{score},</if>
+            <if test="memberAmt != null">#{memberAmt},</if>
+            <if test="printCount != null">#{printCount},</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="payDate != null">#{payDate},</if>
             <if test="createdDate != null">#{createdDate},</if>
             <if test="orderType != null">#{orderType},</if>
          </trim>
@@ -102,18 +215,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update pay_order
         <trim prefix="SET" suffixOverrides=",">
             <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="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>
+            <if test="oilGun != null">oil_gun = #{oilGun},</if>
+            <if test="oilName != null">oil_name = #{oilName},</if>
+            <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>
+            <if test="oilType != null">oil_type = #{oilType},</if>
             <if test="orderLiters != null">order_liters = #{orderLiters},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="receivableAmt != null">receivable_amt = #{receivableAmt},</if>
+            <if test="discountAmt != null">discount_amt = #{discountAmt},</if>
+            <if test="discountCouponAmt != null">discount_coupon_amt = #{discountCouponAmt},</if>
+            <if test="discountCoupon != null">discount_coupon = #{discountCoupon},</if>
+            <if test="wxAmt != null">wx_amt = #{wxAmt},</if>
+            <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
+            <if test="posAmt != null">pos_amt = #{posAmt},</if>
+            <if test="xjAmt != null">xj_amt = #{xjAmt},</if>
+            <if test="didiAppAmt != null">didi_app_amt = #{didiAppAmt},</if>
+            <if test="tyAppAmt != null">ty_app_amt = #{tyAppAmt},</if>
+            <if test="otherAmt != null">other_amt = #{otherAmt},</if>
+            <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
+            <if test="score != null">score = #{score},</if>
+            <if test="memberAmt != null">member_amt = #{memberAmt},</if>
+            <if test="printCount != null">print_count = #{printCount},</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="payDate != null">pay_date = #{payDate},</if>
             <if test="createdDate != null">created_date = #{createdDate},</if>
             <if test="orderType != null">order_type = #{orderType},</if>
         </trim>
@@ -125,10 +256,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>

+ 6 - 1
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -23,13 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="oilType"    column="oil_type"    />
         <result property="printNum"    column="print_num"    />
         <result property="classStructureNo"    column="class_structure_no"    />
+        <result property="classStartDate"    column="class_start_date"    />
         <result property="classStructureDate"    column="class_structure_date"    />
         <result property="classStructureMan"    column="class_structure_man"    />
         <result property="oils"    column="oils"    />
     </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, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils from station_class_structure
     </sql>
 
     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilType != null  and oilType != ''"> and oil_type = #{oilType}</if>
             <if test="printNum != null "> and print_num = #{printNum}</if>
             <if test="classStructureNo != null  and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="classStartDate != null "> and class_start_date = #{classStartDate}</if>
             <if test="classStructureDate != null "> and class_structure_date = #{classStructureDate}</if>
             <if test="classStructureMan != null  and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
             <if test="oils != null  and oils != ''"> and oils = #{oils}</if>
@@ -103,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilType != null">oil_type,</if>
             <if test="printNum != null">print_num,</if>
             <if test="classStructureNo != null">class_structure_no,</if>
+            <if test="classStartDate != null">class_start_date,</if>
             <if test="classStructureDate != null">class_structure_date,</if>
             <if test="classStructureMan != null">class_structure_man,</if>
             <if test="oils != null">oils,</if>
@@ -125,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilType != null">#{oilType},</if>
             <if test="printNum != null">#{printNum},</if>
             <if test="classStructureNo != null">#{classStructureNo},</if>
+            <if test="classStartDate != null">#{classStartDate},</if>
             <if test="classStructureDate != null">#{classStructureDate},</if>
             <if test="classStructureMan != null">#{classStructureMan},</if>
             <if test="oils != null">#{oils},</if>
@@ -151,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilType != null">oil_type = #{oilType},</if>
             <if test="printNum != null">print_num = #{printNum},</if>
             <if test="classStructureNo != null">class_structure_no = #{classStructureNo},</if>
+            <if test="classStartDate != null">class_start_date = #{classStartDate},</if>
             <if test="classStructureDate != null">class_structure_date = #{classStructureDate},</if>
             <if test="classStructureMan != null">class_structure_man = #{classStructureMan},</if>
             <if test="oils != null">oils = #{oils},</if>

+ 117 - 0
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassesSummaryMapper.xml

@@ -0,0 +1,117 @@
+<?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.StationClassesSummaryMapper">
+    
+    <resultMap type="StationClassesSummary" id="StationClassesSummaryResult">
+        <result property="id"    column="id"    />
+        <result property="classesNo"    column="classes_no"    />
+        <result property="startDate"    column="start_date"    />
+        <result property="endDate"    column="end_date"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="orderNum"    column="order_num"    />
+        <result property="printNum"    column="print_num"    />
+        <result property="saleLiters"    column="sale_liters"    />
+        <result property="saleAmt"    column="sale_amt"    />
+        <result property="wxAmt"    column="wx_amt"    />
+        <result property="zfbAmt"    column="zfb_amt"    />
+        <result property="dzkAmt"    column="dzk_amt"    />
+        <result property="classesMan"    column="classes_man"    />
+    </resultMap>
+
+    <sql id="selectStationClassesSummaryVo">
+        select id, classes_no, start_date, end_date, station_id, station_name, order_num, print_num, sale_liters, sale_amt, wx_amt, zfb_amt, dzk_amt, classes_man from station_classes_summary
+    </sql>
+
+    <select id="selectStationClassesSummaryList" parameterType="StationClassesSummary" resultMap="StationClassesSummaryResult">
+        <include refid="selectStationClassesSummaryVo"/>
+        <where>  
+            <if test="classesNo != null  and classesNo != ''"> and classes_no = #{classesNo}</if>
+            <if test="startDate != null "> and start_date = #{startDate}</if>
+            <if test="endDate != null "> and end_date = #{endDate}</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="orderNum != null "> and order_num = #{orderNum}</if>
+            <if test="printNum != null "> and print_num = #{printNum}</if>
+            <if test="saleLiters != null  and saleLiters != ''"> and sale_liters = #{saleLiters}</if>
+            <if test="saleAmt != null "> and sale_amt = #{saleAmt}</if>
+            <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
+            <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
+            <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
+            <if test="classesMan != null  and classesMan != ''"> and classes_man = #{classesMan}</if>
+        </where>
+    </select>
+    
+    <select id="selectStationClassesSummaryById" parameterType="Long" resultMap="StationClassesSummaryResult">
+        <include refid="selectStationClassesSummaryVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertStationClassesSummary" parameterType="StationClassesSummary" useGeneratedKeys="true" keyProperty="id">
+        insert into station_classes_summary
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="classesNo != null">classes_no,</if>
+            <if test="startDate != null">start_date,</if>
+            <if test="endDate != null">end_date,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
+            <if test="orderNum != null">order_num,</if>
+            <if test="printNum != null">print_num,</if>
+            <if test="saleLiters != null">sale_liters,</if>
+            <if test="saleAmt != null">sale_amt,</if>
+            <if test="wxAmt != null">wx_amt,</if>
+            <if test="zfbAmt != null">zfb_amt,</if>
+            <if test="dzkAmt != null">dzk_amt,</if>
+            <if test="classesMan != null">classes_man,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="classesNo != null">#{classesNo},</if>
+            <if test="startDate != null">#{startDate},</if>
+            <if test="endDate != null">#{endDate},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
+            <if test="orderNum != null">#{orderNum},</if>
+            <if test="printNum != null">#{printNum},</if>
+            <if test="saleLiters != null">#{saleLiters},</if>
+            <if test="saleAmt != null">#{saleAmt},</if>
+            <if test="wxAmt != null">#{wxAmt},</if>
+            <if test="zfbAmt != null">#{zfbAmt},</if>
+            <if test="dzkAmt != null">#{dzkAmt},</if>
+            <if test="classesMan != null">#{classesMan},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStationClassesSummary" parameterType="StationClassesSummary">
+        update station_classes_summary
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="classesNo != null">classes_no = #{classesNo},</if>
+            <if test="startDate != null">start_date = #{startDate},</if>
+            <if test="endDate != null">end_date = #{endDate},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
+            <if test="orderNum != null">order_num = #{orderNum},</if>
+            <if test="printNum != null">print_num = #{printNum},</if>
+            <if test="saleLiters != null">sale_liters = #{saleLiters},</if>
+            <if test="saleAmt != null">sale_amt = #{saleAmt},</if>
+            <if test="wxAmt != null">wx_amt = #{wxAmt},</if>
+            <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
+            <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
+            <if test="classesMan != null">classes_man = #{classesMan},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteStationClassesSummaryById" parameterType="Long">
+        delete from station_classes_summary where id = #{id}
+    </delete>
+
+    <delete id="deleteStationClassesSummaryByIds" parameterType="String">
+        delete from station_classes_summary where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>