Browse Source

调整大屏的数据

dev
pref_mail@163.com 4 days ago
parent
commit
379442097e
  1. 6
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/LargeScreenDataEntity.java
  2. 79
      blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java
  3. 33
      blade-service/logpm-report/src/main/java/com/logpm/report/config/InterceptorAdapterConfig.java
  4. 74
      blade-service/logpm-report/src/main/java/com/logpm/report/config/XxlJobConfig.java
  5. 32
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/LargeScreenController.java
  6. 100
      blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java
  7. 18
      blade-service/logpm-report/src/main/java/com/logpm/report/job/LargeScreenQueryXxlJob.java
  8. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BillingDataMapper.xml
  9. 15
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java
  10. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BinLocationServiceImpl.java
  11. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BusinessRationServiceImpl.java
  12. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/CarsLoadDataServiceImpl.java
  13. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/DeliveryDataServiceImpl.java
  14. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/MapWarehouseServiceImpl.java
  15. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/NodeDataServiceImpl.java
  16. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/TrunkDataServiceImpl.java

6
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/LargeScreenDataEntity.java

@ -13,7 +13,6 @@ import java.util.Map;
@Data
@TableName("logpm_large_screen_data")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
public class LargeScreenDataEntity extends TenantEntity {
/** 预留1 */
@ -33,9 +32,6 @@ public class LargeScreenDataEntity extends TenantEntity {
private String reserve5 ;
@ApiModelProperty(name = "数据",notes = "")
private Map<String, Object> data;
private String data;
public LargeScreenDataEntity(Map<String, Object> data) {
this.data = data;
}
}

79
blade-service/logpm-report/src/main/java/com/logpm/report/aspect/JobAnnotationAspect.java

@ -0,0 +1,79 @@
package com.logpm.report.aspect;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import lombok.AllArgsConstructor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.component.MockLoginService;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.redis.lock.LockType;
import org.springblade.core.redis.lock.RedisLockClient;
import org.springblade.core.tool.utils.ThreadLocalUtil;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpHeaders;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@Aspect
@Component
@AllArgsConstructor
public class JobAnnotationAspect {
private final BladeRedis bladeRedis;
private final Environment environment;
private final RedisLockClient redisLockClient;
private final MockLoginService mockLoginService;
@Around("@annotation(com.xxl.job.core.handler.annotation.XxlJob)")
public Object xxlJobAnnotationMethods(ProceedingJoinPoint joinPoint) throws Throwable {
JSONObject jsonObject = mockLogin();
MockHttpServletRequest mockRequest = new MockHttpServletRequest();
mockRequest.addHeader("Blade-Auth", "bearer "+jsonObject.get("access_token"));
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(mockRequest));
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add("Blade-Auth","bearer "+jsonObject.get("access_token") );
httpHeaders.add( "Authorization", "Basic bG9jYWw6bG9jYWxfc2VjcmV0");
ThreadLocalUtil.put("bladeContext", httpHeaders);
DynamicDataSourceContextHolder.push(jsonObject.getString("tenant_id"));
// 执行原方法
Object result = joinPoint.proceed();
// 在方法执行后,从数据源上下文中移除租户ID
DynamicDataSourceContextHolder.poll();
return result;
}
private JSONObject mockLogin() throws InterruptedException {
String account ="shujutongbu";
String tenantId ="627683";
String key =CacheNames.LOCAL_SERVER_USER+tenantId+":"+account;
String lockKey =key+":lock";
JSONObject data =bladeRedis.get(key);
if(Objects.isNull(data)){
boolean flag = redisLockClient.tryLock(lockKey, LockType.FAIR, 5000, 10000, TimeUnit.MILLISECONDS);
if(flag){
data =bladeRedis.get(key);
if(Objects.isNull(data)){
data = mockLoginService.mockToken(tenantId,account);
bladeRedis.setEx(key,data,2591990L);
redisLockClient.unLock(lockKey, LockType.FAIR);
}
}
}
return data;
}
}

