From de5d98edb80742185b91b2d892167b82a8b64430 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Thu, 22 Jul 2021 18:03:24 +0800
Subject: [PATCH] Merge branch 'score_shop' into api_score_meger
---
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html | 2
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html | 14 -
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 8
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html | 4
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html | 8
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html | 13 -
zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java | 43 ++++
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java | 4
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html | 14 -
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html | 14 -
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html | 14 -
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html | 15 -
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html | 15 -
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 23 --
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html | 10
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html | 12 -
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html | 15 -
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java | 78 ++++++++
zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java | 43 ++++
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html | 14 -
zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java | 40 ++++
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html | 15 -
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html | 12
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html | 15 -
24 files changed, 265 insertions(+), 180 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index 6198d78..e570d17 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -243,8 +243,8 @@
public AjaxResult importVipInfo(HttpServletResponse response, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
String fileName = file.getOriginalFilename();
-// String dirPath = "E:";
- String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
+// String dirPath = "E:";
+ String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
File saveFile = new File(dirPath + "/" + fileName);
file.transferTo(saveFile);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index 45dde46..77709be 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -484,9 +484,6 @@
//检查交易限制调整
checkSealLimit(pageOrder);
- //交易业绩设置是否合理
- checkAchieveIsOk(pageOrder);
-
// 更新收款时间
pageOrder.setPayTime(new Date());
@@ -558,27 +555,7 @@
}
- /**
- * 交易业绩设置是否合理
- * @param pageOrder
- */
- private void checkAchieveIsOk(SysOrder pageOrder) {
- double huakouSum = pageOrder.getItems().stream()
- .mapToDouble(
- item ->
- item.getAchieveList().stream()
- .filter(achieveNew -> "划扣".equals(achieveNew.getPayMethod()))
- .mapToDouble(achieve -> achieve.getGoodsCash()).sum()
- ).sum();
- double czkPay= pageOrder.getFlows().stream()
- .filter(sysOrderFlow -> "储值卡".equals(sysOrderFlow.getPayMethod()))
- .mapToDouble(sysOrderFlow ->sysOrderFlow.getAmount().doubleValue()).sum();
-
- if(czkPay!=huakouSum){
- throw new GlobleException("划扣业绩不等于储值卡扣款金额,请修改业绩设置!");
- }
- }
/**
* 设置会员消费积分
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java
index 162b40c..317206f 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java
@@ -2,9 +2,13 @@
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.WebUtil;
+import com.matrix.core.tools.excl.ExcelSheetPO;
+import com.matrix.core.tools.excl.ExcelVersion;
import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.tools.DataAuthUtil;
+import com.matrix.system.common.tools.ResponseHeadUtil;
import com.matrix.system.hive.dao.SysOrderItemDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -12,6 +16,11 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import javax.servlet.http.HttpServletResponse;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Map;
/**
@@ -31,28 +40,83 @@
*/
@RequestMapping(value = "/showList")
public @ResponseBody
- AjaxResult showList( @RequestParam Map<String , Object> param) {
+ AjaxResult showList(@RequestParam Map<String, Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(orderItemDao.selectItemDetail(param),
orderItemDao.selectItemDetailTotal(param));
}
+ @RequestMapping(value = "/exportShowList")
+ public void exportShowList(@RequestParam Map<String, Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "产品销售明细统计";
+ String[] header = {"门店", "销售日期", "订单号", "商品名称", "分类", "客户名", "购买数量", "单价", "健康顾问", "支付方式", "状态"};
+ String[] column = {"SHOP_NAME", "pay_time", "ORDER_NO", "goodsName", "cateName", "VIP_NAME", "COUNT", "ZK_PRICE", "su_name", "pay_method", "status"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = orderItemDao.selectItemDetail(param);
+ exportExcel(title, header,column, dataList, response);
+ }
+
/**
* 产品销售明细统计
*/
@RequestMapping(value = "/summaryItemDetail")
public @ResponseBody
- AjaxResult summaryItemDetail( @RequestParam Map<String , Object> param) {
+ AjaxResult summaryItemDetail(@RequestParam Map<String, Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(orderItemDao.summaryItemDetail(param),
orderItemDao.summaryItemDetailTotal(param));
}
+ @RequestMapping(value = "/exportSummaryItemDetail")
+ public void exportSummaryItemDetail(@RequestParam Map<String, Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "产品销售明细统计";
+ String[] header = {"门店", "商品名称", "分类", "销售数量", "销售总额"};
+ String[] column = {"SHOP_NAME", "goodsName", "cateName", "COUNT", "ZK_PRICE"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = orderItemDao.summaryItemDetail(param);
+ exportExcel(title, header,column, dataList, response);
+ }
+
+
+ public static void exportExcel(String title, String[] header,String[] column, List<Map<String, Object>> dataList, HttpServletResponse response) throws Exception {
+ //这里是从数据库里查数据并组装成我们想要的数据结构的过程
+ List<ExcelSheetPO> res = new ArrayList<>();
+ ExcelSheetPO orderSheet = new ExcelSheetPO();
+ orderSheet.setSheetName(title);
+ orderSheet.setTitle(title);
+ orderSheet.setHeaders(header);
+ List<List<Object>> list = new ArrayList<>();
+ if (dataList.size() > 0) {
+ for (Map<String, Object> item : dataList) {
+ List<Object> temp = new ArrayList<>();
+ Arrays.stream(column).forEach(key-> temp.add(item.get(key)));
+ list.add(temp);
+ }
+ }
+ orderSheet.setDataList(list);
+ res.add(orderSheet);
+ response = ResponseHeadUtil.setExcelHead(response);
+ response.setHeader("Content-Disposition",
+ "attachment;filename=" + java.net.URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8"));
+ OutputStream os = response.getOutputStream();
+ com.matrix.core.tools.excl.ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true);
+ }
+
}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java
index 8c6133c..955fba1 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java
@@ -4,7 +4,7 @@
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.dao.SysProjUseDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -12,6 +12,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
import java.util.Map;
/**
@@ -33,12 +35,29 @@
public @ResponseBody
AjaxResult showList( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(projUseDao.selectItemDetail(param),
projUseDao.selectItemDetailTotal(param));
}
+
+ @RequestMapping(value = "/exportShowList")
+ public void exportShowList( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "项目剩余次数明细";
+ String[] header = {"客户名", "服务名称", "到期日期", "剩余次数", "单价", "项目类型", "套餐类型", "是否使用完成", "备注", "来源", "订单号"};
+ String[] column = {"VIP_NAME", "PROJ_NAME", "FAIL_TIME", "SURPLUS_COUNT", "PRICE", "TYPE_NAME", "type", "IS_OVER", "remark", "SOURCE", "ORDER_NO"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = projUseDao.selectItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
+ }
+
+
+
/**
* 项目剩余次数统计
@@ -47,12 +66,26 @@
public @ResponseBody
AjaxResult summaryItemDetail( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(projUseDao.summaryItemDetail(param),
projUseDao.summaryItemDetailTotal(param));
}
+ @RequestMapping(value = "/exportSummaryItemDetail")
+ public void exportSummaryItemDetail( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "项目剩余次数统计";
+ String[] header = {"服务名称", "项目类型", "剩余次数", "剩余消耗总额"};
+ String[] column = {"PROJ_NAME", "TYPE_NAME", "SURPLUS_COUNT", "PRICE"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = projUseDao.summaryItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
+ }
+
}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
index 81a5f11..f77a707 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
@@ -4,7 +4,7 @@
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.dao.SysBeauticianStateDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -12,6 +12,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
import java.util.Map;
/**
@@ -33,13 +35,29 @@
public @ResponseBody
AjaxResult showList( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(beauticianStateDao.selectItemDetail(param),
beauticianStateDao.selectItemDetailTotal(param));
}
+
+
+ @RequestMapping(value = "/exportShowList")
+ public void exportShowList( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "项目服务明细";
+ String[] header = {"门店", "预约时间","划扣时间","服务单号","服务名称","分类","客户名","次数","划扣单价","提成","美疗师","来源"};
+ String[] column = {"SHOP_NAME", "yy_time", "consume_time", "SERVICE_NO", "PROJ_NAME", "TYPE_NAME", "VIP_NAME", "COUNT", "PRICE", "extract", "su_name", "SOURCE"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = beauticianStateDao.selectItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
+ }
+
/**
* 项目服务明细统计
@@ -48,12 +66,27 @@
public @ResponseBody
AjaxResult summaryItemDetail( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(beauticianStateDao.summaryItemDetail(param),
beauticianStateDao.summaryItemDetailTotal(param));
}
+ @RequestMapping(value = "/exportSummaryItemDetail")
+ public void exportSummaryItemDetail( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "项目服务明细统计";
+ String[] header = {"门店", "服务名称","分类","总次数","消耗金额"};
+ String[] column = {"SHOP_NAME", "PROJ_NAME", "TYPE_NAME", "COUNT", "PRICE"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = beauticianStateDao.summaryItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
+ }
+
+
}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java
index 51305d5..cab77c6 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java
@@ -4,7 +4,7 @@
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.dao.MoneyCardUseDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -12,6 +12,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
import java.util.Map;
/**
@@ -33,11 +35,25 @@
public @ResponseBody
AjaxResult showList( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(moneyCardUseDao.selectItemDetail(param),
moneyCardUseDao.selectItemDetailTotal(param));
+ }
+
+ @RequestMapping(value = "/exportShowList")
+ public void exportShowList( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "客户充值卡明细";
+ String[] header = {"客户名", "充值卡名称","到期日期","剩余本金","剩余赠送金额","是否使用完成","是否为会籍卡","备注","来源","订单号"};
+ String[] column = {"VIP_NAME", "card_name","FAIL_TIME","real_money","gift_money","isOver","is_vip_car","remark","SOURCE","ORDER_NO"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = moneyCardUseDao.selectItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
}
/**
@@ -47,12 +63,26 @@
public @ResponseBody
AjaxResult summaryItemDetail( @RequestParam Map<String , Object> param) {
SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
- if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
- param.put("shopId",sysUsers.getShopId());
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
}
return AjaxResult.buildSuccessInstance(moneyCardUseDao.summaryItemDetail(param),
moneyCardUseDao.summaryItemDetailTotal(param));
}
+ @RequestMapping(value = "/exportSummaryItemDetail")
+ public void exportSummaryItemDetail( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception {
+ SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+ String title = "客户充值卡统计";
+ String[] header = {"充值卡名称", "剩余总本金", "剩余总赠送金额"};
+ String[] column = {"card_name", "real_money", "gift_money"};
+
+ if(!DataAuthUtil.hasAllShopAuth()){
+ param.put("shopId", sysUsers.getShopId());
+ }
+ List<Map<String, Object>> dataList = moneyCardUseDao.summaryItemDetail(param);
+ OrderStatisticsAction.exportExcel(title, header,column, dataList, response);
+ }
+
}
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
index 7bdfec4..a9ba0be 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -240,10 +240,10 @@
and a.orderType = #{record.orderType}
</if>
<if test="record.beginTimeVo != null ">
- and a.ORDER_TIME >= #{record.beginTimeVo}
+ and a.pay_time >= #{record.beginTimeVo}
</if>
<if test="record.endTimeVo != null ">
- <![CDATA[and a.ORDER_TIME <= #{record.endTimeVo}]]>
+ <![CDATA[and a.pay_time <= #{record.endTimeVo}]]>
</if>
</if>
@@ -321,10 +321,10 @@
and a.SHOP_ID = #{record.shopId}
</if>
<if test="record.beginTimeVo != null ">
- and a.ORDER_TIME >= #{record.beginTimeVo}
+ and a.pay_time >= #{record.beginTimeVo}
</if>
<if test="record.endTimeVo != null ">
- <![CDATA[and a.ORDER_TIME <= #{record.endTimeVo}]]>
+ <![CDATA[and a.pay_time <= #{record.endTimeVo}]]>
</if>
</if>
</select>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
index 5089a00..bef684f 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
@@ -52,7 +52,7 @@
</select>
</div>
<div class="form-group mr-20">
- <label>订单日期</label>
+ <label>付款日期</label>
<input autocomplete="off" name="beginTimeVo" type="text" class="form-control datetimepicker" id="beginTime">-
<input autocomplete="off" name="endTimeVo" type="text" class="form-control datetimepicker" id="endTime">
</div>
@@ -100,6 +100,8 @@
<th data-field="vipPhone">客户手机号</th>
<th data-field="orderTime" data-formatter="MGrid.getTime"
data-sortable="true">下单时间</th>
+ <th data-field="payTime" data-formatter="MGrid.getTime"
+ data-sortable="true">支付时间</th>
<th data-field="statu">订单状态</th>
<th data-field="total">订单总价</th>
<th data-field="zkTotal">折后价</th>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html
index 70e9301..81a5c7c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html
@@ -103,14 +103,10 @@
url:basePath+"/admin/moneyCardUseStatistics/showList"
});
});
-
+
function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/moneyCardUseStatistics/exportShowList?"+param;
}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html
index 2dfa73f..554ddec 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html
@@ -84,15 +84,11 @@
url:basePath+"/admin/moneyCardUseStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/moneyCardUseStatistics/exportSummaryItemDetail?"+param;
+ }
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html
index f6459f4..9f946dd 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html
@@ -121,12 +121,8 @@
});
function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/orderStatistics/exportShowList?"+param;
}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html
index 10f50c0..f3030f0 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html
@@ -102,7 +102,7 @@
function exportExcel(){
var param=MForm.toUrlParam("#serchform");
- window.location.href=basePath+"/form/furnsale/exportFurn? "+param;
+ window.location.href=basePath+"/admin/orderStatistics/exportSummaryItemDetail?"+param;
}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
index 2238a29..042aee0 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
@@ -122,15 +122,12 @@
sortOrder:"desc"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/serviceStatistics/exportShowList?"+param;
+ }
+
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html
index ca2c7ac..8b2b1d3 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html
@@ -99,15 +99,11 @@
url:basePath+"/admin/serviceStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/serviceStatistics/exportSummaryItemDetail?"+param;
+ }
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html
index 23a55cd..02bf9f9 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html
@@ -104,18 +104,14 @@
url:basePath+"/admin/projUseStatistics/showList"
});
});
-
+
function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/projUseStatistics/exportShowList?"+param;
}
- function initFunctionList() {
+ function initFunctionList() {
$.AjaxProxy({
a: false,
c: false,
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html
index 018f767..636a0f6 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html
@@ -73,15 +73,12 @@
url:basePath+"/admin/projUseStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/projUseStatistics/exportSummaryItemDetail?"+param;
+ }
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html
index 852a46c..31773f5 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html
@@ -103,18 +103,15 @@
url:basePath+"/admin/moneyCardUseStatistics/showList"
});
});
-
+
function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/moneyCardUseStatistics/exportShowList?"+param;
}
- function initFunctionList() {
+
+ function initFunctionList() {
$.AjaxProxy({
a: false,
c: false,
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html
index ca5daba..dc775ce 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html
@@ -85,15 +85,12 @@
url:basePath+"/admin/moneyCardUseStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/moneyCardUseStatistics/exportSummaryItemDetail?"+param;
+ }
+
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html
index dd2eb32..1a3af24 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html
@@ -111,15 +111,11 @@
url:basePath+"/admin/orderStatistics/showList"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/orderStatistics/exportShowList?"+param;
+ }
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html
index 2796f48..e256d5c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html
@@ -90,17 +90,13 @@
url:basePath+"/admin/orderStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/projUseStatistics/exportSummaryItemDetail?"+param;
+ }
+
function initFunctionList() {
$.AjaxProxy({
a: false,
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
index 80f18c5..7fe7948 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
@@ -115,15 +115,12 @@
sortOrder:"desc"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/serviceStatistics/exportShowList?"+param;
+ }
function initFunctionList() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html
index 9913565..aa6588b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html
@@ -91,16 +91,10 @@
url:basePath+"/admin/serviceStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
-
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/serviceStatistics/exportSummaryItemDetail?"+param;
+ }
function initFunctionList() {
$.AjaxProxy({
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html
index 0ba9414..ab0f0cb 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html
@@ -104,17 +104,15 @@
url:basePath+"/admin/projUseStatistics/showList"
});
});
-
+
+
function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/projUseStatistics/exportShowList?"+param;
}
+
function initFunctionList() {
$.AjaxProxy({
a: false,
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html
index 8e3fe77..cfcd41c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html
@@ -73,15 +73,12 @@
url:basePath+"/admin/projUseStatistics/summaryItemDetail"
});
});
-
- function exportExcel(){
- var select_begin = $("#select_begin").val();
- var select_end = $("#select_end").val();
- var select_id = $("#select_id").val();
- var goodsName = $("#goodsName").val();
- var guwen = $("#goodsName").val();
- window.location.href=basePath+"/form/furnsale/exportFurn?startTime="+select_begin+"&endTime="+select_end+"&goodsName="+goodsName+"&shopId="+select_id+"&guwen="+guwen;
- }
+
+
+ function exportExcel(){
+ var param=MForm.toUrlParam("#serchform");
+ window.location.href=basePath+"/admin/projUseStatistics/exportSummaryItemDetail?"+param;
+ }
function initFunctionList() {
--
Gitblit v1.9.1