Prechádzať zdrojové kódy

fix:“优化订单分析功能"

soobin 9 mesiacov pred
rodič
commit
58f1e78bfe

+ 23 - 23
src/main/java/com/szwl/service/impl/TOrderServiceImpl.java

@@ -607,7 +607,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         Page<OrderDaoChuDTO> result = new Page<>(param.getCurrent(), param.getSize(), true);
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
         List<Long> adminIds = new ArrayList<>();
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(param.getAdminId()));
             if (adminIds.isEmpty()) {
@@ -623,7 +623,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         }
         if (StringUtils.isNotEmpty(param.getClientId())) {
             // 如果type等于1,就查询设备所属商家是否是旗下管理的
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                 if (equipment == null) {
                     return result;
@@ -643,7 +643,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
             if (admin == null) {
                 return result;
             }
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 if (adminIds.contains(admin.getId())) {
                     query.eq(OrderStatisticsMonth::getAdminId, admin.getId());
                     adminIds.clear();
@@ -696,7 +696,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         Page<OrderDaoChuDTO> result = new Page<>(param.getCurrent(), param.getSize(), true);
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
         List<Long> adminIds = new ArrayList<>();
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(param.getAdminId()));
             if (adminIds.isEmpty()) {
@@ -711,8 +711,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
             query.eq(OrderStatisticsYear::getCompanyType, param.getCompanyType());
         }
         if (StringUtils.isNotEmpty(param.getClientId())) {
-            // 如果type等于1,就查询设备所属商家是否是旗下管理的
-            if (param.getType() == 1) {
+            // 如果type等于4,就查询设备所属商家是否是旗下管理的
+            if (param.getType() == 4) {
                 TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                 if (equipment == null) {
                     return result;
@@ -732,7 +732,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
             if (admin == null) {
                 return result;
             }
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 if (adminIds.contains(admin.getId())) {
                     query.eq(OrderStatisticsYear::getAdminId, admin.getId());
                     adminIds.clear();
@@ -785,7 +785,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         Page<OrderDaoChuDTO> result = new Page<>(param.getCurrent(), param.getSize(), true);
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
         List<Long> adminIds = new ArrayList<>();
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(param.getAdminId()));
             if (adminIds.isEmpty()) {
@@ -800,7 +800,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                 LambdaQueryWrapper<TOrder> queryWrapper = new LambdaQueryWrapper<>();
                 if (StringUtils.isNotEmpty(param.getClientId())) {
                     // 如果type等于1,就查询设备所属商家是否是旗下管理的
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                         if (equipment == null) {
                             return result;
@@ -821,7 +821,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                     if (admin == null) {
                         return result;
                     }
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         if (param.getAdminIds().contains(admin.getId())) {
                             queryWrapper.eq(TOrder::getAdminId, admin.getId());
                             param.setAdminId(String.valueOf(admin.getId()));
@@ -866,7 +866,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                 LambdaQueryWrapper<TCoinOrder> queryWrapper = new LambdaQueryWrapper<>();
                 if (StringUtils.isNotEmpty(param.getClientId())) {
                     // 如果type等于1,就查询设备所属商家是否是旗下管理的
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                         if (equipment == null) {
                             return result;
@@ -887,7 +887,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                     if (admin == null) {
                         return result;
                     }
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         if (param.getAdminIds().contains(admin.getId())) {
                             queryWrapper.eq(TCoinOrder::getAdminId, admin.getId());
                             param.setAdminId(String.valueOf(admin.getId()));
@@ -965,7 +965,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
     public <T> void statisticsYearExport(HttpServletResponse response, Class<T> clazz, StatisticsParam param) throws IOException {
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
         List<Long> adminIds = new ArrayList<>();
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(param.getAdminId()));
             if (adminIds.isEmpty()) {
@@ -981,7 +981,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         }
         if (StringUtils.isNotEmpty(param.getClientId())) {
             // 如果type等于1,就查询设备所属商家是否是旗下管理的
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                 if (equipment == null) {
                     return;
@@ -1002,7 +1002,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
             if (admin == null) {
                 return;
             }
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 if (adminIds.contains(admin.getId())) {
                     query.eq(OrderStatisticsYear::getAdminId, admin.getId());
                     adminIds.clear();
@@ -1060,7 +1060,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
     public <T> void statisticsMonthExport(HttpServletResponse response, Class<T> clazz, StatisticsParam param) throws IOException {
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
         List<Long> adminIds = new ArrayList<>();
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(param.getAdminId()));
             if (adminIds.isEmpty()) {
@@ -1076,7 +1076,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         }
         if (StringUtils.isNotEmpty(param.getClientId())) {
             // 如果type等于1,就查询设备所属商家是否是旗下管理的
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                 if (equipment == null) {
                     return;
@@ -1097,7 +1097,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
             if (admin == null) {
                 return;
             }
-            if (param.getType() == 1) {
+            if (param.getType() == 4) {
                 if (adminIds.contains(admin.getId())) {
                     query.eq(OrderStatisticsMonth::getAdminId, admin.getId());
                     adminIds.clear();
@@ -1162,7 +1162,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         // 每页大小
         int pageNo = param.getCurrent();
         // 如果类型是公司人员,就查下级管理的账户,如果是超管,查全部,默认查全部
-        if (param.getType() == 1) {
+        if (param.getType() == 4) {
             // 查询下级账户
             String adminId = param.getAdminId();
             List<Long> adminIds = R.getDataIfSuccess(szwlFeign.getAdminIdList(adminId));
@@ -1246,7 +1246,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                 LambdaQueryWrapper<TOrder> queryWrapper = new LambdaQueryWrapper<>();
                 if (StringUtils.isNotEmpty(param.getClientId())) {
                     // 如果type等于1,就查询设备所属商家是否是旗下管理的
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                         if (equipment == null) {
                             return orderDaoChuDTOList;
@@ -1267,7 +1267,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                     if (admin == null) {
                         return orderDaoChuDTOList;
                     }
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         if (param.getAdminIds().contains(admin.getId())) {
                             queryWrapper.eq(TOrder::getAdminId, admin.getId());
                             param.setAdminId(String.valueOf(admin.getId()));
@@ -1310,7 +1310,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                 LambdaQueryWrapper<TCoinOrder> queryWrapper = new LambdaQueryWrapper<>();
                 if (StringUtils.isNotEmpty(param.getClientId())) {
                     // 如果type等于1,就查询设备所属商家是否是旗下管理的
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(param.getClientId()));
                         if (equipment == null) {
                             return orderDaoChuDTOList;
@@ -1331,7 +1331,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
                     if (admin == null) {
                         return orderDaoChuDTOList;
                     }
-                    if (param.getType() == 1) {
+                    if (param.getType() == 4) {
                         if (param.getAdminIds().contains(admin.getId())) {
                             queryWrapper.eq(TCoinOrder::getAdminId, admin.getId());
                             param.setAdminId(String.valueOf(admin.getId()));