From 8300d695f1643dc3286edc545455e816bc18d10c Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 18 Feb 2022 11:27:34 +0800
Subject: [PATCH] fix:修复赠送卡付bug

---
 zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
index 3469bb4..9901970 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -11,8 +11,8 @@
 import com.matrix.core.tools.excl.ExcelVersion;
 import com.matrix.system.common.bean.CustomerDataDictionary;
 import com.matrix.system.common.bean.SysUsers;
-import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.CustomerDataDictionaryDao;
+import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.AchieveNew;
@@ -78,7 +78,7 @@
     public @ResponseBody
     AjaxResult findSumDailyInfoNew(@RequestBody  AchieveNew achieveNew) {
         SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
-        if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
+         if (!DataAuthUtil.hasAllShopAuth()) {
             achieveNew.setShopId(sysUsers.getShopId());
         }
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, achieveNewService.findSumDailyInfoNew(achieveNew, null),
@@ -95,7 +95,7 @@
     AjaxResult findDailyInfoNew(@RequestBody  AchieveNew achieveNew) {
         SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
         achieveNew.setCompanyId(sysUsers.getCompanyId());
-        if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
+         if (!DataAuthUtil.hasAllShopAuth()) {
             achieveNew.setShopId(sysUsers.getShopId());
         }
         PaginationVO pageVo = new PaginationVO();
@@ -121,7 +121,7 @@
                 , "服务提成", "人头", "项目个数", "服务时间", "订单类型"};
         orderSheet.setHeaders(header);
         SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
-        if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
+         if (!DataAuthUtil.hasAllShopAuth()) {
             queryDto.setShopId(sysUsers.getShopId());
         }
         queryDto.setCompanyId(sysUsers.getCompanyId());
@@ -198,7 +198,7 @@
 
 
         orderSheet.setHeaders(header);
-        if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
+         if (!DataAuthUtil.hasAllShopAuth()) {
             achieveNew.setShopId(sysUsers.getShopId());
         }
 
@@ -272,5 +272,20 @@
         }
     }
 
+    @RequestMapping(value = "/findDailyBeautyList")
+    @ResponseBody
+    public AjaxResult findDailyBeautyList(@RequestBody  AchieveNew achieveNew) {
+        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        achieveNew.setCompanyId(sysUsers.getCompanyId());
+        if (!DataAuthUtil.hasAllShopAuth()) {
+            achieveNew.setShopId(sysUsers.getShopId());
+        }
+        PaginationVO pageVo = new PaginationVO();
+
+        pageVo.setOffset(achieveNew.getOffset());
+        pageVo.setLimit(achieveNew.getLimit());
+        return AjaxResult.buildSuccessInstance(achieveNewService.findDailyBeautyList(achieveNew, pageVo), achieveNewService.findDailyBeautyListTotal(achieveNew));
+    }
+
 }
 

--
Gitblit v1.9.1