报表添加选择食堂,报表修改
diff --git a/src/main/java/com/supwisdom/dlpay/framework/filter/XssHttpServletRequestWrapper.java b/src/main/java/com/supwisdom/dlpay/framework/filter/XssHttpServletRequestWrapper.java
index a7db678..1505abf 100644
--- a/src/main/java/com/supwisdom/dlpay/framework/filter/XssHttpServletRequestWrapper.java
+++ b/src/main/java/com/supwisdom/dlpay/framework/filter/XssHttpServletRequestWrapper.java
@@ -104,6 +104,7 @@
 
   private String cleanXSS(String valueP) {
     // You'll need to remove the spaces from the html entities below
+    // Bearar
     String value = valueP.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
     value = value.replaceAll("<", "& lt;").replaceAll(">", "& gt;");
     value = value.replaceAll("\\(", "& #40;").replaceAll("\\)", "& #41;");
@@ -111,7 +112,6 @@
     value = value.replaceAll("eval\\((.*)\\)", "");
     value = value.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\"");
     value = value.replaceAll("script", "");
-    value = value.replaceAll(" ", "");
     value = cleanSqlKeyWords(value);
     return value;
   }
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/bean/LaborfeeSearchBean.java b/src/main/java/com/supwisdom/dlpay/restaurant/bean/LaborfeeSearchBean.java
index 41612b6..f46ca75 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/bean/LaborfeeSearchBean.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/bean/LaborfeeSearchBean.java
@@ -4,17 +4,10 @@
   private String startdate;
   private String enddate;
   private String datetype;
+  private Integer groupid;
   private String yearmonth;
 
-  public LaborfeeSearchBean() {
-  }
 
-  public LaborfeeSearchBean(String startdate, String enddate, String datetype, String yearmonth) {
-    this.startdate = startdate;
-    this.enddate = enddate;
-    this.datetype = datetype;
-    this.yearmonth = yearmonth;
-  }
 
   public String getStartdate() {
     return startdate;
@@ -47,4 +40,12 @@
   public void setYearmonth(String yearmonth) {
     this.yearmonth = yearmonth;
   }
+
+  public Integer getGroupid() {
+    return groupid;
+  }
+
+  public void setGroupid(Integer groupid) {
+    this.groupid = groupid;
+  }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/controller/CusttypeReportController.java b/src/main/java/com/supwisdom/dlpay/restaurant/controller/CusttypeReportController.java
index 8675c60..2018868 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/controller/CusttypeReportController.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/controller/CusttypeReportController.java
@@ -6,7 +6,6 @@
 import com.supwisdom.dlpay.framework.util.DateUtil;
 import com.supwisdom.dlpay.restaurant.bean.CusttypeReportShowBean;
 import com.supwisdom.dlpay.restaurant.bean.DailyReportSearchBean;
-import com.supwisdom.dlpay.restaurant.bean.DailyReportShowBean;
 import com.supwisdom.dlpay.restaurant.service.CusttypeReportService;
 import com.supwisdom.dlpay.restaurant.service.StatementReportService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -50,6 +49,7 @@
 
         TOperator oper = (TOperator) operUser;
         model.addAttribute("opercode", oper == null ? "unknow" : oper.getOpercode());
+
         return "restaurant/custtypereport/index";
     }
 
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/controller/DeviceDiscountRuleController.java b/src/main/java/com/supwisdom/dlpay/restaurant/controller/DeviceDiscountRuleController.java
index 15a8a81..f372667 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/controller/DeviceDiscountRuleController.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/controller/DeviceDiscountRuleController.java
@@ -415,13 +415,19 @@
     }
 
     @GetMapping("/discountrule/devgrouptree")
-    @PreAuthorize("hasPermission('/discountrule/load4binddev','')")
     @ResponseBody
     public List<TreeSelectNode> searchDevgroupTree() {
         List<TreeSelectNode> tree = deviceParamService.getDeviceGroupSelectTree();
         return tree;
     }
 
+    @GetMapping("/discountrule/devgroupbranchtree")
+    @ResponseBody
+    public List<TreeSelectNode> searchDevgroupBranchTree() {
+        List<TreeSelectNode> tree = deviceParamService.getDeviceGroupSelectBranchTree();
+        return tree;
+    }
+
     @PostMapping("/discountrule/dorulebinddev")
     @PreAuthorize("hasPermission('/discountrule/dorulebinddev','')")
     @ResponseBody
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/controller/StatementReportController.java b/src/main/java/com/supwisdom/dlpay/restaurant/controller/StatementReportController.java
index edbb2a4..bc4b48b 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/controller/StatementReportController.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/controller/StatementReportController.java
@@ -7,8 +7,11 @@
 import com.supwisdom.dlpay.restaurant.bean.LaborCountShowBean;
 import com.supwisdom.dlpay.restaurant.bean.LaborfeeSearchBean;
 import com.supwisdom.dlpay.restaurant.bean.LaborfeeShowBean;
+import com.supwisdom.dlpay.restaurant.domain.TDeviceGroup;
+import com.supwisdom.dlpay.restaurant.service.DeviceGroupService;
 import com.supwisdom.dlpay.restaurant.service.StatementReportService;
 
