代码优化
This commit is contained in:
@@ -143,7 +143,7 @@ public class RedisKeyExpirationListener extends KeyExpirationEventMessageListene
|
||||
//装置下线
|
||||
csEquipmentDeliveryService.updateRunStatusBynDid(nDid, AccessEnum.OFFLINE.getCode());
|
||||
startScheduledTask(scheduler,nDid,version);
|
||||
logDto.setOperate("客户端离线进入定时任务");
|
||||
logDto.setOperate(nDid +"客户端离线进入定时任务");
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -154,7 +154,7 @@ public class RedisKeyExpirationListener extends KeyExpirationEventMessageListene
|
||||
else {
|
||||
//装置下线
|
||||
csEquipmentDeliveryService.updateRunStatusBynDid(nDid, AccessEnum.OFFLINE.getCode());
|
||||
logDto.setOperate("主任务执行失败,装置下线,进入定时任务");
|
||||
logDto.setOperate(nDid +"主任务执行失败,装置下线,进入定时任务");
|
||||
csLogsFeignClient.addUserLog(logDto);
|
||||
log.info("客户端离线进入定时任务...");
|
||||
startScheduledTask(scheduler,nDid,version);
|
||||
|
||||
@@ -88,8 +88,8 @@ public class AskDeviceDataServiceImpl implements AskDeviceDataService {
|
||||
public boolean downloadFile(String nDid, String name, Integer size, String fileCheck) {
|
||||
boolean result = false;
|
||||
try {
|
||||
redisUtil.saveByKeyWithExpire("fileDowning:"+nDid,"fileDowning",300L);
|
||||
redisUtil.saveByKeyWithExpire("fileCheck"+name,fileCheck,300L);
|
||||
redisUtil.saveByKeyWithExpire("fileDowning:"+nDid,"fileDowning",600L);
|
||||
redisUtil.saveByKeyWithExpire("fileCheck"+name,fileCheck,600L);
|
||||
Object object = getDeviceMid(nDid);
|
||||
if (!Objects.isNull(object)) {
|
||||
mid = (Integer) object;
|
||||
|
||||
@@ -2,14 +2,12 @@ package com.njcn.access.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||
import com.github.tocrhz.mqtt.publisher.MqttPublisher;
|
||||
import com.njcn.access.enums.AccessEnum;
|
||||
import com.njcn.access.enums.AccessResponseEnum;
|
||||
import com.njcn.access.enums.DataModel;
|
||||
import com.njcn.access.enums.TypeEnum;
|
||||
import com.njcn.access.handler.MqttMessageHandler;
|
||||
import com.njcn.access.mapper.CsDevModelMapper;
|
||||
import com.njcn.access.pojo.dto.ReqAndResDto;
|
||||
import com.njcn.access.pojo.dto.UploadFileDto;
|
||||
@@ -21,13 +19,11 @@ import com.njcn.access.service.*;
|
||||
import com.njcn.access.utils.CRC32Utils;
|
||||
import com.njcn.access.utils.JsonUtil;
|
||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.CsLogsFeignClient;
|
||||
import com.njcn.csdevice.api.DevModelFeignClient;
|
||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||
import com.njcn.csdevice.pojo.po.*;
|
||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.redis.pojo.enums.AppRedisKey;
|
||||
@@ -42,7 +38,6 @@ import com.njcn.system.pojo.vo.DictTreeVO;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -1193,44 +1188,44 @@ public class CsDevModelServiceImpl implements ICsDevModelService {
|
||||
switch (name) {
|
||||
//数据集
|
||||
case "Ds$Apf$Master$01":
|
||||
showName = "APF模块数据";
|
||||
showName = "APF模块数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$01":
|
||||
showName = "APF模块1数据";
|
||||
showName = "APF模块1数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$02":
|
||||
showName = "APF模块2数据";
|
||||
showName = "APF模块2数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$03":
|
||||
showName = "APF模块3数据";
|
||||
showName = "APF模块3数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$04":
|
||||
showName = "APF模块4数据";
|
||||
showName = "APF模块4数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$05":
|
||||
showName = "APF模块5数据";
|
||||
showName = "APF模块5数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$06":
|
||||
showName = "APF模块6数据";
|
||||
showName = "APF模块6数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$07":
|
||||
showName = "APF模块7数据";
|
||||
showName = "APF模块7数据模板";
|
||||
break;
|
||||
case "Ds$Apf$module$08":
|
||||
showName = "APF模块8数据";
|
||||
showName = "APF模块8数据模板";
|
||||
break;
|
||||
case "Ds$Pqd$Stat$01":
|
||||
if (Objects.equals(code, DicDataEnum.CONNECT_DEV.getCode()) || Objects.isNull(code)){
|
||||
showName = "电网侧数据";
|
||||
showName = "电网侧数据模板";
|
||||
} else if (Objects.equals(code, DicDataEnum.PORTABLE.getCode())){
|
||||
showName = "监测1#数据";
|
||||
showName = "监测1#数据模板";
|
||||
}
|
||||
break;
|
||||
case "Ds$Pqd$Stat$02":
|
||||
if (Objects.equals(code, DicDataEnum.CONNECT_DEV.getCode()) || Objects.isNull(code)){
|
||||
showName = "负载侧数据";
|
||||
showName = "负载侧数据模板";
|
||||
} else if (Objects.equals(code, DicDataEnum.PORTABLE.getCode())){
|
||||
showName = "监测2#数据";
|
||||
showName = "监测2#数据模板";
|
||||
}
|
||||
break;
|
||||
//波形参数名称
|
||||
|
||||
Reference in New Issue
Block a user