Bläddra i källkod

分级权限查询,lnG功能开发

zangguocen 3 år sedan
förälder
incheckning
3cedbba4f9
33 ändrade filer med 2455 tillägg och 124 borttagningar
  1. 9 0
      yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java
  2. 20 0
      yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java
  3. 5 3
      yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml
  4. 2 7
      yijia-integral/src/main/java/com/yijia/integral/controller/CustomerPointsController.java
  5. 2 8
      yijia-integral/src/main/java/com/yijia/integral/controller/IntegralOrderController.java
  6. 386 0
      yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java
  7. 140 0
      yijia-station/src/main/java/com/yijia/station/controller/StationBalanceChangeController.java
  8. 97 0
      yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceAdjustController.java
  9. 155 0
      yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceController.java
  10. 142 75
      yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java
  11. 96 0
      yijia-station/src/main/java/com/yijia/station/domain/StationBalanceChange.java
  12. 124 0
      yijia-station/src/main/java/com/yijia/station/domain/StationSettlementPrice.java
  13. 103 0
      yijia-station/src/main/java/com/yijia/station/domain/StationSettlementPriceAdjust.java
  14. 17 8
      yijia-station/src/main/java/com/yijia/station/mapper/PayOrderMapper.java
  15. 61 0
      yijia-station/src/main/java/com/yijia/station/mapper/StationBalanceChangeMapper.java
  16. 61 0
      yijia-station/src/main/java/com/yijia/station/mapper/StationSettlementPriceAdjustMapper.java
  17. 61 0
      yijia-station/src/main/java/com/yijia/station/mapper/StationSettlementPriceMapper.java
  18. 21 8
      yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java
  19. 61 0
      yijia-station/src/main/java/com/yijia/station/service/IStationBalanceChangeService.java
  20. 61 0
      yijia-station/src/main/java/com/yijia/station/service/IStationSettlementPriceAdjustService.java
  21. 61 0
      yijia-station/src/main/java/com/yijia/station/service/IStationSettlementPriceService.java
  22. 18 8
      yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java
  23. 95 0
      yijia-station/src/main/java/com/yijia/station/service/impl/StationBalanceChangeServiceImpl.java
  24. 95 0
      yijia-station/src/main/java/com/yijia/station/service/impl/StationSettlementPriceAdjustServiceImpl.java
  25. 96 0
      yijia-station/src/main/java/com/yijia/station/service/impl/StationSettlementPriceServiceImpl.java
  26. 132 5
      yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml
  27. 82 0
      yijia-station/src/main/resources/mapper/station/StationBalanceChangeMapper.xml
  28. 89 0
      yijia-station/src/main/resources/mapper/station/StationSettlementPriceAdjustMapper.xml
  29. 102 0
      yijia-station/src/main/resources/mapper/station/StationSettlementPriceMapper.xml
  30. 9 0
      yijia-system/src/main/java/com/yijia/system/service/ISysDeptService.java
  31. 45 0
      yijia-system/src/main/java/com/yijia/system/service/impl/SysDeptServiceImpl.java
  32. 5 1
      yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml
  33. 2 1
      yijia-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 9 - 0
yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java

@@ -168,6 +168,15 @@ public class SysDeptController extends BaseController
         return AjaxResult.success(depts);
     }
     /**
+     * 查询当前登陆是是否是lng集团下的
+     *
+     */
+    @GetMapping("/isLngInfoList")
+    public AjaxResult isLngInfoList(){
+         boolean  flag = deptService.isLngInfoList();
+        return AjaxResult.success(flag);
+    }
+    /**
      * 根据集团查询油站信息
      *
      */

+ 20 - 0
yijia-common/src/main/java/com/yijia/common/core/domain/entity/SysDept.java

@@ -1,5 +1,6 @@
 package com.yijia.common.core.domain.entity;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import javax.validation.constraints.Email;
@@ -87,6 +88,15 @@ public class SysDept extends BaseEntity
      * 打印机类型 1小票机 2是pos机
      */
     private String printDeviceType;