+import com.supwisdom.dlpay.restaurant.util.RestaurantConstant;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.core.annotation.AuthenticationPrincipal;
@@ -48,6 +51,7 @@
 
       TOperator oper = (TOperator) operUser;
       map.addAttribute("opercode", oper == null ? "unknow" : oper.getOpercode());
+
     } catch (Exception e) {
       e.printStackTrace();
     }
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceGroupService.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceGroupService.java
index dcb2a0c..ea61d15 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceGroupService.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceGroupService.java
@@ -20,7 +20,6 @@
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     JsonResult saveGroup(TDeviceGroup device);
 
-
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     JsonResult delete(Integer id);
 
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceParamService.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceParamService.java
index 0a729f4..7a3c16f 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceParamService.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/DeviceParamService.java
@@ -54,6 +54,9 @@
   @Transactional(rollbackFor = Exception.class, readOnly = true)
   List<TreeSelectNode> getDeviceGroupSelectTree();
 
+  @Transactional(rollbackFor = Exception.class, readOnly = true)
+  List<TreeSelectNode> getDeviceGroupSelectBranchTree();
+
   @Transactional(rollbackFor = Exception.class)
   boolean saveBindDevpara(int groupid, List<Integer> deviceIds) throws WebCheckException;
 
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CusttypeReportServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CusttypeReportServiceImpl.java
index 9f34a11..9290fc2 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CusttypeReportServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CusttypeReportServiceImpl.java
@@ -77,12 +77,18 @@
                     " sum(case when t.mealtype='dinner' and t.custtype=2 then t.feeamt+t.totalamt else 0 end) as odtotalamt " +
                     " from tb_rpt_mealsdtl t " +
                     " left join tb_devicegroup a1 on t.devgroupid=a1.devgroupid" +
-                    " where t.checkdate>=:startdate and t.checkdate<=:enddate" +
-                    " group by t.devgroupid,a1.devgroupid  order by t.devgroupid");
+                    " where t.checkdate>=:startdate and t.checkdate<=:enddate") ;
+            if (null!=searchBean.getGroupid()) {
+                sb.append( " and a1.devgroupid=:groupid ");
+            }
+            sb.append((" group by t.devgroupid,a1.devgroupid  order by t.devgroupid"));
 
             Query query = entityManager.createNativeQuery(sb.toString());
             query.setParameter("startdate", startdate);
             query.setParameter("enddate", enddate);
+            if (null!=searchBean.getGroupid()) {
+                query.setParameter("groupid", searchBean.getGroupid());
+            }
             query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(CusttypeReportShowBean.class));
             List<CusttypeReportShowBean> list = query.getResultList();
             if (null != list) return list;
@@ -254,6 +260,7 @@
         ExcelPoiUtil.createCell(signRow11, 6, textStyle3, "审核人:");
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 0, 5));  //合并列
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 6, columns - 1));  //合并列
+
         HSSFRow signRow12 = ExcelPoiUtil.createRow(sheet, rowNum + 5, 400);
         ExcelPoiUtil.createCell(signRow12, 0, textStyle3, "审核人:");
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 5, rowNum + 5, 0, 5));  //合并列
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DailyReportServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DailyReportServiceImpl.java
index d29a26d..434ba64 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DailyReportServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DailyReportServiceImpl.java
@@ -391,26 +391,19 @@
 
         //TODO: 审核信息
         HSSFRow signRow10 = ExcelPoiUtil.createRow(sheet, rowNum + 3, 400);
-        ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "银行方审核盖章:");
+        ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "大理州公安局警务保障处审核盖章:");
         ExcelPoiUtil.createCell(signRow10, 6, textStyle3, "苍山饭店审核盖章:");
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 0, 5));  //合并列
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 6, columns - 1));  //合并列
         HSSFRow signRow11 = ExcelPoiUtil.createRow(sheet, rowNum + 4, 400);
-        ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "审核人:");
+        ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "经办人:");
         ExcelPoiUtil.createCell(signRow11, 6, textStyle3, "审核人:");
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 0, 5));  //合并列
         sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 6, columns - 1));  //合并列
 
-        HSSFRow signRow20 = ExcelPoiUtil.createRow(sheet, rowNum + 8, 400);
-        ExcelPoiUtil.createCell(signRow20, 0, textStyle3, "市民卡公司审核盖章:");
-        ExcelPoiUtil.createCell(signRow20, 6, textStyle3, "建桥园审核盖章:");
-        sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 0, 5));  //合并列
-        sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 6, columns - 1));  //合并列
-        HSSFRow signRow21 = ExcelPoiUtil.createRow(sheet, rowNum + 9, 400);
-        ExcelPoiUtil.createCell(signRow21, 0, textStyle3, "审核人:");
-        ExcelPoiUtil.createCell(signRow21, 6, textStyle3, "审核人:");
-        sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 0, 5));  //合并列
-        sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 6, columns - 1));  //合并列
+        HSSFRow signRow12 = ExcelPoiUtil.createRow(sheet, rowNum + 5, 400);
+        ExcelPoiUtil.createCell(signRow12, 0, textStyle3, "审核人:");
+        sheet.addMergedRegion(new CellRangeAddress(rowNum + 5, rowNum + 5, 0, 5));  //合并列
 
         try {
             response.setContentType("application/x-msdownload");
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DeviceParamServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DeviceParamServiceImpl.java
index 0ad7897..a37eb65 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DeviceParamServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/DeviceParamServiceImpl.java
@@ -9,6 +9,7 @@
 import com.supwisdom.dlpay.restaurant.dao.*;
 import com.supwisdom.dlpay.restaurant.domain.*;
 import com.supwisdom.dlpay.restaurant.service.DeviceParamService;
+import com.supwisdom.dlpay.restaurant.util.RestaurantConstant;
 import com.supwisdom.dlpay.system.bean.TreeSelectNode;
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.query.internal.NativeQueryImpl;
@@ -265,6 +266,13 @@
         return getDevgroupTree(groupList, 0);
     }
 
