餐补报表修改
diff --git a/sql/restarant_create_table.sql b/sql/restarant_create_table.sql
index c9cfc8b..f537970 100644
--- a/sql/restarant_create_table.sql
+++ b/sql/restarant_create_table.sql
@@ -970,7 +970,7 @@
   billno varchar(20)  NOT NULL,
   accdate varchar(8),
   acctime varchar(6),
-  amount numeric(9,2) NOT NULL,
+  amount float8 NOT NULL,
   attr1 varchar(1000),
   cardno varchar(9),
   core_accdate varchar(8),
@@ -978,7 +978,7 @@
   custid varchar(32),
   custname varchar(30),
   custtype int4,
-  managefee numeric(9,2),
+  managefee float8,
   managefeetype varchar(15),
   mealtype varchar(10),
   refno varchar(32),
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 9290fc2..e0f461f 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
@@ -63,19 +63,19 @@
             String enddate = DateUtil.unParseToDateFormat(searchBean.getEnddate());
 
             StringBuffer sb = new StringBuffer("select cast(ROW_NUMBER() OVER() as int4) as rownum,a1.groupname," +
-                    " cast(sum(case when t.mealtype='breakfast' and t.custtype=1 then t.totalcnt else 0 end) as int4) as ibtotalcnt," +
-                    " cast(sum(case when t.mealtype='lunch' and t.custtype=1 then t.totalcnt else 0 end) as int4) as iltotalcnt," +
-                    " cast(sum(case when t.mealtype='dinner' and t.custtype=1 then t.totalcnt else 0 end) as int4) as idtotalcnt," +
-                    " sum(case when t.mealtype='breakfast' and t.custtype=1 then t.feeamt+t.totalamt else 0 end) as ibtotalamt," +
-                    " sum(case when t.mealtype='lunch' and t.custtype=1 then t.feeamt+t.totalamt else 0 end) as iltotalamt," +
-                    " sum(case when t.mealtype='dinner' and t.custtype=1 then t.feeamt+t.totalamt else 0 end) as idtotalamt," +
-                    " cast(sum(case when t.mealtype='breakfast' and t.custtype=2 then t.totalcnt else 0 end) as int4) as obtotalcnt," +
-                    " cast(sum(case when t.mealtype='lunch' and t.custtype=2 then t.totalcnt else 0 end) as int4) as oltotalcnt," +
-                    " cast(sum(case when t.mealtype='dinner' and t.custtype=2 then t.totalcnt else 0 end) as int4) as odtotalcnt," +
-                    " sum(case when t.mealtype='breakfast' and t.custtype=2 then t.feeamt+t.totalamt else 0 end) as obtotalamt," +
-                    " sum(case when t.mealtype='lunch' and t.custtype=2 then t.feeamt+t.totalamt else 0 end) as oltotalamt," +
-                    " 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 " +
+                    " cast(sum(case when t.mealtype='breakfast'  then t.feecnt else 0 end) as int4) as ibtotalcnt," +
+                    " cast(sum(case when t.mealtype='lunch'  then t.feecnt else 0 end) as int4) as iltotalcnt," +
+                    " cast(sum(case when t.mealtype='dinner'  then t.feecnt else 0 end) as int4) as idtotalcnt," +
+                    " sum(case when t.mealtype='breakfast' then t.feeamt else 0 end) as ibtotalamt," +
+                    " sum(case when t.mealtype='lunch'   then t.feeamt else 0 end) as iltotalamt," +
+                    " sum(case when t.mealtype='dinner'  then t.feeamt else 0 end) as idtotalamt," +
+                    " cast(sum(case when t.mealtype='breakfast'   then t.totalcnt-t.feecnt else 0 end) as int4) as obtotalcnt," +
+                    " cast(sum(case when t.mealtype='lunch'   then t.totalcnt-t.feecnt else 0 end) as int4) as oltotalcnt," +
+                    " cast(sum(case when t.mealtype='dinner'   then t.totalcnt-t.feecnt else 0 end) as int4) as odtotalcnt," +
+                    " sum(case when t.mealtype='breakfast'   then t.totalamt-t.feeamt else 0 end) as obtotalamt," +
+                    " sum(case when t.mealtype='lunch'   then  t.totalamt-t.feeamt else 0 end) as oltotalamt," +
+                    " sum(case when t.mealtype='dinner'  then  t.totalamt-t.feeamt 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") ;
             if (null!=searchBean.getGroupid()) {
@@ -150,7 +150,7 @@
         ExcelPoiUtil.createCell(row2, 0, headStyle, "序号");
         ExcelPoiUtil.createCell(row2, 1, headStyle, "食堂");
 
-        ExcelPoiUtil.createCell(row2, 2, headStyle, "内部人员消费支付");
+        ExcelPoiUtil.createCell(row2, 2, headStyle, "含餐补消费支付");
         ExcelPoiUtil.createCell(row2, 3, headStyle, null);
         ExcelPoiUtil.createCell(row2, 4, headStyle, null);
         ExcelPoiUtil.createCell(row2, 5, headStyle, null);
@@ -159,7 +159,7 @@
 
         sheet.addMergedRegion(new CellRangeAddress(2, 2, 2, 7)); //合并单元格CellRangeAddress构造参数依次表示 起始行,截至行,起始列, 截至列
 
-        ExcelPoiUtil.createCell(row2, 8, headStyle, "外部人员消费支付");
+        ExcelPoiUtil.createCell(row2, 8, headStyle, "无餐补消费支付");
         ExcelPoiUtil.createCell(row2, 9, headStyle, null);
         ExcelPoiUtil.createCell(row2, 10, headStyle, null);
         ExcelPoiUtil.createCell(row2, 11, headStyle, null);
@@ -168,8 +168,8 @@
         sheet.addMergedRegion(new CellRangeAddress(2, 2, 8, 13)); //合并单元格CellRangeAddress构造参数依次表示 起始行,截至行,起始列, 截至列
 
 
-        ExcelPoiUtil.createCell(row2, 14, headStyle, "合计\n消费金额");
-        ExcelPoiUtil.createCell(row2, 15, headStyle, "合计\n消费笔数");
+        ExcelPoiUtil.createCell(row2, 14, headStyle, "合计 消费金额");
+        ExcelPoiUtil.createCell(row2, 15, headStyle, "合计 消费笔数");
         HSSFRow row3 = ExcelPoiUtil.createRow(sheet, 3, 800); //表头第二行
         ExcelPoiUtil.createCell(row3, 0, headStyle, null);
         sheet.addMergedRegion(new CellRangeAddress(2, 3, 0, 0)); //合并列
@@ -183,19 +183,19 @@
         ExcelPoiUtil.createCell(row3, 15, headStyle, null);
         sheet.addMergedRegion(new CellRangeAddress(2, 3, 15, 15)); //合并列
 
-        ExcelPoiUtil.createCell(row3, 2, headStyle, "早餐\n金额");
-        ExcelPoiUtil.createCell(row3, 3, headStyle, "早餐\n份数");
-        ExcelPoiUtil.createCell(row3, 4, headStyle, "午餐\n金额");
-        ExcelPoiUtil.createCell(row3, 5, headStyle, "午餐\n份数");
-        ExcelPoiUtil.createCell(row3, 6, headStyle, "晚餐\n金额");
-        ExcelPoiUtil.createCell(row3, 7, headStyle, "晚餐\n份数");
+        ExcelPoiUtil.createCell(row3, 2, headStyle, "早餐 金额");
+        ExcelPoiUtil.createCell(row3, 3, headStyle, "早餐 份数");
+        ExcelPoiUtil.createCell(row3, 4, headStyle, "午餐 金额");
+        ExcelPoiUtil.createCell(row3, 5, headStyle, "午餐 份数");
+        ExcelPoiUtil.createCell(row3, 6, headStyle, "晚餐 金额");
+        ExcelPoiUtil.createCell(row3, 7, headStyle, "晚餐 份数");
 
-        ExcelPoiUtil.createCell(row3, 8, headStyle, "早餐\n金额");
-        ExcelPoiUtil.createCell(row3, 9, headStyle, "早餐\n份数");
-        ExcelPoiUtil.createCell(row3, 10, headStyle, "午餐\n金额");
-        ExcelPoiUtil.createCell(row3, 11, headStyle, "午餐\n份数");
-        ExcelPoiUtil.createCell(row3, 12, headStyle, "晚餐\n金额");
-        ExcelPoiUtil.createCell(row3, 13, headStyle, "晚餐\n份数");
+        ExcelPoiUtil.createCell(row3, 8, headStyle, "早餐 金额");
+        ExcelPoiUtil.createCell(row3, 9, headStyle, "早餐 份数");
+        ExcelPoiUtil.createCell(row3, 10, headStyle, "午餐 金额");
+        ExcelPoiUtil.createCell(row3, 11, headStyle, "午餐 份数");
+        ExcelPoiUtil.createCell(row3, 12, headStyle, "晚餐 金额");
+        ExcelPoiUtil.createCell(row3, 13, headStyle, "晚餐 份数");
 
         //TODO: 数据
         int rowNum = 4;
diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql
index e9ad3a5..204f901 100644
--- a/src/main/resources/data.sql
+++ b/src/main/resources/data.sql
@@ -125,7 +125,7 @@
 INSERT INTO "tb_function" VALUES (37, NULL, 1, NULL, '', '/report/laborcount', '商户劳务费人次统计表', 2, 35);
 INSERT INTO "tb_function" VALUES (40, NULL, 1, NULL, '', '/dept/index', '部门管理', 6, 22);
 INSERT INTO "tb_function" VALUES (41, NULL, 1, NULL, '', '/custtypereport/index', '人员类别消费报表', 4, 35);
-
+INSERT INTO "tb_function" VALUES (42, NULL, 1, NULL, '', '/transcountreport/index', '消费人次报表', NULL, 36);
 
 
 INSERT INTO "tb_mealtype" (mealtype,endtime,lastsaved,mealname) VALUES ('dinner', '235959', '20190709102922', '晚餐');
diff --git a/src/main/resources/templates/restaurant/custtypereport/index.html b/src/main/resources/templates/restaurant/custtypereport/index.html
index ca72230..b445e3d 100644
--- a/src/main/resources/templates/restaurant/custtypereport/index.html
+++ b/src/main/resources/templates/restaurant/custtypereport/index.html
@@ -51,8 +51,8 @@
             <tr>
                 <th rowspan="3" style="text-align: center;min-width: 60px;">序号</th>
                 <th rowspan="3" style="text-align: center;min-width: 100px;">食堂</th>
-                <th colspan="6" style="text-align: center;">内部人员消费支付</th>
-                <th colspan="6" style="text-align: center;">外部人员消费支付</th>
+                <th colspan="6" style="text-align: center;">含餐补消费支付</th>
+                <th colspan="6" style="text-align: center;">无餐补消费支付</th>
                 <th  rowspan="3" style="text-align: center;">合计消费金额</th>
                 <th  rowspan="3" style="text-align: center;">合计消费次数</th>
             </tr>
diff --git a/src/main/resources/templates/restaurant/custtypereport/print/printcusttypereport.html b/src/main/resources/templates/restaurant/custtypereport/print/printcusttypereport.html
index b380bd3..8196bcc 100644
--- a/src/main/resources/templates/restaurant/custtypereport/print/printcusttypereport.html
+++ b/src/main/resources/templates/restaurant/custtypereport/print/printcusttypereport.html
@@ -22,8 +22,8 @@
             <tr>
                 <th rowspan="3" style="text-align: center;min-width: 60px;">序号<br/> <br/> </th>
                 <th rowspan="3" style="text-align: center;min-width: 160px;">食堂<br/> <br/> </th>
-                <th colspan="6" style="text-align: center;">内部人员消费支付</th>
-                <th colspan="6" style="text-align: center;">外部人员消费支付</th>
+                <th colspan="6" style="text-align: center;">含餐补消费支付</th>
+                <th colspan="6" style="text-align: center;">无餐补消费支付</th>
                 <th  rowspan="3" style="text-align: center;min-width: 60px;">合计<br/>消费<br/>金额</th>
                 <th  rowspan="3" style="text-align: center;min-width: 60px;">合计<br/>消费<br/>次数</th>
             </tr>