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