流水表修改
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/controller/CustReportController.java b/src/main/java/com/supwisdom/dlpay/restaurant/controller/CustReportController.java
index d812301..53c0ff3 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/controller/CustReportController.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/controller/CustReportController.java
@@ -104,7 +104,7 @@
searchBean.setDevgroupid(limit.getDevgroupid());
}
List<CustReportShowBean> datalist = custReportService.getCustReportSearchData(searchBean);
- String filename="终端消费报表";
+ String filename="个人消费报表";
custReportService.doCreateCustReportExcel(response, datalist, searchBean, filename, oper);
} catch (Exception e) {
e.printStackTrace();
diff --git a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CustReportServiceImpl.java b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CustReportServiceImpl.java
index 3810cb5..b6f4db8 100644
--- a/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CustReportServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/restaurant/service/impl/CustReportServiceImpl.java
@@ -10,6 +10,7 @@
import com.supwisdom.dlpay.restaurant.bean.CustReportShowBean;
import com.supwisdom.dlpay.restaurant.service.CustReportService;
import com.supwisdom.dlpay.restaurant.service.TermReportService;
+import com.supwisdom.dlpay.restaurant.util.DataUtil;
import com.supwisdom.dlpay.restaurant.util.ExcelPoiUtil;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -69,11 +70,12 @@
" cast(sum(case when t.revflag=1 then 0 when t.transtype='revert' then 0 when t.managefeetype ='normal' then 1 else 0 end) as int4) as totnormalcnt," +
" sum(case when t.revflag=1 then 0 when t.transtype='revert' then 0 else t.amount end) as totamt," +
" cast(sum(case when t.revflag=1 then 0 when t.transtype='revert' then 0 else 1 end) as int4) as totcnt" +
- " from tb_transdtl t " +
+ " from tb_customer c " +
+ " left join tb_transdtl t on t.custid=c.custid" +
" left join tb_device dev on t.termid=dev.id " +
" left join tb_shopsettlement s on s.shopid=t.shopid" +
" left join tb_discount_rule r on r.ruleid=t.ruleid" +
- " left join tb_customer c on t.custid=c.custid" +
+
" left join tb_dept d on d.deptcode=c.deptcode" +
" left join tb_card a on c.custid=a.custid" +
" where t.status='success' " +
@@ -108,7 +110,7 @@
}
query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(CustReportShowBean.class));
List<CustReportShowBean> list = query.getResultList();
- /*if (null != list){
+ if (null != list){
CustReportShowBean tot=new CustReportShowBean("合 计","","",0d,0,0d,0,0d,0,0d,0,0d,0,
0d,0,0,0d,0d,0,0d,0,0d);
for(CustReportShowBean b:list){
@@ -131,10 +133,13 @@
tot.setTotnormalcnt(tot.getTotnormalcnt()+b.getTotnormalcnt());
tot.setTotcnt(tot.getTotcnt()+b.getTotcnt());
tot.setTotamt(tot.getTotamt()+b.getTotamt());
+
+ b.setCustname(DataUtil.dataDesensitization(b.getCustname(), 1));
+ b.setCardno(DataUtil.dataDesensitization(b.getCardno(), 4));
}
list.add(tot);
return list;
- }*/
+ }
}
return new ArrayList<>(0);
@@ -154,7 +159,7 @@
@Override
public void doCreateCustReportExcel(HttpServletResponse response, List<CustReportShowBean> datalist, TermReportSearchBean searchBean, String filename, TOperator oper) {
HSSFWorkbook workbook = new HSSFWorkbook();
- HSSFSheet sheet = workbook.createSheet("终端消费报表");
+ HSSFSheet sheet = workbook.createSheet("个人消费报表");
int columns = 22; //
sheet.setColumnWidth(0, ExcelPoiUtil.columnWidth(25)); //日期
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 4e8c06e..6878c4d 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
@@ -314,8 +314,12 @@
info0[i][15] ="0";
info0[i][16] = "";
info0[i][17] = t.getRevbillno();
- info0[i][18] = "在线交易";
- info0[i][19] = "";
+ String transtype=t.getTranstype();
+ if(RestaurantConstant.TRANSTYPE_TRANSDTL_REVERT.equals(transtype)){
+ info0[i][18] = "撤销";
+ }else{
+ info0[i][18] = "消费";
+ }
String status = "";
switch (t.getStatus()) {
case "init":
@@ -330,10 +334,10 @@
default:
status = "未知状态";
}
+ info0[i][19]=t.getStatus();
info0[i][20]=status;
- info0[i][21]=status;
- info0[i][22]="T+1";
- info0[i][23]="普通";
+ info0[i][21]="T+1";
+ info0[i][22]="普通";
}
}
diff --git a/src/main/resources/templates/restaurant/custreport/print/report.html b/src/main/resources/templates/restaurant/custreport/print/report.html
index 7dfecd6..fd6c031 100644
--- a/src/main/resources/templates/restaurant/custreport/print/report.html
+++ b/src/main/resources/templates/restaurant/custreport/print/report.html
@@ -2,7 +2,7 @@
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
<meta charset="UTF-8">
- <title>客户消费报表</title>
+ <title>个人消费报表</title>
<link rel="stylesheet" th:href="@{/static/libs/layui/css/layui.css}"/>
<link rel="stylesheet" th:href="@{/static/custom/css/custom.css}"/>
@@ -10,7 +10,7 @@
<body>
<div class="layui-card">
<div class="layui-card-header" style="text-align: center;">
- <h1>客户消费报表</h1>
+ <h1>个人消费报表</h1>
</div>
<div class="layui-card-body">
<div class="layui-form toolbar">
diff --git a/src/main/resources/templates/restaurant/transdtl/indexview.html b/src/main/resources/templates/restaurant/transdtl/indexview.html
index c0d4651..5436a5b 100644
--- a/src/main/resources/templates/restaurant/transdtl/indexview.html
+++ b/src/main/resources/templates/restaurant/transdtl/indexview.html
@@ -152,8 +152,6 @@
{field: 'searchno', title: '检索参考号',width:120},
{field: 'serviceamt', title: '手续费',width:120},
{field: 'shopid', title: '商户号',width:120},
- {field: 'shopname', title: '商户名称',width:120},
- {field: 'revertamt', title: '退货金额',width:120},
{field: 'revertamt', title: '退货金额',width:120},
{field: 'revbillno', title: '原系统流水号',width:120},
{field: 'shopname', title: '商户名称',width:120},
@@ -167,23 +165,20 @@
return getTempDictValue('transtatusList',item.status);
}
},
- {
- field: 'status',
- title: '应答码',
- width:100,
- align: 'center',
- templet: function (item) {
- return getTempDictValue('transtatusList',item.status);
- }
- },
+ {field: 'status', title: '应答码',width:120},
{
field: 'transtype',
- title: '流水类型',
+ title: '交易类型',
width:100,
sort: true,
align: 'center',
templet: function (item) {
- return getTempDictValue('transtypeList',item.transtype);
+ if('revert'==item.transtype){
+ return '撤销'
+ }else{
+ return '消费'
+ }
+
}
},
{field: 'revertamt', title: '退货金额', width:100},