+    @Override
+    public List<TreeSelectNode> getDeviceGroupSelectBranchTree() {
+        List<TDeviceGroup> groupList = deviceGroupDao.findByGrouptype(RestaurantConstant.DEVICEGROUP_TYPE_BRANCH);
+        if (StringUtil.isEmpty(groupList)) return new ArrayList<>(0);
+        return getDevgroupTree(groupList, 0);
+    }
+
     private List<TreeSelectNode> getDevgroupTree(List<TDeviceGroup> groupList, Integer pid) {
         List<TreeSelectNode> result = new ArrayList<>(0);
         for (TDeviceGroup gp : groupList) {
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/StatementReportServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/StatementReportServiceImpl.java
index 394849d..871a00d 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/StatementReportServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/StatementReportServiceImpl.java
@@ -89,11 +89,17 @@
           " sum(case when t.mealtype='dinner' then t.feeamt else 0 end) as dfeeamt " +
           "from tb_rpt_mealsdtl t left join tb_devicegroup a1 on t.devgroupid=a1.devgroupid " +
               "left join tb_devicegroup a2 on a1.pid=a2.devgroupid " +
-          "where t.checkdate>=:startdate and t.checkdate<=:enddate " +
-          "group by t.devgroupid,a1.devgroupid,a2.devgroupid order by t.devgroupid ");
+          "where t.checkdate>=:startdate and t.checkdate<=:enddate " );
+      if (null!=searchBean.getGroupid()) {
+        sb.append( " and a1.devgroupid=:groupid ");
+      }
+      sb.append("group by t.devgroupid,a1.devgroupid,a2.devgroupid order by t.devgroupid ");
       Query query = entityManager.createNativeQuery(sb.toString());
       query.setParameter("startdate", startdate);
       query.setParameter("enddate", enddate);
+      if (null!=searchBean.getGroupid()) {
+        query.setParameter("groupid", searchBean.getGroupid());
+      }
       query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(LaborfeeSearchData.class));
       List<LaborfeeSearchData> list = query.getResultList();
       if (null != list) return transforLaborfeeShowBean(list);
@@ -356,26 +362,19 @@
 
     //TODO: 审核信息
     HSSFRow signRow10 = ExcelPoiUtil.createRow(sheet, rowNum + 3, 400);
-    ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "银行方审核盖章:");
+    ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "大理州公安局警务保障处审核盖章:");
     ExcelPoiUtil.createCell(signRow10, 6, textStyle3, "苍山饭店审核盖章:");
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 0, 5));  //合并列
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 6, columns - 1));  //合并列
     HSSFRow signRow11 = ExcelPoiUtil.createRow(sheet, rowNum + 4, 400);
-    ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "审核人:");
+    ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "经办人:");
     ExcelPoiUtil.createCell(signRow11, 6, textStyle3, "审核人:");
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 0, 5));  //合并列
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 6, columns - 1));  //合并列
 
-    HSSFRow signRow20 = ExcelPoiUtil.createRow(sheet, rowNum + 8, 400);
-    ExcelPoiUtil.createCell(signRow20, 0, textStyle3, "市民卡公司审核盖章:");
-    ExcelPoiUtil.createCell(signRow20, 6, textStyle3, "建桥园审核盖章:");
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 0, 5));  //合并列
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 6, columns - 1));  //合并列
-    HSSFRow signRow21 = ExcelPoiUtil.createRow(sheet, rowNum + 9, 400);
-    ExcelPoiUtil.createCell(signRow21, 0, textStyle3, "审核人:");
-    ExcelPoiUtil.createCell(signRow21, 6, textStyle3, "审核人:");
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 0, 5));  //合并列
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 6, columns - 1));  //合并列
+    HSSFRow signRow12 = ExcelPoiUtil.createRow(sheet, rowNum + 5, 400);
+    ExcelPoiUtil.createCell(signRow12, 0, textStyle3, "审核人:");
+    sheet.addMergedRegion(new CellRangeAddress(rowNum + 5, rowNum + 5, 0, 5));  //合并列
 
     try {
       response.setContentType("application/x-msdownload");
@@ -411,11 +410,17 @@
           " sum(case when t.mealtype='lunch' then t.feeamt else 0 end) as lfeeamt, " +
           " sum(case when t.mealtype='dinner' then t.feeamt else 0 end) as dfeeamt " +
           "from tb_rpt_mealsdtl t left join tb_devicegroup a1 on t.devgroupid=a1.devgroupid left join tb_devicegroup a2 on a1.pid=a2.devgroupid " +
-          "where t.checkdate>=:startdate and t.checkdate<=:enddate " +
-          "group by t.devgroupid,a1.devgroupid,a2.devgroupid order by t.devgroupid ");
+          "where t.checkdate>=:startdate and t.checkdate<=:enddate " );
+      if (null!=searchBean.getGroupid()) {
+        sb.append( " and a1.devgroupid=:groupid ");
+      }
+      sb.append(   "group by t.devgroupid,a1.devgroupid,a2.devgroupid order by t.devgroupid ");
       Query query = entityManager.createNativeQuery(sb.toString());
       query.setParameter("startdate", startdate);
       query.setParameter("enddate", enddate);
