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