MS-QJVSRANLTYEO\Administrator 4 лет назад
Родитель
Сommit
72d6cada4e

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

@@ -70,6 +70,7 @@ public class PayOrderController extends BaseController
             List<String> list = Arrays.asList(selectDeptid.split(","));
             payOrder.setStationIdList(list);
         }
+        payOrder.setOrderType("1");
         List<PayOrder> list = payOrderService.selectPayOrderList(payOrder);
         return getTable(list);
     }
@@ -90,6 +91,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
         }
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         PayOrder order = payOrderService.selectDaySources(payOrder);
         return AjaxResult.success(order);
     }
@@ -110,6 +112,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
         }
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder> orderList = payOrderService.selectOilTypeSources(payOrder);
         return getTable(orderList);
     }
@@ -130,6 +133,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
         }
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         PayOrder order = payOrderService.selectOverViewData(payOrder);
         return AjaxResult.success(order);
     }
@@ -150,6 +154,7 @@ public class PayOrderController extends BaseController
         //默认当前登陆人的ID 5冯总油站
         startPage();
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.selectDayReport(payOrder);
         return getDataTable(orderList);
     }
@@ -170,6 +175,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
         }
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
        List<PayOrder>  orderList = payOrderService.selectDayReport(payOrder);
         return getTable(orderList);
     }
@@ -188,6 +194,8 @@ public class PayOrderController extends BaseController
             List<String> list = Arrays.asList(selectDeptid.split(","));
             payOrder.setStationIdList(list);
         }
+        payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder> list = payOrderService.selectPayOrderExport(payOrder);
         ExcelUtil<PayOrder> util = new ExcelUtil<PayOrder>(PayOrder.class);
 
@@ -222,6 +230,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("92#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -242,6 +251,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("95#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -262,6 +272,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("97#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -283,6 +294,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("-20#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -303,6 +315,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("0#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -323,6 +336,7 @@ public class PayOrderController extends BaseController
         }
         payOrder.setOilName("-10#");
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listQydata(payOrder);
         return getTable(orderList);
     }
@@ -342,6 +356,7 @@ public class PayOrderController extends BaseController
             payOrder.setStationIdList(list);
         }
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         List<PayOrder>  orderList = payOrderService.listXdata(payOrder);
         return getTable(orderList);
     }
@@ -355,6 +370,7 @@ public class PayOrderController extends BaseController
         LoginUser currentUser = SecurityUtils.getLoginUser();
         payOrder.setStationId(currentUser.getUser().getDeptId());
         payOrder.setStatus("1");
+        payOrder.setOrderType("1");
         return  AjaxResult.success(payOrderService.getPayOrderInfoMin(payOrder));
     }
     /**

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

@@ -10,13 +10,9 @@ import java.util.*;
 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.PayOrder;
-import com.yijia.station.domain.StationClassesSummary;
-import com.yijia.station.domain.StationDeviceManage;
+import com.yijia.station.domain.*;
 import com.yijia.station.mapper.PayOrderMapper;
-import com.yijia.station.service.IPayOrderService;
-import com.yijia.station.service.IStationClassesSummaryService;
-import com.yijia.station.service.IStationDeviceManageService;
+import com.yijia.station.service.*;
 import com.yijia.station.utils.FeiEPrinterUtil;
 import com.yijia.system.service.ISysUserService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -33,8 +29,6 @@ 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.StationClassStructure;
-import com.yijia.station.service.IStationClassStructureService;
 import com.yijia.common.utils.poi.ExcelUtil;
 import com.yijia.common.core.page.TableDataInfo;
 
@@ -58,6 +52,8 @@ public class StationClassStructureController extends BaseController
     private IStationDeviceManageService stationDeviceManageService;
     @Autowired
     private ISysUserService sysUserService;
+    @Autowired
+    private IStationPayService stationPayService;
     /**
      * 查询班结管理列表
      */
@@ -136,7 +132,6 @@ public class StationClassStructureController extends BaseController
         return AjaxResult.success(stationClassStructureService.selectStationClassStructureById(id));
     }
 
-
     /**
      * 新增班结管理
      */
@@ -407,6 +402,7 @@ public class StationClassStructureController extends BaseController
         StationClassStructure scs =new StationClassStructure();
         scs.setClassStructureNo(no);
         scs.setStationId(stationId);