+      if (null!=searchBean.getGroupid()) {
+        query.setParameter("groupid", searchBean.getGroupid());
+      }
       query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(LaborCountSearchData.class));
       List<LaborCountSearchData> list = query.getResultList();
       if (null != list) return transforLaborCountShowBean(list);
@@ -633,26 +638,19 @@
 
     //TODO: 审核信息
     HSSFRow signRow10 = ExcelPoiUtil.createRow(sheet, rowNum + 3, 400);
-    ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "银行方审核盖章:");
+    ExcelPoiUtil.createCell(signRow10, 0, textStyle3, "大理州公安局警务保障处审核盖章:");
     ExcelPoiUtil.createCell(signRow10, 5, textStyle3, "苍山饭店审核盖章:");
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 0, 4));  //合并列
     sheet.addMergedRegion(new CellRangeAddress(rowNum + 3, rowNum + 3, 5, columns - 1));  //合并列
     HSSFRow signRow11 = ExcelPoiUtil.createRow(sheet, rowNum + 4, 400);
-    ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "审核人:");
-    ExcelPoiUtil.createCell(signRow11, 5, textStyle3, "审核人:");
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 0, 4));  //合并列
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 5, columns - 1));  //合并列
+    ExcelPoiUtil.createCell(signRow11, 0, textStyle3, "经办人:");
+    ExcelPoiUtil.createCell(signRow11, 6, textStyle3, "审核人:");
+    sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 0, 5));  //合并列
+    sheet.addMergedRegion(new CellRangeAddress(rowNum + 4, rowNum + 4, 6, columns - 1));  //合并列
 
-    HSSFRow signRow20 = ExcelPoiUtil.createRow(sheet, rowNum + 8, 400);
-    ExcelPoiUtil.createCell(signRow20, 0, textStyle3, "市民卡公司审核盖章:");
-    ExcelPoiUtil.createCell(signRow20, 5, textStyle3, "建桥园审核盖章:");
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 0, 4));  //合并列
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 8, rowNum + 8, 5, columns - 1));  //合并列
-    HSSFRow signRow21 = ExcelPoiUtil.createRow(sheet, rowNum + 9, 400);
-    ExcelPoiUtil.createCell(signRow21, 0, textStyle3, "审核人:");
-    ExcelPoiUtil.createCell(signRow21, 5, textStyle3, "审核人:");
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 0, 4));  //合并列
-    sheet.addMergedRegion(new CellRangeAddress(rowNum + 9, rowNum + 9, 5, columns - 1));  //合并列
+    HSSFRow signRow12 = ExcelPoiUtil.createRow(sheet, rowNum + 5, 400);
+    ExcelPoiUtil.createCell(signRow12, 0, textStyle3, "审核人:");
+    sheet.addMergedRegion(new CellRangeAddress(rowNum + 5, rowNum + 5, 0, 5));  //合并列
 
     try {
       response.setContentType("application/x-msdownload");
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/TransDtlServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/TransDtlServiceImpl.java
index 0706e61..121f2a9 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/TransDtlServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/TransDtlServiceImpl.java
@@ -100,7 +100,7 @@
 
     @Override
     public JsonResult export(TransDtlSearchBean bean, HttpServletRequest request, HttpServletResponse response) {
-        String[] titles0 = {"姓名",	"交易号",	"交易金额","交易时间","记账时间","终端号","商户","流水状态","流水类型"
+        String[] titles0 = {"姓名",	"交易号",	"交易金额","交易时间","记账时间","终端号","商户","流水状态","流水类型","分餐类别"
         }; //表头
         String fileName0 = "食堂流水";// 保存数据
         String[][] info0 = {{}};
@@ -133,7 +133,14 @@
                 }
                 info0[i][7]=status;
                 info0[i][8]=t.getTranstype();
-                
+                String mealtype="";
+                switch (t.getMealtype()){
+                    case "breakfast":mealtype="早餐"; break;
+                    case "lunch":mealtype="午餐"; break;
+                    case "dinner":mealtype="晚餐"; break;
+                    default:mealtype="未知";
+                }
+                info0[i][8]=mealtype;
             }
         }
 
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/util/RestaurantConstant.java b/src/main/java/com/supwisdom/dlpay/restaurant/util/RestaurantConstant.java
index a231f87..1a57291 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/util/RestaurantConstant.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/util/RestaurantConstant.java
@@ -14,8 +14,8 @@
     public static final String TRANSMODE_CARD = "card";  //卡消费
     public static final String TRANSMODE_CODE = "code";  //二维码消费
 
