feat(新增滑窗配置)
commit
1ca5930f76
|
@ -1,28 +0,0 @@
|
|||
package com.muyu.clw.common.many.remote;
|
||||
|
||||
import com.muyu.clw.common.many.remote.factory.RemoteEnterpriseFallbackFactory;
|
||||
import com.muyu.clw.common.many.remote.factory.RemoteMessageDataFallbackFactory;
|
||||
import com.muyu.common.core.constant.ServiceNameConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.Enterprise;
|
||||
import com.muyu.domain.MessageData;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*
|
||||
* @author muyu
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "remoteMessageDataService",
|
||||
value = ServiceNameConstants.COMPANY_ENTERPRISE,
|
||||
fallbackFactory = RemoteMessageDataFallbackFactory.class
|
||||
)
|
||||
public interface RemoteMessageDataService {
|
||||
|
||||
@GetMapping("/messageData/list")
|
||||
public Result<List<MessageData>> enterpriseAllList();
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.muyu.clw.common.many.remote.factory;
|
||||
|
||||
import com.muyu.clw.common.many.remote.RemoteEnterpriseService;
|
||||
import com.muyu.clw.common.many.remote.RemoteMessageDataService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.Enterprise;
|
||||
import com.muyu.domain.MessageData;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName RemoteEnterpriseFallbackFactory
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/7 21:55
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class RemoteMessageDataFallbackFactory implements FallbackFactory<RemoteMessageDataService> {
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteMessageDataFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteMessageDataService create(Throwable cause) {
|
||||
log.error("日志服务调用失败:{}", cause.getMessage());
|
||||
return new RemoteMessageDataService() {
|
||||
@Override
|
||||
public Result<List<MessageData>> enterpriseAllList() {
|
||||
return Result.error("报文配置获取失败:{}"+cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.muyu.authentication.service.IEnterpriseService;
|
||||
import com.muyu.domain.vo.EnterpriseReq;
|
||||
import com.muyu.many.domain.Message.MessageData;
|
||||
import com.muyu.many.domain.Message.MessageDataArgument;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
|
@ -128,7 +128,7 @@ public class EnterpriseController extends BaseController
|
|||
}
|
||||
|
||||
@GetMapping("/redisList/{vin}")
|
||||
public Result<MessageData> redisList(@PathVariable String vin){
|
||||
public Result<MessageDataArgument> redisList(@PathVariable String vin){
|
||||
return Result.success(
|
||||
enterpriseService.redisList(vin)
|
||||
);
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import com.muyu.authentication.service.MessageDataService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.MessageData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文解析配置Controller层
|
||||
*
|
||||
* @ClassName MessageDataController
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/27 10:27
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/messageData")
|
||||
public class MessageDataController {
|
||||
@Autowired
|
||||
private MessageDataService messageDataService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public Result<List<MessageData>> list(){
|
||||
return Result.success(
|
||||
messageDataService.messageList()
|
||||
);
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.Enterprise;
|
||||
import com.muyu.domain.vo.EnterpriseReq;
|
||||
import com.muyu.many.domain.Message.MessageData;
|
||||
import com.muyu.many.domain.Message.MessageDataArgument;
|
||||
|
||||
/**
|
||||
* 企业Service接口
|
||||
|
@ -69,5 +69,5 @@ public interface IEnterpriseService extends IService<Enterprise>
|
|||
|
||||
String enterpriseUpdateId(Long id);
|
||||
|
||||
MessageData redisList(String vin);
|
||||
MessageDataArgument redisList(String vin);
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.MessageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文解析配置Service层
|
||||
*
|
||||
* @author AnNan.Wang
|
||||
* @ClassName: MessageDataService
|
||||
* @createTime: 2024/6/27 10:30
|
||||
*/
|
||||
public interface MessageDataService extends IService<MessageData> {
|
||||
List<MessageData> messageList();
|
||||
|
||||
|
||||
}
|
|
@ -18,8 +18,7 @@ import com.muyu.common.core.utils.DateUtils;
|
|||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.muyu.common.system.remote.RemoteUserService;
|
||||
import com.muyu.domain.vo.EnterpriseReq;
|
||||
import com.muyu.many.domain.Message.MessageData;
|
||||
import com.muyu.many.forewarning.EarlyWarning;
|
||||
import com.muyu.many.domain.Message.MessageDataArgument;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -246,8 +245,8 @@ public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper,Enterpri
|
|||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@Override
|
||||
public MessageData redisList(String vin) {
|
||||
public MessageDataArgument redisList(String vin) {
|
||||
String index = redisTemplate.opsForValue().get(vin);
|
||||
return JSON.parseObject(index, MessageData.class);
|
||||
return JSON.parseObject(index, MessageDataArgument.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.MessageDataMapper;
|
||||
import com.muyu.authentication.service.MessageDataService;
|
||||
import com.muyu.domain.MessageData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文解析配置实现层
|
||||
*
|
||||
* @ClassName MessageDataServiceImpl
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/27 10:31
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class MessageDataServiceImpl extends ServiceImpl<MessageDataMapper, MessageData>
|
||||
implements MessageDataService {
|
||||
|
||||
@Autowired
|
||||
private MessageDataMapper messageDataMapper;
|
||||
|
||||
@Override
|
||||
public List<MessageData> messageList() {
|
||||
return messageDataMapper.selectList(null);
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ import lombok.NoArgsConstructor;
|
|||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 报文对象 MessageData
|
||||
* 报文对象 MessageDataArgument
|
||||
*
|
||||
* @author Yangle
|
||||
* Date 2024/6/7 17:15
|
||||
|
@ -15,7 +15,7 @@ import lombok.experimental.SuperBuilder;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class MessageData {
|
||||
public class MessageDataArgument {
|
||||
/**
|
||||
*vin
|
||||
*/
|
|
@ -1,57 +1,110 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.muyu.many.domain.req.MessageAnalysisEditReq;
|
||||
import com.muyu.many.domain.req.MessageAnalysisQueryReq;
|
||||
import com.muyu.many.domain.req.MessageAnalysisSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文解析配置
|
||||
* 报文解析对象 message_analysis
|
||||
*
|
||||
* @ClassName MessageAnalysis
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/26 18:38
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_analysis")
|
||||
public class MessageAnalysis {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModel(value = "MessageAnalysis", description = "报文解析")
|
||||
public class MessageAnalysis{
|
||||
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
|
||||
@Excel(name = "车辆ID")
|
||||
@ApiModelProperty(name = "车辆ID", value = "车辆ID")
|
||||
private Long vehicleId;
|
||||
/**
|
||||
* 指标项key
|
||||
*/
|
||||
|
||||
/** 指标项key */
|
||||
@Excel(name = "指标项key")
|
||||
@ApiModelProperty(name = "指标项key", value = "指标项key")
|
||||
private String analyzeKey;
|
||||
/**
|
||||
* 起始位
|
||||
*/
|
||||
private Integer analyzeStart;
|
||||
/**
|
||||
* 终止位
|
||||
*/
|
||||
private Integer ent;
|
||||
/**
|
||||
* 指标项标签
|
||||
*/
|
||||
|
||||
/** 起始位 */
|
||||
@Excel(name = "起始位")
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private Long analyzeStart;
|
||||
|
||||
/** 终止位 */
|
||||
@Excel(name = "终止位")
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private Long ent;
|
||||
|
||||
/** 指标项标签 */
|
||||
@Excel(name = "指标项标签")
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String lable;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
@ApiModelProperty(name = "类型", value = "类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static MessageAnalysis queryBuild(MessageAnalysisQueryReq messageAnalysisQueryReq){
|
||||
return MessageAnalysis.builder()
|
||||
.vehicleId(messageAnalysisQueryReq.getVehicleId())
|
||||
.analyzeKey(messageAnalysisQueryReq.getAnalyzeKey())
|
||||
.analyzeStart(messageAnalysisQueryReq.getAnalyzeStart())
|
||||
.ent(messageAnalysisQueryReq.getEnt())
|
||||
.lable(messageAnalysisQueryReq.getLable())
|
||||
.type(messageAnalysisQueryReq.getType())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static MessageAnalysis saveBuild(MessageAnalysisSaveReq messageAnalysisSaveReq){
|
||||
return MessageAnalysis.builder()
|
||||
.vehicleId(messageAnalysisSaveReq.getVehicleId())
|
||||
.analyzeKey(messageAnalysisSaveReq.getAnalyzeKey())
|
||||
.analyzeStart(messageAnalysisSaveReq.getAnalyzeStart())
|
||||
.ent(messageAnalysisSaveReq.getEnt())
|
||||
.lable(messageAnalysisSaveReq.getLable())
|
||||
.type(messageAnalysisSaveReq.getType())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static MessageAnalysis editBuild(Long id, MessageAnalysisEditReq messageAnalysisEditReq){
|
||||
return MessageAnalysis.builder()
|
||||
.id(id)
|
||||
.vehicleId(messageAnalysisEditReq.getVehicleId())
|
||||
.analyzeKey(messageAnalysisEditReq.getAnalyzeKey())
|
||||
.analyzeStart(messageAnalysisEditReq.getAnalyzeStart())
|
||||
.ent(messageAnalysisEditReq.getEnt())
|
||||
.lable(messageAnalysisEditReq.getLable())
|
||||
.type(messageAnalysisEditReq.getType())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeEditReq;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeQueryReq;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文配置类型对象 message_configuration_type
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_configuration_type")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "MessageConfigurationType", description = "报文配置类型")
|
||||
public class MessageConfigurationType extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 类型名称 */
|
||||
@Excel(name = "类型名称")
|
||||
@ApiModelProperty(name = "类型名称", value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 类型标识 */
|
||||
@Excel(name = "类型标识")
|
||||
@ApiModelProperty(name = "类型标识", value = "类型标识")
|
||||
private String typeIdentification;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static MessageConfigurationType queryBuild( MessageConfigurationTypeQueryReq messageConfigurationTypeQueryReq){
|
||||
return MessageConfigurationType.builder()
|
||||
.typeName(messageConfigurationTypeQueryReq.getTypeName())
|
||||
.typeIdentification(messageConfigurationTypeQueryReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static MessageConfigurationType saveBuild(MessageConfigurationTypeSaveReq messageConfigurationTypeSaveReq){
|
||||
return MessageConfigurationType.builder()
|
||||
.typeName(messageConfigurationTypeSaveReq.getTypeName())
|
||||
.typeIdentification(messageConfigurationTypeSaveReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static MessageConfigurationType editBuild(Long id, MessageConfigurationTypeEditReq messageConfigurationTypeEditReq){
|
||||
return MessageConfigurationType.builder()
|
||||
.id(id)
|
||||
.typeName(messageConfigurationTypeEditReq.getTypeName())
|
||||
.typeIdentification(messageConfigurationTypeEditReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.many.domain.req.MessageDataEditReq;
|
||||
import com.muyu.many.domain.req.MessageDataQueryReq;
|
||||
import com.muyu.many.domain.req.MessageDataSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文类型数据对象 message_data
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_data")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "MessageDataArgument", description = "报文类型数据")
|
||||
public class MessageData extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 报文标签 */
|
||||
@Excel(name = "报文标签")
|
||||
@ApiModelProperty(name = "报文标签", value = "报文标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 指标Key */
|
||||
@Excel(name = "指标Key")
|
||||
@ApiModelProperty(name = "指标Key", value = "指标Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
@Excel(name = "起始位")
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private String initiationPosition;
|
||||
|
||||
/** 终止位 */
|
||||
@Excel(name = "终止位")
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private String terminatePosition;
|
||||
|
||||
/** 报文类型 */
|
||||
@Excel(name = "报文类型")
|
||||
@ApiModelProperty(name = "报文类型", value = "报文类型")
|
||||
private String typeIdentification;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static MessageData queryBuild(MessageDataQueryReq messageDataQueryReq){
|
||||
return MessageData.builder()
|
||||
.messageLabel(messageDataQueryReq.getMessageLabel())
|
||||
.analyzeKey(messageDataQueryReq.getAnalyzeKey())
|
||||
.initiationPosition(messageDataQueryReq.getInitiationPosition())
|
||||
.terminatePosition(messageDataQueryReq.getTerminatePosition())
|
||||
.typeIdentification(messageDataQueryReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static MessageData saveBuild(MessageDataSaveReq messageDataSaveReq){
|
||||
return MessageData.builder()
|
||||
.messageLabel(messageDataSaveReq.getMessageLabel())
|
||||
.analyzeKey(messageDataSaveReq.getAnalyzeKey())
|
||||
.initiationPosition(messageDataSaveReq.getInitiationPosition())
|
||||
.terminatePosition(messageDataSaveReq.getTerminatePosition())
|
||||
.typeIdentification(messageDataSaveReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static MessageData editBuild(Long id, MessageDataEditReq messageDataEditReq){
|
||||
return MessageData.builder()
|
||||
.id(id)
|
||||
.messageLabel(messageDataEditReq.getMessageLabel())
|
||||
.analyzeKey(messageDataEditReq.getAnalyzeKey())
|
||||
.initiationPosition(messageDataEditReq.getInitiationPosition())
|
||||
.terminatePosition(messageDataEditReq.getTerminatePosition())
|
||||
.typeIdentification(messageDataEditReq.getTypeIdentification())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.many.domain.req.SlideLengthEditReq;
|
||||
import com.muyu.many.domain.req.SlideLengthQueryReq;
|
||||
import com.muyu.many.domain.req.SlideLengthSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑动长度对象 slide_length
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("slide_length")
|
||||
@ApiModel(value = "SlideLength", description = "滑动长度")
|
||||
public class SlideLength {
|
||||
|
||||
|
||||
/** id */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "id", value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 滑动长度名称 */
|
||||
@Excel(name = "滑动长度名称")
|
||||
@ApiModelProperty(name = "滑动长度名称", value = "滑动长度名称")
|
||||
private String slideLengthName;
|
||||
|
||||
/** 占比 */
|
||||
@Excel(name = "占比")
|
||||
@ApiModelProperty(name = "占比", value = "占比")
|
||||
private BigDecimal slideLengthProportion;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static SlideLength queryBuild( SlideLengthQueryReq slideLengthQueryReq){
|
||||
return SlideLength.builder()
|
||||
.slideLengthName(slideLengthQueryReq.getSlideLengthName())
|
||||
.slideLengthProportion(slideLengthQueryReq.getSlideLengthProportion())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static SlideLength saveBuild(SlideLengthSaveReq slideLengthSaveReq){
|
||||
return SlideLength.builder()
|
||||
.slideLengthName(slideLengthSaveReq.getSlideLengthName())
|
||||
.slideLengthProportion(slideLengthSaveReq.getSlideLengthProportion())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static SlideLength editBuild(Long id, SlideLengthEditReq slideLengthEditReq){
|
||||
return SlideLength.builder()
|
||||
.id(id)
|
||||
.slideLengthName(slideLengthEditReq.getSlideLengthName())
|
||||
.slideLengthProportion(slideLengthEditReq.getSlideLengthProportion())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.many.domain.req.SlidingInfoEditReq;
|
||||
import com.muyu.many.domain.req.SlidingInfoQueryReq;
|
||||
import com.muyu.many.domain.req.SlidingInfoSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗对象 sliding_info
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("sliding_info")
|
||||
@ApiModel(value = "SlidingInfo", description = "滑窗")
|
||||
public class SlidingInfo {
|
||||
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** VIN */
|
||||
@Excel(name = "VIN")
|
||||
@ApiModelProperty(name = "VIN", value = "VIN")
|
||||
private String vehicleVin;
|
||||
|
||||
/** 报文解析ID */
|
||||
@Excel(name = "报文解析ID")
|
||||
@ApiModelProperty(name = "报文解析ID", value = "报文解析ID")
|
||||
private Long messageKye;
|
||||
|
||||
/** 指标项Key */
|
||||
@Excel(name = "指标项Key")
|
||||
@ApiModelProperty(name = "指标项Key", value = "指标项Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 指标项标签 */
|
||||
@Excel(name = "指标项标签")
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
@ApiModelProperty(name = "标准", value = "标准")
|
||||
private Long standard;
|
||||
|
||||
/** 滑窗范围 */
|
||||
@Excel(name = "滑窗范围")
|
||||
@ApiModelProperty(name = "滑窗范围", value = "滑窗范围")
|
||||
private Long windowRadiusId;
|
||||
|
||||
/** 滑动长度 */
|
||||
@Excel(name = "滑动长度")
|
||||
@ApiModelProperty(name = "滑动长度", value = "滑动长度")
|
||||
private Long slideLengthId;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static SlidingInfo queryBuild( SlidingInfoQueryReq slidingInfoQueryReq){
|
||||
return SlidingInfo.builder()
|
||||
.vehicleVin(slidingInfoQueryReq.getVehicleVin())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static SlidingInfo saveBuild(SlidingInfoSaveReq slidingInfoSaveReq){
|
||||
return SlidingInfo.builder()
|
||||
.vehicleVin(slidingInfoSaveReq.getVehicleVin())
|
||||
.messageKye(slidingInfoSaveReq.getMessageKye())
|
||||
.analyzeKey(slidingInfoSaveReq.getAnalyzeKey())
|
||||
.messageLabel(slidingInfoSaveReq.getMessageLabel())
|
||||
.standard(slidingInfoSaveReq.getStandard())
|
||||
.windowRadiusId(slidingInfoSaveReq.getWindowRadiusId())
|
||||
.slideLengthId(slidingInfoSaveReq.getSlideLengthId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static SlidingInfo editBuild(Long id, SlidingInfoEditReq slidingInfoEditReq){
|
||||
return SlidingInfo.builder()
|
||||
.id(id)
|
||||
.vehicleVin(slidingInfoEditReq.getVehicleVin())
|
||||
.messageKye(slidingInfoEditReq.getMessageKye())
|
||||
.analyzeKey(slidingInfoEditReq.getAnalyzeKey())
|
||||
.messageLabel(slidingInfoEditReq.getMessageLabel())
|
||||
.standard(slidingInfoEditReq.getStandard())
|
||||
.windowRadiusId(slidingInfoEditReq.getWindowRadiusId())
|
||||
.slideLengthId(slidingInfoEditReq.getSlideLengthId())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.muyu.many.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.many.domain.req.WindowEditReq;
|
||||
import com.muyu.many.domain.req.WindowQueryReq;
|
||||
import com.muyu.many.domain.req.WindowSaveReq;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗范围对象 window
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("window")
|
||||
@ApiModel(value = "Window", description = "滑窗范围")
|
||||
public class Window{
|
||||
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 滑窗范围名称 */
|
||||
@Excel(name = "滑窗范围名称")
|
||||
@ApiModelProperty(name = "滑窗范围名称", value = "滑窗范围名称")
|
||||
private String windowRadiusName;
|
||||
|
||||
/** 滑窗长度 */
|
||||
@Excel(name = "滑窗长度")
|
||||
@ApiModelProperty(name = "滑窗长度", value = "滑窗长度")
|
||||
private Long windowRadiusLength;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static Window queryBuild( WindowQueryReq windowQueryReq){
|
||||
return Window.builder()
|
||||
.windowRadiusName(windowQueryReq.getWindowRadiusName())
|
||||
.windowRadiusLength(windowQueryReq.getWindowRadiusLength())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static Window saveBuild(WindowSaveReq windowSaveReq){
|
||||
return Window.builder()
|
||||
.windowRadiusName(windowSaveReq.getWindowRadiusName())
|
||||
.windowRadiusLength(windowSaveReq.getWindowRadiusLength())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static Window editBuild(Long id, WindowEditReq windowEditReq){
|
||||
return Window.builder()
|
||||
.id(id)
|
||||
.windowRadiusName(windowEditReq.getWindowRadiusName())
|
||||
.windowRadiusLength(windowEditReq.getWindowRadiusLength())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.many.domain.mq;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName MessageAnalysisMq
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/29 12:51
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MessageAnalysisMq {
|
||||
/**
|
||||
* VIN
|
||||
*/
|
||||
private String vehicleVin;
|
||||
/**
|
||||
* 指标项Key
|
||||
*/
|
||||
private String analyzeKey;
|
||||
/**
|
||||
* 指标项标签
|
||||
*/
|
||||
private String messageLabel;
|
||||
/**
|
||||
* 标准
|
||||
*/
|
||||
private Long standard;
|
||||
/**
|
||||
* 滑窗范围
|
||||
*/
|
||||
private Long windowRadiusId;
|
||||
/**
|
||||
* 滑动长度
|
||||
*/
|
||||
private BigDecimal slideLengthId;
|
||||
}
|
|
@ -1,50 +1,44 @@
|
|||
package com.muyu.domain;
|
||||
package com.muyu.many.domain.mq;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 报文表
|
||||
* 报文类型数据对象 message_data
|
||||
*
|
||||
* @ClassName MessageData
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/27 9:56
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_data")
|
||||
public class MessageData extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
public class MessageData extends BaseEntity{
|
||||
|
||||
private Long id;
|
||||
/**
|
||||
* 报文标签
|
||||
*/
|
||||
|
||||
private String messageLabel;
|
||||
/**
|
||||
* 指标Key
|
||||
*/
|
||||
|
||||
|
||||
private String analyzeKey;
|
||||
/**
|
||||
* 起始位
|
||||
*/
|
||||
|
||||
|
||||
private String initiationPosition;
|
||||
/**
|
||||
* 终止位
|
||||
*/
|
||||
|
||||
|
||||
private String terminatePosition;
|
||||
/**
|
||||
* 报文类型
|
||||
*/
|
||||
|
||||
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.muyu.many.domain.mq;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业报文传输
|
||||
*
|
||||
* @ClassName MessageDataEnterprise
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/28 18:35
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MessageDataEnterpriseMq {
|
||||
|
||||
private String ent;
|
||||
|
||||
private List<MessageData> messageDataList;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文解析对象 message_analysis
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageAnalysisEditReq", description = "报文解析")
|
||||
public class MessageAnalysisEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车辆ID */
|
||||
@ApiModelProperty(name = "车辆ID", value = "车辆ID")
|
||||
private Long vehicleId;
|
||||
|
||||
/** 指标项key */
|
||||
@ApiModelProperty(name = "指标项key", value = "指标项key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private Long analyzeStart;
|
||||
|
||||
/** 终止位 */
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private Long ent;
|
||||
|
||||
/** 指标项标签 */
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String lable;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(name = "类型", value = "类型")
|
||||
private String type;
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文解析对象 message_analysis
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageAnalysisQueryReq", description = "报文解析")
|
||||
public class MessageAnalysisQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 车辆ID */
|
||||
@ApiModelProperty(name = "车辆ID", value = "车辆ID")
|
||||
private Long vehicleId;
|
||||
|
||||
/** 指标项key */
|
||||
@ApiModelProperty(name = "指标项key", value = "指标项key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private Long analyzeStart;
|
||||
|
||||
/** 终止位 */
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private Long ent;
|
||||
|
||||
/** 指标项标签 */
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String lable;
|
||||
|
||||
/** 类型 */
|
||||
@ApiModelProperty(name = "类型", value = "类型")
|
||||
private String type;
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文解析对象 message_analysis
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageAnalysisSaveReq", description = "报文解析")
|
||||
public class MessageAnalysisSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 车辆ID */
|
||||
|
||||
@ApiModelProperty(name = "车辆ID", value = "车辆ID")
|
||||
private Long vehicleId;
|
||||
|
||||
/** 指标项key */
|
||||
|
||||
@ApiModelProperty(name = "指标项key", value = "指标项key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private Long analyzeStart;
|
||||
|
||||
/** 终止位 */
|
||||
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private Long ent;
|
||||
|
||||
/** 指标项标签 */
|
||||
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String lable;
|
||||
|
||||
/** 类型 */
|
||||
|
||||
@ApiModelProperty(name = "类型", value = "类型")
|
||||
private String type;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文配置类型对象 message_configuration_type
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageConfigurationTypeEditReq", description = "报文配置类型")
|
||||
public class MessageConfigurationTypeEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型名称 */
|
||||
@ApiModelProperty(name = "类型名称", value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 类型标识 */
|
||||
@ApiModelProperty(name = "类型标识", value = "类型标识")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文配置类型对象 message_configuration_type
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageConfigurationTypeQueryReq", description = "报文配置类型")
|
||||
public class MessageConfigurationTypeQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型名称 */
|
||||
@ApiModelProperty(name = "类型名称", value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 类型标识 */
|
||||
@ApiModelProperty(name = "类型标识", value = "类型标识")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文配置类型对象 message_configuration_type
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageConfigurationTypeSaveReq", description = "报文配置类型")
|
||||
public class MessageConfigurationTypeSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 类型名称 */
|
||||
|
||||
@ApiModelProperty(name = "类型名称", value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 类型标识 */
|
||||
|
||||
@ApiModelProperty(name = "类型标识", value = "类型标识")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文类型数据对象 message_data
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageDataEditReq", description = "报文类型数据")
|
||||
public class MessageDataEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 报文标签 */
|
||||
@ApiModelProperty(name = "报文标签", value = "报文标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 指标Key */
|
||||
@ApiModelProperty(name = "指标Key", value = "指标Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private String initiationPosition;
|
||||
|
||||
/** 终止位 */
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private String terminatePosition;
|
||||
|
||||
/** 报文类型 */
|
||||
@ApiModelProperty(name = "报文类型", value = "报文类型")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业报文
|
||||
*
|
||||
* @ClassName MessageDataEnterprise
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/28 18:35
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MessageDataEnterprise {
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private List<Long> ids;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import com.muyu.many.domain.MessageData;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业报文传输
|
||||
*
|
||||
* @ClassName MessageDataEnterprise
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/28 18:35
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MessageDataEnterpriseMq {
|
||||
|
||||
private Long id;
|
||||
|
||||
private List<MessageData> messageDataList;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文类型数据对象 message_data
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageDataQueryReq", description = "报文类型数据")
|
||||
public class MessageDataQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 报文标签 */
|
||||
@ApiModelProperty(name = "报文标签", value = "报文标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 指标Key */
|
||||
@ApiModelProperty(name = "指标Key", value = "指标Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private String initiationPosition;
|
||||
|
||||
/** 终止位 */
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private String terminatePosition;
|
||||
|
||||
/** 报文类型 */
|
||||
@ApiModelProperty(name = "报文类型", value = "报文类型")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报文类型数据对象 message_data
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "MessageDataSaveReq", description = "报文类型数据")
|
||||
public class MessageDataSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 报文标签 */
|
||||
|
||||
@ApiModelProperty(name = "报文标签", value = "报文标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 指标Key */
|
||||
|
||||
@ApiModelProperty(name = "指标Key", value = "指标Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 起始位 */
|
||||
|
||||
@ApiModelProperty(name = "起始位", value = "起始位")
|
||||
private String initiationPosition;
|
||||
|
||||
/** 终止位 */
|
||||
|
||||
@ApiModelProperty(name = "终止位", value = "终止位")
|
||||
private String terminatePosition;
|
||||
|
||||
/** 报文类型 */
|
||||
|
||||
@ApiModelProperty(name = "报文类型", value = "报文类型")
|
||||
private String typeIdentification;
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑动长度对象 slide_length
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlideLengthEditReq", description = "滑动长度")
|
||||
public class SlideLengthEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 滑动长度名称 */
|
||||
@ApiModelProperty(name = "滑动长度名称", value = "滑动长度名称")
|
||||
private String slideLengthName;
|
||||
|
||||
/** 占比 */
|
||||
@ApiModelProperty(name = "占比", value = "占比")
|
||||
private BigDecimal slideLengthProportion;
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑动长度对象 slide_length
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlideLengthQueryReq", description = "滑动长度")
|
||||
public class SlideLengthQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 滑动长度名称 */
|
||||
@ApiModelProperty(name = "滑动长度名称", value = "滑动长度名称")
|
||||
private String slideLengthName;
|
||||
|
||||
/** 占比 */
|
||||
@ApiModelProperty(name = "占比", value = "占比")
|
||||
private BigDecimal slideLengthProportion;
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑动长度对象 slide_length
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlideLengthSaveReq", description = "滑动长度")
|
||||
public class SlideLengthSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
|
||||
@ApiModelProperty(name = "id", value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 滑动长度名称 */
|
||||
|
||||
@ApiModelProperty(name = "滑动长度名称", value = "滑动长度名称")
|
||||
private String slideLengthName;
|
||||
|
||||
/** 占比 */
|
||||
|
||||
@ApiModelProperty(name = "占比", value = "占比")
|
||||
private BigDecimal slideLengthProportion;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗对象 sliding_info
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlidingInfoEditReq", description = "滑窗")
|
||||
public class SlidingInfoEditReq {
|
||||
|
||||
|
||||
/** VIN */
|
||||
@ApiModelProperty(name = "VIN", value = "VIN")
|
||||
private String vehicleVin;
|
||||
|
||||
/** 报文解析ID */
|
||||
@ApiModelProperty(name = "报文解析ID", value = "报文解析ID")
|
||||
private Long messageKye;
|
||||
|
||||
/** 指标项Key */
|
||||
@ApiModelProperty(name = "指标项Key", value = "指标项Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 指标项标签 */
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 标准 */
|
||||
@ApiModelProperty(name = "标准", value = "标准")
|
||||
private Long standard;
|
||||
|
||||
/** 滑窗范围 */
|
||||
@ApiModelProperty(name = "滑窗范围", value = "滑窗范围")
|
||||
private Long windowRadiusId;
|
||||
|
||||
/** 滑动长度 */
|
||||
@ApiModelProperty(name = "滑动长度", value = "滑动长度")
|
||||
private Long slideLengthId;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗对象 sliding_info
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlidingInfoQueryReq", description = "滑窗")
|
||||
public class SlidingInfoQueryReq {
|
||||
|
||||
|
||||
/** VIN */
|
||||
@ApiModelProperty(name = "VIN", value = "VIN")
|
||||
private String vehicleVin;
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗对象 sliding_info
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "SlidingInfoSaveReq", description = "滑窗")
|
||||
public class SlidingInfoSaveReq {
|
||||
|
||||
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** VIN */
|
||||
|
||||
@ApiModelProperty(name = "VIN", value = "VIN")
|
||||
private String vehicleVin;
|
||||
|
||||
/** 报文解析ID */
|
||||
|
||||
@ApiModelProperty(name = "报文解析ID", value = "报文解析ID")
|
||||
private Long messageKye;
|
||||
|
||||
/** 指标项Key */
|
||||
|
||||
@ApiModelProperty(name = "指标项Key", value = "指标项Key")
|
||||
private String analyzeKey;
|
||||
|
||||
/** 指标项标签 */
|
||||
|
||||
@ApiModelProperty(name = "指标项标签", value = "指标项标签")
|
||||
private String messageLabel;
|
||||
|
||||
/** 标准 */
|
||||
|
||||
@ApiModelProperty(name = "标准", value = "标准")
|
||||
private Long standard;
|
||||
|
||||
/** 滑窗范围 */
|
||||
|
||||
@ApiModelProperty(name = "滑窗范围", value = "滑窗范围")
|
||||
private Long windowRadiusId;
|
||||
|
||||
/** 滑动长度 */
|
||||
|
||||
@ApiModelProperty(name = "滑动长度", value = "滑动长度")
|
||||
private Long slideLengthId;
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗范围对象 window
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "WindowEditReq", description = "滑窗范围")
|
||||
public class WindowEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 滑窗范围名称 */
|
||||
@ApiModelProperty(name = "滑窗范围名称", value = "滑窗范围名称")
|
||||
private String windowRadiusName;
|
||||
|
||||
/** 滑窗长度 */
|
||||
@ApiModelProperty(name = "滑窗长度", value = "滑窗长度")
|
||||
private Long windowRadiusLength;
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗范围对象 window
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "WindowQueryReq", description = "滑窗范围")
|
||||
public class WindowQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 滑窗范围名称 */
|
||||
@ApiModelProperty(name = "滑窗范围名称", value = "滑窗范围名称")
|
||||
private String windowRadiusName;
|
||||
|
||||
/** 滑窗长度 */
|
||||
@ApiModelProperty(name = "滑窗长度", value = "滑窗长度")
|
||||
private Long windowRadiusLength;
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.many.domain.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 滑窗范围对象 window
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "WindowSaveReq", description = "滑窗范围")
|
||||
public class WindowSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 滑窗范围名称 */
|
||||
|
||||
@ApiModelProperty(name = "滑窗范围名称", value = "滑窗范围名称")
|
||||
private String windowRadiusName;
|
||||
|
||||
/** 滑窗长度 */
|
||||
|
||||
@ApiModelProperty(name = "滑窗长度", value = "滑窗长度")
|
||||
private Long windowRadiusLength;
|
||||
|
||||
}
|
|
@ -95,12 +95,6 @@
|
|||
<artifactId>muyu-modules-many-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-modules-many-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package com.muyu.authentication;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
import com.muyu.authentication.mapper.VehicleMapper;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.clw.common.many.remote.RemoteEnterpriseService;
|
||||
import com.muyu.clw.common.saas.domain.model.EntInfo;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
|
@ -12,17 +14,18 @@ import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
|||
import com.muyu.domain.Enterprise;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.Vehicle;
|
||||
import org.apache.commons.collections4.map.HashedMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
@ -59,11 +62,24 @@ public class MuYuManyApplication implements ApplicationRunner {
|
|||
String ent = "ent_" + enterprise1.getContactPhone().substring(enterprise1.getContactPhone().length() - 4);
|
||||
DynamicDataSourceHolder.setDynamicDataSourceKey(ent);
|
||||
List<Vehicle> vehicles = vehicleMapper.selectList(null);
|
||||
List<MessageAnalysis> messageAnalyses = messageAnalysisMapper.selectList(null);
|
||||
|
||||
for (Vehicle vehicle : vehicles) {
|
||||
redisTemplate.opsForValue().set(vehicle.getVin(), JSON.toJSONString(messageAnalyses),4,TimeUnit.HOURS);
|
||||
}
|
||||
|
||||
vehicles.forEach(vehicle -> {
|
||||
List<MessageAnalysis> messageAnalyses = messageAnalysisMapper.selectList(
|
||||
new LambdaQueryWrapper<>() {{
|
||||
eq(MessageAnalysis::getVehicleId, vehicle.getId());
|
||||
;
|
||||
}}
|
||||
);
|
||||
List<MessageAnalysis> arrayList = new ArrayList<>();
|
||||
messageAnalyses.forEach(messageAnal->{
|
||||
arrayList.add(messageAnal);
|
||||
});
|
||||
String jsonString = JSON.toJSONString(arrayList);
|
||||
System.out.println(jsonString);
|
||||
redisTemplate.opsForHash().put("VIN",vehicle.getVin(),jsonString);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,123 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.MessageAnalysisService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.req.MessageAnalysisEditReq;
|
||||
import com.muyu.many.domain.req.MessageAnalysisQueryReq;
|
||||
import com.muyu.many.domain.req.MessageAnalysisSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* 报文解析配置的Controller层
|
||||
* 报文解析Controller
|
||||
*
|
||||
* @ClassName MessageAnalysisController
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/26 18:40
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
|
||||
@Api(tags = "报文解析")
|
||||
@RestController
|
||||
@RequestMapping("/messageAnalysis")
|
||||
public class MessageAnalysisController {
|
||||
@RequestMapping("/analysis")
|
||||
public class MessageAnalysisController extends BaseController {
|
||||
@Autowired
|
||||
private MessageAnalysisService messageAnalysisService;
|
||||
|
||||
@PostMapping("/messageAnalysisAdd")
|
||||
public Result<String> messageAnalysisAdd(@RequestBody List<MessageAnalysis> messageAnalysisList){
|
||||
return messageAnalysisService.messageAnalysisAdd(messageAnalysisList);
|
||||
/**
|
||||
* 查询报文解析列表
|
||||
*/
|
||||
@ApiOperation("获取报文解析列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<MessageAnalysis>> list(MessageAnalysisQueryReq messageAnalysisQueryReq) {
|
||||
startPage();
|
||||
List<MessageAnalysis> list = messageAnalysisService.list(MessageAnalysis.queryBuild(messageAnalysisQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报文解析列表
|
||||
*/
|
||||
@ApiOperation("导出报文解析列表")
|
||||
@Log(title = "报文解析", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MessageAnalysis messageAnalysis) {
|
||||
List<MessageAnalysis> list = messageAnalysisService.list(messageAnalysis);
|
||||
ExcelUtil<MessageAnalysis> util = new ExcelUtil<MessageAnalysis>(MessageAnalysis.class);
|
||||
util.exportExcel(response, list, "报文解析数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报文解析详细信息
|
||||
*/
|
||||
@ApiOperation("获取报文解析详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<MessageAnalysis> getInfo(@PathVariable("id") Long id) {
|
||||
MessageAnalysis byId = messageAnalysisService.getById(id);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报文解析
|
||||
*/
|
||||
@Log(title = "报文解析", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增报文解析")
|
||||
public Result<String> add(@RequestBody MessageAnalysisSaveReq messageAnalysisSaveReq) {
|
||||
boolean save = messageAnalysisService.save(MessageAnalysis.saveBuild(messageAnalysisSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报文解析
|
||||
*/
|
||||
@Log(title = "报文解析", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改报文解析")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody MessageAnalysisEditReq messageAnalysisEditReq) {
|
||||
boolean b = messageAnalysisService.updateById(MessageAnalysis.editBuild(id, messageAnalysisEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报文解析
|
||||
*/
|
||||
@Log(title = "报文解析", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除报文解析")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = messageAnalysisService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
@GetMapping("/messageAnalysisList")
|
||||
public Result<List<MessageAnalysis>>messageAnalysisList(){
|
||||
List<MessageAnalysis> messageAnalyses = messageAnalysisService.messageAnalysisList();
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(messageAnalyses);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.MessageConfigurationTypeService;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.many.domain.MessageConfigurationType;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeEditReq;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeQueryReq;
|
||||
import com.muyu.many.domain.req.MessageConfigurationTypeSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
|
||||
/**
|
||||
* 报文配置类型Controller
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Api(tags = "报文配置类型")
|
||||
@RestController
|
||||
@RequestMapping("/configuration")
|
||||
public class MessageConfigurationTypeController extends BaseController {
|
||||
@Autowired
|
||||
private MessageConfigurationTypeService messageConfigurationTypeService;
|
||||
|
||||
/**
|
||||
* 查询报文配置类型列表
|
||||
*/
|
||||
@ApiOperation("获取报文配置类型列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<MessageConfigurationType>> list(MessageConfigurationTypeQueryReq messageConfigurationTypeQueryReq) {
|
||||
startPage();
|
||||
List<MessageConfigurationType> list = messageConfigurationTypeService.list(MessageConfigurationType.queryBuild(messageConfigurationTypeQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报文配置类型列表
|
||||
*/
|
||||
@ApiOperation("导出报文配置类型列表")
|
||||
@Log(title = "报文配置类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MessageConfigurationType messageConfigurationType) {
|
||||
List<MessageConfigurationType> list = messageConfigurationTypeService.list(messageConfigurationType);
|
||||
ExcelUtil<MessageConfigurationType> util = new ExcelUtil<MessageConfigurationType>(MessageConfigurationType.class);
|
||||
util.exportExcel(response, list, "报文配置类型数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报文配置类型详细信息
|
||||
*/
|
||||
@ApiOperation("获取报文配置类型详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<MessageConfigurationType> getInfo(@PathVariable("id") Long id) {
|
||||
MessageConfigurationType byId = messageConfigurationTypeService.getById(id);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报文配置类型
|
||||
*/
|
||||
@Log(title = "报文配置类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增报文配置类型")
|
||||
public Result<String> add(@RequestBody MessageConfigurationTypeSaveReq messageConfigurationTypeSaveReq) {
|
||||
boolean save = messageConfigurationTypeService.save(MessageConfigurationType.saveBuild(messageConfigurationTypeSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报文配置类型
|
||||
*/
|
||||
@Log(title = "报文配置类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改报文配置类型")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody MessageConfigurationTypeEditReq messageConfigurationTypeEditReq) {
|
||||
boolean b = messageConfigurationTypeService.updateById(MessageConfigurationType.editBuild(id, messageConfigurationTypeEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报文配置类型
|
||||
*/
|
||||
@Log(title = "报文配置类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除报文配置类型")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = messageConfigurationTypeService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.MessageDataService;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.MessageData;
|
||||
import com.muyu.many.domain.req.MessageDataEditReq;
|
||||
import com.muyu.many.domain.req.MessageDataEnterprise;
|
||||
import com.muyu.many.domain.req.MessageDataQueryReq;
|
||||
import com.muyu.many.domain.req.MessageDataSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
|
||||
/**
|
||||
* 报文类型数据Controller
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Api(tags = "报文类型数据")
|
||||
@RestController
|
||||
@RequestMapping("/message")
|
||||
public class MessageDataController extends BaseController {
|
||||
@Autowired
|
||||
private MessageDataService messageDataService;
|
||||
|
||||
/**
|
||||
* 查询报文类型数据列表
|
||||
*/
|
||||
@ApiOperation("获取报文类型数据列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<MessageData>> list(MessageDataQueryReq messageDataQueryReq) {
|
||||
startPage();
|
||||
List<MessageData> list = messageDataService.list(MessageData.queryBuild(messageDataQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报文类型数据列表
|
||||
*/
|
||||
@ApiOperation("导出报文类型数据列表")
|
||||
@Log(title = "报文类型数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MessageData messageData) {
|
||||
List<MessageData> list = messageDataService.list(messageData);
|
||||
ExcelUtil<MessageData> util = new ExcelUtil<MessageData>(MessageData.class);
|
||||
util.exportExcel(response, list, "报文类型数据数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报文类型数据详细信息
|
||||
*/
|
||||
@ApiOperation("获取报文类型数据详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<MessageData> getInfo(@PathVariable("id") Long id) {
|
||||
MessageData byId = messageDataService.getById(id);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报文类型数据
|
||||
*/
|
||||
@Log(title = "报文类型数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增报文类型数据")
|
||||
public Result<String> add(@RequestBody MessageDataSaveReq messageDataSaveReq) {
|
||||
boolean save = messageDataService.save(MessageData.saveBuild(messageDataSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报文类型数据
|
||||
*/
|
||||
@Log(title = "报文类型数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改报文类型数据")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody MessageDataEditReq messageDataEditReq) {
|
||||
boolean b = messageDataService.updateById(MessageData.editBuild(id, messageDataEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报文类型数据
|
||||
*/
|
||||
@Log(title = "报文类型数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除报文类型数据")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = messageDataService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
@GetMapping("/messageList")
|
||||
public Result<List<MessageData>> messageList(){
|
||||
List<MessageData> list = messageDataService.list();
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/messageDataEnterpriseAdd")
|
||||
public void messageDataEnterpriseAdd(@RequestBody MessageDataEnterprise messageDataEnterprise){
|
||||
messageDataService.messageDataEnterpriseAdd(messageDataEnterprise);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.SlideLengthService;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.many.domain.SlideLength;
|
||||
import com.muyu.many.domain.Window;
|
||||
import com.muyu.many.domain.req.SlideLengthEditReq;
|
||||
import com.muyu.many.domain.req.SlideLengthQueryReq;
|
||||
import com.muyu.many.domain.req.SlideLengthSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 滑动长度Controller
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Api(tags = "滑动长度")
|
||||
@RestController
|
||||
@RequestMapping("/SlideLength")
|
||||
public class SlideLengthController extends BaseController {
|
||||
@Autowired
|
||||
private SlideLengthService slideLengthService;
|
||||
|
||||
/**
|
||||
* 查询滑动长度列表
|
||||
*/
|
||||
@ApiOperation("获取滑动长度列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<SlideLength>> list(SlideLengthQueryReq slideLengthQueryReq) {
|
||||
startPage();
|
||||
List<SlideLength> list = slideLengthService.list(SlideLength.queryBuild(slideLengthQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出滑动长度列表
|
||||
*/
|
||||
@ApiOperation("导出滑动长度列表")
|
||||
@Log(title = "滑动长度", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SlideLength slideLength) {
|
||||
List<SlideLength> list = slideLengthService.list(slideLength);
|
||||
ExcelUtil<SlideLength> util = new ExcelUtil<SlideLength>(SlideLength.class);
|
||||
util.exportExcel(response, list, "滑动长度数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取滑动长度详细信息
|
||||
*/
|
||||
@ApiOperation("获取滑动长度详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<SlideLength> getInfo(@PathVariable("id") Long id) {
|
||||
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(slideLengthService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增滑动长度
|
||||
*/
|
||||
@Log(title = "滑动长度", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增滑动长度")
|
||||
public Result<String> add(@RequestBody SlideLengthSaveReq slideLengthSaveReq) {
|
||||
boolean save = slideLengthService.save(SlideLength.saveBuild(slideLengthSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改滑动长度
|
||||
*/
|
||||
@Log(title = "滑动长度", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改滑动长度")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody SlideLengthEditReq slideLengthEditReq) {
|
||||
boolean b = slideLengthService.updateById(SlideLength.editBuild(id, slideLengthEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除滑动长度
|
||||
*/
|
||||
@Log(title = "滑动长度", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除滑动长度")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = slideLengthService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
@GetMapping("/slideLengthList")
|
||||
public Result<List<SlideLength>> windowList(){
|
||||
List<SlideLength> slideLengthList = slideLengthService.slideLengthList();
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(slideLengthList);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.SlidingInfoService;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.many.domain.SlidingInfo;
|
||||
import com.muyu.many.domain.req.SlidingInfoEditReq;
|
||||
import com.muyu.many.domain.req.SlidingInfoQueryReq;
|
||||
import com.muyu.many.domain.req.SlidingInfoSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 滑窗Controller
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Api(tags = "滑窗")
|
||||
@RestController
|
||||
@RequestMapping("/SlidingInfo")
|
||||
public class SlidingInfoController extends BaseController {
|
||||
@Autowired
|
||||
private SlidingInfoService slidingInfoService;
|
||||
|
||||
/**
|
||||
* 查询滑窗列表
|
||||
*/
|
||||
@ApiOperation("获取滑窗列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<SlidingInfo>> list(SlidingInfoQueryReq slidingInfoQueryReq) {
|
||||
startPage();
|
||||
List<SlidingInfo> list = slidingInfoService.list(SlidingInfo.queryBuild(slidingInfoQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出滑窗列表
|
||||
*/
|
||||
@ApiOperation("导出滑窗列表")
|
||||
@Log(title = "滑窗", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SlidingInfo slidingInfo) {
|
||||
List<SlidingInfo> list = slidingInfoService.list(slidingInfo);
|
||||
ExcelUtil<SlidingInfo> util = new ExcelUtil<SlidingInfo>(SlidingInfo.class);
|
||||
util.exportExcel(response, list, "滑窗数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取滑窗详细信息
|
||||
*/
|
||||
@ApiOperation("获取滑窗详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<SlidingInfo> getInfo(@PathVariable("id") Long id) {
|
||||
SlidingInfo byId = slidingInfoService.getById(id);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增滑窗
|
||||
*/
|
||||
@Log(title = "滑窗", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增滑窗")
|
||||
public Result<String> add(@RequestBody SlidingInfoSaveReq slidingInfoSaveReq) {
|
||||
boolean add = slidingInfoService.add(SlidingInfo.saveBuild(slidingInfoSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(add);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改滑窗
|
||||
*/
|
||||
@Log(title = "滑窗", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改滑窗")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody SlidingInfoEditReq slidingInfoEditReq) {
|
||||
boolean b = slidingInfoService.updateId(SlidingInfo.editBuild(id, slidingInfoEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除滑窗
|
||||
*/
|
||||
@Log(title = "滑窗", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除滑窗")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = slidingInfoService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
}
|
|
@ -114,4 +114,13 @@ public class VehicleController extends BaseController {
|
|||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
@GetMapping("/vehicleList")
|
||||
public Result<List<Vehicle>> vehicleList(){
|
||||
List<Vehicle> vehicles = vehicleService.vehicleList();
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(vehicles);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
package com.muyu.authentication.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.authentication.service.WindowService;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.many.domain.Window;
|
||||
import com.muyu.many.domain.req.WindowEditReq;
|
||||
import com.muyu.many.domain.req.WindowQueryReq;
|
||||
import com.muyu.many.domain.req.WindowSaveReq;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 滑窗范围Controller
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Api(tags = "滑窗范围")
|
||||
@RestController
|
||||
@RequestMapping("/Window")
|
||||
public class WindowController extends BaseController {
|
||||
@Autowired
|
||||
private WindowService windowService;
|
||||
|
||||
/**
|
||||
* 查询滑窗范围列表
|
||||
*/
|
||||
@ApiOperation("获取滑窗范围列表")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Window>> list(WindowQueryReq windowQueryReq) {
|
||||
startPage();
|
||||
List<Window> list = windowService.list(Window.queryBuild(windowQueryReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出滑窗范围列表
|
||||
*/
|
||||
@ApiOperation("导出滑窗范围列表")
|
||||
@Log(title = "滑窗范围", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Window window) {
|
||||
List<Window> list = windowService.list(window);
|
||||
ExcelUtil<Window> util = new ExcelUtil<Window>(Window.class);
|
||||
util.exportExcel(response, list, "滑窗范围数据");
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取滑窗范围详细信息
|
||||
*/
|
||||
@ApiOperation("获取滑窗范围详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<Window> getInfo(@PathVariable("id") Long id) {
|
||||
Window byId = windowService.getById(id);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增滑窗范围
|
||||
*/
|
||||
@Log(title = "滑窗范围", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增滑窗范围")
|
||||
public Result<String> add(@RequestBody WindowSaveReq windowSaveReq) {
|
||||
boolean save = windowService.save(Window.saveBuild(windowSaveReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改滑窗范围
|
||||
*/
|
||||
@Log(title = "滑窗范围", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改滑窗范围")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody WindowEditReq windowEditReq) {
|
||||
boolean b = windowService.updateById(Window.editBuild(id, windowEditReq));
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除滑窗范围
|
||||
*/
|
||||
@Log(title = "滑窗范围", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除滑窗范围")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
boolean b = windowService.removeBatchByIds(ids);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return toAjax(b);
|
||||
}
|
||||
|
||||
@GetMapping("/windowList")
|
||||
public Result<List<Window>> windowList(){
|
||||
List<Window> windows = windowService.windowList();
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
return Result.success(windows);
|
||||
}
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
|
||||
/**
|
||||
* 报文解析配置的Mapper层
|
||||
*
|
||||
* @author AnNan.Wang
|
||||
* @ClassName: MessageAnalysisMapper
|
||||
* @createTime: 2024/6/26 18:44
|
||||
*/
|
||||
|
||||
/**
|
||||
* 报文解析Mapper接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
public interface MessageAnalysisMapper extends BaseMapper<MessageAnalysis> {
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.many.domain.MessageConfigurationType;
|
||||
|
||||
/**
|
||||
* 报文配置类型Mapper接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
public interface MessageConfigurationTypeMapper extends BaseMapper<MessageConfigurationType> {
|
||||
|
||||
}
|
|
@ -1,15 +1,14 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.MessageData;
|
||||
import com.muyu.many.domain.MessageData;
|
||||
|
||||
/**
|
||||
* 报文解析Mapper层
|
||||
* 报文类型数据Mapper接口
|
||||
*
|
||||
* @author AnNan.Wang
|
||||
* @ClassName: MessageDataMapper
|
||||
* @createTime: 2024/6/27 10:33
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
|
||||
public interface MessageDataMapper extends BaseMapper<MessageData> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.many.domain.SlideLength;
|
||||
|
||||
/**
|
||||
* 滑动长度Mapper接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface SlideLengthMapper extends BaseMapper<SlideLength> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.many.domain.SlidingInfo;
|
||||
|
||||
/**
|
||||
* 滑窗Mapper接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface SlidingInfoMapper extends BaseMapper<SlidingInfo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.many.domain.Window;
|
||||
|
||||
/**
|
||||
* 滑窗范围Mapper接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface WindowMapper extends BaseMapper<Window> {
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.authentication.rabbitmq.enterprise;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
import com.muyu.authentication.mapper.VehicleMapper;
|
||||
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.Vehicle;
|
||||
import com.muyu.many.domain.mq.MessageData;
|
||||
import com.muyu.many.domain.mq.MessageDataEnterpriseMq;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName EnterpriseMq
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/28 18:51
|
||||
*/
|
||||
|
||||
@Log4j2
|
||||
@Component
|
||||
public class EnterpriseMq {
|
||||
@Autowired
|
||||
private MessageAnalysisMapper messageAnalysisMapper;
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private VehicleMapper vehicleMapper;
|
||||
|
||||
|
||||
@RabbitListener(queues = "1")
|
||||
public void discoverTime(String message){
|
||||
log.info("开始消费");
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
//package com.muyu.authentication.rabbitmq.record;
|
||||
//
|
||||
//import com.alibaba.druid.pool.DruidDataSource;
|
||||
//import com.alibaba.fastjson.JSON;
|
||||
//import com.muyu.clw.common.many.datasource.domain.model.DataSourceInfo;
|
||||
//import com.muyu.common.log.annotation.Log;
|
||||
//import com.muyu.many.domain.Enterprise;
|
||||
//import lombok.extern.log4j.Log4j2;
|
||||
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
///**
|
||||
// * 返回记录
|
||||
// *
|
||||
// * @ClassName MessageAnalysisRecord
|
||||
// * @Author AnNan.Wang
|
||||
// * @Date 2024/6/29 13:50
|
||||
// */
|
||||
//
|
||||
//@Log4j2
|
||||
//@Component
|
||||
//public class MessageAnalysisRecord {
|
||||
//
|
||||
// @RabbitListener(queues = "5566")
|
||||
// public void receiveMessage(String message) {
|
||||
// // 在这里处理接收到的消息,并将其写入MySQL数据库
|
||||
// log.info("message:{}",message);
|
||||
// Enterprise parse = JSON.parseObject(message, Enterprise.class);
|
||||
// String substring = parse.getContactPhone().substring(parse.getContactPhone().length() - 4);
|
||||
// String host="123.56.102.11";
|
||||
// Integer post= Math.toIntExact(3306 + parse.getId());
|
||||
// String key="ent_" + substring;
|
||||
// log.info("parse:{}",parse);
|
||||
//
|
||||
// DataSourceInfo dataSourceInfo = DataSourceInfo.hostAndPortBuild(key, host, post);
|
||||
//
|
||||
// log.info("dataSourceInfo:{}",dataSourceInfo);
|
||||
//
|
||||
//
|
||||
// }
|
||||
//}
|
|
@ -59,39 +59,39 @@ public class BreakdownAbnormalMq {
|
|||
String[] split = faultInfo.getVin().split("-");
|
||||
log.info("split:{}",split[0]);
|
||||
|
||||
FaultInfo build = FaultInfo.builder()
|
||||
.faultCode(split[1])
|
||||
.vin(split[0])
|
||||
.endTime(faultInfo.getEndTime())
|
||||
.build();
|
||||
String key=build.getVin()+"123";
|
||||
String ent = redisTemplate.opsForValue().get(key);
|
||||
DynamicDataSourceHolder.setDynamicDataSourceKey(ent);
|
||||
|
||||
//获取最新一天数据
|
||||
List<FaultInfo> faultInfos = faultInfoMapper.selectList(
|
||||
new QueryWrapper<FaultInfo>()
|
||||
.eq("fault_code", build.getFaultCode()) // 替换 yourFaultCode 为实际的故障代码值
|
||||
.orderByDesc("start_time")
|
||||
.last("LIMIT 1")
|
||||
);
|
||||
// FaultInfo build = FaultInfo.builder()
|
||||
// .faultCode(split[1])
|
||||
// .vin(split[0])
|
||||
// .endTime(faultInfo.getEndTime())
|
||||
// .build();
|
||||
// String key=build.getVin()+"123";
|
||||
// String ent = redisTemplate.opsForValue().get(key);
|
||||
// DynamicDataSourceHolder.setDynamicDataSourceKey(ent);
|
||||
//
|
||||
// //获取最新一天数据
|
||||
// List<FaultInfo> faultInfos = faultInfoMapper.selectList(
|
||||
// new QueryWrapper<FaultInfo>()
|
||||
// .eq("fault_code", build.getFaultCode()) // 替换 yourFaultCode 为实际的故障代码值
|
||||
// .orderByDesc("start_time")
|
||||
// .last("LIMIT 1")
|
||||
// );
|
||||
//判断非空
|
||||
if (!faultInfos.isEmpty()) {
|
||||
//获取第一条数据
|
||||
FaultInfo latestFaultInfo = faultInfos.get(0);
|
||||
// 这里可以对 latestFaultInfo 进行进一步操作或者返回
|
||||
log.info("Latest FaultInfo: {}", latestFaultInfo);
|
||||
|
||||
//修改数据
|
||||
faultInfoMapper.updateById(
|
||||
FaultInfo.builder()
|
||||
.id(latestFaultInfo.getId())
|
||||
.endTime(new Date())
|
||||
.build()
|
||||
);
|
||||
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
log.info("消费结束");
|
||||
}
|
||||
// if (!faultInfos.isEmpty()) {
|
||||
// //获取第一条数据
|
||||
// FaultInfo latestFaultInfo = faultInfos.get(0);
|
||||
// // 这里可以对 latestFaultInfo 进行进一步操作或者返回
|
||||
// log.info("Latest FaultInfo: {}", latestFaultInfo);
|
||||
//
|
||||
// //修改数据
|
||||
// faultInfoMapper.updateById(
|
||||
// FaultInfo.builder()
|
||||
// .id(latestFaultInfo.getId())
|
||||
// .endTime(new Date())
|
||||
// .build()
|
||||
// );
|
||||
// DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||
// log.info("消费结束");
|
||||
// }
|
||||
log.info("消费结束");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,26 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文解析配置的Service层
|
||||
* 报文解析Service接口
|
||||
*
|
||||
* @author AnNan.Wang
|
||||
* @ClassName: MessageAnalysisService
|
||||
* @createTime: 2024/6/26 18:41
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
|
||||
public interface MessageAnalysisService extends IService<MessageAnalysis> {
|
||||
Result<String> messageAnalysisAdd(List<MessageAnalysis> messageAnalysisList);
|
||||
/**
|
||||
* 查询报文解析列表
|
||||
*
|
||||
* @param messageAnalysis 报文解析
|
||||
* @return 报文解析集合
|
||||
*/
|
||||
public List<MessageAnalysis> list(MessageAnalysis messageAnalysis);
|
||||
|
||||
List<MessageAnalysis> messageAnalysisList();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.many.domain.MessageConfigurationType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文配置类型Service接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
public interface MessageConfigurationTypeService extends IService<MessageConfigurationType> {
|
||||
/**
|
||||
* 查询报文配置类型列表
|
||||
*
|
||||
* @param messageConfigurationType 报文配置类型
|
||||
* @return 报文配置类型集合
|
||||
*/
|
||||
public List<MessageConfigurationType> list(MessageConfigurationType messageConfigurationType);
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.MessageData;
|
||||
import com.muyu.many.domain.req.MessageDataEnterprise;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文类型数据Service接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
public interface MessageDataService extends IService<MessageData> {
|
||||
/**
|
||||
* 查询报文类型数据列表
|
||||
*
|
||||
* @param messageData 报文类型数据
|
||||
* @return 报文类型数据集合
|
||||
*/
|
||||
public List<MessageData> list(MessageData messageData);
|
||||
|
||||
void messageDataEnterpriseAdd(MessageDataEnterprise messageDataEnterprise);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.many.domain.SlideLength;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 滑动长度Service接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface SlideLengthService extends IService<SlideLength> {
|
||||
/**
|
||||
* 查询滑动长度列表
|
||||
*
|
||||
* @param slideLength 滑动长度
|
||||
* @return 滑动长度集合
|
||||
*/
|
||||
public List<SlideLength> list(SlideLength slideLength);
|
||||
|
||||
List<SlideLength> slideLengthList();
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.many.domain.SlidingInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 滑窗Service接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface SlidingInfoService extends IService<SlidingInfo> {
|
||||
/**
|
||||
* 查询滑窗列表
|
||||
*
|
||||
* @param slidingInfo 滑窗
|
||||
* @return 滑窗集合
|
||||
*/
|
||||
public List<SlidingInfo> list(SlidingInfo slidingInfo);
|
||||
|
||||
boolean add(SlidingInfo slidingInfo);
|
||||
|
||||
boolean updateId(SlidingInfo slidingInfo);
|
||||
}
|
|
@ -20,4 +20,6 @@ public interface VehicleService extends IService<Vehicle> {
|
|||
*/
|
||||
public List<Vehicle> list(Vehicle vehicle);
|
||||
|
||||
List<Vehicle> vehicleList();
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.many.domain.Window;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 滑窗范围Service接口
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface WindowService extends IService<Window> {
|
||||
/**
|
||||
* 查询滑窗范围列表
|
||||
*
|
||||
* @param window 滑窗范围
|
||||
* @return 滑窗范围集合
|
||||
*/
|
||||
public List<Window> list(Window window);
|
||||
|
||||
List<Window> windowList();
|
||||
}
|
|
@ -1,42 +1,70 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
import com.muyu.authentication.service.MessageAnalysisService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文解析配置实现类
|
||||
*
|
||||
* @ClassName MessageAnalysisServiceImpl
|
||||
* @Author AnNan.Wang
|
||||
* @Date 2024/6/26 18:43
|
||||
*/
|
||||
import com.muyu.authentication.service.MessageAnalysisService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 报文解析Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MessageAnalysisServiceImpl extends ServiceImpl<MessageAnalysisMapper, MessageAnalysis>
|
||||
implements MessageAnalysisService {
|
||||
public class MessageAnalysisServiceImpl extends ServiceImpl<MessageAnalysisMapper, MessageAnalysis> implements MessageAnalysisService {
|
||||
|
||||
/**
|
||||
* 查询报文解析列表
|
||||
*
|
||||
* @param messageAnalysis 报文解析
|
||||
* @return 报文解析
|
||||
*/
|
||||
@Override
|
||||
public List<MessageAnalysis> list(MessageAnalysis messageAnalysis) {
|
||||
LambdaQueryWrapper<MessageAnalysis> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getVehicleId())){
|
||||
queryWrapper.eq(MessageAnalysis::getVehicleId, messageAnalysis.getVehicleId());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getAnalyzeKey())){
|
||||
queryWrapper.eq(MessageAnalysis::getAnalyzeKey, messageAnalysis.getAnalyzeKey());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getAnalyzeStart())){
|
||||
queryWrapper.eq(MessageAnalysis::getAnalyzeStart, messageAnalysis.getAnalyzeStart());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getEnt())){
|
||||
queryWrapper.eq(MessageAnalysis::getEnt, messageAnalysis.getEnt());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getLable())){
|
||||
queryWrapper.eq(MessageAnalysis::getLable, messageAnalysis.getLable());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageAnalysis.getType())){
|
||||
queryWrapper.eq(MessageAnalysis::getType, messageAnalysis.getType());
|
||||
}
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private MessageAnalysisMapper messageAnalysisMapper;
|
||||
private MessageAnalysisMapper messageAnalysis;
|
||||
|
||||
@Override
|
||||
public Result<String> messageAnalysisAdd(List<MessageAnalysis> messageAnalysisList) {
|
||||
for (MessageAnalysis messageAnalysis : messageAnalysisList) {
|
||||
messageAnalysisMapper.insert(
|
||||
MessageAnalysis.builder()
|
||||
.analyzeKey(messageAnalysis.getAnalyzeKey())
|
||||
.analyzeStart(messageAnalysis.getAnalyzeStart())
|
||||
.ent(messageAnalysis.getEnt())
|
||||
.lable(messageAnalysis.getLable())
|
||||
.type(messageAnalysis.getType())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
return Result.success();
|
||||
public List<MessageAnalysis> messageAnalysisList() {
|
||||
return messageAnalysis.selectList(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.MessageConfigurationTypeMapper;
|
||||
import com.muyu.authentication.service.MessageConfigurationTypeService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.MessageConfigurationType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 报文配置类型Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MessageConfigurationTypeServiceImpl extends ServiceImpl<MessageConfigurationTypeMapper, MessageConfigurationType> implements MessageConfigurationTypeService {
|
||||
|
||||
/**
|
||||
* 查询报文配置类型列表
|
||||
*
|
||||
* @param messageConfigurationType 报文配置类型
|
||||
* @return 报文配置类型
|
||||
*/
|
||||
@Override
|
||||
public List<MessageConfigurationType> list(MessageConfigurationType messageConfigurationType) {
|
||||
LambdaQueryWrapper<MessageConfigurationType> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(messageConfigurationType.getTypeName())){
|
||||
queryWrapper.like(MessageConfigurationType::getTypeName, messageConfigurationType.getTypeName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageConfigurationType.getTypeIdentification())){
|
||||
queryWrapper.eq(MessageConfigurationType::getTypeIdentification, messageConfigurationType.getTypeIdentification());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
import com.muyu.authentication.mapper.MessageDataMapper;
|
||||
import com.muyu.authentication.mapper.VehicleMapper;
|
||||
import com.muyu.authentication.service.MessageDataService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.domain.Enterprise;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.MessageData;
|
||||
import com.muyu.many.domain.Vehicle;
|
||||
import com.muyu.many.domain.req.MessageDataEnterprise;
|
||||
import com.muyu.many.domain.req.MessageDataEnterpriseMq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 报文类型数据Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-28
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MessageDataServiceImpl extends ServiceImpl<MessageDataMapper, MessageData> implements MessageDataService {
|
||||
|
||||
/**
|
||||
* 查询报文类型数据列表
|
||||
*
|
||||
* @param messageData 报文类型数据
|
||||
* @return 报文类型数据
|
||||
*/
|
||||
@Override
|
||||
public List<MessageData> list(MessageData messageData) {
|
||||
LambdaQueryWrapper<MessageData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(messageData.getMessageLabel())){
|
||||
queryWrapper.eq(MessageData::getMessageLabel, messageData.getMessageLabel());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageData.getAnalyzeKey())){
|
||||
queryWrapper.eq(MessageData::getAnalyzeKey, messageData.getAnalyzeKey());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageData.getInitiationPosition())){
|
||||
queryWrapper.eq(MessageData::getInitiationPosition, messageData.getInitiationPosition());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageData.getTerminatePosition())){
|
||||
queryWrapper.eq(MessageData::getTerminatePosition, messageData.getTerminatePosition());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(messageData.getTypeIdentification())){
|
||||
queryWrapper.eq(MessageData::getTypeIdentification, messageData.getTypeIdentification());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private MessageAnalysisMapper messageAnalysisMapper;
|
||||
@Autowired
|
||||
private MessageDataMapper messageDataMapper;
|
||||
@Autowired
|
||||
private VehicleMapper vehicleMapper;
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@Override
|
||||
public void messageDataEnterpriseAdd(MessageDataEnterprise messageDataEnterprise) {
|
||||
List<MessageData> messageData = messageDataList(messageDataEnterprise.getIds());
|
||||
|
||||
messageData.forEach(message -> {
|
||||
messageAnalysisMapper.insert(
|
||||
MessageAnalysis.builder()
|
||||
.vehicleId(messageDataEnterprise.getId())
|
||||
.analyzeKey(message.getAnalyzeKey())
|
||||
.analyzeStart(Long.valueOf(message.getInitiationPosition()))
|
||||
.ent(Long.valueOf(message.getTerminatePosition()))
|
||||
.lable(message.getMessageLabel())
|
||||
.type(message.getRemark())
|
||||
.build()
|
||||
);
|
||||
});
|
||||
List<Vehicle> vehicles = vehicleMapper.selectList(null);
|
||||
|
||||
|
||||
vehicles.forEach(vehicl -> {
|
||||
List<MessageAnalysis> messageAnalyses = messageAnalysisMapper.selectList(
|
||||
new LambdaQueryWrapper<>() {{
|
||||
eq(MessageAnalysis::getVehicleId, vehicl.getId());
|
||||
;
|
||||
}}
|
||||
);
|
||||
List<MessageAnalysis> arrayList = new ArrayList<>();
|
||||
messageAnalyses.forEach(messageAnal->{
|
||||
arrayList.add(messageAnal);
|
||||
});
|
||||
String jsonString = JSON.toJSONString(arrayList);
|
||||
System.out.println(jsonString);
|
||||
redisTemplate.opsForHash().put("VIN",vehicl.getVin(),jsonString);
|
||||
});
|
||||
}
|
||||
|
||||
private List<MessageData> messageDataList(List<Long> ids){
|
||||
List<MessageData> arrayList = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
MessageData messageData = messageDataMapper.selectOne(
|
||||
new LambdaQueryWrapper<>() {{
|
||||
eq(MessageData::getId, id);
|
||||
}}
|
||||
);
|
||||
arrayList.add(messageData);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.muyu.authentication.mapper.SlideLengthMapper;
|
||||
import com.muyu.authentication.service.SlideLengthService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.SlideLength;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 滑动长度Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SlideLengthServiceImpl extends ServiceImpl<SlideLengthMapper, SlideLength> implements SlideLengthService {
|
||||
|
||||
@Autowired
|
||||
private SlideLengthMapper slideLengthMapper;
|
||||
/**
|
||||
* 查询滑动长度列表
|
||||
*
|
||||
* @param slideLength 滑动长度
|
||||
* @return 滑动长度
|
||||
*/
|
||||
@Override
|
||||
public List<SlideLength> list(SlideLength slideLength) {
|
||||
LambdaQueryWrapper<SlideLength> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(slideLength.getSlideLengthName())){
|
||||
queryWrapper.like(SlideLength::getSlideLengthName, slideLength.getSlideLengthName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(slideLength.getSlideLengthProportion())){
|
||||
queryWrapper.eq(SlideLength::getSlideLengthProportion, slideLength.getSlideLengthProportion());
|
||||
}
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SlideLength> slideLengthList() {
|
||||
return slideLengthMapper.selectList(null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.SlideLengthMapper;
|
||||
import com.muyu.authentication.mapper.SlidingInfoMapper;
|
||||
import com.muyu.authentication.mapper.WindowMapper;
|
||||
import com.muyu.authentication.service.SlidingInfoService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.SlideLength;
|
||||
import com.muyu.many.domain.SlidingInfo;
|
||||
import com.muyu.many.domain.Window;
|
||||
import com.muyu.many.domain.mq.MessageAnalysisMq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 滑窗Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SlidingInfoServiceImpl extends ServiceImpl<SlidingInfoMapper, SlidingInfo> implements SlidingInfoService {
|
||||
|
||||
@Autowired
|
||||
private SlidingInfoMapper slidingInfoMapper;
|
||||
/**
|
||||
* 查询滑窗列表
|
||||
*
|
||||
* @param slidingInfo 滑窗
|
||||
* @return 滑窗
|
||||
*/
|
||||
@Override
|
||||
public List<SlidingInfo> list(SlidingInfo slidingInfo) {
|
||||
LambdaQueryWrapper<SlidingInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(slidingInfo.getVehicleVin())){
|
||||
queryWrapper.eq(SlidingInfo::getVehicleVin, slidingInfo.getVehicleVin());
|
||||
}
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private WindowMapper windowMapper;
|
||||
@Autowired
|
||||
private SlideLengthMapper slideLengthMapper;
|
||||
@Autowired
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@Override
|
||||
public boolean add(SlidingInfo slidingInfo) {
|
||||
int insert = slidingInfoMapper.insert(slidingInfo);
|
||||
if (insert>0) {
|
||||
|
||||
Window window = windowMapper.selectById(slidingInfo.getWindowRadiusId());
|
||||
SlideLength slideLength = slideLengthMapper.selectById(slidingInfo.getSlideLengthId());
|
||||
|
||||
MessageAnalysisMq build = MessageAnalysisMq.builder()
|
||||
.vehicleVin(slidingInfo.getVehicleVin())
|
||||
.analyzeKey(slidingInfo.getAnalyzeKey())
|
||||
.messageLabel(slidingInfo.getMessageLabel())
|
||||
.standard(slidingInfo.getStandard())
|
||||
.windowRadiusId(window.getWindowRadiusLength())
|
||||
.slideLengthId(slideLength.getSlideLengthProportion())
|
||||
.build();
|
||||
redisTemplate.opsForValue().set(build.getVehicleVin()+"-length",JSON.toJSONString(build));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean updateId(SlidingInfo slidingInfo) {
|
||||
int i = slidingInfoMapper.updateById(slidingInfo);
|
||||
|
||||
if (i>0) {
|
||||
redisTemplate.delete(slidingInfo.getVehicleVin()+"-length");
|
||||
Window window = windowMapper.selectById(slidingInfo.getWindowRadiusId());
|
||||
SlideLength slideLength = slideLengthMapper.selectById(slidingInfo.getSlideLengthId());
|
||||
|
||||
MessageAnalysisMq build = MessageAnalysisMq.builder()
|
||||
.vehicleVin(slidingInfo.getVehicleVin())
|
||||
.analyzeKey(slidingInfo.getAnalyzeKey())
|
||||
.messageLabel(slidingInfo.getMessageLabel())
|
||||
.standard(slidingInfo.getStandard())
|
||||
.windowRadiusId(window.getWindowRadiusLength())
|
||||
.slideLengthId(slideLength.getSlideLengthProportion())
|
||||
.build();
|
||||
redisTemplate.opsForValue().set(build.getVehicleVin()+"-length",JSON.toJSONString(build));
|
||||
String s = build.getVehicleVin() + "-length";
|
||||
rabbitTemplate.convertAndSend("renew",s,message -> {
|
||||
message.getMessageProperties().setMessageId(UUID.randomUUID().toString());
|
||||
return message;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,13 +1,19 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.MessageAnalysisMapper;
|
||||
import com.muyu.authentication.mapper.VehicleMapper;
|
||||
import com.muyu.authentication.service.VehicleService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.MessageAnalysis;
|
||||
import com.muyu.many.domain.Vehicle;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
|
@ -98,4 +104,19 @@ public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> impl
|
|||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private VehicleMapper vehicleMapper;
|
||||
@Autowired
|
||||
private MessageAnalysisMapper messageAnalysisMapper;
|
||||
|
||||
@Override
|
||||
public List<Vehicle> vehicleList() {
|
||||
return vehicleMapper.selectList(null);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.authentication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.muyu.authentication.mapper.WindowMapper;
|
||||
import com.muyu.authentication.service.WindowService;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.many.domain.Window;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* 滑窗范围Service业务层处理
|
||||
*
|
||||
* @author wan
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WindowServiceImpl extends ServiceImpl<WindowMapper, Window> implements WindowService {
|
||||
|
||||
@Autowired
|
||||
private WindowMapper mapper;
|
||||
/**
|
||||
* 查询滑窗范围列表
|
||||
*
|
||||
* @param window 滑窗范围
|
||||
* @return 滑窗范围
|
||||
*/
|
||||
@Override
|
||||
public List<Window> list(Window window) {
|
||||
LambdaQueryWrapper<Window> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(window.getWindowRadiusName())){
|
||||
queryWrapper.like(Window::getWindowRadiusName, window.getWindowRadiusName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(window.getWindowRadiusLength())){
|
||||
queryWrapper.eq(Window::getWindowRadiusLength, window.getWindowRadiusLength());
|
||||
}
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Window> windowList() {
|
||||
return mapper.selectList(null);
|
||||
}
|
||||
}
|
|
@ -1,2 +1,3 @@
|
|||
com.muyu.authentication.rabbitmq.MessageConsumer
|
||||
com.muyu.authentication.rabbitmq.vo.BreakdownAbnormalMq
|
||||
com.muyu.authentication.rabbitmq.enterprise.EnterpriseMq
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.SlideLength.mapper.SlideLengthMapper">
|
||||
|
||||
<resultMap type="com.muyu.many.domain.SlideLength" id="SlideLengthResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="slideLengthName" column="slide_length_name" />
|
||||
<result property="slideLengthProportion" column="slide_length_proportion" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSlideLengthVo">
|
||||
select id, slide_length_name, slide_length_proportion from slide_length
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.SlidingInfo.mapper.SlidingInfoMapper">
|
||||
|
||||
<resultMap type="com.muyu.many.domain.SlidingInfo" id="SlidingInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="vehicleVin" column="vehicle_vin" />
|
||||
<result property="messageKye" column="message_kye" />
|
||||
<result property="analyzeKey" column="analyze_key" />
|
||||
<result property="messageLabel" column="message_label" />
|
||||
<result property="standard" column="standard" />
|
||||
<result property="windowRadiusId" column="window_radius_id" />
|
||||
<result property="slideLengthId" column="slide_length_id" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.Window.mapper.WindowMapper">
|
||||
|
||||
<resultMap type="com.muyu.many.domain.Window" id="WindowResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="windowRadiusName" column="window_radius_name" />
|
||||
<result property="windowRadiusLength" column="window_radius_length" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWindowVo">
|
||||
select id, window_radius_name, window_radius_length from window
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue