From fc4af63b26a4c45daa0db6ae9df48ce455ba1c54 Mon Sep 17 00:00:00 2001
From: longz <longzhaoz@qq.com>
Date: 星期四, 02 七月 2026 19:33:07 +0800
Subject: [PATCH] Revert "update"

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java |   38 ++++--------------
 cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/storeIncome.html                     |   73 +++++++++++++++++++++++++-----------
 2 files changed, 60 insertions(+), 51 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
index bf2d67c..990dbda 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
@@ -64,9 +64,6 @@
 
     private Integer resolveStoreId(Integer storeId) {
         Integer objectType = UserExt.getUser().getObjectType();
-        if (Integer.valueOf(3).equals(objectType)) {
-            return UserExt.getUser().getObjectId();
-        }
         if (!Integer.valueOf(2).equals(objectType) || storeId == null) {
             return storeId;
         }
@@ -276,16 +273,7 @@
         }
 
         // 积分商品
-        List<Integer> pointMerchandiseStoreIds = Collections.emptyList();
-        if (storeId != null) {
-            pointMerchandiseStoreIds = Collections.singletonList(storeId);
-        } else if (operatorId != null) {
-            pointMerchandiseStoreIds = storeIds;
-            if (pointMerchandiseStoreIds.size() == 0) {
-                pointMerchandiseStoreIds = Collections.singletonList(-1);
-            }
-        }
-        List<PointMerchandiseIncomeVo> amount = pointMercharsClient.getAmount(pointMerchandiseStoreIds);
+        List<PointMerchandiseIncomeVo> amount = pointMercharsClient.getAmount(cityManagerId);
         for (PointMerchandiseIncomeVo pointMerchandiseIncomeVo : amount) {
             IncomeVO temp = new IncomeVO();
             if (pointMerchandiseIncomeVo==null) continue;
@@ -808,8 +796,7 @@
     @RequestMapping(value = "/backStore")
     @ResponseBody
     public Object backStore(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -958,8 +945,7 @@
     @RequestMapping(value = "/stuStores")
     @ResponseBody
     public Object stuStores(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -996,8 +982,7 @@
     @RequestMapping(value = "/courseStore")
     @ResponseBody
     public Object courseStore(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(id == null ? -1 : id));
+        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(id));
         HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt);
         return map;
     }
@@ -1025,8 +1010,7 @@
     @RequestMapping(value = "/userAndVipStore")
     @ResponseBody
     public Object userAndVipStore(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -1116,8 +1100,7 @@
     @RequestMapping(value = "/actStore")
     @ResponseBody
     public Object actStore(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -1286,8 +1269,7 @@
     @RequestMapping("/selectStore")
     public Object selectStore(Integer id,String time) {
         HashMap<String, Object> map = new HashMap<>();
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -1578,8 +1560,7 @@
     @ResponseBody
     public Object stuUserDataStore(Integer id) {
 
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
@@ -1632,8 +1613,7 @@
     @RequestMapping("/selectStoreJx")
     @ResponseBody
     public Object selectStoreJx(Integer id) {
-        id = resolveStoreId(id);
-        List<Integer> collect1 = Arrays.asList(id == null ? -1 : id);
+        List<Integer> collect1 = Arrays.asList(id);
         //课程
         List<Integer> list = coursePackagePaymentClient.queryPaymentCoursePackage(collect1);
         //场地
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/storeIncome.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/storeIncome.html
index 6d9ebd3..0e5b55f 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/storeIncome.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/dataStatistics/storeIncome.html
@@ -268,13 +268,6 @@
 <script src="${ctxPath}/modular/system/dataStatistics/tSite.js"></script>
 <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script>
 <script>
-    function currentStoreId() {
-        if ($("#objectType").val() == 3) {
-            return $("#objectId").val();
-        }
-        return $("#cCode").val();
-    }
-
 
 
     function search(){
@@ -398,7 +391,11 @@
 
         });
         ajax.set("type",1);
-        ajax.set("storeId", currentStoreId())
+        if($("#objectType").val()==3){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("storeId", $("#cCode").val())
+        }
         ajax.start();
         // 营收
         var income  = echarts.init(document.getElementById('income'));
@@ -424,7 +421,7 @@
 
 
     function srtj() {
-        var id = currentStoreId()
+        var id = $("#cCode").val()
         var beginTime = $("#beginTime").val()
         console.log(id)
         if(id==""){
@@ -553,7 +550,11 @@
         }, function (data) {
 
         });
-        ajax.set("id", id)
+        if($("#objectType").val()==3){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("id", id)
+        }
         ajax.set("time",beginTime);
         ajax.start();
 
@@ -561,7 +562,7 @@
 
 
     function yytj() {
-        let id  = currentStoreId()
+        let id  = $("#cCode").val()
         console.log(id)
         if(id==''){
             Feng.info("请先选择门店");
@@ -686,12 +687,16 @@
         }, function (data) {
 
         });
-        ajax.set("id", id)
+        if($("#objectType").val()==3){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("id", id)
+        }
         ajax.start();
     }
 
     function jxtj()     {
-        var id = currentStoreId()
+        var id = $("#cCode").val()
         console.log(id,333)
         if(id==""){
             Feng.info("请先选择门店");
@@ -804,13 +809,17 @@
 
         });
 
-        ajax.set("id", id)
+        if($("#objectType").val()==3){
+            ajax.set("id",$("#objectId").val())
+        }else {
+            ajax.set("id", id)
+        }
         ajax.start();
 
     }
     function tuifei() {
         var myChart1 = echarts.init(document.getElementById('refund'));
-        let id  = currentStoreId()
+        let id  = $("#cCode").val()
         console.log(id)
         if(id==''){
             Feng.info("请先选择门店");
@@ -885,7 +894,11 @@
 
             };
         });
-        ajax3.set("id", id)
+        if($("#objectType").val()==3){
+            ajax3.set("id",$("#objectId").val())
+        }else {
+            ajax3.set("id", id)
+        }
         ajax3.start();
 
         myChart1.on('legendselectchanged', obj => {
@@ -1000,7 +1013,11 @@
                 ]
             };
         });
-        ajax2.set("id", currentStoreId())
+        if($("#objectType").val()==3){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", $("#cCode").val())
+        }
         ajax2.start()
 
         myChart6.setOption(option6);
@@ -1023,7 +1040,7 @@
             }
             myChart2.setOption(options, true)
         });
-        let id  = currentStoreId()
+        let id  = $("#cCode").val()
         console.log(id)
         if(id==''){
             Feng.info("请先选择门店");
@@ -1172,7 +1189,11 @@
                 ]
             };
         });
-        ajax2.set("id", id)
+        if($("#objectType").val()==3){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", id)
+        }
         ajax2.start()
         myChart2.setOption(option2);
         myChart3.setOption(option3);
@@ -1261,7 +1282,11 @@
                 ]
             };
         });
-        ajax2.set("id", currentStoreId())
+        if($("#objectType").val()==3){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", $("#cCode").val())
+        }
         ajax2.start()
         myChart7.setOption(option7);
     }
@@ -1289,7 +1314,7 @@
             }
             myChart5.setOption(options, true)
         });
-        let id  = currentStoreId()
+        let id  = $("#cCode").val()
         console.log(id)
         if(id==''){
             Feng.info("请先选择门店");
@@ -1397,7 +1422,11 @@
             };
         });
 
-        ajax2.set("id", id)
+        if($("#objectType").val()==3){
+            ajax2.set("id",$("#objectId").val())
+        }else {
+            ajax2.set("id", id)
+        }
         ajax2.start()
         myChart4.setOption(option4);
         myChart5.setOption(option5);

--
Gitblit v1.7.1