-    public static final String DEVICEGROUP_TYPE_BRANCH = "branch";   //驳回
-    public static final String DEVICEGROUP_TYPE_LEAF = "leaf";   //驳回
+    public static final String DEVICEGROUP_TYPE_BRANCH = "branch";   //根
+    public static final String DEVICEGROUP_TYPE_LEAF = "leaf";   //叶
 
 
     public static final String STATUS_TRANSDTL_INIT = "init";   //初始化
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 90e2544..d348bac 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -29,16 +29,16 @@
 
 payapi.url=https://yy.dlsmk.cn/payapi
 
-cron.offlinedtl=0/10 * * * * ?
+cron.offlinedtl=-
 
 # 对账任务
-restaurant.chkdtltask.cron=27 3/10 * * * ?
+restaurant.chkdtltask.cron=-
 # 统计任务
-restaurant.statement.cron=0 7/10 * * * ?
+restaurant.statement.cron=-
 # 客户信息校对任务
-restaurant.customercheck.cron=0 0/1 * * * ?
+restaurant.customercheck.cron=-
 # 流水入账任务
-restaurant.submitofflinedtl.cron=0 0/1 * * * ?
+restaurant.submitofflinedtl.cron=-
 # 查询流水状态任务
-restaurant.querydtlresult.cron=0 0/2 * * * ?
+restaurant.querydtlresult.cron=-
 
diff --git a/src/main/resources/static/libs/custom.js b/src/main/resources/static/libs/custom.js
index a0177b3..aad7b9d 100644
--- a/src/main/resources/static/libs/custom.js
+++ b/src/main/resources/static/libs/custom.js
@@ -65,6 +65,7 @@
                     .addNewDict("transtatusList")
                     .addNewDict("idtypeList")
                     .addNewDict("sexList")