+        scs.setOrderType("1"); //油品
         //汇总班结数据将汇总的数据插入到汇总数据中
         StationClassStructure stationclass = stationClassStructureService.selectSummyClassStructure(scs);
         if(stationclass!=null){
@@ -463,141 +459,162 @@ public class StationClassStructureController extends BaseController
             stationClassesSummary.setClassesMan(stationclass.getClassStructureMan());
             i=stationClassesSummaryService.insertStationClassesSummary(stationClassesSummary);
             //班结成功,打印小票
-            //查询班结小票数据
-            StationClassStructure classStructure= new StationClassStructure();
-            classStructure.setClassStructureNo(no);
-            classStructure.setStationId(stationId);
-            List<StationClassStructure>  list= stationClassStructureService.listOilStructure(classStructure);
-            //支付方式汇总数据
-            List<StationClassStructure>  paylist= stationClassStructureService.listPayStructure(classStructure);
-            //查询出小票数据
-            String content;
-            content = "<CB>班结小票</CB><BR>";
-            content += "--------------------------------<BR>";
-            if(list!=null && list.size()>0 && paylist !=null && paylist.size()>0){
-                if(list.get(0).getClassStartDate()!=null){
-                    content += "开始时间:"+dateFormat.format(list.get(0).getClassStartDate())+"  <BR>";
-                }else{
-                    content += "开始时间: <BR>";
-                }
-                content += "班结时间:"+dateFormat.format(list.get(0).getClassStructureDate())+" <BR>";
-                content += "油品  笔    升数      金额<BR>";
+            //根据油站查询是否打印班结小票
+            StationPay  stationPay =new StationPay();
+            stationPay.setStationId(stationId);
+            StationPay pay = stationPayService.selectStationPayOne(stationPay);
+            if(pay!=null && pay.getWsPrintFlag().equals("1")){
+                //查询班结小票数据
+                StationClassStructure classStructure= new StationClassStructure();
+                classStructure.setClassStructureNo(no);
+                classStructure.setStationId(stationId);
+                classStructure.setOrderType("1");// 油品
+                List<StationClassStructure>  list= stationClassStructureService.listOilStructure(classStructure);
+                //支付方式汇总数据
+                List<StationClassStructure>  paylist= stationClassStructureService.listPayStructure(classStructure);
+                //汇总非油品
+                StationClassStructure selectNoOil =new StationClassStructure();
+                selectNoOil.setClassStructureNo(no);
+                selectNoOil.setStationId(stationId);
+                selectNoOil.setOrderType("2");// 非油品
+                StationClassStructure search = stationClassStructureService.selectSummyClassStructure(selectNoOil);
+                //查询出小票数据
+                String content;
+                content = "<CB>班结小票</CB><BR>";
                 content += "--------------------------------<BR>";
-
-                BigDecimal sumAmt = new BigDecimal(0);
-                BigDecimal liters = new BigDecimal(0);
-                BigDecimal coupon = new BigDecimal(0);
-                BigDecimal ysAmt =  new BigDecimal(0);
-                BigDecimal dzAmt =  new BigDecimal(0);
-                int num = 0;
-                int pageNum=0;
-                for(StationClassStructure str : list){
-                    String orderLiter="";
-                    String amt="";
-                    String receivableAmt="";
-                    String orderno="";
-                    //打印小票数量
-                    if(str.getPrintNum()!=null){
-                        pageNum += str.getPrintNum();
-                    }
-                    if( str.getOrderLiters()==null){
-                        str.setOrderLiters(BigDecimal.valueOf(0));
-                        orderLiter="0";
-                    }else{
-                        liters=liters.add(str.getOrderLiters());
-                        orderLiter= str.getOrderLiters().toString();
-                    }
-                    //实收金额
-                    if( str.getAmt()==null){
-                        str.setAmt(BigDecimal.valueOf(0));
-                        amt="0";
-                    }else{
-                        sumAmt=sumAmt.add(str.getAmt());
-                        amt=str.getAmt().toString();
-                    }
-                    //应付金额
-                    if( str.getReceivableAmt()==null){
-                        str.setReceivableAmt(BigDecimal.valueOf(0));
-                        receivableAmt="0";
+                if(list!=null && list.size()>0 && paylist !=null && paylist.size()>0 ){
+                    if(list.get(0).getClassStartDate()!=null){
+                        content += "开始时间:"+dateFormat.format(list.get(0).getClassStartDate())+"  <BR>";
                     }else{
-                        ysAmt=ysAmt.add(str.getReceivableAmt());
-                        receivableAmt=str.getReceivableAmt().toString();
+                        content += "开始时间: <BR>";
                     }
-                    //到款金额
-                    if( str.getReceivedAmt()==null){
-                        str.setReceivedAmt(BigDecimal.valueOf(0));
-                    }else{
-                        dzAmt = dzAmt.add(str.getReceivedAmt());
-                    }
-                    //优惠金额
-                    if( str.getDiscountAmt()==null){
-                        str.setDiscountAmt(BigDecimal.valueOf(0));
-                    }else{
-                        coupon=coupon.add(str.getDiscountAmt());
+                    content += "班结时间:"+dateFormat.format(list.get(0).getClassStructureDate())+" <BR>";
+                    content += "油品  笔    升数      金额<BR>";
+                    content += "--------------------------------<BR>";
+
+                    BigDecimal sumAmt = new BigDecimal(0);
+                    BigDecimal liters = new BigDecimal(0);
+                    BigDecimal coupon = new BigDecimal(0);
+                    BigDecimal ysAmt =  new BigDecimal(0);
+                    BigDecimal dzAmt =  new BigDecimal(0);
+                    int num = 0;
+                    int pageNum=0;
+                    for(StationClassStructure str : list){
+                        String orderLiter="";
+                        String amt="";
+                        String receivableAmt="";
+                        String orderno="";
+                        //打印小票数量
+                        if(str.getPrintNum()!=null){
+                            pageNum += str.getPrintNum();
+                        }
+                        if( str.getOrderLiters()==null){
+                            str.setOrderLiters(BigDecimal.valueOf(0));
+                            orderLiter="0";
+                        }else{
+                            liters=liters.add(str.getOrderLiters());
+                            orderLiter= str.getOrderLiters().toString();
+                        }
+                        //实收金额
+                        if( str.getAmt()==null){
+                            str.setAmt(BigDecimal.valueOf(0));
+                            amt="0";
+                        }else{
+                            sumAmt=sumAmt.add(str.getAmt());
+                            amt=str.getAmt().toString();
+                        }
+                        //应付金额
+                        if( str.getReceivableAmt()==null){
+                            str.setReceivableAmt(BigDecimal.valueOf(0));
+                            receivableAmt="0";
+                        }else{
+                            ysAmt=ysAmt.add(str.getReceivableAmt());
+                            receivableAmt=str.getReceivableAmt().toString();
+                        }
+                        //到款金额
+                        if( str.getReceivedAmt()==null){
+                            str.setReceivedAmt(BigDecimal.valueOf(0));
+                        }else{
+                            dzAmt = dzAmt.add(str.getReceivedAmt());
+                        }
+                        //优惠金额
+                        if( str.getDiscountAmt()==null){
+                            str.setDiscountAmt(BigDecimal.valueOf(0));
+                        }else{
+                            coupon=coupon.add(str.getDiscountAmt());
+                        }
+                        //订单数量
+                        if( str.getOrderNo()==null){
+                            str.setOrderNo(String.valueOf(0));
+                        }else{
+                            num= num+Integer.parseInt(str.getOrderNo());
+                            orderno=str.getOrderNo().toString();
+                        }
+                        String oilname=addSpace(str.getOilName(),4);
+                        orderno=addSpace(orderno,3);
+                        orderLiter=addSpace(orderLiter,8);
+                        receivableAmt=addSpace(receivableAmt,8);
+                        content += oilname+"  "+orderno+"  "+orderLiter+"  "+receivableAmt+"<BR>";
                     }
-                    //订单数量
-                    if( str.getOrderNo()==null){
-                        str.setOrderNo(String.valueOf(0));
-                    }else{
-                        num= num+Integer.parseInt(str.getOrderNo());
-                        orderno=str.getOrderNo().toString();
+                    content += "--------------------------------<BR>";
+                    String sumorder=addSpace(String.valueOf(num),3);
+                    String oilliters=addSpace(String.valueOf(liters),9);
+                    String oilYsAmt=addSpace(String.valueOf(ysAmt),9);
+                    content += "合计  "+sumorder +"  "+liters +"  "+oilYsAmt+"<BR>";
+                    content += " <BR>";
+                    //按支付方式
+                    content += "支付方式  笔    升数      金额<BR>";
+                    for(StationClassStructure sc : paylist){
+                        String orderno= sc.getOrderNo();
+                        orderno =addSpace(orderno,3);
+                        String orderLiter="";
+                        if(sc.getOrderLiters()!=null){
+                            orderLiter = sc.getOrderLiters().toString();
+                        }else{
+                            sc.setOrderLiters(BigDecimal.valueOf(0));
+                            orderLiter= sc.getOrderLiters().toString();
+                        }
+                        orderLiter =addSpace(orderLiter,8);
+                        String receivableAmt="";
+                        if(sc.getReceivableAmt()!=null){
+                            receivableAmt = sc.getReceivableAmt().toString();
+                        }else{
+                            sc.setReceivableAmt(BigDecimal.valueOf(0));
+                            receivableAmt= sc.getReceivableAmt().toString();
+                        }
+                        content += sc.getPayType()+"  "+orderno+"  "+orderLiter+"  "+receivableAmt+"<BR>";
                     }
-                    String oilname=addSpace(str.getOilName(),4);
-                    orderno=addSpace(orderno,3);
-                    orderLiter=addSpace(orderLiter,8);
-                    receivableAmt=addSpace(receivableAmt,8);
-                    content += oilname+"  "+orderno+"  "+orderLiter+"  "+receivableAmt+"<BR>";
-                }
-                content += "--------------------------------<BR>";
-                String sumorder=addSpace(String.valueOf(num),3);
-                String oilliters=addSpace(String.valueOf(liters),9);
-                String oilYsAmt=addSpace(String.valueOf(ysAmt),9);
-                content += "合计  "+sumorder +"  "+liters +"  "+oilYsAmt+"<BR>";
-                content += " <BR>";
-                //按支付方式
-                content += "支付方式  笔    升数      金额<BR>";
-                for(StationClassStructure sc : paylist){
-                    String orderno= sc.getOrderNo();
-                    orderno =addSpace(orderno,3);
-                    String orderLiter="";
-                    if(sc.getOrderLiters()!=null){
-                        orderLiter = sc.getOrderLiters().toString();
-                    }else{
-                        sc.setOrderLiters(BigDecimal.valueOf(0));
-                        orderLiter= sc.getOrderLiters().toString();
+                    content += "小票张数: "+pageNum+" 张<BR>";
+                    content += "班结金额: "+ysAmt+" 元<BR>";
+                    content += "优惠总额: "+coupon+" 元<BR>";
+                    content += "实际支付: "+sumAmt+" 元<BR>";
+                    content += "到款金额: "+dzAmt+"元<BR>";
+                    if(pay.getIsNoOil()!=null && pay.getIsNoOil().equals("1")){
+                        content += "--------------------------------<BR>";
+                        if( search.getAmt()==null){
+                            search.setAmt(BigDecimal.valueOf(0));
+                        }
+                        content +="非油总额: "+search.getAmt()+"元<BR>";
                     }
-                    orderLiter =addSpace(orderLiter,8);
-                    String receivableAmt="";
-                    if(sc.getReceivableAmt()!=null){
-                        receivableAmt = sc.getReceivableAmt().toString();
-                    }else{
-                        sc.setReceivableAmt(BigDecimal.valueOf(0));
-                        receivableAmt= sc.getReceivableAmt().toString();
+                    content += "班结人: "+list.get(0).getClassStructureMan()+"<BR>";
+                    content += "<BR>";
+                    content += "--------------------------------<BR>";
+                    content += "<BR>";
+                    //查询打印机信息
+                    Map params  =new HashMap();
+                    params.put("stationId", list.get(0).getStationId());
+                    params.put("deviceType", "3");
+                    Map mp  = stationDeviceManageService.getPrinterSnByStationId(params);
+                    if(mp!=null&&mp.containsKey("device_no") && mp.get("device_no")!= null && mp.get("device_no")!=""){
+                        String sn = mp.get("device_no").toString();
+                        FeiEPrinterUtil.printReceipt(sn, content);
+                    }else {
+                        logger.info("请正确配置打印机");
+                        i=2;
                     }
-                    content += sc.getPayType()+"  "+orderno+"  "+orderLiter+"  "+receivableAmt+"<BR>";
-                }
-                content += "小票张数: "+pageNum+" 张<BR>";
-                content += "班结金额: "+ysAmt+" 元<BR>";
-                content += "优惠总额: "+coupon+" 元<BR>";
-                content += "实际支付: "+sumAmt+" 元<BR>";
-                content += "到款金额: "+dzAmt+"元<BR>";
-                content += "班结人: "+list.get(0).getClassStructureMan()+"<BR>";
-                content += "<BR>";
-                content += "--------------------------------<BR>";
-                content += "<BR>";
-                //查询打印机信息
-                Map params  =new HashMap();
-                params.put("stationId", list.get(0).getStationId());
-                params.put("deviceType", "3");
-                Map mp  = stationDeviceManageService.getPrinterSnByStationId(params);
-                if(mp!=null&&mp.containsKey("device_no") && mp.get("device_no")!= null && mp.get("device_no")!=""){
-                    String sn = mp.get("device_no").toString();
-                    FeiEPrinterUtil.printReceipt(sn, content);
-                }else {
-                    logger.info("请正确配置打印机");
-                    i=2;
                 }
             }
+
         }
         return toAjaxee(i);
     }

+ 11 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationOilPriceController.java

@@ -125,4 +125,15 @@ public class StationOilPriceController extends BaseController
     {
         return toAjax(stationOilPriceService.deleteStationOilPriceByIds(oilPriceIds));
     }
+
+    /**
+     * 查询当前油站对应的油品名称
+     */
+    @PreAuthorize("@ss.hasPermi('station:price:oilNameList')")
+    @GetMapping("/oilNameList")
+    public TableDataInfo oilNameList(StationOilPrice stationOilPrice)
+    {
+        List<StationOilPrice> list = stationOilPriceService.selectStationOilPriceList(stationOilPrice);
+        return getTable(list);
+    }
 }

+ 2 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationPayController.java

@@ -5,6 +5,8 @@ import java.util.List;
 
 import com.yijia.common.core.domain.model.LoginUser;
 import com.yijia.common.utils.SecurityUtils;
+import com.yijia.station.domain.StationPic;
+import com.yijia.station.service.IStationPicService;
 import com.yijia.system.service.ISysUserService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;

+ 15 - 1
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationOilGun.java

@@ -14,7 +14,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 油枪管理对象 station_oil_gun
  * 
  * @author yijia
- * @date 2021-01-10
+ * @date 2021-02-23
  */
 public class StationOilGun extends BaseEntity
 {
@@ -65,6 +65,10 @@ public class StationOilGun extends BaseEntity
         this.stationIdList = stationIdList;
     }
 
+    /** 油枪类型(1油枪 2非油枪) */
+    @Excel(name = "油枪类型", readConverterExp = "1=油枪,2=非油枪")
+    private String oilGunType;
+
     public void setOilGunId(Long oilGunId) 
     {
         this.oilGunId = oilGunId;
@@ -137,6 +141,15 @@ public class StationOilGun extends BaseEntity
     {
         return status;
     }
+    public void setOilGunType(String oilGunType) 
+    {
+        this.oilGunType = oilGunType;
+    }
+
+    public String getOilGunType() 
+    {
+        return oilGunType;
+    }
 
     @Override
     public String toString() {
@@ -149,6 +162,7 @@ public class StationOilGun extends BaseEntity
             .append("stationName", getStationName())
             .append("date", getDate())
             .append("status", getStatus())
+            .append("oilGunType", getOilGunType())
             .toString();
     }
 }

+ 28 - 3
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationPay.java

@@ -11,7 +11,7 @@ import java.util.List;
  * 油站支付设置对象 station_pay
  * 
  * @author yijia
- * @date 2021-01-26
+ * @date 2021-02-22
  */
 public class StationPay extends BaseEntity
 {
@@ -82,7 +82,22 @@ public class StationPay extends BaseEntity
         this.stationIdList = stationIdList;
     }
 
-    public void setPayId(Long payId)
+    /** 是否开启非油品(1是,2否) */
+    @Excel(name = "是否开启非油品", readConverterExp = "1=是,2否")
+    private String isNoOil;
+
+    private List<StationPic> imgFileList;
+
+    public List<StationPic> getImgFileList() {
+        return imgFileList;
+    }
+
+    public void setImgFileList(List<StationPic> imgFileList) {
+        this.imgFileList = imgFileList;
+    }
+
+
+    public void setPayId(Long payId) 
     {
         this.payId = payId;
     }
@@ -195,7 +210,7 @@ public class StationPay extends BaseEntity
     {
         this.activityPic = activityPic;
     }
-    public String getPrintSetting() 
+    public String getPrintSetting()
     {
         return printSetting;
     }
@@ -208,6 +223,15 @@ public class StationPay extends BaseEntity
     {
         return discountSetting;
     }
+    public void setIsNoOil(String isNoOil) 
+    {
+        this.isNoOil = isNoOil;
+    }
+
+    public String getIsNoOil() 
+    {
+        return isNoOil;
+    }
 
     @Override
     public String toString() {
@@ -226,6 +250,7 @@ public class StationPay extends BaseEntity
             .append("wsPrintFlag", getWsPrintFlag())
             .append("printSetting", getPrintSetting())
             .append("discountSetting", getDiscountSetting())
+            .append("isNoOil", getIsNoOil())
             .toString();
     }
 }

+ 1 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/mapper/StationPayMapper.java

@@ -58,4 +58,5 @@ public interface StationPayMapper
      * @return 结果
      */
     public int deleteStationPayByIds(Long[] payIds);
+
 }

+ 39 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationPayServiceImpl.java

@@ -1,6 +1,9 @@
 package com.yijia.station.service.impl;
 
 import java.util.List;
+
+import com.yijia.station.domain.StationPic;
+import com.yijia.station.mapper.StationPicMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.yijia.station.mapper.StationPayMapper;
@@ -18,6 +21,8 @@ public class StationPayServiceImpl implements IStationPayService
 {
     @Autowired
     private StationPayMapper stationPayMapper;
+    @Autowired
+    private StationPicMapper stationPicMapper;
 
     /**
      * 查询油站支付设置
@@ -52,7 +57,18 @@ public class StationPayServiceImpl implements IStationPayService
     @Override
     public int insertStationPay(StationPay stationPay)
     {
-        return stationPayMapper.insertStationPay(stationPay);
+        int i=0;
+        List<StationPic> list= stationPay.getImgFileList();
+        i =stationPayMapper.insertStationPay(stationPay);
+        if(stationPay.getImgFileList()!=null && stationPay.getImgFileList().size()>0){
+            for(StationPic pic :list){
+                pic.setParentId(stationPay.getPayId());
+                pic.setStationId(stationPay.getStationId());
+                pic.setStationName(stationPay.getStationName());
+                stationPicMapper.insertStationPic(pic);
+            }
+        }
+        return i;
     }
 
     /**
@@ -64,7 +80,23 @@ public class StationPayServiceImpl implements IStationPayService
     @Override
     public int updateStationPay(StationPay stationPay)
     {
-        return stationPayMapper.updateStationPay(stationPay);
+
+        int i=0;
+        List<StationPic> list= stationPay.getImgFileList();
+        i =stationPayMapper.updateStationPay(stationPay);
+        //先删除图片
+        StationPic stationPic =new StationPic();
+        stationPic.setParentId(stationPay.getPayId());
+        stationPicMapper.deleteStationPay(stationPic);
+        if(stationPay.getImgFileList()!=null && stationPay.getImgFileList().size()>0){
+            for(StationPic pic :list){
+                pic.setParentId(stationPay.getPayId());
+                pic.setStationId(stationPay.getStationId());
+                pic.setStationName(stationPay.getStationName());
+                stationPicMapper.insertStationPic(pic);
+            }
+        }
+        return i;
     }
 
     /**
@@ -110,6 +142,11 @@ public class StationPayServiceImpl implements IStationPayService
             pay.setStationId(list.get(0).getStationId());
             pay.setStationName(list.get(0).getStationName());
             pay.setDiscountSetting(list.get(0).getDiscountSetting());
+            StationPic stationPic =new StationPic();
+            stationPic.setStationId(pay.getStationId());
+            stationPic.setParentId(pay.getPayId());
+            List<StationPic> stationPicList =stationPicMapper.selectStationPicList(stationPic);
+            pay.setImgFileList(stationPicList);
         }
         return pay;
     }

+ 38 - 38
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/task/SaticScheduleTask.java

@@ -29,42 +29,42 @@ public class SaticScheduleTask {
     //3.添加定时任务
    // @Scheduled(cron = "0/5 * * * * ?")
     //或直接指定时间间隔,例如:5秒 5000
-    @Scheduled(fixedRate=5000)
-    private void configureTasks() throws ParseException {
-        //获取当前时间 yyyy-MM-dd HH:mm:ss
-        String newdate = DateUtils.getTime();
-        System.err.println("执行静态定时任务时间: " + newdate);
-        //查询油品调价列表 查询出未调价的信息
-        StationOilPriceAdjust stationOilPriceAdjust =new StationOilPriceAdjust();
-        stationOilPriceAdjust.setStatus("1");
-        stationOilPriceAdjust.setTakeEffectStatus("2");
-        stationOilPriceAdjust.setEndTime(newdate);
-        List<StationOilPriceAdjust>  oilPriceAdjustList=stationOilPriceAdjustService.selectStationOilPriceAdjustList(stationOilPriceAdjust);
-        //循环查看 调价的生效时间是否和当前时间相符
-        for(StationOilPriceAdjust adjust: oilPriceAdjustList ){
-            //修改油品价格根据油品价格id
-            StationOilPrice oilPrice=new StationOilPrice();
-            oilPrice.setOilPriceId(adjust.getOilPriceId());
-            oilPrice.setOilPrice(adjust.getOilAdjustPrice());
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            Date sdate = sdf.parse(newdate);
-            oilPrice.setDate(sdate);
-            stationOilPriceService.updateStationOilPrice(oilPrice);
-            //修改油枪信息中的价格
-            StationOilGun gun =new StationOilGun();
-            gun.setStationId(adjust.getStationId());
-            gun.setOilName(adjust.getOilName());
-            List<StationOilGun> listGun = stationOilGunService.selectStationOilGunList(gun);
-            for(StationOilGun oilGun: listGun ){
-                StationOilGun stationOilGun =new StationOilGun();
-                stationOilGun.setOilPrice(adjust.getOilAdjustPrice());
-                stationOilGun.setOilGunId(oilGun.getOilGunId());
-                stationOilGunService.updateStationOilGun(stationOilGun);
-            }
-            StationOilPriceAdjust priceAdjust=new StationOilPriceAdjust();
-            priceAdjust.setStatus("2");
-            priceAdjust.setAdjustPriceId(adjust.getAdjustPriceId());
-            stationOilPriceAdjustService.updateStationOilPriceAdjust(priceAdjust);
-        }
-    }
+   // @Scheduled(fixedRate=5000)
+//    private void configureTasks() throws ParseException {
+//        //获取当前时间 yyyy-MM-dd HH:mm:ss
+//        String newdate = DateUtils.getTime();
+//        System.err.println("执行静态定时任务时间: " + newdate);
+//        //查询油品调价列表 查询出未调价的信息
+//        StationOilPriceAdjust stationOilPriceAdjust =new StationOilPriceAdjust();
+//        stationOilPriceAdjust.setStatus("1");
+//        stationOilPriceAdjust.setTakeEffectStatus("2");
+//        stationOilPriceAdjust.setEndTime(newdate);
+//        List<StationOilPriceAdjust>  oilPriceAdjustList=stationOilPriceAdjustService.selectStationOilPriceAdjustList(stationOilPriceAdjust);
+//        //循环查看 调价的生效时间是否和当前时间相符
+//        for(StationOilPriceAdjust adjust: oilPriceAdjustList ){
+//            //修改油品价格根据油品价格id
+//            StationOilPrice oilPrice=new StationOilPrice();
+//            oilPrice.setOilPriceId(adjust.getOilPriceId());
+//            oilPrice.setOilPrice(adjust.getOilAdjustPrice());
+//            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//            Date sdate = sdf.parse(newdate);
+//            oilPrice.setDate(sdate);
+//            stationOilPriceService.updateStationOilPrice(oilPrice);
+//            //修改油枪信息中的价格
+//            StationOilGun gun =new StationOilGun();
+//            gun.setStationId(adjust.getStationId());
+//            gun.setOilName(adjust.getOilName());
+//            List<StationOilGun> listGun = stationOilGunService.selectStationOilGunList(gun);
+//            for(StationOilGun oilGun: listGun ){
+//                StationOilGun stationOilGun =new StationOilGun();
+//                stationOilGun.setOilPrice(adjust.getOilAdjustPrice());
+//                stationOilGun.setOilGunId(oilGun.getOilGunId());
+//                stationOilGunService.updateStationOilGun(stationOilGun);
+//            }
+//            StationOilPriceAdjust priceAdjust=new StationOilPriceAdjust();
+//            priceAdjust.setStatus("2");
+//            priceAdjust.setAdjustPriceId(adjust.getAdjustPriceId());
+//            stationOilPriceAdjustService.updateStationOilPriceAdjust(priceAdjust);
+//        }
+//    }
 }

+ 16 - 6
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -107,12 +107,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
             </if>
             <if test="stationIdList != null ">
-                and station_id in
-                <foreach item="item" index="index" collection="stationIdList"
-                         open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
+            and station_id in
+            <foreach item="item" index="index" collection="stationIdList"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
         </where>
         order by order_id desc
     </select>
@@ -180,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -202,6 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -225,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="createdDate != null "> and created_date = #{createdDate}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -249,6 +252,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -267,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="oilName != null "> and oil_name = #{oilName}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
@@ -291,6 +296,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
             </if>
@@ -315,6 +321,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
             </if>
@@ -338,6 +345,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
             </if>
@@ -354,6 +362,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
                 AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
             </if>
@@ -373,6 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <if test="stationId != null "> and station_id = #{stationId}</if>
                 <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
                 <if test="status != null  and status != ''"> and status = #{status}</if>
+                <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             </where>
         )
     </select>

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

@@ -111,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null "> and a.station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
         GROUP BY a.oil_personnel
     </select>
@@ -131,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             SELECT MAX(id) from station_class_structure
             <where>
                 <if test="stationId != null "> and station_id = #{stationId}</if>
+                <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             </where>
 		)
     </select>
@@ -145,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="likeClassStructureNo != null  and likeClassStructureNo != ''">  and class_structure_no like concat( #{likeClassStructureNo}, '%') </if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
     </select>
     <!--根据班次号汇总班结数据-->
@@ -157,10 +160,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
         GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man
     </select>
-
     <!--按员工/支付方式汇总数据-->
     <select id="listPersonnelPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
         SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
@@ -168,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
         GROUP BY oil_personnel
     </select>
@@ -179,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <where>
                 <if test="classStructureMan != null and classStructureMan != ''"> and class_structure_man = #{classStructureMan}</if>
                 <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+                <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             </where>
         )
     </select>
@@ -189,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
+            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
 		GROUP BY pay_type,dict_label
     </select>

+ 6 - 8
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationOilGunMapper.xml

@@ -13,10 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationName"    column="station_name"    />
         <result property="date"    column="date"    />
         <result property="status"    column="status"    />
+        <result property="oilGunType"    column="oil_gun_type"    />
     </resultMap>
 
     <sql id="selectStationOilGunVo">
-        select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status from station_oil_gun
+        select oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status, oil_gun_type from station_oil_gun
     </sql>
 
     <select id="selectStationOilGunList" parameterType="StationOilGun" resultMap="StationOilGunResult">
@@ -29,13 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="date != null "> and date = #{date}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="stationIdList != null ">
-                and station_id in
-                <foreach item="item" index="index" collection="stationIdList"
-                         open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
+            <if test="oilGunType != null  and oilGunType != ''"> and oil_gun_type = #{oilGunType}</if>
         </where>
     </select>
     
@@ -54,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationName != null">station_name,</if>
             <if test="date != null">date,</if>
             <if test="status != null">status,</if>
+            <if test="oilGunType != null">oil_gun_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="oilGunNo != null">#{oilGunNo},</if>
@@ -63,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationName != null">#{stationName},</if>
             <if test="date != null">#{date},</if>
             <if test="status != null">#{status},</if>
+            <if test="oilGunType != null">#{oilGunType},</if>
          </trim>
     </insert>
 
@@ -76,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stationName != null">station_name = #{stationName},</if>
             <if test="date != null">date = #{date},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="oilGunType != null">oil_gun_type = #{oilGunType},</if>
         </trim>
         where oil_gun_id = #{oilGunId}
     </update>

+ 6 - 8
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationPayMapper.xml

@@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="wsPrintFlag"    column="ws_print_flag"    />
         <result property="printSetting"    column="print_setting"    />
         <result property="discountSetting"    column="discount_setting"    />
+        <result property="isNoOil"    column="is_no_oil"    />
     </resultMap>
 
     <sql id="selectStationPayVo">
-        select pay_id, pay_mode, station_id, station_name, image_photos_flag, card_enabled_flag, activity_pic, preferential_way_share_flag, other_preferential_way, pay_print_num, pay_callback_page, ws_print_flag, print_setting, discount_setting from station_pay
+        select pay_id, pay_mode, station_id, station_name, image_photos_flag, card_enabled_flag, activity_pic, preferential_way_share_flag, other_preferential_way, pay_print_num, pay_callback_page, ws_print_flag, print_setting, discount_setting, is_no_oil from station_pay
     </sql>
 
     <select id="selectStationPayList" parameterType="StationPay" resultMap="StationPayResult">
@@ -41,13 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wsPrintFlag != null  and wsPrintFlag != ''"> and ws_print_flag = #{wsPrintFlag}</if>
             <if test="printSetting != null  and printSetting != ''"> and print_setting = #{printSetting}</if>
             <if test="discountSetting != null  and discountSetting != ''"> and discount_setting = #{discountSetting}</if>
-            <if test="stationIdList != null ">
-                and station_id in
-                <foreach item="item" index="index" collection="stationIdList"
-                         open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
+            <if test="isNoOil != null  and isNoOil != ''"> and is_no_oil = #{isNoOil}</if>
         </where>
     </select>
     
@@ -72,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wsPrintFlag != null">ws_print_flag,</if>
             <if test="printSetting != null">print_setting,</if>
             <if test="discountSetting != null">discount_setting,</if>
+            <if test="isNoOil != null">is_no_oil,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="payMode != null">#{payMode},</if>
@@ -87,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wsPrintFlag != null">#{wsPrintFlag},</if>
             <if test="printSetting != null">#{printSetting},</if>
             <if test="discountSetting != null">#{discountSetting},</if>
+            <if test="isNoOil != null">#{isNoOil},</if>
          </trim>
     </insert>
 
@@ -106,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="wsPrintFlag != null">ws_print_flag = #{wsPrintFlag},</if>
             <if test="printSetting != null">print_setting = #{printSetting},</if>
             <if test="discountSetting != null">discount_setting = #{discountSetting},</if>
+            <if test="isNoOil != null">is_no_oil = #{isNoOil},</if>
         </trim>
         where pay_id = #{payId}
     </update>