33
blade-service/logpm-report/src/main/java/com/logpm/report/config/InterceptorAdapterConfig.java

@ -0,0 +1,33 @@
package com.logpm.report.config;
import com.logpm.report.interceptor.LocalServerLoginAccountsInterceptor;
import lombok.AllArgsConstructor;
import org.springblade.common.component.MockLoginService;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.redis.lock.RedisLockClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* 为所有的的
*/
@Configuration
@AllArgsConstructor
public class InterceptorAdapterConfig implements WebMvcConfigurer {
private final BladeRedis redis;
private final RedisLockClient redisLockClient;
private final MockLoginService mockLoginService;
@Override
public void addInterceptors(InterceptorRegistry interceptorRegistry) {
interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,redisLockClient,mockLoginService)).addPathPatterns("/largeScreen/**").order(1);
}
}

74
blade-service/logpm-report/src/main/java/com/logpm/report/config/XxlJobConfig.java

@ -0,0 +1,74 @@
package com.logpm.report.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Configuration(proxyBeanMethods = false)
public class XxlJobConfig {
private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.executor.appname}")
private String appName;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡容器内部署等情况可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

32
blade-service/logpm-report/src/main/java/com/logpm/report/controller/LargeScreenController.java

@ -37,22 +37,22 @@ public class LargeScreenController{
public LargeScreenController(
// 正式使用是使用这个
// @Qualifier(value = "mapWarehouseServiceHttp") IMapWarehouseService mapWarehouseService,
// @Qualifier(value = "billingDataServiceHttp") IBillingDataService billingDataService,
// @Qualifier(value = "carsLoadDataServiceHttp") ICarsLoadDataService carsLoadDataService,
// @Qualifier(value = "nodeDataServiceHttp") INodeDataService nodeData,
// @Qualifier(value = "binLocationServiceHttp") IBinLocationService binLocation,
// @Qualifier(value = "trunkDataServiceHttp") ITrunkDataService trunkData,
// @Qualifier(value = "deliveryDataServiceHttp") IDeliveryDataService deliveryDataService,
// @Qualifier(value = "businessRationServiceHttp") IBusinessRationService businessRatio
IMapWarehouseService mapWarehouseService,
IBillingDataService billingDataService,
ICarsLoadDataService carsLoadDataService,
INodeDataService nodeData,
IBinLocationService binLocation,
ITrunkDataService trunkData,
IDeliveryDataService deliveryDataService,
IBusinessRationService businessRatio
@Qualifier(value = "mapWarehouseServiceHttp") IMapWarehouseService mapWarehouseService,
@Qualifier(value = "billingDataServiceHttp") IBillingDataService billingDataService,
@Qualifier(value = "carsLoadDataServiceHttp") ICarsLoadDataService carsLoadDataService,
@Qualifier(value = "nodeDataServiceHttp") INodeDataService nodeData,
@Qualifier(value = "binLocationServiceHttp") IBinLocationService binLocation,
@Qualifier(value = "trunkDataServiceHttp") ITrunkDataService trunkData,
@Qualifier(value = "deliveryDataServiceHttp") IDeliveryDataService deliveryDataService,
@Qualifier(value = "businessRationServiceHttp") IBusinessRationService businessRatio
// IMapWarehouseService mapWarehouseService,
// IBillingDataService billingDataService,
// ICarsLoadDataService carsLoadDataService,
// INodeDataService nodeData,
// IBinLocationService binLocation,
// ITrunkDataService trunkData,
// IDeliveryDataService deliveryDataService,
// IBusinessRationService businessRatio
) {
this.mapWarehouseService = mapWarehouseService;
this.billingDataService = billingDataService;

100
blade-service/logpm-report/src/main/java/com/logpm/report/interceptor/LocalServerLoginAccountsInterceptor.java

@ -0,0 +1,100 @@
package com.logpm.report.interceptor;
import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.component.MockLoginService;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.wrapper.CustomHttpServletRequestWrapper;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.redis.lock.LockType;
import org.springblade.core.redis.lock.RedisLockClient;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.core.tool.utils.ThreadLocalUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@Log4j2
@AllArgsConstructor
public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapter {
private final BladeRedis bladeRedis;
private final RedisLockClient redisLockClient;
private final MockLoginService mockLoginService;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws CustomerException {
try {
CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request);
String account ="shujutongbu";
String tenantId = request.getHeader("tenantId");
tenantId = StringUtil.isBlank(tenantId)?"627683":tenantId;
String key =CacheNames.LOCAL_SERVER_USER+tenantId+":"+account;
String lockKey =key+":lock";
JSONObject data =bladeRedis.get(key);
if(Objects.isNull(data)){
boolean flag = redisLockClient.tryLock(lockKey, LockType.FAIR, 5000, 10000, TimeUnit.MILLISECONDS);
if(flag){
data =bladeRedis.get(key);
if(Objects.isNull(data)){
data = mockLoginService.mockToken(tenantId,account);
bladeRedis.setEx(key,data,2591990L);
redisLockClient.unLock(lockKey, LockType.FAIR);
}
}
}
// 修改或添加header
// 发送登录请求
log.info("##########preHandle: request={}", request);
wrappedRequest.addHeader("Blade-Auth", "bearer "+data.getString("access_token"));
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add("Blade-Auth","bearer "+data.get("access_token") );
httpHeaders.add( "Authorization", "Basic bG9jYWw6bG9jYWxfc2VjcmV0");
ThreadLocalUtil.put("bladeContext", httpHeaders);
// 用包装后的request替换原始request
request = wrappedRequest;
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
return true;
} catch (Exception e) {
returnJson(response, JSONObject.toJSONString(R.fail(500, "服务异常,请联系管理员")));
return false;
}
}
private void returnJson(HttpServletResponse response, String json) {
PrintWriter writer = null;
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json");
try {
writer = response.getWriter();
writer.print(json);
} catch (IOException e) {
System.out.println(e.getMessage());
} finally {
if (writer != null) {
writer.close();
}
}
}
}

18
blade-service/logpm-report/src/main/java/com/logpm/report/job/LargeScreenQueryXxlJob.java

@ -1,15 +1,19 @@
package com.logpm.report.job;
import com.alibaba.fastjson.JSON;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper;
import com.logpm.report.service.largeScreen.*;
import com.logpm.report.vo.largeScreen.XxlJobQueryVO;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.HashMap;
/**
@ -34,9 +38,8 @@ public class LargeScreenQueryXxlJob {
/**
* 数据查询
*/
@XxlJob("LargeScreenQuery")
public void query()
{
@XxlJob("largeScreenexExcute")
public ReturnT<String> largeScreenexExcute(String param) {
XxlJobQueryVO xxlJobQueryVO = new XxlJobQueryVO();
xxlJobQueryVO.setMapWarehouse(mapWarehouseService.list());
xxlJobQueryVO.setBillingData(billingDataService.getBillingData());
@ -64,7 +67,14 @@ public class LargeScreenQueryXxlJob {
data.put("deliveryData", xxlJobQueryVO.getDeliveryData());
data.put("deliveryYearData", xxlJobQueryVO.getDeliveryYearData());
data.put("businessRatio", xxlJobQueryVO.getBusinessRatio());
LargeScreenDataEntity largeScreenDataEntity = new LargeScreenDataEntity();
largeScreenDataEntity.setData(JSON.toJSONString(data));
largeScreenDataEntity.setCreateTime(new Date());
largeScreenDataEntity.setUpdateTime(new Date());
largeScreenDataEntity.setIsDeleted(0);
largeScreenDataEntity.setStatus(1);
largeScreenDataMapper.insert(largeScreenDataEntity);
largeScreenDataMapper.insert(new LargeScreenDataEntity(data));
return ReturnT.SUCCESS;
}
}

2
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BillingDataMapper.xml

@ -8,7 +8,7 @@
sum(d.volume) as volume,
count(d.id) as value
from logpm_platform.logpm_warehouse_waybill as w
INNER JOIN logpm_platform.logpm_trunkline_advance_detail as d on w.waybill_no = d.waybill_no
INNER JOIN logpm_platform.logpm_trunkline_advance_detail as d on w.id = d.waybill_id
where
w.freeze_status = 0
and w.create_time BETWEEN #{startTime} and #{endTime}

15
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BillingDataServiceImpl.java

@ -1,6 +1,7 @@
package com.logpm.report.service.largeScreen.httpImpl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.BillingDataMapper;
@ -35,7 +36,7 @@ public class BillingDataServiceImpl implements IBillingDataService {
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime));
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getBillingData();
}
@ -44,9 +45,15 @@ public class BillingDataServiceImpl implements IBillingDataService {
public List<WarehouseBillingDataVO> getWarehouseBillingData() {
LargeScreenDataEntity largeScreenDataEntity = largeScreenDataMapper.selectOne(Wrappers.<LargeScreenDataEntity>lambdaQuery().orderByDesc(LargeScreenDataEntity::getCreateTime));
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getWarehouseBillingData();
List<WarehouseBillingDataVO> warehouseBillingData = init.getWarehouseBillingData();
// 按照开单件数 倒序排列
warehouseBillingData.sort((o1, o2) -> o2.getValue() - o1.getValue());
return warehouseBillingData;
}
@Override
@ -56,7 +63,7 @@ public class BillingDataServiceImpl implements IBillingDataService {
if (largeScreenDataEntity == null) {
return new ArrayList<>();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getMonthBillingData();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BinLocationServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.BinLocationMapper;
@ -25,7 +26,7 @@ public class BinLocationServiceImpl implements IBinLocationService {
if (largeScreenDataEntity == null) {
return new BinLocationDataVO();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getBinLocationData();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/BusinessRationServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.BusinessRatioMapper;
@ -27,7 +28,7 @@ public class BusinessRationServiceImpl implements IBusinessRationService {
if (largeScreenDataEntity == null) {
return new BusinessRatioDataVO();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getBusinessRatio();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/CarsLoadDataServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.CarsLoadDataMapper;
@ -39,7 +40,7 @@ public class CarsLoadDataServiceImpl implements ICarsLoadDataService {
return new ArrayList<>();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return isDelivery.equals(1)
? init.getCareerLineDeliveryData()

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/DeliveryDataServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.DeliveryDataMapper;
@ -29,7 +30,7 @@ public class DeliveryDataServiceImpl implements IDeliveryDataService {
return new DeliveryDataVO();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return isYear.equals(1)
? init.getDeliveryYearData()

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/MapWarehouseServiceImpl.java

@ -1,6 +1,7 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper;
@ -35,7 +36,7 @@ public class MapWarehouseServiceImpl implements IMapWarehouseService {
if (largeScreenDataEntity == null) {
return new ArrayList<>();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getMapWarehouse();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/NodeDataServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper;
@ -25,7 +26,7 @@ public class NodeDataServiceImpl implements INodeDataService {
if (largeScreenDataEntity == null) {
return new NodeDataVO();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getNodeData();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/httpImpl/TrunkDataServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.largeScreen.httpImpl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.report.entity.LargeScreenDataEntity;
import com.logpm.report.mapper.largeScreen.LargeScreenDataMapper;
@ -30,7 +31,7 @@ public class TrunkDataServiceImpl implements ITrunkDataService {
return new TrunkDataVO();
}
XxlJobQueryVO init = XxlJobQueryVO.init(largeScreenDataEntity.getData());
XxlJobQueryVO init = JSON.parseObject(largeScreenDataEntity.getData(), XxlJobQueryVO.class);
return init.getTrunkData();
}

Loading…
Cancel
Save