+                    .addNewDict("mealtypeList")
                     .addNewDict("accountStatusList")
             },
             getDict: function (dictType) {
diff --git a/src/main/resources/templates/restaurant/custtypereport/index.html b/src/main/resources/templates/restaurant/custtypereport/index.html
index acafee3..edb8a17 100644
--- a/src/main/resources/templates/restaurant/custtypereport/index.html
+++ b/src/main/resources/templates/restaurant/custtypereport/index.html
@@ -24,6 +24,14 @@
                 </div>
 
                 <div class="layui-inline">
+                    <label class="layui-form-label">选择设备组</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="groupid" id="custtypereport-search-devgroup"
+                               autocomplete="off" class="layui-input"/>
+                    </div>
+                </div>
+
+                <div class="layui-inline">
                     <button id="custtypereport-search-btn" class="layui-btn icon-btn" data-type="search"><i
                             class="layui-icon">&#xe615;</i>搜索
                     </button>
@@ -65,7 +73,7 @@
 
             </tr>
             </thead>
-            <tbody id="shopreport-custtypereport-tbody" th:data-startdate="${searchBean.startdate}" th:data-enddate="${searchBean.enddate}" th:data-opercode="${opercode}">
+            <tbody id="shopreport-custtypereport-tbody" th:data-startdate="${searchBean.startdate}" th:data-enddate="${searchBean.enddate}"  th:data-opercode="${opercode}">
             <tr th:if="${null==showlist || showlist.size()==0}">
                 <td colspan="16">无数据</td>
             </tr>
@@ -98,10 +106,35 @@
 
 
 <script>
-    layui.use(['form', 'layer',  'element', 'laydate'], function () {
+    layui.use(['form', 'layer',  'element', 'laydate','treeSelect'], function () {
         var laydate = layui.laydate;
         var layer = layui.layer;
         var $ = layui.jquery;
+        var treeSelect = layui.treeSelect;
+
+        treeSelect.render({
+            elem: '#custtypereport-search-devgroup',
+            data: '[[@{/discountrule/devgroupbranchtree}]]',
+            type: 'get',
+            placeholder: '选择食堂',
+            search: false,
+            style: {
+                folder: {
+                    enable: false
+                },
+                line: {
+                    enable: true
+                }
+            },
+            // 点击回调
+            click: function (d) {
+                return true;
+            },
+            success: function (d) {
+                console.log(d); // 加载完成后的回调函数
+            }
+        });
+
 
         laydate.render({
             elem: '#custtypereport-search-startdate',
@@ -117,6 +150,7 @@
         $('#custtypereport-search-btn').click(function () {
             var startdate = $("#custtypereport-search-startdate").val();
             var enddate = $("#custtypereport-search-enddate").val();
+            var groupid = $("#custtypereport-search-devgroup").val();
             if (null == startdate || "" == $.trim(startdate)) {
                 layer.msg('请选择起始日期', {icon: 2, time: 1500});
                 return;
@@ -132,6 +166,7 @@
                 data: {
                     startdate: startdate,
                     enddate: enddate,
+                    groupid: groupid,
                     _csrf: $("meta[name='_csrf_token']").attr("value")
                 },
                 success: function (data) {
@@ -148,8 +183,9 @@
         $("#shopreport-custtypereport-export-excel").click(function(){
             var startdate= $("#shopreport-custtypereport-tbody").attr("data-startdate");
             var enddate= $("#shopreport-custtypereport-tbody").attr("data-enddate");
+            var groupid = $("#custtypereport-search-devgroup").val();
 
-            var dataUrl='[[@{/custtypereport/excelexport}]]?startdate='+startdate+'&enddate='+enddate;
+            var dataUrl='[[@{/custtypereport/excelexport}]]?startdate='+startdate+'&enddate='+enddate+'&groupid='+groupid;
             var xhr = new XMLHttpRequest();
             xhr.responseType = "blob"; //设置响应类型为blob类型
             xhr.onload = function () {
@@ -182,8 +218,10 @@
         $("#shopreport-custtypereport-print-table").click(function(){
             var startdate= $("#shopreport-custtypereport-tbody").attr("data-startdate");
             var enddate= $("#shopreport-custtypereport-tbody").attr("data-enddate");
+            var groupid = $("#custtypereport-search-devgroup").val();
+
             var opercode = $("#shopreport-custtypereport-tbody").attr("data-opercode");
-            var url = '/custtypereport/print/printcusttypereport?startdate=' + startdate + '&enddate=' + enddate +  '&opercode=' + opercode;
+            var url = '/custtypereport/print/printcusttypereport?startdate=' + startdate + '&enddate=' + enddate +'&groupid=' + groupid+  '&opercode=' + opercode;
 
             LODOP = getLodop();
             LODOP.PRINT_INIT("客户类别消费报表");
diff --git a/src/main/resources/templates/restaurant/dailyreport/print/printdailyreport.html b/src/main/resources/templates/restaurant/dailyreport/print/printdailyreport.html
index f5ca33d..e9908e1 100644
--- a/src/main/resources/templates/restaurant/dailyreport/print/printdailyreport.html
+++ b/src/main/resources/templates/restaurant/dailyreport/print/printdailyreport.html
@@ -136,29 +136,16 @@
     <div class="layui-card-body" style="margin-top: 25px;">
         <table class="sw-print-sign">
             <tr>
-                <td width="50%">银行方审核盖章:</td>
+                <td width="50%">大理州公安局警务保障处审核盖章:</td>
                 <td width="50%">苍山饭店审核盖章:</td>
             </tr>
             <tr>
-                <td>审核人:</td>
+                <td>经办人:</td>
                 <td>审核人:</td>
             </tr>
             <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td>市民卡公司审核盖章:</td>
-                <td>建桥园审核盖章:</td>
-            </tr>
-            <tr>
                 <td>审核人:</td>
-                <td>审核人:</td>
+
             </tr>
         </table>
     </div>
diff --git a/src/main/resources/templates/restaurant/deptreport/print/printdeptreport.html b/src/main/resources/templates/restaurant/deptreport/print/printdeptreport.html
index 0dda404..6bb83cd 100644
--- a/src/main/resources/templates/restaurant/deptreport/print/printdeptreport.html
+++ b/src/main/resources/templates/restaurant/deptreport/print/printdeptreport.html
@@ -136,29 +136,16 @@
     <div class="layui-card-body" style="margin-top: 25px;">
         <table class="sw-print-sign">
             <tr>
-                <td width="50%">银行方审核盖章:</td>
+                <td width="50%">大理州公安局警务保障处审核盖章:</td>
                 <td width="50%">苍山饭店审核盖章:</td>
             </tr>
             <tr>
-                <td>审核人:</td>
+                <td>经办人:</td>
                 <td>审核人:</td>
             </tr>
             <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td>市民卡公司审核盖章:</td>
-                <td>建桥园审核盖章:</td>
-            </tr>
-            <tr>
                 <td>审核人:</td>
-                <td>审核人:</td>
+
             </tr>
         </table>
     </div>
diff --git a/src/main/resources/templates/restaurant/report/laborcount.html b/src/main/resources/templates/restaurant/report/laborcount.html
index c5826be..a1dc870 100644
--- a/src/main/resources/templates/restaurant/report/laborcount.html
+++ b/src/main/resources/templates/restaurant/report/laborcount.html
@@ -41,6 +41,16 @@
                     </div>
                 </div>
 
+            </div>
+            <div class="layui-form-item" style="margin-bottom: 0;">
+                <div class="layui-inline">
+                    <label class="layui-form-label">食堂</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="groupid" id="labercount-search-devgroup"
+                               autocomplete="off" class="layui-input"/>
+                    </div>
+                </div>
+
                 <div class="layui-inline">
                     <button id="shopreport-labercount-search-btn" class="layui-btn icon-btn" data-type="search"><i
                             class="layui-icon">&#xe615;</i>搜索
@@ -130,13 +140,21 @@
         </table>
     </div>
 </div>
+<style>
+    .layui-form-select{
+        width: 290px !important;
+    }
 
+</style>
 <script>
-    layui.use(['form', 'layer', 'laydate', 'admin'], function () {
+    layui.use(['form', 'layer', 'laydate', 'admin', 'treeSelect'], function () {
         var form = layui.form;
         var laydate = layui.laydate;
         var layer = layui.layer;
         var $ = layui.jquery;
+        var form = layui.form;
+        var treeSelect = layui.treeSelect;
+        form.render("select");
 
         form.render("checkbox");
         laydate.render({
@@ -160,10 +178,34 @@
             trigger: 'click'
         });
 
+        treeSelect.render({
+            elem: '#labercount-search-devgroup',
+            data: '[[@{/discountrule/devgroupbranchtree}]]',
+            type: 'get',
+            placeholder: '选择设备组',
+            search: false,
+            style: {
+                folder: {
+                    enable: false
+                },
+                line: {
+                    enable: true
+                }
+            },
+            // 点击回调
+            click: function (d) {
+                return true;
+            },
+            success: function (d) {
+                console.log(d); // 加载完成后的回调函数
+            }
+        });
+
         $("#shopreport-labercount-search-btn").click(function(){
             var startdate=$("#shopreport-labercount-search-startdate").val();
             var enddate = $("#shopreport-labercount-search-enddate").val();
             var yearmonth=$("#shopreport-labercount-search-yearmonth").val();
+            var groupid = $("#labercount-search-devgroup").val();
             var dtype = $("#shopreport-labercount-datetype").is(":checked")?"month":"days";
             if ("month" == dtype) {
                 if (isempty(yearmonth)) {
@@ -184,6 +226,7 @@
                 data: {
                     startdate: startdate,
                     enddate: enddate,
+                    groupid: groupid,
                     datetype: dtype,
                     yearmonth: yearmonth,
                     _csrf: $("meta[name='_csrf_token']").attr("value")
@@ -207,7 +250,9 @@
             var datetype= $("#shopreport-labercount-tbody").attr("data-datetype");
             var yearmonth= $("#shopreport-labercount-tbody").attr("data-yearmonth");
             var opercode = $("#shopreport-labercount-tbody").attr("data-opercode");
-            var url = '/report/print/printlaborcnt?startdate=' + startdate + '&enddate=' + enddate + '&datetype=' + datetype + '&yearmonth=' + yearmonth + '&opercode=' + opercode;
+            var groupid = $("#labercount-search-devgroup").val();
+
+            var url = '/report/print/printlaborcnt?startdate=' + startdate + '&enddate=' + enddate + '&datetype=' + datetype + '&groupid=' + groupid + '&yearmonth=' + yearmonth + '&opercode=' + opercode;
 
             LODOP = getLodop();
             LODOP.PRINT_INIT("商户劳务费报表");
@@ -228,8 +273,8 @@
             var enddate= $("#shopreport-labercount-tbody").attr("data-enddate");
             var datetype= $("#shopreport-labercount-tbody").attr("data-datetype");
             var yearmonth= $("#shopreport-labercount-tbody").attr("data-yearmonth");
-
-            var dataUrl='[[@{/report/excelexportlaborcnt}]]?startdate='+startdate+'&enddate='+enddate+'&datetype='+datetype+'&yearmonth='+yearmonth;
+            var groupid = $("#labercount-search-devgroup").val();
+            var dataUrl='[[@{/report/excelexportlaborcnt}]]?startdate='+startdate+'&enddate='+enddate+'&groupid='+groupid+'&datetype='+datetype+'&yearmonth='+yearmonth;
             var xhr = new XMLHttpRequest();
             xhr.responseType = "blob"; //设置响应类型为blob类型
             xhr.onload = function () {
diff --git a/src/main/resources/templates/restaurant/report/laborfee.html b/src/main/resources/templates/restaurant/report/laborfee.html
index ac93c25..4636477 100644
--- a/src/main/resources/templates/restaurant/report/laborfee.html
+++ b/src/main/resources/templates/restaurant/report/laborfee.html
@@ -40,6 +40,15 @@
                                title="按月份查询"/>
                     </div>
                 </div>
+            </div>
+            <div class="layui-form-item" style="margin-bottom: 0; ">
+                <div class="layui-inline">
+                    <label class="layui-form-label">食堂</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="groupid" id="laborfee-search-devgroup"
+                               autocomplete="off" class="layui-input"/>
+                    </div>
+                </div>
 
                 <div class="layui-inline">
                     <button id="shopreport-laborfee-search-btn" class="layui-btn icon-btn" data-type="search"><i
@@ -83,7 +92,7 @@
                 <th rowspan="2" style="text-align: center;min-width: 60px;">应支付劳<br/>务费小计</th>
             </tr>
             </thead>
-            <tbody id="shopreport-laborfee-tbody" th:data-startdate="${searchBean.startdate}" th:data-enddate="${searchBean.enddate}"  th:data-datetype="${searchBean.datetype}" th:data-yearmonth="${searchBean.yearmonth}" th:data-opercode="${opercode}">
+            <tbody id="shopreport-laborfee-tbody" th:data-startdate="${searchBean.startdate}" th:data-enddate="${searchBean.enddate}" th:data-groupid="${searchBean.groupid}" th:data-datetype="${searchBean.datetype}" th:data-yearmonth="${searchBean.yearmonth}" th:data-opercode="${opercode}">
                 <tr th:if="${null==showlist || showlist.size()==0}">
                     <td colspan="13">无数据</td>
                 </tr>
@@ -150,12 +159,20 @@
     </div>
 </div>
 
+<style>
+    .layui-form-select{
+        width: 290px !important;
+    }
+
+</style>
+
 <script>
-    layui.use(['form', 'layer', 'laydate', 'admin'], function () {
-        var form = layui.form;
+    layui.use(['form', 'layer', 'laydate', 'admin','treeSelect'], function () {
         var laydate = layui.laydate;
         var layer = layui.layer;
         var $ = layui.jquery;
+        var form = layui.form;
+        var treeSelect = layui.treeSelect;
 
         form.render("checkbox");
         laydate.render({
@@ -179,10 +196,36 @@
             trigger: 'click'
         });
 
+
+
+        treeSelect.render({
+            elem: '#laborfee-search-devgroup',
+            data: '[[@{/discountrule/devgroupbranchtree}]]',
+            type: 'get',
+            placeholder: '选择食堂',
+            search: false,
+            style: {
+                folder: {
+                    enable: false
+                },
+                line: {
+                    enable: true
+                }
+            },
+            // 点击回调
+            click: function (d) {
+                return true;
+            },
+            success: function (d) {
+                console.log(d); // 加载完成后的回调函数
+            }
+        });
+
         $("#shopreport-laborfee-search-btn").click(function(){
             var startdate=$("#shopreport-laborfee-search-startdate").val();
             var enddate = $("#shopreport-laborfee-search-enddate").val();
             var yearmonth=$("#shopreport-laborfee-search-yearmonth").val();
+            var groupid = $("#laborfee-search-devgroup").val();
             var dtype = $("#shopreport-laborfee-datetype").is(":checked")?"month":"days";
             if ("month" == dtype) {
                 if (isempty(yearmonth)) {
@@ -204,6 +247,7 @@
                     startdate: startdate,
                     enddate: enddate,
                     datetype: dtype,
+                    groupid:groupid,
                     yearmonth: yearmonth,
                     _csrf: $("meta[name='_csrf_token']").attr("value")
                 },
@@ -226,7 +270,8 @@
             var datetype= $("#shopreport-laborfee-tbody").attr("data-datetype");
             var yearmonth= $("#shopreport-laborfee-tbody").attr("data-yearmonth");
             var opercode = $("#shopreport-laborfee-tbody").attr("data-opercode");
-            var url = '/report/print/printlaborfee?startdate=' + startdate + '&enddate=' + enddate + '&datetype=' + datetype + '&yearmonth=' + yearmonth + '&opercode=' + opercode;
+            var groupid = $("#laborfee-search-devgroup").val();
+            var url = '/report/print/printlaborfee?startdate=' + startdate + '&enddate=' + enddate + '&datetype=' + datetype + '&groupid=' + groupid + '&yearmonth=' + yearmonth + '&opercode=' + opercode;
 
             LODOP = getLodop();
             LODOP.PRINT_INIT("商户劳务费报表");
@@ -247,8 +292,8 @@
             var enddate= $("#shopreport-laborfee-tbody").attr("data-enddate");
             var datetype= $("#shopreport-laborfee-tbody").attr("data-datetype");
             var yearmonth= $("#shopreport-laborfee-tbody").attr("data-yearmonth");
-
-            var dataUrl='[[@{/report/excelexportlaborfee}]]?startdate='+startdate+'&enddate='+enddate+'&datetype='+datetype+'&yearmonth='+yearmonth;
+            var groupid = $("#laborfee-search-devgroup").val();
+            var dataUrl='[[@{/report/excelexportlaborfee}]]?startdate='+startdate+'&enddate='+enddate + '&groupid=' + groupid+ '&datetype='+datetype+'&yearmonth='+yearmonth;
             var xhr = new XMLHttpRequest();
             xhr.responseType = "blob"; //设置响应类型为blob类型
             xhr.onload = function () {
diff --git a/src/main/resources/templates/restaurant/report/print/printlaborcount.html b/src/main/resources/templates/restaurant/report/print/printlaborcount.html
index 255777f..3b34ca7 100644
--- a/src/main/resources/templates/restaurant/report/print/printlaborcount.html
+++ b/src/main/resources/templates/restaurant/report/print/printlaborcount.html
@@ -98,29 +98,16 @@
     <div class="layui-card-body" style="margin-top: 25px;">
         <table class="sw-print-sign">
             <tr>
-                <td width="50%">银行方审核盖章:</td>
+                <td width="50%">大理州公安局警务保障处审核盖章:</td>
                 <td width="50%">苍山饭店审核盖章:</td>
             </tr>
             <tr>
-                <td>审核人:</td>
+                <td>经办人:</td>
                 <td>审核人:</td>
             </tr>
             <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td colspan="2">&nbsp;</td>
-            </tr>
-            <tr>
-                <td>市民卡公司审核盖章:</td>
-                <td>建桥园审核盖章:</td>
-            </tr>
-            <tr>
                 <td>审核人:</td>
-                <td>审核人:</td>
+
             </tr>
         </table>
     </div>
diff --git a/src/main/resources/templates/restaurant/transdtl/index.html b/src/main/resources/templates/restaurant/transdtl/index.html
index 2b3ca6f..b5d8973 100644
--- a/src/main/resources/templates/restaurant/transdtl/index.html
+++ b/src/main/resources/templates/restaurant/transdtl/index.html
@@ -222,6 +222,16 @@
                             return getTempDictValue('transtypeList',item.transtype);
                         }
                     },
+                    {
+                        field: 'transtype',
+                        title: '流水类型',
+                        width:100,
+                        sort: true,
+                        align: 'center',
+                        templet: function (item) {
+                            return getTempDictValue('transtypeList',item.mealtype);
+                        }
+                    },
                 ]
             ]
         });