+    private String isLngFlag;
+
+    public String getIsLngFlag() {
+        return isLngFlag;
+    }
+
+    public void setIsLngFlag(String isLngFlag) {
+        this.isLngFlag = isLngFlag;
+    }
 
     public String getPrintDeviceType() {
         return printDeviceType;
@@ -155,6 +165,16 @@ public class SysDept extends BaseEntity
 
     private Long userId;
 
+    private BigDecimal balance;
+
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
     public Long getUserId() {
         return userId;
     }

+ 5 - 3
yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -155,7 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT b.union_id,b.station_id,a.qy_amt,a.cy_amt,a.fy_amt,a.lng_amt, a.cng_amt,b.member_id, b.customer_name,
         b.phone_number,  b.car_number,b.mina_user_id,b.oil_name,b.grade,c.points AS integral,d.dept_name as station_name
         from (SELECT member_id,customer_name,phone_number,car_number, mina_user_id,station_id,
-        union_id,GROUP_CONCAT(DISTINCT ( oil_name )) oil_name,GROUP_CONCAT(DISTINCT ( grade )) AS grade
+        union_id,GROUP_CONCAT(DISTINCT ( oil_name )) oil_name,GROUP_CONCAT(DISTINCT ( grade )) AS grade,created_date
         FROM (
         SELECT max( created_date ) created_date, po.consumer_id FROM pay_order po
         <where>
@@ -185,8 +185,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and m.station_id  = #{stationId}
             </if>
         </where>
-        GROUP BY member_id,customer_name, phone_number,car_number,  mina_user_id, station_id, union_id
-         limit #{pageNumLimit},#{pageSizeLimit}
+        GROUP BY member_id,customer_name, phone_number,car_number,  mina_user_id, station_id, union_id,created_date
+        order by max( created_date )  desc
+        limit #{pageNumLimit},#{pageSizeLimit}
          )  b
 		LEFT JOIN
         (SELECT   union_id, customer_name, station_id,
@@ -222,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and c.station_id  = #{stationId}
         </if>
 		LEFT JOIN sys_dept d ON b.station_id = d.dept_id
+        ORDER BY created_date desc
     </select>
     <select id="selectCustomerManagePage" parameterType="CustomerManage" resultMap="CustomerManageResult">
         SELECT customer_name,mina_user_id

+ 2 - 7
yijia-integral/src/main/java/com/yijia/integral/controller/CustomerPointsController.java

@@ -45,9 +45,7 @@ public class CustomerPointsController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CustomerPoints customerPoints)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        SysDept sysDept = deptService.selectDeptById(currentUser.getUser().getDeptId());
-        List<String> list = deptService.deptCardInfoList(sysDept);
+        List<String> list = deptService.levelDeptList(customerPoints.getLevelId());
         if(list!=null && list.size()>0){
             customerPoints.setStationIdList(list);
             customerPoints.setStationId(null);
@@ -64,10 +62,7 @@ public class CustomerPointsController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(CustomerPoints customerPoints)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        SysDept dept =new SysDept();
-        dept.setDeptId(currentUser.getUser().getDeptId());
-        List<String> list = deptService.selectDeptId(dept);
+        List<String> list = deptService.levelDeptList(customerPoints.getLevelId());
         if(list!=null && list.size()>0){
             customerPoints.setStationIdList(list);
             customerPoints.setStationId(null);

+ 2 - 8
yijia-integral/src/main/java/com/yijia/integral/controller/IntegralOrderController.java

@@ -45,10 +45,7 @@ public class IntegralOrderController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(IntegralOrder integralOrder)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        SysDept dept =new SysDept();
-        dept.setDeptId(currentUser.getUser().getDeptId());
-        List<String> list = sysDeptService.selectDeptId(dept);
+        List<String> list = sysDeptService.levelDeptList(integralOrder.getLevelId());
         if(list!=null && list.size()>0){
             integralOrder.setStationIdList(list);
             integralOrder.setStationId(null);
@@ -65,10 +62,7 @@ public class IntegralOrderController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(IntegralOrder integralOrder)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        SysDept dept =new SysDept();
-        dept.setDeptId(currentUser.getUser().getDeptId());
-        List<String> list = sysDeptService.selectDeptId(dept);
+        List<String> list = sysDeptService.levelDeptList(integralOrder.getLevelId());
         if(list!=null && list.size()>0){
             integralOrder.setStationIdList(list);
             integralOrder.setStationId(null);

+ 386 - 0
yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java

@@ -1,14 +1,28 @@
 package com.yijia.station.controller;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.UUID;
 
+import com.yijia.common.config.YiJiaConfig;
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.exception.CustomException;
 import com.yijia.common.utils.SecurityUtils;
+import com.yijia.station.domain.StationClassStructure;
+import com.yijia.station.domain.StationClassesSummary;
 import com.yijia.system.service.ISysDeptService;
 import com.yijia.system.service.ISysUserService;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.streaming.SXSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -38,6 +52,7 @@ import com.yijia.common.core.page.TableDataInfo;
 @RequestMapping("/station/order")
 public class PayOrderController extends BaseController
 {
+    private static final Logger log = LoggerFactory.getLogger(PayOrderController.class);
     @Autowired
     private IPayOrderService payOrderService;
     @Autowired
@@ -410,4 +425,375 @@ public class PayOrderController extends BaseController
     {
         return toAjax(payOrderService.deletePayOrderByIds(orderIds));
     }
+
+    /**
+     * 查询订单支付列表
+     */
+    @GetMapping("/LNGDeptList")
+    public TableDataInfo LNGDeptList(PayOrder payOrder)
+    {
+        List<String> list = deptService.levelDeptList(payOrder.getLevelId());
+        if(list!=null && list.size()>0){
+            payOrder.setStationIdList(list);
+            payOrder.setStationId(null);
+        }
+        startPage();
+        payOrder.setStatus("1");
+        List<PayOrder> payOrderList = payOrderService.LNGDeptList(payOrder);
+        return getDataTable(payOrderList);
+    }
+    /**
+     * 查询订单支付列表
+     */
+    @GetMapping("/LNGlist")
+    public TableDataInfo LNGlist(PayOrder payOrder)
+    {
+        List<String> list = deptService.levelDeptList(payOrder.getLevelId());
+        if(list!=null && list.size()>0){
+            payOrder.setStationIdList(list);
+            payOrder.setStationId(null);
+        }
+        startPage();
+        payOrder.setStatus("1");
+        List<PayOrder> payOrderList = payOrderService.selectLNGPayOrderExport(payOrder);
+        return getDataTable(payOrderList);
+    }
+
+    @Log(title = "导出LNG", businessType = BusinessType.EXPORT)
+    @GetMapping("/LNGExport")
+    public AjaxResult LNGExport(PayOrder payOrder)
+    {
+        List<String> list = deptService.levelDeptList(payOrder.getLevelId());
+        if(list!=null && list.size()>0){
+            payOrder.setStationIdList(list);
+            payOrder.setStationId(null);
+        }
+        payOrder.setStatus("1");
+        List<PayOrder> payOrderList = payOrderService.selectLNGPayOrderExport(payOrder);
+        AjaxResult ss = exportExcel(payOrderList, "导出订单信息");
+        return ss;
+    }
+
+    private AjaxResult exportExcel(List<PayOrder> payOrderList, String sheetName) {
+        OutputStream out = null;
+        Workbook wb= new SXSSFWorkbook(500);
+        try
+        {
+            Sheet sheet = wb.createSheet(sheetName);
+            sheet.setDefaultColumnWidth(20);//默认列宽20
+            CellStyle style = wb.createCellStyle();
+            CreationHelper createHelper = wb.getCreationHelper();
+            style.setDataFormat(createHelper.createDataFormat().getFormat("yyyy-mm-dd hh:mm:ss"));
+            int rows =payOrderList.size()+1;
+            Cell cell =null;
+            Row row =null;
+            for (int i = 0; i < rows; i++) {
+                if(i == 0) {
+                    row = sheet.createRow(i);
+                    cell = row.createCell(0);
+                    cell.setCellValue("油站名称");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(1);
+                    cell.setCellValue("油品");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(2);
+                    cell.setCellValue("订单号");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(3);
+                    cell.setCellValue("枪标价");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(4);
+                    cell.setCellValue("结算价");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(5);
+                    cell.setCellValue("司机价");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(6);
+                    cell.setCellValue("升数");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(7);
+                    cell.setCellValue("应付金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(8);
+                    cell.setCellValue("结算金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(9);
+                    cell.setCellValue("司机金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(10);
+                    cell.setCellValue("支付时间");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(11);
+                    cell.setCellValue("手机号");
+                    cell.setCellStyle(style);
+                }else {
+                    row = sheet.createRow(i);
+                    int j =i-1;
+                    cell = row.createCell(0);
+                    cell.setCellValue(payOrderList.get(j).getStationName());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(1);
+                    cell.setCellValue(payOrderList.get(j).getOilName());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(2);
+                    cell.setCellValue(payOrderList.get(j).getOrderNo());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(3);
+                    cell.setCellValue(payOrderList.get(j).getOilPirce()+"");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(4);
+                    if(payOrderList.get(j).getSellOilPrice()!=null){
+                        cell.setCellValue(payOrderList.get(j).getSellOilPrice()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(5);
+                    if(payOrderList.get(j).getDriverOilPrice()!=null){
+                        cell.setCellValue(payOrderList.get(j).getDriverOilPrice()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(6);
+                    if(payOrderList.get(j).getOrderLiters()!=null){
+                        cell.setCellValue(payOrderList.get(j).getOrderLiters()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(7);
+                    if(payOrderList.get(j).getReceivableAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getReceivableAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(8);
+                    if(payOrderList.get(j).getSellAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getSellAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(9);
+                    if(payOrderList.get(j).getAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(10);
+                    cell.setCellValue(payOrderList.get(j).getPayDate());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(11);
+                    cell.setCellValue(payOrderList.get(j).getMobilePhone());
+                    cell.setCellStyle(style);
+                }
+            }
+            String filename = encodingFilename(sheetName);
+            out = new FileOutputStream(getAbsoluteFile(filename));
+            wb.write(out);
+            return AjaxResult.success(filename);
+        }
+        catch (Exception e)
+        {
+            log.error("导出Excel异常{}", e.getMessage());
+            throw new CustomException("导出Excel失败,请联系网站管理员!");
+        }
+        finally
+        {
+            if (wb != null)
+            {
+                try
+                {
+                    wb.close();
+                }
+                catch (IOException e1)
+                {
+                    e1.printStackTrace();
+                }
+            }
+            if (out != null)
+            {
+                try
+                {
+                    out.close();
+                }
+                catch (IOException e1)
+                {
+                    e1.printStackTrace();
+                }
+            }
+        }
+    }
+    private String encodingFilename(String filename) {
+        filename = UUID.randomUUID().toString() + "_" + filename + ".xlsx";
+        return filename;
+    }
+    public String getAbsoluteFile(String filename)
+    {
+        String downloadPath = YiJiaConfig.getDownloadPath() + filename;
+        File desc = new File(downloadPath);
+        if (!desc.getParentFile().exists())
+        {
+            desc.getParentFile().mkdirs();
+        }
+        return downloadPath;
+    }
+
+    @Log(title = "导出LNG站点", businessType = BusinessType.EXPORT)
+    @GetMapping("/LNGDeptExport")
+    public AjaxResult LNGDeptExport(PayOrder payOrder)
+    {
+        List<String> list = deptService.levelDeptList(payOrder.getLevelId());
+        if(list!=null && list.size()>0){
+            payOrder.setStationIdList(list);
+            payOrder.setStationId(null);
+        }
+        payOrder.setStatus("1");
+        List<PayOrder> payOrderList = payOrderService.LNGDeptList(payOrder);
+        AjaxResult ss = exportDeptExcel(payOrderList, "导出订单信息");
+        return ss;
+    }
+
+    private AjaxResult exportDeptExcel(List<PayOrder> payOrderList, String sheetName) {
+        OutputStream out = null;
+        Workbook wb= new SXSSFWorkbook(500);
+        try
+        {
+            Sheet sheet = wb.createSheet(sheetName);
+            sheet.setDefaultColumnWidth(20);//默认列宽20
+            CellStyle style = wb.createCellStyle();
+            CreationHelper createHelper = wb.getCreationHelper();
+            style.setDataFormat(createHelper.createDataFormat().getFormat("yyyy-mm-dd hh:mm:ss"));
+            int rows =payOrderList.size()+1;
+            Cell cell =null;
+            Row row =null;
+            for (int i = 0; i < rows; i++) {
+                if(i == 0) {
+                    row = sheet.createRow(i);
+                    cell = row.createCell(0);
+                    cell.setCellValue("油站名称");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(1);
+                    cell.setCellValue("订单号");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(2);
+                    cell.setCellValue("油品");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(3);
+                    cell.setCellValue("枪标价");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(4);
+                    cell.setCellValue("结算价");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(5);
+                    cell.setCellValue("升数");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(6);
+                    cell.setCellValue("应付金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(7);
+                    cell.setCellValue("结算金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(8);
+                    cell.setCellValue("结算优惠金额");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(9);
+                    cell.setCellValue("支付时间");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(10);
+                    cell.setCellValue("手机号");
+                    cell.setCellStyle(style);
+                }else {
+                    row = sheet.createRow(i);
+                    int j =i-1;
+                    cell = row.createCell(0);
+                    cell.setCellValue(payOrderList.get(j).getStationName());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(1);
+                    cell.setCellValue(payOrderList.get(j).getOrderNo());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(2);
+                    cell.setCellValue(payOrderList.get(j).getOilName());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(3);
+                    cell.setCellValue(payOrderList.get(j).getOilPirce()+"");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(4);
+                    if(payOrderList.get(j).getSellOilPrice()!=null){
+                        cell.setCellValue(payOrderList.get(j).getSellOilPrice()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(5);
+                    cell.setCellValue(payOrderList.get(j).getOrderLiters() + "");
+                    cell.setCellStyle(style);
+                    cell = row.createCell(6);
+                    if(payOrderList.get(j).getReceivableAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getReceivableAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(7);
+                    if(payOrderList.get(j).getSellAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getSellAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(8);
+                    if(payOrderList.get(j).getSellDiscountAmt()!=null){
+                        cell.setCellValue(payOrderList.get(j).getSellDiscountAmt()+"");
+                    }else{
+                        cell.setCellValue("0");
+                    }
+                    cell.setCellStyle(style);
+                    cell = row.createCell(9);
+                    cell.setCellValue(payOrderList.get(j).getPayDate());
+                    cell.setCellStyle(style);
+                    cell = row.createCell(10);
+                    cell.setCellValue(payOrderList.get(j).getMobilePhone());
+                    cell.setCellStyle(style);
+                }
+            }
+            String filename = encodingFilename(sheetName);
+            out = new FileOutputStream(getAbsoluteFile(filename));
+            wb.write(out);
+            return AjaxResult.success(filename);
+        }
+        catch (Exception e)
+        {
+            log.error("导出Excel异常{}", e.getMessage());
+            throw new CustomException("导出Excel失败,请联系网站管理员!");
+        }
+        finally
+        {
+            if (wb != null)
+            {
+                try
+                {
+                    wb.close();
+                }
+                catch (IOException e1)
+                {
+                    e1.printStackTrace();
+                }
+            }
+            if (out != null)
+            {
+                try
+                {
+                    out.close();
+                }
+                catch (IOException e1)
+                {
+                    e1.printStackTrace();
+                }
+            }
+        }
+    }
 }

+ 140 - 0
yijia-station/src/main/java/com/yijia/station/controller/StationBalanceChangeController.java

@@ -0,0 +1,140 @@
+package com.yijia.station.controller;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.exception.CustomException;
+import com.yijia.common.utils.DateUtils;
+import com.yijia.common.utils.SecurityUtils;
+import com.yijia.system.service.ISysDeptService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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.StationBalanceChange;
+import com.yijia.station.service.IStationBalanceChangeService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * LNG油站余额变化记录Controller
+ *
+ * @author yijia
+ * @date 2021-07-13
+ */
+@RestController
+@RequestMapping("/station/stationBalanceChange")
+public class StationBalanceChangeController extends BaseController
+{
+    @Autowired
+    private IStationBalanceChangeService stationBalanceChangeService;
+    @Autowired
+    private ISysDeptService deptService;
+    /**
+     * 查询LNG油站余额变化记录列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(StationBalanceChange stationBalanceChange)
+    {
+        List<String> list = deptService.levelDeptList(stationBalanceChange.getLevelId());
+        if(list!=null && list.size()>0){
+            stationBalanceChange.setStationIdList(list);
+            stationBalanceChange.setStationId(null);
+        }
+        startPage();
+        List<StationBalanceChange> changeList = stationBalanceChangeService.selectStationBalanceChangeList(stationBalanceChange);
+        return getDataTable(changeList);
+    }
+
+    /**
+     * 导出LNG油站余额变化记录列表
+     */
+    @Log(title = "LNG油站余额变化记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StationBalanceChange stationBalanceChange)
+    {
+        List<StationBalanceChange> list = stationBalanceChangeService.selectStationBalanceChangeList(stationBalanceChange);
+        ExcelUtil<StationBalanceChange> util = new ExcelUtil<StationBalanceChange>(StationBalanceChange.class);
+        return util.exportExcel(list, "change");
+    }
+
+    /**
+     * 获取LNG油站余额变化记录详细信息
+     */
+     @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(stationBalanceChangeService.selectStationBalanceChangeById(id));
+    }
+
+    /**
+     * 新增LNG油站余额变化记录
+     */
+    @Log(title = "LNG油站余额变化记录", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @Transactional
+    public AjaxResult add(@RequestBody StationBalanceChange stationBalanceChange)
+    {
+        int i=0;
+        //获取当前站上余额是多少
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        if(stationBalanceChange.getStationId()!=null && stationBalanceChange.getAmt()!=null && stationBalanceChange.getType()!=null){
+            SysDept dept =deptService.selectDeptById(stationBalanceChange.getStationId());
+            if(dept!=null){
+                if( dept.getBalance()!=null){
+                    if(stationBalanceChange.getType().equals("+")){
+                        dept.setBalance(dept.getBalance().add(stationBalanceChange.getAmt()));
+                    }else if(stationBalanceChange.getType().equals("-")){
+                        dept.setBalance(dept.getBalance().subtract(stationBalanceChange.getAmt()));
+                    }
+                }else  {
+                    if(stationBalanceChange.getType().equals("+")){
+                        dept.setBalance(stationBalanceChange.getAmt());
+                    }else if(stationBalanceChange.getType().equals("-")){
+                        dept.setBalance(new BigDecimal("0").subtract(stationBalanceChange.getAmt()));
+                    }
+                }
+                i = deptService.updateDeptInfo(dept);
+                stationBalanceChange.setCreateBy(currentUser.getUser().getUserId()+"");
+                stationBalanceChange.setCreateTime(DateUtils.getNowDate());
+                i = stationBalanceChangeService.insertStationBalanceChange(stationBalanceChange);
+            }else{
+                logger.debug("没有查询到站点信息");
+            }
+        }
+        return toAjax(i);
+    }
+
+    /**
+     * 修改LNG油站余额变化记录
+     */
+    @Log(title = "LNG油站余额变化记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StationBalanceChange stationBalanceChange)
+    {
+        return toAjax(stationBalanceChangeService.updateStationBalanceChange(stationBalanceChange));
+    }
+
+    /**
+     * 删除LNG油站余额变化记录
+     */
+    @Log(title = "LNG油站余额变化记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(stationBalanceChangeService.deleteStationBalanceChangeByIds(ids));
+    }
+}

+ 97 - 0
yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceAdjustController.java

@@ -0,0 +1,97 @@
+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.StationSettlementPriceAdjust;
+import com.yijia.station.service.IStationSettlementPriceAdjustService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 结算价格,司机价格优惠调整Controller
+ *
+ * @author yijia
+ * @date 2021-07-14
+ */
+@RestController
+@RequestMapping("/station/settlementPriceAdjust")
+public class StationSettlementPriceAdjustController extends BaseController
+{
+    @Autowired
+    private IStationSettlementPriceAdjustService stationSettlementPriceAdjustService;
+
+    /**
+     * 查询结算价格,司机价格优惠调整列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        startPage();
+        List<StationSettlementPriceAdjust> list = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出结算价格,司机价格优惠调整列表
+     */
+    @Log(title = "结算价格,司机价格优惠调整", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        List<StationSettlementPriceAdjust> list = stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
+        ExcelUtil<StationSettlementPriceAdjust> util = new ExcelUtil<StationSettlementPriceAdjust>(StationSettlementPriceAdjust.class);
+        return util.exportExcel(list, "adjust");
+    }
+
+    /**
+     * 获取结算价格,司机价格优惠调整详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
+    {
+        return AjaxResult.success(stationSettlementPriceAdjustService.selectStationSettlementPriceAdjustById(id));
+    }
+
+    /**
+     * 新增结算价格,司机价格优惠调整
+     */
+    @Log(title = "结算价格,司机价格优惠调整", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        return toAjax(stationSettlementPriceAdjustService.insertStationSettlementPriceAdjust(stationSettlementPriceAdjust));
+    }
+
+    /**
+     * 修改结算价格,司机价格优惠调整
+     */
+    @Log(title = "结算价格,司机价格优惠调整", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        return toAjax(stationSettlementPriceAdjustService.updateStationSettlementPriceAdjust(stationSettlementPriceAdjust));
+    }
+
+    /**
+     * 删除结算价格,司机价格优惠调整
+     */
+    @Log(title = "结算价格,司机价格优惠调整", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(stationSettlementPriceAdjustService.deleteStationSettlementPriceAdjustByIds(ids));
+    }
+}

+ 155 - 0
yijia-station/src/main/java/com/yijia/station/controller/StationSettlementPriceController.java

@@ -0,0 +1,155 @@
+package com.yijia.station.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.utils.DateUtils;
+import com.yijia.common.utils.SecurityUtils;
+import com.yijia.station.domain.StationSettlementPriceAdjust;
+import com.yijia.station.service.IStationSettlementPriceAdjustService;
+import com.yijia.system.service.ISysDeptService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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.StationSettlementPrice;
+import com.yijia.station.service.IStationSettlementPriceService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 结算价格,司机价格Controller
+ *
+ * @author yijia
+ * @date 2021-07-13
+ */
+@RestController
+@RequestMapping("/station/settlementPrice")
+public class StationSettlementPriceController extends BaseController
+{
+    @Autowired
+    private IStationSettlementPriceService stationSettlementPriceService;
+    @Autowired
+    private ISysDeptService deptService;
+    @Autowired
+    private IStationSettlementPriceAdjustService stationSettlementPriceAdjustService;
+    /**
+     * 查询结算价格,司机价格列表
+     */
+
+    @GetMapping("/list")
+    public TableDataInfo list(StationSettlementPrice stationSettlementPrice)
+    {
+       // startPage();
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        List<StationSettlementPrice> pircelist =new ArrayList<>();
+        if(currentUser.getUser().getDept().getJiBie()!=0){
+            SysDept dept =new SysDept();
+            List<String> list = deptService.selectdeptInfoList(dept);
+            if(list!=null && list.size()>0){
+                stationSettlementPrice.setStationIdList(list);
+                stationSettlementPrice.setStationId(null);
+            }
+            List<StationSettlementPrice> settlementPriceList = stationSettlementPriceService.selectStationSettlementPriceList(stationSettlementPrice);
+            if(settlementPriceList!=null && settlementPriceList.size()>0){
+                for (StationSettlementPrice settlementPrice:settlementPriceList){
+                    if(settlementPrice.getId()==null){
+                        settlementPrice.setCreateBy(currentUser.getUser().getUserId().toString());
+                        settlementPrice.setCreateTime(DateUtils.getNowDate());
+                        settlementPrice.setSettlementType("1");
+                        settlementPrice.setSettlementPrice("0");
+                        settlementPrice.setDriverPrice("100");
+                        settlementPrice.setStationId(settlementPrice.getDeptId());
+                        stationSettlementPriceService.insertStationSettlementPrice(settlementPrice);
+                    }
+                }
+            }
+            pircelist = stationSettlementPriceService.selectStationSettlementPriceList(stationSettlementPrice);
+        }
+        return getTable(pircelist);
+    }
+
+    /**
+     * 导出结算价格,司机价格列表
+     */
+
+    @Log(title = "结算价格,司机价格", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(StationSettlementPrice stationSettlementPrice)
+    {
+        List<StationSettlementPrice> list = stationSettlementPriceService.selectStationSettlementPriceList(stationSettlementPrice);
+        ExcelUtil<StationSettlementPrice> util = new ExcelUtil<StationSettlementPrice>(StationSettlementPrice.class);
+        return util.exportExcel(list, "价格");
+    }
+
+    /**
+     * 获取结算价格,司机价格详细信息
+     */
+
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
+    {
+        return AjaxResult.success(stationSettlementPriceService.selectStationSettlementPriceById(id));
+    }
+
+    /**
+     * 新增结算价格,司机价格
+     */
+    @Log(title = "结算价格,司机价格", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StationSettlementPrice stationSettlementPrice)
+    {
+        return toAjax(stationSettlementPriceService.insertStationSettlementPrice(stationSettlementPrice));
+    }
+
+    /**
+     * 修改结算价格,司机价格
+     */
+    @Log(title = "结算价格,司机价格", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @Transactional
+    public AjaxResult edit(@RequestBody StationSettlementPrice stationSettlementPrice)
+    {
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        //客户修改数据
+        int i = 0;
+        if(stationSettlementPrice!=null){
+            StationSettlementPriceAdjust stationSettlementPriceAdjust =new StationSettlementPriceAdjust();
+            stationSettlementPriceAdjust.setStationId(stationSettlementPrice.getStationId());
+            stationSettlementPriceAdjust.setCreateBy(currentUser.getUser().getUserId().toString());
+            stationSettlementPriceAdjust.setCreateTime(DateUtils.getNowDate());
+            stationSettlementPriceAdjust.setSettlementPrice(stationSettlementPrice.getSettlementPrice());
+            stationSettlementPriceAdjust.setDriverPrice(stationSettlementPrice.getDriverPrice());
+            stationSettlementPriceAdjust.setSettlementType(stationSettlementPrice.getSettlementType());
+            stationSettlementPriceAdjust.setParentId(stationSettlementPrice.getId());
+           i= stationSettlementPriceAdjustService.insertStationSettlementPriceAdjust(stationSettlementPriceAdjust);
+            stationSettlementPrice.setUpdateBy(currentUser.getUser().getUserId().toString());
+            stationSettlementPrice.setUpdateTime(DateUtils.getNowDate());
+            i=  stationSettlementPriceService.updateStationSettlementPrice(stationSettlementPrice);
+        }
+        return toAjax(i);
+    }
+
+    /**
+     * 删除结算价格,司机价格
+     */
+    @Log(title = "结算价格,司机价格", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(stationSettlementPriceService.deleteStationSettlementPriceByIds(ids));
+    }
+}

+ 142 - 75
yijia-station/src/main/java/com/yijia/station/domain/PayOrder.java

@@ -12,7 +12,7 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 订单支付对象 pay_order
- * 
+ *
  * @author yijia
  * @date 2021-01-12
  */
@@ -137,7 +137,6 @@ public class PayOrder extends BaseEntity
     private Date createdDate;
 
     /** 订单类型(1.柴油,2.汽油,积分:3.现金+积分4.现金,5.积分) */
-
     private String orderType;
 
     /** 车牌号 */
@@ -154,6 +153,22 @@ public class PayOrder extends BaseEntity
 
     private BigDecimal cyAmt;
 
+    private BigDecimal sellOilPrice;
+    private BigDecimal driverOilPrice;
+
+
+    /**
+     *结算人优惠金额
+     */
+    private BigDecimal sellDiscountAmt;
+    /**
+     * 结算价格
+     */
+    private BigDecimal sellAmt;
+    /**
+     * 手机号
+     */
+    private String  mobilePhone;
     /**
      * 模糊查询条件
      * @return
@@ -169,6 +184,7 @@ public class PayOrder extends BaseEntity
 
     private List<String> stationIdList;
 
+
     public List<String> getStationIdList() {
         return stationIdList;
     }
@@ -188,6 +204,57 @@ public class PayOrder extends BaseEntity
     //现金支付数量
     private Integer xjNum;
 
+
+    private Integer countNum;
+
+    public Integer getCountNum() {
+        return countNum;
+    }
+
+    public void setCountNum(Integer countNum) {
+        this.countNum = countNum;
+    }
+
+    public BigDecimal getSellOilPrice() {
+        return sellOilPrice;
+    }
+
+    public void setSellOilPrice(BigDecimal sellOilPrice) {
+        this.sellOilPrice = sellOilPrice;
+    }
+
+    public BigDecimal getDriverOilPrice() {
+        return driverOilPrice;
+    }
+
+    public void setDriverOilPrice(BigDecimal driverOilPrice) {
+        this.driverOilPrice = driverOilPrice;
+    }
+
+    public String getMobilePhone() {
+        return mobilePhone;
+    }
+
+    public void setMobilePhone(String mobilePhone) {
+        this.mobilePhone = mobilePhone;
+    }
+
+    public BigDecimal getSellDiscountAmt() {
+        return sellDiscountAmt;
+    }
+
+    public void setSellDiscountAmt(BigDecimal sellDiscountAmt) {
+        this.sellDiscountAmt = sellDiscountAmt;
+    }
+
+    public BigDecimal getSellAmt() {
+        return sellAmt;
+    }
+
+    public void setSellAmt(BigDecimal sellAmt) {
+        this.sellAmt = sellAmt;
+    }
+
     public Integer getWxNum() {
         return wxNum;
     }
@@ -260,102 +327,102 @@ public class PayOrder extends BaseEntity
         this.cyAmt = cyAmt;
     }
 
-    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 setStationId(Long stationId) 
+    public void setStationId(Long stationId)
     {
         this.stationId = stationId;
     }
 
-    public Long getStationId() 
+    public Long getStationId()
     {
         return stationId;
     }
-    public void setStationName(String stationName) 
+    public void setStationName(String stationName)
     {
         this.stationName = stationName;
     }
 
-    public String getStationName() 
+    public String getStationName()
     {
         return stationName;
     }
-    public void setStatus(String status) 
+    public void setStatus(String status)
     {
         this.status = status;
     }
 
-    public String getStatus() 
+    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 setOilGun(String oilGun) 
+    public void setOilGun(String oilGun)
     {
         this.oilGun = oilGun;
     }
 
-    public String getOilGun() 
+    public String getOilGun()
     {
         return oilGun;
     }
-    public void setOilName(String oilName) 
+    public void setOilName(String oilName)
     {
         this.oilName = oilName;
     }
 
-    public String getOilName() 
+    public String getOilName()
     {
         return oilName;
     }
-    public void setOilPirce(BigDecimal oilPirce) 
+    public void setOilPirce(BigDecimal oilPirce)
     {
         this.oilPirce = oilPirce;
     }
 
-    public BigDecimal getOilPirce() 
+    public BigDecimal getOilPirce()
     {
         return oilPirce;
     }
-    public void setOilType(String oilType) 
+    public void setOilType(String oilType)
     {
         this.oilType = oilType;
     }
 
-    public String getOilType() 
+    public String getOilType()
     {
         return oilType;
     }
@@ -381,232 +448,232 @@ public class PayOrder extends BaseEntity
         this.receivableAmt = receivableAmt;
     }
 
-    public BigDecimal getReceivableAmt() 
+    public BigDecimal getReceivableAmt()
     {
         return receivableAmt;
     }
-    public void setReceivedAmt(BigDecimal receivedAmt) 
+    public void setReceivedAmt(BigDecimal receivedAmt)
     {
         this.receivedAmt = receivedAmt;
     }
 
-    public BigDecimal getReceivedAmt() 
+    public BigDecimal getReceivedAmt()
     {
         return receivedAmt;
     }
-    public void setDiscountAmt(BigDecimal discountAmt) 
+    public void setDiscountAmt(BigDecimal discountAmt)
     {
         this.discountAmt = discountAmt;
     }
 
-    public BigDecimal getDiscountAmt() 
+    public BigDecimal getDiscountAmt()
     {
         return discountAmt;
     }
-    public void setDiscountCouponAmt(BigDecimal discountCouponAmt) 
+    public void setDiscountCouponAmt(BigDecimal discountCouponAmt)
     {
         this.discountCouponAmt = discountCouponAmt;
     }
 
-    public BigDecimal getDiscountCouponAmt() 
+    public BigDecimal getDiscountCouponAmt()
     {
         return discountCouponAmt;
     }
-    public void setDiscountCoupon(String discountCoupon) 
+    public void setDiscountCoupon(String discountCoupon)
     {
         this.discountCoupon = discountCoupon;
     }
 
-    public String getDiscountCoupon() 
+    public String getDiscountCoupon()
     {
         return discountCoupon;
     }
-    public void setWxAmt(BigDecimal wxAmt) 
+    public void setWxAmt(BigDecimal wxAmt)
     {
         this.wxAmt = wxAmt;
     }
 
-    public BigDecimal getWxAmt() 
+    public BigDecimal getWxAmt()
     {
         return wxAmt;
     }
-    public void setZfbAmt(BigDecimal zfbAmt) 
+    public void setZfbAmt(BigDecimal zfbAmt)
     {
         this.zfbAmt = zfbAmt;
     }
 
-    public BigDecimal getZfbAmt() 
+    public BigDecimal getZfbAmt()
     {
         return zfbAmt;
     }
-    public void setPosAmt(BigDecimal posAmt) 
+    public void setPosAmt(BigDecimal posAmt)
     {
         this.posAmt = posAmt;
     }
 
-    public BigDecimal getPosAmt() 
+    public BigDecimal getPosAmt()
     {
         return posAmt;
     }
-    public void setXjAmt(BigDecimal xjAmt) 
+    public void setXjAmt(BigDecimal xjAmt)
     {
         this.xjAmt = xjAmt;
     }
 
-    public BigDecimal getXjAmt() 
+    public BigDecimal getXjAmt()
     {
         return xjAmt;
     }
-    public void setDidiAppAmt(BigDecimal didiAppAmt) 
+    public void setDidiAppAmt(BigDecimal didiAppAmt)
     {
         this.didiAppAmt = didiAppAmt;
     }
 
-    public BigDecimal getDidiAppAmt() 
+    public BigDecimal getDidiAppAmt()
     {
         return didiAppAmt;
     }
-    public void setTyAppAmt(BigDecimal tyAppAmt) 
+    public void setTyAppAmt(BigDecimal tyAppAmt)
     {
         this.tyAppAmt = tyAppAmt;
     }
 
-    public BigDecimal getTyAppAmt() 
+    public BigDecimal getTyAppAmt()
     {
         return tyAppAmt;
     }
-    public void setOtherAmt(BigDecimal otherAmt) 
+    public void setOtherAmt(BigDecimal otherAmt)
     {
         this.otherAmt = otherAmt;
     }
 
-    public BigDecimal getOtherAmt() 
+    public BigDecimal getOtherAmt()
     {
         return otherAmt;
     }
-    public void setDzkAmt(BigDecimal dzkAmt) 
+    public void setDzkAmt(BigDecimal dzkAmt)
     {
         this.dzkAmt = dzkAmt;
     }
 
-    public BigDecimal getDzkAmt() 
+    public BigDecimal getDzkAmt()
     {
         return dzkAmt;
     }
-    public void setScore(Long score) 
+    public void setScore(Long score)
     {
         this.score = score;
     }
 
-    public Long getScore() 
+    public Long getScore()
     {
         return score;
     }
-    public void setMemberNo(String memberNo) 
+    public void setMemberNo(String memberNo)
     {
         this.memberNo = memberNo;
     }
 
-    public String getMemberNo() 
+    public String getMemberNo()
     {
         return memberNo;
     }
-    public void setMemberAmt(BigDecimal memberAmt) 
+    public void setMemberAmt(BigDecimal memberAmt)
     {
         this.memberAmt = memberAmt;
     }
 
-    public BigDecimal getMemberAmt() 
+    public BigDecimal getMemberAmt()
     {
         return memberAmt;
     }
-    public void setPrintCount(Long printCount) 
+    public void setPrintCount(Long printCount)
     {
         this.printCount = printCount;
     }
 
-    public Long getPrintCount() 
+    public Long getPrintCount()
     {
         return printCount;
     }
-    public void setPayType(String payType) 
+    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 setOilPersonnel(String oilPersonnel) 
+    public void setOilPersonnel(String oilPersonnel)
     {
         this.oilPersonnel = oilPersonnel;
     }
 
-    public String getOilPersonnel() 
+    public String getOilPersonnel()
     {
         return oilPersonnel;
     }
-    public void setPayDate(Date payDate) 
+    public void setPayDate(Date payDate)
     {
         this.payDate = payDate;
     }
 
-    public Date getPayDate() 
+    public Date getPayDate()
     {
         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;
     }
-    public void setCarNo(String carNo) 
+    public void setCarNo(String carNo)
     {
         this.carNo = carNo;
     }
 
-    public String getCarNo() 
+    public String getCarNo()
     {
         return carNo;
     }
-    public void setCustomerPhone(String customerPhone) 
+    public void setCustomerPhone(String customerPhone)
     {
         this.customerPhone = customerPhone;
     }
 
-    public String getCustomerPhone() 
+    public String getCustomerPhone()
     {
         return customerPhone;
     }
-    public void setCustomerGrade(String customerGrade) 
+    public void setCustomerGrade(String customerGrade)
     {
         this.customerGrade = customerGrade;
     }
 
-    public String getCustomerGrade() 
+    public String getCustomerGrade()
     {
         return customerGrade;
     }

+ 96 - 0
yijia-station/src/main/java/com/yijia/station/domain/StationBalanceChange.java

@@ -0,0 +1,96 @@
+package com.yijia.station.domain;
+
+import java.math.BigDecimal;
+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;
+
+/**
+ * LNG油站余额变化记录对象 station_balance_change
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+public class StationBalanceChange extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Long stationId;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNo;
+
+    /** 记录类型:+,充值;-,消费; */
+    @Excel(name = "记录类型:+,充值;-,消费;")
+    private String type;
+
+    /** 销售价支付金额 */
+    @Excel(name = "销售价支付金额")
+    private BigDecimal amt;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+    public void setOrderNo(String orderNo) 
+    {
+        this.orderNo = orderNo;
+    }
+
+    public String getOrderNo() 
+    {
+        return orderNo;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("orderNo", getOrderNo())
+            .append("type", getType())
+            .append("amt", getAmt())
+            .append("createTime", getCreateTime())
+            .append("createBy", getCreateBy())
+            .toString();
+    }
+}

+ 124 - 0
yijia-station/src/main/java/com/yijia/station/domain/StationSettlementPrice.java

@@ -0,0 +1,124 @@
+package com.yijia.station.domain;
+
+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_settlement_price
+ *
+ * @author yijia
+ * @date 2021-07-13
+ */
+public class StationSettlementPrice extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+     /** 站点id */
+    @Excel(name = "站点id")
+    private Long stationId;
+
+    /** 结算价类型 (1.直降,2.折扣) */
+    @Excel(name = "结算价类型 ", readConverterExp = "1=.直降,2.折扣")
+    private String settlementType;
+
+    /** 结算价(直降,折扣) */
+    @Excel(name = "结算价", readConverterExp = "直=降,折扣")
+    private String settlementPrice;
+
+    /** 司机价 */
+    @Excel(name = "司机价")
+    private String driverPrice;
+
+    private String stationName;
+    private String balance;
+    private Long deptId;
+
+    public String getBalance() {
+        return balance;
+    }
+
+    public void setBalance(String balance) {
+        this.balance = balance;
+    }
+
+    public String getStationName() {
+        return stationName;
+    }
+
+    public void setStationName(String stationName) {
+        this.stationName = stationName;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public void setStationId(Long stationId)
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId()
+    {
+        return stationId;
+    }
+    public void setSettlementType(String settlementType)
+    {
+        this.settlementType = settlementType;
+    }
+
+    public String getSettlementType()
+    {
+        return settlementType;
+    }
+    public void setSettlementPrice(String settlementPrice)
+    {
+        this.settlementPrice = settlementPrice;
+    }
+
+    public String getSettlementPrice()
+    {
+        return settlementPrice;
+    }
+    public void setDriverPrice(String driverPrice)
+    {
+        this.driverPrice = driverPrice;
+    }
+
+    public String getDriverPrice()
+    {
+        return driverPrice;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("stationId", getStationId())
+            .append("settlementType", getSettlementType())
+            .append("settlementPrice", getSettlementPrice())
+            .append("driverPrice", getDriverPrice())
+            .append("createTime", getCreateTime())
+            .append("createBy", getCreateBy())
+            .append("updateTime", getUpdateTime())
+            .append("updateBy", getUpdateBy())
+            .toString();
+    }
+}

+ 103 - 0
yijia-station/src/main/java/com/yijia/station/domain/StationSettlementPriceAdjust.java

@@ -0,0 +1,103 @@
+package com.yijia.station.domain;
+
+import java.math.BigDecimal;
+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_settlement_price_adjust
+ *
+ * @author yijia
+ * @date 2021-07-14
+ */
+public class StationSettlementPriceAdjust extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 结算价格 */
+    @Excel(name = "结算价格")
+    private String settlementPrice;
+
+    /** 结算类型 1直降,2折扣 */
+    @Excel(name = "结算类型 1直降,2折扣")
+    private String settlementType;
+
+    /** 司机折扣 */
+    @Excel(name = "司机折扣")
+    private String driverPrice;
+
+    /** 站点id */
+    @Excel(name = "站点id")
+    private Long stationId;
+
+    private Long parentId;
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getStationId() {
+        return stationId;
+    }
+
+    public void setStationId(Long stationId) {
+        this.stationId = stationId;
+    }
+
+
+    public void setSettlementType(String settlementType)
+    {
+        this.settlementType = settlementType;
+    }
+
+    public String getSettlementType()
+    {
+        return settlementType;
+    }
+
+    public String getSettlementPrice() {
+        return settlementPrice;
+    }
+
+    public void setSettlementPrice(String settlementPrice) {
+        this.settlementPrice = settlementPrice;
+    }
+
+    public String getDriverPrice() {
+        return driverPrice;
+    }
+
+    public void setDriverPrice(String driverPrice) {
+        this.driverPrice = driverPrice;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("settlementPrice", getSettlementPrice())
+            .append("settlementType", getSettlementType())
+            .append("driverPrice", getDriverPrice())
+            .append("stationId", getStationId())
+            .toString();
+    }
+}

+ 17 - 8
yijia-station/src/main/java/com/yijia/station/mapper/PayOrderMapper.java

@@ -5,15 +5,15 @@ import com.yijia.station.domain.PayOrder;
 
 /**
  * 订单支付Mapper接口
- * 
+ *
  * @author yijia
  * @date 2020-12-10
  */
-public interface PayOrderMapper 
+public interface PayOrderMapper
 {
     /**
      * 查询订单支付
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 订单支付
      */
@@ -21,7 +21,7 @@ public interface PayOrderMapper
 
     /**
      * 查询订单支付列表
-     * 
+     *
      * @param payOrder 订单支付
      * @return 订单支付集合
      */
@@ -29,7 +29,7 @@ public interface PayOrderMapper
 
     /**
      * 新增订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface PayOrderMapper
 
     /**
      * 修改订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface PayOrderMapper
 
     /**
      * 删除订单支付
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface PayOrderMapper
 
     /**
      * 批量删除订单支付
-     * 
+     *
      * @param orderIds 需要删除的数据ID
      * @return 结果
      */
@@ -138,4 +138,13 @@ public interface PayOrderMapper
      * @return
      */
     public List<PayOrder> dayOilTypeSources(PayOrder payOrder);
+
+    /**
+     * 查询lNG数据
+     * @param payOrder
+     * @return
+     */
+    public List<PayOrder> selectLNGPayOrderExport(PayOrder payOrder);
+
+    public List<PayOrder> LNGDeptList(PayOrder payOrder);
 }

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/mapper/StationBalanceChangeMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.station.mapper;
+
+import java.util.List;
+import com.yijia.station.domain.StationBalanceChange;
+
+/**
+ * LNG油站余额变化记录Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+public interface StationBalanceChangeMapper 
+{
+    /**
+     * 查询LNG油站余额变化记录
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return LNG油站余额变化记录
+     */
+    public StationBalanceChange selectStationBalanceChangeById(Long id);
+
+    /**
+     * 查询LNG油站余额变化记录列表
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return LNG油站余额变化记录集合
+     */
+    public List<StationBalanceChange> selectStationBalanceChangeList(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 新增LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    public int insertStationBalanceChange(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 修改LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    public int updateStationBalanceChange(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 删除LNG油站余额变化记录
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return 结果
+     */
+    public int deleteStationBalanceChangeById(Long id);
+
+    /**
+     * 批量删除LNG油站余额变化记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStationBalanceChangeByIds(Long[] ids);
+}

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/mapper/StationSettlementPriceAdjustMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.station.mapper;
+
+import java.util.List;
+import com.yijia.station.domain.StationSettlementPriceAdjust;
+
+/**
+ * 结算价格,司机价格优惠调整Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-07-14
+ */
+public interface StationSettlementPriceAdjustMapper 
+{
+    /**
+     * 查询结算价格,司机价格优惠调整
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结算价格,司机价格优惠调整
+     */
+    public StationSettlementPriceAdjust selectStationSettlementPriceAdjustById(Integer id);
+
+    /**
+     * 查询结算价格,司机价格优惠调整列表
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结算价格,司机价格优惠调整集合
+     */
+    public List<StationSettlementPriceAdjust> selectStationSettlementPriceAdjustList(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 新增结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    public int insertStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 修改结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    public int updateStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 删除结算价格,司机价格优惠调整
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceAdjustById(Integer id);
+
+    /**
+     * 批量删除结算价格,司机价格优惠调整
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceAdjustByIds(Integer[] ids);
+}

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/mapper/StationSettlementPriceMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.station.mapper;
+
+import java.util.List;
+import com.yijia.station.domain.StationSettlementPrice;
+
+/**
+ * 结算价格,司机价格Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+public interface StationSettlementPriceMapper 
+{
+    /**
+     * 查询结算价格,司机价格
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结算价格,司机价格
+     */
+    public StationSettlementPrice selectStationSettlementPriceById(Integer id);
+
+    /**
+     * 查询结算价格,司机价格列表
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结算价格,司机价格集合
+     */
+    public List<StationSettlementPrice> selectStationSettlementPriceList(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 新增结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    public int insertStationSettlementPrice(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 修改结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    public int updateStationSettlementPrice(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 删除结算价格,司机价格
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceById(Integer id);
+
+    /**
+     * 批量删除结算价格,司机价格
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceByIds(Integer[] ids);
+}

+ 21 - 8
yijia-station/src/main/java/com/yijia/station/service/IPayOrderService.java

@@ -5,15 +5,15 @@ import com.yijia.station.domain.PayOrder;
 
 /**
  * 订单支付Service接口
- * 
+ *
  * @author yijia
  * @date 2020-12-10
  */
-public interface IPayOrderService 
+public interface IPayOrderService
 {
     /**
      * 查询订单支付
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 订单支付
      */
@@ -21,7 +21,7 @@ public interface IPayOrderService
 
     /**
      * 查询订单支付列表
-     * 
+     *
      * @param payOrder 订单支付
      * @return 订单支付集合
      */
@@ -29,7 +29,7 @@ public interface IPayOrderService
 
     /**
      * 新增订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface IPayOrderService
 
     /**
      * 修改订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface IPayOrderService
 
     /**
      * 批量删除订单支付
-     * 
+     *
      * @param orderIds 需要删除的订单支付ID
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface IPayOrderService
 
     /**
      * 删除订单支付信息
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 结果
      */
@@ -101,6 +101,12 @@ public interface IPayOrderService
      * @return
      */
     public List<PayOrder> selectPayOrderExport(PayOrder payOrder);
+    /**
+     * 查询LNG导出信息
+     * @param payOrder
+     * @return
+     */
+    public List<PayOrder> selectLNGPayOrderExport(PayOrder payOrder);
 
     /**
      * 查询数据,根据员工汇总数据
@@ -136,4 +142,11 @@ public interface IPayOrderService
      * @return
      */
     public List<PayOrder> dayOilTypeSources(PayOrder payOrder);
+
+    /**
+     * LNG 站点人员查询数据
+     * @param payOrder
+     * @return
+     */
+    public List<PayOrder> LNGDeptList(PayOrder payOrder);
 }

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/service/IStationBalanceChangeService.java

@@ -0,0 +1,61 @@
+package com.yijia.station.service;
+
+import java.util.List;
+import com.yijia.station.domain.StationBalanceChange;
+
+/**
+ * LNG油站余额变化记录Service接口
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+public interface IStationBalanceChangeService 
+{
+    /**
+     * 查询LNG油站余额变化记录
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return LNG油站余额变化记录
+     */
+    public StationBalanceChange selectStationBalanceChangeById(Long id);
+
+    /**
+     * 查询LNG油站余额变化记录列表
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return LNG油站余额变化记录集合
+     */
+    public List<StationBalanceChange> selectStationBalanceChangeList(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 新增LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    public int insertStationBalanceChange(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 修改LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    public int updateStationBalanceChange(StationBalanceChange stationBalanceChange);
+
+    /**
+     * 批量删除LNG油站余额变化记录
+     * 
+     * @param ids 需要删除的LNG油站余额变化记录ID
+     * @return 结果
+     */
+    public int deleteStationBalanceChangeByIds(Long[] ids);
+
+    /**
+     * 删除LNG油站余额变化记录信息
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return 结果
+     */
+    public int deleteStationBalanceChangeById(Long id);
+}

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/service/IStationSettlementPriceAdjustService.java

@@ -0,0 +1,61 @@
+package com.yijia.station.service;
+
+import java.util.List;
+import com.yijia.station.domain.StationSettlementPriceAdjust;
+
+/**
+ * 结算价格,司机价格优惠调整Service接口
+ * 
+ * @author yijia
+ * @date 2021-07-14
+ */
+public interface IStationSettlementPriceAdjustService 
+{
+    /**
+     * 查询结算价格,司机价格优惠调整
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结算价格,司机价格优惠调整
+     */
+    public StationSettlementPriceAdjust selectStationSettlementPriceAdjustById(Integer id);
+
+    /**
+     * 查询结算价格,司机价格优惠调整列表
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结算价格,司机价格优惠调整集合
+     */
+    public List<StationSettlementPriceAdjust> selectStationSettlementPriceAdjustList(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 新增结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    public int insertStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 修改结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    public int updateStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust);
+
+    /**
+     * 批量删除结算价格,司机价格优惠调整
+     * 
+     * @param ids 需要删除的结算价格,司机价格优惠调整ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceAdjustByIds(Integer[] ids);
+
+    /**
+     * 删除结算价格,司机价格优惠调整信息
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceAdjustById(Integer id);
+}

+ 61 - 0
yijia-station/src/main/java/com/yijia/station/service/IStationSettlementPriceService.java

@@ -0,0 +1,61 @@
+package com.yijia.station.service;
+
+import java.util.List;
+import com.yijia.station.domain.StationSettlementPrice;
+
+/**
+ * 结算价格,司机价格Service接口
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+public interface IStationSettlementPriceService 
+{
+    /**
+     * 查询结算价格,司机价格
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结算价格,司机价格
+     */
+    public StationSettlementPrice selectStationSettlementPriceById(Integer id);
+
+    /**
+     * 查询结算价格,司机价格列表
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结算价格,司机价格集合
+     */
+    public List<StationSettlementPrice> selectStationSettlementPriceList(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 新增结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    public int insertStationSettlementPrice(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 修改结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    public int updateStationSettlementPrice(StationSettlementPrice stationSettlementPrice);
+
+    /**
+     * 批量删除结算价格,司机价格
+     * 
+     * @param ids 需要删除的结算价格,司机价格ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceByIds(Integer[] ids);
+
+    /**
+     * 删除结算价格,司机价格信息
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结果
+     */
+    public int deleteStationSettlementPriceById(Integer id);
+}

+ 18 - 8
yijia-station/src/main/java/com/yijia/station/service/impl/PayOrderServiceImpl.java

@@ -9,19 +9,19 @@ import com.yijia.station.service.IPayOrderService;
 
 /**
  * 订单支付Service业务层处理
- * 
+ *
  * @author yijia
  * @date 2020-12-10
  */
 @Service
-public class PayOrderServiceImpl implements IPayOrderService 
+public class PayOrderServiceImpl implements IPayOrderService
 {
     @Autowired
     private PayOrderMapper payOrderMapper;
 
     /**
      * 查询订单支付
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 订单支付
      */
@@ -33,7 +33,7 @@ public class PayOrderServiceImpl implements IPayOrderService
 
     /**
      * 查询订单支付列表
-     * 
+     *
      * @param payOrder 订单支付
      * @return 订单支付
      */
@@ -45,7 +45,7 @@ public class PayOrderServiceImpl implements IPayOrderService
 
     /**
      * 新增订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -57,7 +57,7 @@ public class PayOrderServiceImpl implements IPayOrderService
 
     /**
      * 修改订单支付
-     * 
+     *
      * @param payOrder 订单支付
      * @return 结果
      */
@@ -69,7 +69,7 @@ public class PayOrderServiceImpl implements IPayOrderService
 
     /**
      * 批量删除订单支付
-     * 
+     *
      * @param orderIds 需要删除的订单支付ID
      * @return 结果
      */
@@ -81,7 +81,7 @@ public class PayOrderServiceImpl implements IPayOrderService
 
     /**
      * 删除订单支付信息
-     * 
+     *
      * @param orderId 订单支付ID
      * @return 结果
      */
@@ -160,6 +160,11 @@ public class PayOrderServiceImpl implements IPayOrderService
         return payOrderMapper.selectPayOrderExport(payOrder);
     }
 
+    @Override
+    public List<PayOrder> selectLNGPayOrderExport(PayOrder payOrder) {
+        return payOrderMapper.selectLNGPayOrderExport(payOrder);
+    }
+
     /**
      * 查询数据,根据员工汇总数据
      * @param payOrder
@@ -211,4 +216,9 @@ public class PayOrderServiceImpl implements IPayOrderService
         return payOrderMapper.dayOilTypeSources(payOrder);
     }
 
+    @Override
+    public List<PayOrder> LNGDeptList(PayOrder payOrder) {
+        return payOrderMapper.LNGDeptList(payOrder) ;
+    }
+
 }

+ 95 - 0
yijia-station/src/main/java/com/yijia/station/service/impl/StationBalanceChangeServiceImpl.java

@@ -0,0 +1,95 @@
+package com.yijia.station.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.station.mapper.StationBalanceChangeMapper;
+import com.yijia.station.domain.StationBalanceChange;
+import com.yijia.station.service.IStationBalanceChangeService;
+
+/**
+ * LNG油站余额变化记录Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+@Service
+public class StationBalanceChangeServiceImpl implements IStationBalanceChangeService 
+{
+    @Autowired
+    private StationBalanceChangeMapper stationBalanceChangeMapper;
+
+    /**
+     * 查询LNG油站余额变化记录
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return LNG油站余额变化记录
+     */
+    @Override
+    public StationBalanceChange selectStationBalanceChangeById(Long id)
+    {
+        return stationBalanceChangeMapper.selectStationBalanceChangeById(id);
+    }
+
+    /**
+     * 查询LNG油站余额变化记录列表
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return LNG油站余额变化记录
+     */
+    @Override
+    public List<StationBalanceChange> selectStationBalanceChangeList(StationBalanceChange stationBalanceChange)
+    {
+        return stationBalanceChangeMapper.selectStationBalanceChangeList(stationBalanceChange);
+    }
+
+    /**
+     * 新增LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    @Override
+    public int insertStationBalanceChange(StationBalanceChange stationBalanceChange)
+    {
+        stationBalanceChange.setCreateTime(DateUtils.getNowDate());
+        return stationBalanceChangeMapper.insertStationBalanceChange(stationBalanceChange);
+    }
+
+    /**
+     * 修改LNG油站余额变化记录
+     * 
+     * @param stationBalanceChange LNG油站余额变化记录
+     * @return 结果
+     */
+    @Override
+    public int updateStationBalanceChange(StationBalanceChange stationBalanceChange)
+    {
+        return stationBalanceChangeMapper.updateStationBalanceChange(stationBalanceChange);
+    }
+
+    /**
+     * 批量删除LNG油站余额变化记录
+     * 
+     * @param ids 需要删除的LNG油站余额变化记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationBalanceChangeByIds(Long[] ids)
+    {
+        return stationBalanceChangeMapper.deleteStationBalanceChangeByIds(ids);
+    }
+
+    /**
+     * 删除LNG油站余额变化记录信息
+     * 
+     * @param id LNG油站余额变化记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationBalanceChangeById(Long id)
+    {
+        return stationBalanceChangeMapper.deleteStationBalanceChangeById(id);
+    }
+}

+ 95 - 0
yijia-station/src/main/java/com/yijia/station/service/impl/StationSettlementPriceAdjustServiceImpl.java

@@ -0,0 +1,95 @@
+package com.yijia.station.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.station.mapper.StationSettlementPriceAdjustMapper;
+import com.yijia.station.domain.StationSettlementPriceAdjust;
+import com.yijia.station.service.IStationSettlementPriceAdjustService;
+
+/**
+ * 结算价格,司机价格优惠调整Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-07-14
+ */
+@Service
+public class StationSettlementPriceAdjustServiceImpl implements IStationSettlementPriceAdjustService 
+{
+    @Autowired
+    private StationSettlementPriceAdjustMapper stationSettlementPriceAdjustMapper;
+
+    /**
+     * 查询结算价格,司机价格优惠调整
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结算价格,司机价格优惠调整
+     */
+    @Override
+    public StationSettlementPriceAdjust selectStationSettlementPriceAdjustById(Integer id)
+    {
+        return stationSettlementPriceAdjustMapper.selectStationSettlementPriceAdjustById(id);
+    }
+
+    /**
+     * 查询结算价格,司机价格优惠调整列表
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结算价格,司机价格优惠调整
+     */
+    @Override
+    public List<StationSettlementPriceAdjust> selectStationSettlementPriceAdjustList(StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        return stationSettlementPriceAdjustMapper.selectStationSettlementPriceAdjustList(stationSettlementPriceAdjust);
+    }
+
+    /**
+     * 新增结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    @Override
+    public int insertStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        stationSettlementPriceAdjust.setCreateTime(DateUtils.getNowDate());
+        return stationSettlementPriceAdjustMapper.insertStationSettlementPriceAdjust(stationSettlementPriceAdjust);
+    }
+
+    /**
+     * 修改结算价格,司机价格优惠调整
+     * 
+     * @param stationSettlementPriceAdjust 结算价格,司机价格优惠调整
+     * @return 结果
+     */
+    @Override
+    public int updateStationSettlementPriceAdjust(StationSettlementPriceAdjust stationSettlementPriceAdjust)
+    {
+        return stationSettlementPriceAdjustMapper.updateStationSettlementPriceAdjust(stationSettlementPriceAdjust);
+    }
+
+    /**
+     * 批量删除结算价格,司机价格优惠调整
+     * 
+     * @param ids 需要删除的结算价格,司机价格优惠调整ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationSettlementPriceAdjustByIds(Integer[] ids)
+    {
+        return stationSettlementPriceAdjustMapper.deleteStationSettlementPriceAdjustByIds(ids);
+    }
+
+    /**
+     * 删除结算价格,司机价格优惠调整信息
+     * 
+     * @param id 结算价格,司机价格优惠调整ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationSettlementPriceAdjustById(Integer id)
+    {
+        return stationSettlementPriceAdjustMapper.deleteStationSettlementPriceAdjustById(id);
+    }
+}

+ 96 - 0
yijia-station/src/main/java/com/yijia/station/service/impl/StationSettlementPriceServiceImpl.java

@@ -0,0 +1,96 @@
+package com.yijia.station.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.station.mapper.StationSettlementPriceMapper;
+import com.yijia.station.domain.StationSettlementPrice;
+import com.yijia.station.service.IStationSettlementPriceService;
+
+/**
+ * 结算价格,司机价格Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-07-13
+ */
+@Service
+public class StationSettlementPriceServiceImpl implements IStationSettlementPriceService 
+{
+    @Autowired
+    private StationSettlementPriceMapper stationSettlementPriceMapper;
+
+    /**
+     * 查询结算价格,司机价格
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结算价格,司机价格
+     */
+    @Override
+    public StationSettlementPrice selectStationSettlementPriceById(Integer id)
+    {
+        return stationSettlementPriceMapper.selectStationSettlementPriceById(id);
+    }
+
+    /**
+     * 查询结算价格,司机价格列表
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结算价格,司机价格
+     */
+    @Override
+    public List<StationSettlementPrice> selectStationSettlementPriceList(StationSettlementPrice stationSettlementPrice)
+    {
+        return stationSettlementPriceMapper.selectStationSettlementPriceList(stationSettlementPrice);
+    }
+
+    /**
+     * 新增结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    @Override
+    public int insertStationSettlementPrice(StationSettlementPrice stationSettlementPrice)
+    {
+        stationSettlementPrice.setCreateTime(DateUtils.getNowDate());
+        return stationSettlementPriceMapper.insertStationSettlementPrice(stationSettlementPrice);
+    }
+
+    /**
+     * 修改结算价格,司机价格
+     * 
+     * @param stationSettlementPrice 结算价格,司机价格
+     * @return 结果
+     */
+    @Override
+    public int updateStationSettlementPrice(StationSettlementPrice stationSettlementPrice)
+    {
+        stationSettlementPrice.setUpdateTime(DateUtils.getNowDate());
+        return stationSettlementPriceMapper.updateStationSettlementPrice(stationSettlementPrice);
+    }
+
+    /**
+     * 批量删除结算价格,司机价格
+     * 
+     * @param ids 需要删除的结算价格,司机价格ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationSettlementPriceByIds(Integer[] ids)
+    {
+        return stationSettlementPriceMapper.deleteStationSettlementPriceByIds(ids);
+    }
+
+    /**
+     * 删除结算价格,司机价格信息
+     * 
+     * @param id 结算价格,司机价格ID
+     * @return 结果
+     */
+    @Override
+    public int deleteStationSettlementPriceById(Integer id)
+    {
+        return stationSettlementPriceMapper.deleteStationSettlementPriceById(id);
+    }
+}

+ 132 - 5
yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -49,15 +49,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="xjNum"    column="xj_num"  />
         <result property="qyAmt"    column="qy_amt"  />
         <result property="cyAmt"    column="cy_amt"  />
+        <result property="sellAmt"    column="sell_amt"  />
+        <result property="sellDiscountAmt"    column="sell_discount_amt"  />
+        <result property="mobilePhone"    column="mobile_phone"  />
+        <result property="sellOilPrice"    column="sell_oil_price"  />
+        <result property="driverOilPrice"    column="driver_oil_price"  />
+        <result property="countNum"    column="count_num"  />
     </resultMap>
 
 
     <sql id="selectPayOrderVo">
         select order_id, order_no, station_id,d.dept_name as station_name, p.status,consumer_id, consumer, oil_gun,
-         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,
+         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,sell_oil_price,driver_oil_price,
           discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
            other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,
-            pay_date, created_date, order_type, car_no, customer_phone, customer_grade
+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade,sell_amt,sell_discount_amt
             from pay_order p join sys_dept d on p.station_id =d.dept_id
     </sql>
 
@@ -123,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <!--查询导出数据-->
     <select id="selectPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult">
-        select order_no,oil_name,oil_pirce,order_liters, amt,consumer,oil_personnel,oil_gun,pay_type,pay_way
+        select order_no,oil_name,oil_pirce,order_liters, amt,consumer,oil_personnel,oil_gun,pay_type,pay_way,sell_oil_price,driver_oil_price
         from pay_order
         <where>
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
@@ -179,12 +185,133 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by order_id desc
     </select>
+    <!--查询LNG导出数据-->
+    <select id="selectLNGPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT order_id,dept_name as station_name,oil_name,order_no,p.oil_pirce,order_liters,receivable_amt,sell_amt,sell_discount_amt,amt,discount_amt,pay_date,mobile_phone,sell_oil_price,driver_oil_price
+        from pay_order p
+        left join sys_dept d on d.dept_id =p.station_id
+        join app_user_info a on a.user_id=p.consumer_id
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
+            <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
+            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
+            <if test="oilType != null  and oilType != ''"> and oil_type = #{oilType}</if>
+            <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
+            <if test="amt != null "> and amt = #{amt}</if>
+            <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
+            <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
+            <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
+            <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
+            <if test="discountCoupon != null  and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
+            <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
+            <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
+            <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
+            <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
+            <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
+            <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
+            <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
+            <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
+            <if test="score != null "> and score = #{score}</if>
+            <if test="memberNo != null  and memberNo != ''"> and member_no = #{memberNo}</if>
+            <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
+            <if test="printCount != null "> and print_count = #{printCount}</if>
+            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
+            <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
+            <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by order_id desc
+    </select>
+
+    <select id="LNGDeptList" parameterType="PayOrder" resultMap="PayOrderResult">
+        SELECT dept_name as station_name,order_id,order_no,oil_name,p.oil_pirce,sell_oil_price,order_liters,receivable_amt,sell_amt,pay_date,
+        concat(LEFT (mobile_phone, 3), '****', RIGHT (mobile_phone, 4))  mobile_phone
+        from pay_order p
+        left join sys_dept d on d.dept_id =p.station_id
+        join app_user_info a on a.user_id=p.consumer_id
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and p.order_no = #{orderNo}</if>
+            <if test="stationId != null "> and p.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
+            <if test="consumerId != null "> and p.consumer_id = #{consumerId}</if>
+            <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
+            <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
+            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
+            <if test="oilType != null  and oilType != ''"> and oil_type = #{oilType}</if>
+            <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
+            <if test="amt != null "> and amt = #{amt}</if>
+            <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
+            <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
+            <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
+            <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
+            <if test="discountCoupon != null  and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
+            <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
+            <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
+            <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
+            <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
+            <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
+            <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
+            <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
+            <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
+            <if test="score != null "> and score = #{score}</if>
+            <if test="memberNo != null  and memberNo != ''"> and member_no = #{memberNo}</if>
+            <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
+            <if test="printCount != null "> and print_count = #{printCount}</if>
+            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
+            <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
+            <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
+            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="carNo != null  and carNo != ''"> and car_no = #{carNo}</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone like concat('%',#{customerPhone}, '%') </if>
+            <if test="customerGrade != null  and customerGrade != ''"> and customer_grade like concat('%',#{customerGrade}, '%') </if>
+            <if test="stationIdList != null ">
+                and p.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(p.created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by order_id desc
+    </select>
     <select id="selectPayOrderById" parameterType="Long" resultMap="PayOrderResult">
         <include refid="selectPayOrderVo"/>
         where order_id = #{orderId}
     </select>
     <select id="selectDaySources" parameterType="PayOrder" resultMap="PayOrderResult">
-        SELECT SUM(amt) as amt,sum(order_liters) as order_liters
+        SELECT SUM(amt) as amt,sum(order_liters) as order_liters,sum(sell_amt) as sell_amt,count(1) count_num
         from pay_order
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
@@ -207,7 +334,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
-        SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type
+        SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type,count(1) count_num
         from pay_order
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>

+ 82 - 0
yijia-station/src/main/resources/mapper/station/StationBalanceChangeMapper.xml

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

+ 89 - 0
yijia-station/src/main/resources/mapper/station/StationSettlementPriceAdjustMapper.xml

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

+ 102 - 0
yijia-station/src/main/resources/mapper/station/StationSettlementPriceMapper.xml

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

+ 9 - 0
yijia-system/src/main/java/com/yijia/system/service/ISysDeptService.java

@@ -199,4 +199,13 @@ public interface ISysDeptService
      * @return
      */
     public List<String> levelShareCardList(Long levelId);
+
+    /**
+     * 根据油站查询
+     */
+    public List<String> selectdeptInfoList(SysDept sysDept);
+
+    public boolean isLngInfoList();
+
+
 }

+ 45 - 0
yijia-system/src/main/java/com/yijia/system/service/impl/SysDeptServiceImpl.java

@@ -537,6 +537,51 @@ public class SysDeptServiceImpl implements ISysDeptService
         }
         return stringList;
     }
+    //查询当前人涉及到的站点信息
+    public List<String> selectdeptInfoList(SysDept deptinfo){
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        List<SysDept> deptList = new ArrayList<>();
+        List<String> stringList = new ArrayList<>();
+        if(currentUser.getUser().getDept().getJiBie()!=null && currentUser.getUser().getDept().getJiBie() == 0 ){
+            //顶级 查询处所有的 集团和油站id
+            SysDept dept =new SysDept();
+            dept.setJiBie(2);
+            deptList =deptMapper.selectDeptList(dept);
+        }else if(currentUser.getUser().getDept().getJiBie()!=null && currentUser.getUser().getDept().getJiBie() == 1){
+            //查询集团及站点
+            SysDept dept =new SysDept();
+            dept.setParentId(currentUser.getUser().getDeptId());
+            deptList =deptMapper.selectDeptList(dept);
+        }else{
+            SysDept dept =new SysDept();
+            dept.setDeptId(currentUser.getUser().getDeptId());
+            dept.setParentId(currentUser.getUser().getDept().getParentId());
+            deptList.add(dept);
+        }
+        if(deptList!=null && deptList.size()>0){
+            for(SysDept sysDept:deptList){
+                stringList.add(sysDept.getDeptId()+"");
+            }
+        }
+        return stringList;
+    }
+
+    @Override
+    public boolean isLngInfoList() {
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        boolean flag =false ;
+        if(currentUser.getUser().getDept().getJiBie()==1){
+            if(currentUser.getUser().getDept().getIsLngFlag()!=null &&currentUser.getUser().getDept().getIsLngFlag().equals("1") ){
+                flag = true;
+            }
+        }else if(currentUser.getUser().getDept().getJiBie()==2){
+            SysDept dept =selectDeptById(currentUser.getUser().getDeptId());
+            if(dept!=null &&dept.getIsLngFlag()!=null && dept.getIsLngFlag().equals("1")){
+                flag = true;
+            }
+        }
+        return flag;
+    }
 
     /**
      * 查询代理所有的集团

+ 5 - 1
yijia-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="couponFlag"    column="coupon_flag"    />
 		<result property="labelFlag"    column="label_flag"    />
 		<result property="printDeviceType"    column="print_device_type" />
+		<result property="balance"    column="balance" />
 	</resultMap>
 
 	<sql id="selectDeptVo">
@@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         d.del_flag, d.create_by, d.create_time ,d.ji_bie, d.dept_address, d.oil_gun_num, d.station_pic, d.station_longitude,
         d.station_latitude, d.mno, discount_setting,card_enabled_flag,d.app_id, d.app_secret,gzh_app_id,gzh_app_secret,ali_app_id,gzh_app_secret
         ali_app_id,ali_public_key,ali_private_key,ali_encrypt_key,image1,image2,image3,image4,image5,ws_print_flag,print_setting,notice,integral_print_flag,
-        d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type
+        d.integral_flag,d.integral_rule_flag,d.card_rule_flag,d.coupon_flag,d.label_flag,d.print_device_type,d.balance
         from sys_dept d
     </sql>
 
@@ -317,6 +318,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="couponFlag != null">coupon_flag,</if>
 			<if test="labelFlag != null">label_flag,</if>
 			<if test="printDeviceType != null">print_device_type,</if>
+			<if test="balance != null">balance,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -361,6 +363,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="couponFlag != null">#{couponFlag},</if>
 			<if test="labelFlag != null">#{labelFlag},</if>
 			<if test="printDeviceType != null">#{printDeviceType},</if>
+			<if test="balance != null">#{balance},</if>
  			sysdate()
  		)
 	</insert>
@@ -409,6 +412,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="couponFlag != null">coupon_flag= #{couponFlag},</if>
 			<if test="labelFlag != null">label_flag= #{labelFlag},</if>
 			<if test="printDeviceType != null">print_device_type= #{printDeviceType},</if>
+			<if test="balance != null">balance= #{balance},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}

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

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