Compare commits
64 Commits
87b3eccff5
...
e46b6325c4
Author | SHA1 | Date |
---|---|---|
|
e46b6325c4 | |
|
614ddceebc | |
|
a17d1b4557 | |
|
1542f34db3 | |
|
0d82041676 | |
|
7a88f1da14 | |
|
b4f832925c | |
|
4aebd67ebc | |
|
207125c795 | |
|
3bf6f0d929 | |
|
f07d95abeb | |
|
f27b14dc33 | |
|
aedee04643 | |
|
1627aa3dab | |
|
fa3b9b2244 | |
|
8d7ad9cdb9 | |
|
13bb25f4da | |
|
5688271d2c | |
|
83312b8e37 | |
|
fa36d029af | |
|
07a60444aa | |
|
60b63b758e | |
|
ac21236123 | |
|
016887afc2 | |
|
52dbb5a08b | |
|
c415b7676f | |
|
5b1c1a27a9 | |
|
22b3d12010 | |
|
f6c1de2c6b | |
|
29c84f90ef | |
|
122049419c | |
|
1d8aea440b | |
|
25ad7f9da0 | |
|
01aaf7f926 | |
|
1185868ce5 | |
|
0c7287f19d | |
|
803ea0fe80 | |
|
59b64e816c | |
|
4a094775d4 | |
|
66adba7bdc | |
|
6727b1896a | |
|
178d4966b5 | |
|
c174e8adab | |
|
c66b84bc6c | |
|
ab2f94acbd | |
|
10981bc80d | |
|
97b20e395a | |
|
15b99b27c4 | |
|
3d8b02a00e | |
|
347018d602 | |
|
833e554722 | |
|
5edc2a8c05 | |
|
e8377904b5 | |
|
b227854496 | |
|
41918d6303 | |
|
86eb16420b | |
|
10b63954a4 | |
|
19ca5b409f | |
|
6f17adbcf3 | |
|
97d5dac0a2 | |
|
b3ce3825ad | |
|
6a413e0ce0 | |
|
f07a9bd208 | |
|
3c7ba5744d |
|
@ -12,6 +12,8 @@ out
|
|||
######################################################################
|
||||
# IDE
|
||||
|
||||
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
|
@ -26,6 +28,7 @@ logs
|
|||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.yml
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
|
|
@ -30,6 +30,10 @@ public class RegisterBody extends LoginBody {
|
|||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phoneNumber;
|
||||
private String phonenumber;
|
||||
/**
|
||||
* 公司注册人名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
}
|
||||
|
|
|
@ -127,10 +127,18 @@ public class SysLoginService {
|
|||
|
||||
// 注册用户信息
|
||||
SysUser sysUser = new SysUser();
|
||||
//公司账号
|
||||
sysUser.setUserName(registerBody.getUsername());
|
||||
//公司邮箱
|
||||
sysUser.setEmail(registerBody.getEmail());
|
||||
sysUser.setPhonenumber(registerBody.getPhoneNumber());
|
||||
//公司号码
|
||||
sysUser.setPhonenumber(registerBody.getPhonenumber());
|
||||
//密码
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(registerBody.getPassword()));
|
||||
//公司注册人名称
|
||||
sysUser.setNickName(registerBody.getNickName());
|
||||
//企业名称
|
||||
sysUser.setFirmName(registerBody.getFirmName());
|
||||
Result<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
|
||||
if (Result.FAIL == registerResult.getCode()) {
|
||||
|
|
|
@ -501,4 +501,5 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,5 +23,11 @@
|
|||
<artifactId>kafka-clients</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 项目公共核心 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -87,7 +87,6 @@ public class SysUser extends BaseEntity {
|
|||
* 企业ID
|
||||
*/
|
||||
private Integer firmId;
|
||||
|
||||
/**
|
||||
* 所属数据库
|
||||
*/
|
||||
|
@ -145,6 +144,12 @@ public class SysUser extends BaseEntity {
|
|||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
* @param userId
|
||||
*/
|
||||
private String firmName;
|
||||
|
||||
public SysUser (Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-common-wechat</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>cloud-common-wechat</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- MuYu Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 帮助将java对象转换为xml字符串-->
|
||||
<!-- 依赖冲突会导致InaccessibleObjectException异常更新到适用版本-->
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.20</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.83</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 24415
|
||||
*/
|
||||
@Data
|
||||
public class AccessToken {
|
||||
|
||||
private String access_token;
|
||||
|
||||
private Long expires_in;
|
||||
|
||||
public void setExpiresTime(Long expiresIn) {
|
||||
this.expires_in = System.currentTimeMillis()+expiresIn*1000;
|
||||
}
|
||||
|
||||
public boolean isExpired(Long expiresIn){
|
||||
long now = System.currentTimeMillis();
|
||||
return now>expiresIn;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:Articles
|
||||
* @Date:2024/9/18 下午10:14
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("item")
|
||||
public class Articles {
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("Title")
|
||||
private String title ;
|
||||
@XStreamAlias("Description")
|
||||
private String description ;
|
||||
@XStreamAlias("PicUrl")
|
||||
private String picUrl ;
|
||||
@XStreamAlias("Url")
|
||||
private String url ;
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:ImageText
|
||||
* @Date:2024/9/18 下午9:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
public class NewsMessage {
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[news]]></MsgType>
|
||||
// <ArticleCount>1</ArticleCount>
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName ;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName ;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime ;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType ;
|
||||
@XStreamAlias("ArticleCount")
|
||||
private Integer articleCount ;
|
||||
@XStreamAlias("Articles")
|
||||
private List<Articles> articles ;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:TextMessage
|
||||
* @Date:2024/9/18 上午11:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
public class TextMessage {
|
||||
|
||||
//起一个别名 因为我们微信返回信息与java代码格式规范发生冲突
|
||||
//微信格式 ToUserName
|
||||
//JAVA格式 toUserName
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType;
|
||||
@XStreamAlias("Content")
|
||||
private String content;
|
||||
|
||||
}
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[text]]></MsgType>
|
||||
// <Content><![CDATA[你好]]></Content>
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@
|
|||
<module>cloud-common-xxl</module>
|
||||
<module>cloud-common-rabbit</module>
|
||||
<module>cloud-common-saas</module>
|
||||
<module>cloud-common-wechat</module>
|
||||
<module>cloud-common-kafka</module>
|
||||
</modules>
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
|
||||
<artifactId>cloud-modules-carData</artifactId>
|
||||
|
||||
<description>
|
||||
数据处理模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
|
@ -85,7 +89,6 @@
|
|||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.iotdb</groupId>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
package com.muyu.carData.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.annotation
|
||||
* @Project:cloud-server-8
|
||||
* @name:IoTTableName
|
||||
* @Date:2024/9/27 19:29
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
|
||||
public @interface IoTTableName {
|
||||
|
||||
String value() default "";
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.muyu.carData.constract;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.constract
|
||||
* @Project:cloud-server-8
|
||||
* @name:IoTDBTableParam
|
||||
* @Date:2024/9/27 20:02
|
||||
*/
|
||||
public class IoTDBTableParam {
|
||||
|
||||
public static final String SYSLOG_IOT_TABLE = "student";
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
package com.muyu.carData.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:IoTDBRecord
|
||||
* @Date:2024/9/27 19:25
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IoTDBRecord {
|
||||
|
||||
/**
|
||||
* 节点路径
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
private long time = System.currentTimeMillis();
|
||||
|
||||
/**
|
||||
* 属性
|
||||
*/
|
||||
private List<String> measurementList;
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
private List<Object> valueList;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
private List<String> typeList;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package com.muyu.carData.interfaces;
|
||||
|
||||
import com.muyu.carData.annotation.IoTTableName;
|
||||
import com.muyu.carData.domain.IoTDBRecord;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.interfaces
|
||||
* @Project:cloud-server-8
|
||||
* @name:IoTDBRecordable
|
||||
* @Date:2024/9/27 19:22
|
||||
* iot基类
|
||||
*/
|
||||
public interface IoTDBRecordable {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(IoTDBRecordable.class);
|
||||
|
||||
/**
|
||||
* 数据载入方法
|
||||
* @return Record
|
||||
*/
|
||||
default IoTDBRecord toRecord() throws Exception {
|
||||
IoTDBRecord ioTDBRecord = new IoTDBRecord();
|
||||
Object getIoTDBTime = this.getClass().getMethod("getIoTDBTime").invoke(this);
|
||||
if (null != getIoTDBTime){
|
||||
ioTDBRecord.setTime((Long) getIoTDBTime);
|
||||
}
|
||||
Class aClass = this.getClass();
|
||||
IoTTableName name = this.getClass().getAnnotation(IoTTableName.class);
|
||||
ioTDBRecord.setDeviceId(name.value());
|
||||
Field[] declaredFields = aClass.getDeclaredFields();
|
||||
ArrayList<String> measurements = new ArrayList<>();
|
||||
ArrayList<Object> records = new ArrayList<>();
|
||||
ArrayList<String> types = new ArrayList<>();
|
||||
for (Field declaredField : declaredFields) {
|
||||
measurements.add(declaredField.getName());
|
||||
String methodNamePro = declaredField.getName().substring(0, 1).toUpperCase() + declaredField.getName().substring(1);
|
||||
Method methodName = this.getClass().getMethod("get" + methodNamePro);
|
||||
records.add(methodName.invoke(this));
|
||||
types.add(methodName.getReturnType().getName());
|
||||
}
|
||||
ioTDBRecord.setMeasurementList(measurements);
|
||||
ioTDBRecord.setValueList(records);
|
||||
ioTDBRecord.setTypeList(types);
|
||||
return ioTDBRecord;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-modules-enterprise-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<description>
|
||||
cloud-modules-enterprise-common 企业业务common
|
||||
</description>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- MuYu Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||
<version>2.2.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.83</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-system</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 连接微信服务器(微信公众号)
|
||||
*/
|
||||
@Data
|
||||
@Tag(name = "连接微信服务器")
|
||||
public class AccessToken {
|
||||
|
||||
private String access_token;
|
||||
|
||||
private Long expires_in;
|
||||
|
||||
public void setExpiresTime(Long expiresIn) {
|
||||
this.expires_in = System.currentTimeMillis()+expiresIn*1000;
|
||||
}
|
||||
|
||||
public boolean isExpired(Long expiresIn){
|
||||
long now = System.currentTimeMillis();
|
||||
return now>expiresIn;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 发送图文回复消息内容(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:Articles
|
||||
* @Date:2024/9/18 下午10:14
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("item")
|
||||
@Tag(name = "发送图文回复消息内容")
|
||||
public class Articles {
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("Title")
|
||||
private String title ;
|
||||
@XStreamAlias("Description")
|
||||
private String description ;
|
||||
@XStreamAlias("PicUrl")
|
||||
private String picUrl ;
|
||||
@XStreamAlias("Url")
|
||||
private String url ;
|
||||
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
package com.muyu.domain;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
/**
|
||||
*
|
||||
* 故障规则测试类(故障)
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.faultrule
|
||||
* @Project:cloud-server-8
|
||||
* @name:PureElectricCar
|
||||
* @Date:2024/9/20 20:22
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "故障规则测试类")
|
||||
public class CarFaultRule {
|
||||
|
||||
/**
|
||||
* VIN码VIN码VIN码
|
||||
*/
|
||||
private String vin;
|
||||
/**
|
||||
* 时间戳时间戳时间戳
|
||||
*/
|
||||
private long timestamp;
|
||||
/**
|
||||
* 经度经度经度
|
||||
*/
|
||||
private double longitude;
|
||||
/**
|
||||
* 纬度纬度纬度
|
||||
*/
|
||||
private double latitude;
|
||||
/**
|
||||
* 车速车速车速
|
||||
*/
|
||||
private double speed;
|
||||
/**
|
||||
* 总里程总里程总里程
|
||||
*/
|
||||
private Long tm;
|
||||
/**
|
||||
* 总电压总电压总电压
|
||||
*/
|
||||
private double tv;
|
||||
/**
|
||||
* 总电流总电流总电流
|
||||
*/
|
||||
private double cc;
|
||||
/**
|
||||
* 绝缘电阻绝缘电阻绝缘电阻
|
||||
*/
|
||||
private double ir;
|
||||
/**
|
||||
* 档位档位档位
|
||||
*/
|
||||
private String gp;
|
||||
/**
|
||||
* 加速踏板行程值加速踏板行程值加速踏板行程值
|
||||
*/
|
||||
private double aptv;
|
||||
/**
|
||||
* 制动踏板行程值制动踏板行程值制动踏板行程值
|
||||
*/
|
||||
private double bptv;
|
||||
/**
|
||||
* 燃料消耗率燃料消耗率燃料消耗率
|
||||
*/
|
||||
private double sfc;
|
||||
/**
|
||||
* 电机控制器温度电机控制器温度电机控制器温度
|
||||
*/
|
||||
private double mct;
|
||||
/**
|
||||
* 电机转速电机转速电机转速
|
||||
*/
|
||||
private int ms;
|
||||
/**
|
||||
* 电机转矩电机转矩电机转矩
|
||||
*/
|
||||
private double mto;
|
||||
/**
|
||||
* 电机温度电机温度电机温度
|
||||
*/
|
||||
private double mte;
|
||||
/**
|
||||
* 电机电压电机电压电机电压
|
||||
*/
|
||||
private double mv;
|
||||
/**
|
||||
* 电机电流电机电流电机电流
|
||||
*/
|
||||
private double mc;
|
||||
/**
|
||||
* 动力电池剩余电量SOC动力电池剩余电量SOC动力电池剩余电量SOC
|
||||
*/
|
||||
private double pbrsoc;
|
||||
/**
|
||||
* 当前状态允许的最大反馈功率当前状态允许的最大反馈功率当前状态允许的最大反馈功率
|
||||
*/
|
||||
private double macsfp;
|
||||
/**
|
||||
* 当前状态允许最大放电功率当前状态允许最大放电功率当前状态允许最大放电功率
|
||||
*/
|
||||
private double csatmdp;
|
||||
/**
|
||||
* BMS自检计数器BMS自检计数器BMS自检计数器
|
||||
*/
|
||||
private int bms;
|
||||
/**
|
||||
* 动力电池充放电电流动力电池充放电电流动力电池充放电电流
|
||||
*/
|
||||
private double cadc;
|
||||
/**
|
||||
* 动力电池负载端总电压V3动力电池负载端总电压V3动力电池负载端总电压V3
|
||||
*/
|
||||
private double pbletvv3;
|
||||
/**
|
||||
* 单次最大电压单次最大电压单次最大电压
|
||||
*/
|
||||
private double smv;
|
||||
/**
|
||||
* 单体电池最低电压单体电池最低电压单体电池最低电压
|
||||
*/
|
||||
private double mvoab;
|
||||
/**
|
||||
* 单体电池最高温度单体电池最高温度单体电池最高温度
|
||||
*/
|
||||
private double maxbt;
|
||||
/**
|
||||
* 单体电池最低温度单体电池最低温度单体电池最低温度
|
||||
*/
|
||||
private double minbt;
|
||||
/**
|
||||
* 动力电池可用容量动力电池可用容量动力电池可用容量
|
||||
*/
|
||||
private double pbac;
|
||||
/**
|
||||
* 车辆状态车辆状态车辆状态
|
||||
*/
|
||||
private String vs;
|
||||
/**
|
||||
* 充电状态充电状态充电状态
|
||||
*/
|
||||
private String cs;
|
||||
/**
|
||||
* 运行状态运行状态运行状态
|
||||
*/
|
||||
private String rs;
|
||||
/**
|
||||
* SOCSOCSOC
|
||||
*/
|
||||
private double soc;
|
||||
/**
|
||||
* 可充电储能装置工作状态可充电储能装置工作状态可充电储能装置工作状态
|
||||
*/
|
||||
private String resdwc;
|
||||
/**
|
||||
* EASEASEAS
|
||||
*/
|
||||
private String eas;
|
||||
/**
|
||||
* PTCPTCPTC
|
||||
*/
|
||||
private String ptc;
|
||||
/**
|
||||
* EPSEPSEPS
|
||||
*/
|
||||
private String eps;
|
||||
/**
|
||||
* ABSABSABS
|
||||
*/
|
||||
private String abs;
|
||||
/**
|
||||
* MCUMCUMCU
|
||||
*/
|
||||
private String mcu;
|
||||
/**
|
||||
* 动力电池加热状态动力电池加热状态动力电池加热状态
|
||||
*/
|
||||
private String pbhs;
|
||||
/**
|
||||
* 动力电池当前状态动力电池当前状态动力电池当前状态
|
||||
*/
|
||||
private String pbcs;
|
||||
/**
|
||||
* 动力电池保温状态动力电池保温状态动力电池保温状态
|
||||
*/
|
||||
private String pbis;
|
||||
/**
|
||||
* DCDCDCDCDCDC
|
||||
*/
|
||||
private String dcdc;
|
||||
/**
|
||||
* CHGCHGCHG
|
||||
*/
|
||||
private String chg;
|
||||
/**
|
||||
* 校验位校验位校验位
|
||||
*/
|
||||
private byte chb;
|
||||
/**
|
||||
* 截止位截止位截止位
|
||||
*/
|
||||
private byte cub;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电子围栏类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFence
|
||||
* @Date:2024/9/17 16:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏类")
|
||||
@TableName(value = "car_fence",autoResultMap = true)
|
||||
public class CarFence {
|
||||
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
private Integer middleId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
|
||||
public static CarFence carFenceBuild(CarFence carFence) {
|
||||
return CarFence.builder()
|
||||
.id(carFence.getId())
|
||||
.name(carFence.getName())
|
||||
.clazzId(carFence.getClazzId())
|
||||
.typeId(carFence.getTypeId())
|
||||
.fenceText(carFence.getFenceText())
|
||||
.fenceStart(carFence.getFenceStart())
|
||||
.fenceCreate(carFence.getFenceCreate())
|
||||
.middleId(carFence.getMiddleId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏业务类型
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceClazz
|
||||
* @Date:2024/9/17 16:41
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子业务类型")
|
||||
@TableName(value = "car_fence_clazz",autoResultMap = true)
|
||||
public class CarFenceClazz {
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String clazzName;
|
||||
|
||||
public static CarFenceClazz carFenceClazzBuild(CarFenceClazz carFenceClazz) {
|
||||
return CarFenceClazz.builder()
|
||||
.clazzId(carFenceClazz.getClazzId())
|
||||
.clazzName(carFenceClazz.getClazzName())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏组类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:carFenceGroup
|
||||
* @Date:2024/9/22 10:20
|
||||
*/
|
||||
//weilabzu
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏组类")
|
||||
@TableName(value = "car_fence_group",autoResultMap = true)
|
||||
public class CarFenceGroup {
|
||||
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
|
||||
public static CarFenceGroup carFenceBuild(CarFenceGroup carFenceGroup) {
|
||||
return CarFenceGroup.builder()
|
||||
.id(carFenceGroup.getId())
|
||||
.priority(carFenceGroup.getPriority())
|
||||
.status(carFenceGroup.getStatus())
|
||||
.groupType(carFenceGroup.getGroupType())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏类型
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:Type
|
||||
* @Date:2024/9/17 16:40
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏类型")
|
||||
@TableName(value = "car_fence_type",autoResultMap = true)
|
||||
public class CarFenceType {
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
public static CarFenceType carFenceTypeBuild(CarFenceType carFenceType) {
|
||||
return CarFenceType.builder()
|
||||
.typeId(carFenceType.getTypeId())
|
||||
.typeName(carFenceType.getTypeName())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.muyu.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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.req.CarInformationAddReq;
|
||||
import com.muyu.domain.req.CarInformationUpdReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 企业车辆管理实体类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarInformation
|
||||
* @Date:2024/9/22 22:18
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "企业车辆管理实体类")
|
||||
@TableName(value = "car_information",autoResultMap = true)
|
||||
public class CarInformation {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@TableId(value = "car_information_id",type = IdType.AUTO)
|
||||
private Long carInformationId;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
@TableField(value = "car_information_VIN")
|
||||
private String carInformationVIN;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(title = "车辆电子围栏外键ID", type = "Integer")
|
||||
private Integer carInformationFence;
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private Date carInformationExamineEnddata;
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
@Schema(title = "车辆类型外键ID", type = "Integer")
|
||||
private Integer carInformationType;
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
private Integer carInformationState;
|
||||
|
||||
public static CarInformation carInformationBuilder(CarInformation carInformation) {
|
||||
return CarInformation.builder()
|
||||
.carInformationId(carInformation.getCarInformationId())
|
||||
.carInformationLicensePlate(carInformation.getCarInformationLicensePlate())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static CarInformation carInformationUpdBuilder(CarInformationUpdReq carInformation, Supplier<Long> idSupplier) {
|
||||
return CarInformation.builder()
|
||||
.carInformationId(idSupplier.get())
|
||||
.carInformationBrand(carInformation.getCarInformationBrand())
|
||||
.carInformationColor(carInformation.getCarInformationColor())
|
||||
.carInformationDriver(carInformation.getCarInformationDriver())
|
||||
.carInformationMotorManufacturer(carInformation.getCarInformationMotorManufacturer())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.carInformationBatteryManufacturer(carInformation.getCarInformationBatteryManufacturer())
|
||||
.carInformationBatteryModel(carInformation.getCarInformationBatteryModel())
|
||||
.carInformationFence(carInformation.getCarInformationFence())
|
||||
.carInformationType(carInformation.getCarInformationType())
|
||||
.carInformationFocus(carInformation.getCarInformationFocus())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static CarInformation carInformationAddBuilder(CarInformationAddReq carInformation) {
|
||||
return CarInformation.builder()
|
||||
.carInformationVIN(carInformation.getCarInformationVIN())
|
||||
.carInformationLicensePlate(carInformation.getCarInformationLicensePlate())
|
||||
.carInformationBrand(carInformation.getCarInformationBrand())
|
||||
.carInformationColor(carInformation.getCarInformationColor())
|
||||
.carInformationDriver(carInformation.getCarInformationDriver())
|
||||
.carInformationMotorManufacturer(carInformation.getCarInformationMotorManufacturer())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.carInformationBatteryManufacturer(carInformation.getCarInformationBatteryManufacturer())
|
||||
.carInformationBatteryModel(carInformation.getCarInformationBatteryModel())
|
||||
.carInformationFence(carInformation.getCarInformationFence())
|
||||
.carInformationType(carInformation.getCarInformationType())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 车辆报文模板实体类
|
||||
* @author 17353
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆报文模板实体类")
|
||||
@TableName(value = "car_message",autoResultMap = true)
|
||||
public class CarMessage {
|
||||
//报文类型模块表
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long messageTypeId;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
//报文拆分位置主表
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long carMessageId;
|
||||
/**
|
||||
* 车辆类型外键
|
||||
*/
|
||||
private Integer carMessageCartype;
|
||||
/**
|
||||
* 车辆报文类型外键
|
||||
*/
|
||||
private Integer carMessageType;
|
||||
/**
|
||||
* 开始位下标
|
||||
*/
|
||||
private Integer carMessageStartIndex;
|
||||
/**
|
||||
* 结束位下标
|
||||
*/
|
||||
private Integer carMessageEndIndex;
|
||||
/**
|
||||
* 报文数据类型 (固定值 区间随机值)
|
||||
*/
|
||||
private String messageTypeClass;
|
||||
/**
|
||||
* 报文是否开启故障检测(0默认未开启 1开启)
|
||||
*/
|
||||
private Integer carMessageState;
|
||||
|
||||
/**
|
||||
* 修改方法
|
||||
* @param carMessage
|
||||
* @param supplier
|
||||
* @return
|
||||
*/
|
||||
public static CarMessage carMessageUpdBuilder(CarMessage carMessage, Supplier<Long> supplier) {
|
||||
return CarMessage.builder()
|
||||
.messageTypeId(supplier.get())
|
||||
.messageTypeCode(carMessage.messageTypeCode)
|
||||
.messageTypeName(carMessage.messageTypeName)
|
||||
.messageTypeBelongs(carMessage.messageTypeBelongs)
|
||||
.carMessageId(carMessage.carMessageId)
|
||||
.carMessageCartype(carMessage.carMessageCartype)
|
||||
.carMessageType(carMessage.carMessageType)
|
||||
.carMessageStartIndex(carMessage.carMessageStartIndex)
|
||||
.carMessageEndIndex(carMessage.carMessageEndIndex)
|
||||
.messageTypeClass(carMessage.messageTypeClass)
|
||||
.carMessageState(carMessage.carMessageState)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加方法
|
||||
* @param carMessage
|
||||
* @return
|
||||
*/
|
||||
public static CarMessage carMessageAddBuilder(CarMessage carMessage) {
|
||||
return CarMessage.builder()
|
||||
.messageTypeCode(carMessage.messageTypeCode)
|
||||
.messageTypeName(carMessage.messageTypeName)
|
||||
.messageTypeBelongs(carMessage.messageTypeBelongs)
|
||||
.carMessageId(carMessage.carMessageId)
|
||||
.carMessageCartype(carMessage.carMessageCartype)
|
||||
.carMessageType(carMessage.carMessageType)
|
||||
.carMessageStartIndex(carMessage.carMessageStartIndex)
|
||||
.carMessageEndIndex(carMessage.carMessageEndIndex)
|
||||
.messageTypeClass(carMessage.messageTypeClass)
|
||||
.carMessageState(carMessage.carMessageState)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
private Long messageTypeId ;
|
||||
private String messageTypeCode ;
|
||||
private String messageTypeName ;
|
||||
private String messageTypeBelongs ;
|
||||
private String messageTypeClass ;
|
||||
private Long carMessageId ;
|
||||
private Integer carMessageCartype ;
|
||||
private Integer carMessageType ;
|
||||
private Integer carMessageStartIndex ;
|
||||
private Integer carMessageEndIndex ;
|
||||
private Integer carMessageState ;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆报文所属类型
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.car
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarMessage
|
||||
* @Date:2024/9/22 下午3:07
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆报文所属类型")
|
||||
@TableName(value = "car_message_type",autoResultMap = true)
|
||||
public class CarMessageType {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer messageTypeId ;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode ;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName ;
|
||||
/**
|
||||
* 报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs ;
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆电子组中间表
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:carMiddle
|
||||
* @Date:2024/9/20 16:30
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆电子组中间表")
|
||||
@TableName(value = "car_middle",autoResultMap = true)
|
||||
public class CarMiddle {
|
||||
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 电子围栏ID
|
||||
*/
|
||||
private Integer fenceGroupId;
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
private Long carInformationId;
|
||||
|
||||
public CarMiddle(Integer fenceGroupId, Long carInformationId) {
|
||||
this.fenceGroupId = fenceGroupId;
|
||||
this.carInformationId = carInformationId;
|
||||
}
|
||||
|
||||
public static CarMiddle carMiddleBuilder(CarMiddle carMiddle) {
|
||||
return CarMiddle.builder()
|
||||
.id(carMiddle.getId())
|
||||
.fenceGroupId(carMiddle.getFenceGroupId())
|
||||
.carInformationId(carMiddle.getCarInformationId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 围栏组中间表围栏
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:carMiddleGroup
|
||||
* @Date:2024/9/22 10:35
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "围栏组中间表围栏")
|
||||
@TableName(value = "car_middle_group",autoResultMap = true)
|
||||
public class CarMiddleGroup {
|
||||
|
||||
/**
|
||||
* 中间ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Integer carFenceId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private Integer fenceGroupId;
|
||||
|
||||
public CarMiddleGroup(Integer carFenceId, Integer fenceGroupId) {
|
||||
this.carFenceId = carFenceId;
|
||||
this.fenceGroupId = fenceGroupId;
|
||||
}
|
||||
|
||||
public static CarMiddleGroup carMiddleGroupBuilder(CarMiddleGroup carMiddleGroup) {
|
||||
return CarMiddleGroup.builder()
|
||||
.id(carMiddleGroup.getId())
|
||||
.carFenceId(carMiddleGroup.getCarFenceId())
|
||||
.fenceGroupId(carMiddleGroup.getFenceGroupId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆类型
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarType
|
||||
* @Date:2024/9/21 19:01
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_type",autoResultMap = true)
|
||||
@Tag(name ="车辆类型表")
|
||||
public class CarType {
|
||||
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
* 车辆类型名
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 车辆规则外键ID
|
||||
*/
|
||||
private long carTypeRules;
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.muyu.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 com.muyu.domain.req.FaultCodeAddReq;
|
||||
import com.muyu.domain.req.FaultCodeUpdReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCode
|
||||
* @Date:2024/9/17 14:55
|
||||
*/
|
||||
/**
|
||||
* 故障码
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_faultcode",autoResultMap = true)
|
||||
@Tag(name = "故障码")
|
||||
public class FaultCode {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
@TableId(value = "faultcode_id",type = IdType.AUTO)
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*是否警告
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String faulttypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
public static FaultCode addfaultcode(FaultCodeAddReq faultCodeAddReq){
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(0)
|
||||
.messageTypeId(faultCodeAddReq.getMessageTypeId())
|
||||
.faultcodeNumber(faultCodeAddReq.getFaultcodeNumber())
|
||||
.faultGroup(faultCodeAddReq.getFaultGroup())
|
||||
.faultBit(faultCodeAddReq.getFaultBit())
|
||||
.faultValue(faultCodeAddReq.getFaultValue())
|
||||
.isWarning(faultCodeAddReq.getIsWarning())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static FaultCode updfaultcode(FaultCodeUpdReq faultCodeUpdReq){
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(0)
|
||||
.messageTypeId(faultCodeUpdReq.getMessageTypeId())
|
||||
.faultcodeNumber(faultCodeUpdReq.getFaultcodeNumber())
|
||||
.faultGroup(faultCodeUpdReq.getFaultGroup())
|
||||
.faultBit(faultCodeUpdReq.getFaultBit())
|
||||
.faultValue(faultCodeUpdReq.getFaultValue())
|
||||
.isWarning(faultCodeUpdReq.getIsWarning())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
public static FaultCode faultCodeBuilder(FaultCode faultCode) {
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(faultCode.getFaultcodeId())
|
||||
.messageTypeId(faultCode.getMessageTypeId())
|
||||
.faultcodeNumber(faultCode.getFaultcodeNumber())
|
||||
.faultGroup(faultCode.faultGroup)
|
||||
.faultBit(faultCode.faultBit)
|
||||
.faultValue(faultCode.faultValue)
|
||||
.isWarning(faultCode.isWarning)
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.muyu.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 com.muyu.domain.req.FaultConditionAddReq;
|
||||
import com.muyu.domain.req.FaultConditionUpdReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 故障规则
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCondition
|
||||
* @Date:2024/9/21 19:51
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_condition",autoResultMap = true)
|
||||
@Tag(name = "故障规则")
|
||||
public class FaultCondition {
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
@TableId(value = "carcondition_id",type = IdType.AUTO)
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeCode;
|
||||
|
||||
|
||||
public static FaultCondition faultConditionadd(FaultConditionAddReq faultConditionAddReq){
|
||||
return FaultCondition.builder()
|
||||
.carTypeId(faultConditionAddReq.getCarTypeId())
|
||||
.messageTypeId(faultConditionAddReq.getMessageTypeId())
|
||||
.faultconditionIdentification(faultConditionAddReq.getFaultconditionIdentification())
|
||||
.faultconditionParameter(faultConditionAddReq.getFaultconditionParameter())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static FaultCondition faultConditionupd(FaultConditionUpdReq faultConditionUpdReq, Supplier<Long> idSupplier){
|
||||
return FaultCondition.builder()
|
||||
.carconditionId(faultConditionUpdReq.getCarconditionId())
|
||||
.carTypeId(faultConditionUpdReq.getCarTypeId())
|
||||
.messageTypeId(faultConditionUpdReq.getMessageTypeId())
|
||||
.faultconditionIdentification(faultConditionUpdReq.getFaultconditionIdentification())
|
||||
.faultconditionParameter(faultConditionUpdReq.getFaultconditionParameter())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.domain.req.FaultCodeAddReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障标签
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultLabel
|
||||
* @Date:2024/9/17 15:06
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_label",autoResultMap = true)
|
||||
@Tag(name = "故障标签")
|
||||
public class FaultLabel {
|
||||
/**
|
||||
*自增主键
|
||||
*/
|
||||
@TableId(value = "message_type_id",type = IdType.AUTO)
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
public static FaultLabel addfaultLabel(FaultCodeAddReq faultCodeAddReq){
|
||||
return FaultLabel.builder()
|
||||
.messageTypeId(0)
|
||||
.messageTypeId(faultCodeAddReq.getMessageTypeId())
|
||||
.messageTypeCode(faultCodeAddReq.getMessageTypeCode())
|
||||
.messageTypeName(faultCodeAddReq.getMessageTypeName())
|
||||
.messageTypeBelongs(faultCodeAddReq.getMessageTypeBelongs())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLog
|
||||
* @Date:2024/9/19 0:42
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_log",autoResultMap = true)
|
||||
@Tag(name = "故障日志")
|
||||
public class FaultLog {
|
||||
|
||||
/**
|
||||
* 故障日志Id
|
||||
*/
|
||||
@TableId(value = "log_id",type = IdType.AUTO)
|
||||
private long logId;
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆Id
|
||||
*/
|
||||
private long carInformationId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障类型
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultType
|
||||
* @Date:2024/9/17 15:03
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_type",autoResultMap = true)
|
||||
public class FaultType {
|
||||
/**
|
||||
*故障类型Id
|
||||
*/
|
||||
@TableId(value = "faulttype_id",type = IdType.AUTO)
|
||||
private long faulttypeId;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
private String faulttypeName;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:Firm
|
||||
* @Date:2024/9/27 12:29
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class Firm {
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
@TableId(value = "firm_id")
|
||||
private Long firmId;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firmName;
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain ;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 图文信息(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:ImageText
|
||||
* @Date:2024/9/18 下午9:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
@Tag(name = "图文信息")
|
||||
public class NewsMessage {
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[news]]></MsgType>
|
||||
// <ArticleCount>1</ArticleCount>
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName ;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName ;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime ;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType ;
|
||||
@XStreamAlias("ArticleCount")
|
||||
private Integer articleCount ;
|
||||
@XStreamAlias("Articles")
|
||||
private List<Articles> articles ;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:SysUser
|
||||
* @Date:2024/9/28 22:37
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "用户信息")
|
||||
@TableName("sys_user")
|
||||
public class SysUser extends BaseEntity {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId(value = "user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户类型(00系统用户)
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 用户性别(0男 1女 2未知)
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 头像地址
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date loginDate;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Long firmId;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firmName;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 文本信息(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:TextMessage
|
||||
* @Date:2024/9/18 上午11:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
@Tag(name = "文本信息")
|
||||
public class TextMessage {
|
||||
|
||||
//起一个别名 因为我们微信返回信息与java代码格式规范发生冲突
|
||||
//微信格式 ToUserName
|
||||
//JAVA格式 toUserName
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType;
|
||||
@XStreamAlias("Content")
|
||||
private String content;
|
||||
|
||||
}
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[text]]></MsgType>
|
||||
// <Content><![CDATA[你好]]></Content>
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障查询信息结果返回对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:Vehicle
|
||||
* @Date:2024/9/20 20:44
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "故障查询信息结果返回对象")
|
||||
public class Vehicle {
|
||||
/**
|
||||
* 车辆VIN 唯一标识
|
||||
*/
|
||||
private String VIN;
|
||||
/**
|
||||
* 故障信息
|
||||
*/
|
||||
private String faultmessage;
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 预警日志
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnLogs
|
||||
* @Date:2024/9/20 下午7:11
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_logs")
|
||||
@Tag(name = "预警日志")
|
||||
public class WarnLogs {
|
||||
|
||||
/**
|
||||
* 预警日志id
|
||||
*/
|
||||
@Excel(name = "预警日志id", cellType = Excel.ColumnType.NUMERIC)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 车辆vin码
|
||||
*/
|
||||
@Excel(name = "车辆vin码")
|
||||
private String vin;
|
||||
/**
|
||||
* 规则id
|
||||
*/
|
||||
@Excel(name = "规则id")
|
||||
private Long warnRuleId;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Excel(name = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime ;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@Excel(name = "结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime ;
|
||||
/**
|
||||
* 最大值
|
||||
*/
|
||||
@Excel(name = "最大值")
|
||||
private Long maxValue ;
|
||||
/**
|
||||
* 最小值
|
||||
*/
|
||||
@Excel(name = "最小值")
|
||||
private Long minValue ;
|
||||
/**
|
||||
* 平均值
|
||||
*/
|
||||
@Excel(name = "平均值")
|
||||
private Long avgValue ;
|
||||
/**
|
||||
* 中位数
|
||||
*/
|
||||
@Excel(name = "中位数")
|
||||
private Long medianValue ;
|
||||
/**
|
||||
* 是否发送预警
|
||||
*/
|
||||
@Excel(name = "是否发送预警")
|
||||
private Long status ;
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// @Excel(name = "创建人")
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// @Excel(name = "创建时间")
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// @Excel(name = "更新人")
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// @Excel(name = "更新时间")
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
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 io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警规则
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnRule
|
||||
* @Date:2024/9/20 下午7:20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_rule")
|
||||
@Tag(name = "预警规则")
|
||||
public class WarnRule {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String ruleName;
|
||||
private Long strategyId;
|
||||
private Long msgTypeId;
|
||||
private Long slideTime;
|
||||
private Long slideFrequency;
|
||||
private Long maxValue;
|
||||
private Long minValue;
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
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 io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警策略
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnStrategy
|
||||
* @Date:2024/9/20 下午7:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_strategy")
|
||||
@Tag(name = "预警策略")
|
||||
public class WarnStrategy {
|
||||
|
||||
/**
|
||||
* 策略Id
|
||||
*/
|
||||
@TableId( type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Long carTypeId ;
|
||||
private String strategyName ;
|
||||
private Long msgId ;
|
||||
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 站内信
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:Message
|
||||
* @Date:2024/9/22 10:40
|
||||
*/
|
||||
|
||||
@Tag(name = "站内信")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_message",autoResultMap = true)
|
||||
public class Message {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* 发送者
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 接收者
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "消息创建时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
|
||||
|
||||
public static Message messageBuilder(Message message) {
|
||||
return Message.builder()
|
||||
.id(message.getId())
|
||||
.sender(message.getSender())
|
||||
.receiver(message.getReceiver())
|
||||
.content(message.getContent())
|
||||
.status(message.getStatus())
|
||||
.createTime(message.getCreateTime())
|
||||
.userId(message.getUserId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:MessageReq
|
||||
* @Date:2024/9/22 11:00
|
||||
*/
|
||||
|
||||
@Tag(name = "消息状态")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class MessageReq {
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 消息发送参数
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:MessageReq
|
||||
* @Date:2024/9/22 11:00
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "消息发送参数")
|
||||
public class MessageSendReq {
|
||||
/**
|
||||
* 发送者
|
||||
*/
|
||||
private String sender;
|
||||
/**
|
||||
* 接收者
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "消息创建时间",defaultValue = "2024-8-9 10:47:57",type = "String")
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏组请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupReq
|
||||
* @Date:2024/9/24 14:36
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆电子围栏组请求对象")
|
||||
public class CarFenceGroupReq {
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
private Integer carId;
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceReq
|
||||
* @Date:2024/9/17 16:26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "电子围栏请求对象")
|
||||
public class CarFenceReq {
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private String clazzId;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@Schema(title = "当前页数", type = "Integer", defaultValue = "1", description = "当前页数")
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 条数
|
||||
*/
|
||||
@Schema(title = "分页条数", type = "Integer", defaultValue = "10", description = "每页有多少条")
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 围栏组电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupDel
|
||||
* @Date:2024/9/24 11:49
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "围栏组电子围栏请求对象")
|
||||
public class CarGroupIdReq {
|
||||
/**
|
||||
* 围栏组Id
|
||||
*/
|
||||
private Integer ids;
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import com.muyu.domain.CarInformation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarGroupReq
|
||||
* @Date:2024/9/23 12:01
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆电子围栏请求对象")
|
||||
public class CarGroupReq {
|
||||
/**
|
||||
* 车辆
|
||||
*/
|
||||
|
||||
private List<CarInformation> carInformations;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 车辆管理信息添加请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆管理信息添加请求对象")
|
||||
public class CarInformationAddReq {
|
||||
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private String carInformationExamineEnddata;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
private Integer carInformationType;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆管理列表请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name="车辆管理列表请求对象")
|
||||
public class CarInformationListReq {
|
||||
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆唯一VIN",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationVIN;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆类型ID",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carTypeId;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电子围栏外键ID",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
@Schema(
|
||||
description = "启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carInformationState;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电机厂商",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电机型号",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电池厂商",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电池型号",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
//分页页数
|
||||
private Integer pageNum = 1;
|
||||
//分页条数
|
||||
private Integer pageSize = 5;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆管理修改操作请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "车辆管理修改操作请求对象")
|
||||
public class CarInformationUpdReq {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@Schema(title = "车辆管理主键", type = "Long")
|
||||
private Long carInformationId;
|
||||
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
@Schema(title = "车辆品牌", type = "String")
|
||||
private String carInformationBrand;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
@Schema(title = "车辆颜色", type = "String")
|
||||
private String carInformationColor;
|
||||
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
@Schema(title = "车辆驾驶员", type = "String")
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
@Schema(title = "车辆电机厂商", type = "String")
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
@Schema(title = "车辆电机型号", type = "String")
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
@Schema(title = "车辆电池厂商", type = "String")
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
@Schema(title = "车辆电池型号", type = "String")
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(title = "车辆电子围栏外键ID", type = "Integer")
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
@Schema(title = "车辆类型外键ID", type = "Integer")
|
||||
private Integer carInformationType;
|
||||
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
@Schema(title = "是否重点车辆 (0否默认 1是 )", type = "Integer")
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
@Schema(title = "启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)", type = "Integer")
|
||||
private Integer carInformationState;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障码添加请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCodeAddReq
|
||||
* @Date:2024/9/18 10:12
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeAddReq {
|
||||
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 故障分类Id
|
||||
*/
|
||||
private long faulttypeId;
|
||||
/**
|
||||
* 是否产生报警
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String faultContent;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 故障码列表条件查询请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeListReq
|
||||
* @Date:2024/9/17 15:55
|
||||
*/
|
||||
|
||||
@Tag(name = "故障码列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeListReq {
|
||||
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* 故障码修改请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCodeAddReq
|
||||
* @Date:2024/9/18 10:12
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeUpdReq {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 故障分类Id
|
||||
*/
|
||||
private long faulttypeId;
|
||||
/**
|
||||
* 是否产生报警
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String faultContent;
|
||||
/**
|
||||
*故障状态
|
||||
*/
|
||||
private Integer faultStatus;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则制定请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionAddReq
|
||||
* @Date:2024/9/21 21:02
|
||||
*/
|
||||
@Tag(name = "故障规则制定请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionAddReq {
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则列表条件查询请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCondition
|
||||
* @Date:2024/9/21 20:02
|
||||
*/
|
||||
@Tag(name = "故障规则列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionListReq {
|
||||
|
||||
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则修改请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionUpdReq
|
||||
* @Date:2024/9/22 9:38
|
||||
*/
|
||||
@Tag(name = "故障规则修改请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionUpdReq {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志列表请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogReq
|
||||
* @Date:2024/9/20 9:38
|
||||
*/
|
||||
|
||||
@Tag(name = "故障日志列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultLogListReq {
|
||||
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏组围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FenceGroupReq
|
||||
* @Date:2024/9/24 1:09
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "围栏组围栏请求对象")
|
||||
public class FenceGroupReq {
|
||||
|
||||
/**
|
||||
* 车辆
|
||||
*/
|
||||
private List<CarFence> carFences;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 公司信息请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FirmListReq
|
||||
* @Date:2024/9/27 19:19
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "公司信息请求对象",description = "公司信息请求对象")
|
||||
public class FirmListReq {
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String firmName;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警策略请求对象
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnStrategyReq
|
||||
* @Date:2024/9/25 下午10:28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "预警策略请求对象")
|
||||
public class WarnStrategyReq {
|
||||
|
||||
/**
|
||||
* 策略id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 车辆类型
|
||||
*/
|
||||
private String carTypeId;
|
||||
/**
|
||||
* 策略名称
|
||||
*/
|
||||
private String strategyName;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电子围栏-围栏组列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupReq
|
||||
* @Date:2024/9/24 1:45
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "电子围栏-围栏组列表")
|
||||
public class CarFenceGroupResp {
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
private Integer middleId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆-围栏组列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupsResq
|
||||
* @Date:2024/9/25 21:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆-围栏组列表")
|
||||
public class CarFenceGroupsResp {
|
||||
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.CarFence;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电子围栏列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceResq
|
||||
* @Date:2024/9/17 16:35
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏列表")
|
||||
@TableName(value = "car_fence",autoResultMap = true)
|
||||
public class CarFenceResp {
|
||||
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型名
|
||||
*/
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型名
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
|
||||
public static CarFenceResp carFenceResqListBuilder(CarFence etlDataScore) {
|
||||
return CarFenceResp.builder()
|
||||
.id(etlDataScore.getId())
|
||||
.name(etlDataScore.getName())
|
||||
.clazzName(etlDataScore.getClazzName())
|
||||
.typeName(etlDataScore.getTypeName())
|
||||
.fenceStart(etlDataScore.getFenceStart())
|
||||
.fenceEnd(etlDataScore.getFenceEnd())
|
||||
.fenceCreate(etlDataScore.getFenceCreate())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆基础信息列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarInformationResp
|
||||
* @Date:2024/9/28 12:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆基础信息列表")
|
||||
public class CarInformationResp {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@TableId(value = "car_information_id",type = IdType.AUTO)
|
||||
private Long carInformationId;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
@TableField(value = "car_information_VIN")
|
||||
private String carInformationVin;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
private Integer carInformationFence;
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private Date carInformationExamineEnddata;
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
private Integer carInformationType;
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
private Integer carInformationState;
|
||||
|
||||
//车辆类型表
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
@TableField(value = "car_information_type")
|
||||
private Integer carTypeId;
|
||||
/**
|
||||
* 车辆类型名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 车辆规则外键ID
|
||||
*/
|
||||
private long carTypeRules;
|
||||
|
||||
//电子围栏
|
||||
/**
|
||||
*电子围栏ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 电子围栏名
|
||||
*/
|
||||
private String name;
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆报文信息(预警)响应对象
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.car
|
||||
* @Project:cloud-server-8
|
||||
* @name:resp
|
||||
* @Date:2024/9/22 下午7:12
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆报文信息")
|
||||
public class CarMessageResp {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer carMessageId ;
|
||||
/**
|
||||
* 车辆类型外键
|
||||
*/
|
||||
private Integer carMessageCartype ;
|
||||
/**
|
||||
* 车辆报文外键
|
||||
*/
|
||||
private Integer carMessageType ;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName ;
|
||||
/**
|
||||
* 开始位下标
|
||||
*/
|
||||
private Integer carMessageStartIndex ;
|
||||
/**
|
||||
* 结束位下标
|
||||
*/
|
||||
private Integer carMessageEndIndex ;
|
||||
/**
|
||||
* 报文数据类型 (固定值 区间随机值)
|
||||
*/
|
||||
private String messageTypeClass ;
|
||||
/**
|
||||
* 报文是否开启故障检测(0默认未开启 1开启)
|
||||
*/
|
||||
private Integer carMessageState ;
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
|
||||
import com.muyu.domain.FaultCode;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 故障码信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeListResp
|
||||
* @Date:2024/9/17 15:41
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障码信息响应对象",description = "故障码查询的响应结果")
|
||||
public class FaultCodeListResp {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*是否警告
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
private String faulttypeName;
|
||||
/**
|
||||
*报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultCode
|
||||
* @return
|
||||
*/
|
||||
public static FaultCodeListResp faultCodeListResp(FaultCode faultCode){
|
||||
return FaultCodeListResp.builder()
|
||||
.faultcodeId(faultCode.getFaultcodeId())
|
||||
.messageTypeId(faultCode.getMessageTypeId())
|
||||
.faultcodeNumber(faultCode.getFaultcodeNumber())
|
||||
.faultGroup(faultCode.getFaultGroup())
|
||||
.faultBit(faultCode.getFaultBit())
|
||||
.faultValue(faultCode.getFaultValue())
|
||||
.isWarning(faultCode.getIsWarning())
|
||||
.faulttypeName(faultCode.getFaulttypeName())
|
||||
.messageTypeName(faultCode.getMessageTypeName())
|
||||
.messageTypeCode(faultCode.getMessageTypeCode())
|
||||
.messageTypeBelongs(faultCode.getMessageTypeBelongs())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据和总数的响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeTotalListResp
|
||||
* @Date:2024/9/17 15:44
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障码数据总数列表",description = "数据和总数的响应")
|
||||
public class FaultCodeTotalListResp {
|
||||
|
||||
|
||||
/**
|
||||
* 故障码信息集合
|
||||
*/
|
||||
private List<FaultCodeListResp> faultCodeListRespList;
|
||||
|
||||
private long total;
|
||||
|
||||
public static FaultCodeTotalListResp faultCodeTotalListResp(List<FaultCodeListResp> faultCodeListRespList,long total){
|
||||
FaultCodeTotalListResp faultCodeTotalListResp = new FaultCodeTotalListResp();
|
||||
faultCodeTotalListResp.setFaultCodeListRespList(faultCodeListRespList);
|
||||
faultCodeTotalListResp.setTotal(total);
|
||||
return faultCodeTotalListResp;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.muyu.domain.FaultCondition;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionResp
|
||||
* @Date:2024/9/21 19:59
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@Tag(name="故障规则信息响应对象",description = "故障规则查询的响应结果")
|
||||
public class FaultConditionListResp {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultCondition
|
||||
* @return
|
||||
*/
|
||||
public static FaultConditionListResp faultConditionListResp(FaultCondition faultCondition){
|
||||
return FaultConditionListResp.builder()
|
||||
.carconditionId(faultCondition.getCarconditionId())
|
||||
.carTypeId(faultCondition.getCarTypeId())
|
||||
.messageTypeId(faultCondition.getMessageTypeId())
|
||||
.faultconditionParameter(faultCondition.getFaultconditionParameter())
|
||||
.faultconditionIdentification(faultCondition.getFaultconditionIdentification())
|
||||
.carTypeName(faultCondition.getCarTypeName())
|
||||
.messageTypeName(faultCondition.getMessageTypeName())
|
||||
.messageTypeCode(faultCondition.getMessageTypeCode())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionResp
|
||||
* @Date:2024/9/28 16:53
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障规则表",description = "数据响应")
|
||||
public class FaultConditionResp {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
@TableId(value = "carcondition_id",type = IdType.AUTO)
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障规则数据总数响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionTotalListResp
|
||||
* @Date:2024/9/21 20:00
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障规则数据总数列表",description = "数据和总数的响应")
|
||||
public class FaultConditionTotalListResp {
|
||||
|
||||
/**
|
||||
* 故障规则信息集合
|
||||
*/
|
||||
private List<FaultConditionListResp> faultConditionListRespList;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private long total;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param faultConditionListRespList
|
||||
* @param total
|
||||
* @return
|
||||
*/
|
||||
public static FaultConditionTotalListResp faultConditionTotalListResp(List<FaultConditionListResp> faultConditionListRespList,long total){
|
||||
FaultConditionTotalListResp faultConditionTotalListResp = new FaultConditionTotalListResp();
|
||||
faultConditionTotalListResp.setFaultConditionListRespList(faultConditionListRespList);
|
||||
faultConditionTotalListResp.setTotal(total);
|
||||
return faultConditionTotalListResp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.FaultLog;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogResp
|
||||
* @Date:2024/9/20 9:43
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@Tag(name="故障日志信息响应对象",description = "故障日志的响应结果")
|
||||
public class FaultLogListResp {
|
||||
|
||||
|
||||
/**
|
||||
* 故障日志Id
|
||||
*/
|
||||
private long logId;
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆Id
|
||||
*/
|
||||
private long carInformationId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 车辆vin
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultLog
|
||||
* @return
|
||||
*/
|
||||
public static FaultLogListResp faultLogListResp(FaultLog faultLog){
|
||||
return FaultLogListResp.builder()
|
||||
.logId(faultLog.getLogId())
|
||||
.faultcodeId(faultLog.getFaultcodeId())
|
||||
.carInformationId(faultLog.getCarInformationId())
|
||||
.carVin(faultLog.getCarVin())
|
||||
.startwarningTime(faultLog.getStartwarningTime())
|
||||
.endwarningTime(faultLog.getEndwarningTime())
|
||||
.faultcodeNumber(faultLog.getFaultcodeNumber())
|
||||
.carInformationVIN(faultLog.getCarInformationVIN())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障日志数据总数响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogTotalListResp
|
||||
* @Date:2024/9/20 11:18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障日志数据总数列表",description = "数据和总数的响应")
|
||||
public class FaultLogTotalListResp {
|
||||
|
||||
private List<FaultLogListResp> faultLogListRespList;
|
||||
|
||||
private long total;
|
||||
|
||||
public static FaultLogTotalListResp faultLogTotalListResp(List<FaultLogListResp> faultLogListRespList,long total){
|
||||
FaultLogTotalListResp faultLogTotalListResp = new FaultLogTotalListResp();
|
||||
faultLogTotalListResp.setFaultLogListRespList(faultLogListRespList);
|
||||
faultLogTotalListResp.setTotal(total);
|
||||
return faultLogTotalListResp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.SysUser;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 企业信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FirmListResp
|
||||
* @Date:2024/9/27 19:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name="企业信息响应对象",description = "企业信息响应对象")
|
||||
public class FirmListResp {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户类型(00系统用户)
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 用户性别(0男 1女 2未知)
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 头像地址
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date loginDate;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Long firmId;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firmName;
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
*/
|
||||
public static FirmListResp firmListResp(SysUser sysUser){
|
||||
return FirmListResp.builder()
|
||||
.userId(sysUser.getUserId())
|
||||
.deptId(sysUser.getDeptId())
|
||||
.userName(sysUser.getUserName())
|
||||
.nickName(sysUser.getNickName())
|
||||
.userType((sysUser.getUserType()))
|
||||
.email(sysUser.getEmail())
|
||||
.phonenumber(sysUser.getPhonenumber())
|
||||
.sex(sysUser.getSex())
|
||||
.avatar(sysUser.getAvatar())
|
||||
.password(sysUser.getPassword())
|
||||
.status(sysUser.getStatus())
|
||||
.delFlag(sysUser.getDelFlag())
|
||||
.loginDate(sysUser.getLoginDate())
|
||||
.databaseName(sysUser.getDatabaseName())
|
||||
.firmId(sysUser.getFirmId())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司数据总数响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain.resp.firmlist
|
||||
* @Project:cloud-server-8
|
||||
* @name:FirmTotalListResp
|
||||
* @Date:2024/9/27 19:42
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "公司数据总数列表",description = "数据总数响应")
|
||||
public class FirmTotalListResp {
|
||||
|
||||
private List<FirmListResp> firmListRespList;
|
||||
|
||||
private long total;
|
||||
|
||||
public static FirmTotalListResp firmTotalListResp(List<FirmListResp> firmListRespList,long toal){
|
||||
FirmTotalListResp firmTotalListResp = new FirmTotalListResp();
|
||||
firmTotalListResp.setFirmListRespList(firmListRespList);
|
||||
firmTotalListResp.setTotal(toal);
|
||||
return firmTotalListResp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-modules-enterprise-server</artifactId>
|
||||
<description>
|
||||
cloud-modules-enterprise-server 企业业务服务
|
||||
</description>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>com.muyu</groupId> -->
|
||||
<!-- <artifactId>cloud-common-rabbit</artifactId> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--apache.kafka<-->
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
</dependency>
|
||||
<!--远调端Feign-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<!-- mqttv3 -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
<!-- MuYu Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-datasource</artifactId>
|
||||
</dependency>
|
||||
<!-- MuYu Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-datascope</artifactId>
|
||||
</dependency>
|
||||
<!-- MuYu Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-log</artifactId>
|
||||
</dependency>
|
||||
<!-- 接口模块 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-api-doc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||
<version>1.4.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>cloud-electronic</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- <!– 加入maven deploy插件,当在deploy时,忽略些model–> -->
|
||||
<!-- <plugin> -->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId> -->
|
||||
<!-- <artifactId>maven-deploy-plugin</artifactId> -->
|
||||
<!-- <version>3.1.1</version> -->
|
||||
<!-- <configuration> -->
|
||||
<!-- <skip>true</skip> -->
|
||||
<!-- </configuration> -->
|
||||
<!-- </plugin> -->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,22 @@
|
|||
package com.muyu.server;
|
||||
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @Author:杨闪闪
|
||||
* @Package:com.muyu.server.integration
|
||||
* @Project:cloud-integration
|
||||
* @name:Integration
|
||||
* @Date:2024/9/17 下午9:56
|
||||
*/
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.muyu.server.mapper")
|
||||
public class IntegrationApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(IntegrationApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFenceClazz;
|
||||
import com.muyu.server.service.CarFenceClazzService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 围栏业务类型控制层
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.server.controller
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceClazzController
|
||||
* @Date:2024/9/20 14:31
|
||||
*/
|
||||
@RequestMapping("/carFenceClazz")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "查询数据",description = "从围栏信息表中查询数据")
|
||||
@Log4j2
|
||||
public class CarFenceClazzController {
|
||||
|
||||
private final CarFenceClazzService carFenceClazzService;
|
||||
|
||||
/**
|
||||
* 查询围栏类型信息
|
||||
*/
|
||||
@PostMapping("/selectClazz")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<List<CarFenceClazz>> selectConnect(){
|
||||
List<CarFenceClazz> connects = carFenceClazzService.list();
|
||||
log.info("查询数据成功");
|
||||
return Result.success(
|
||||
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.req.*;
|
||||
import com.muyu.domain.resp.CarFenceGroupResp;
|
||||
import com.muyu.domain.resp.CarFenceGroupsResp;
|
||||
import com.muyu.domain.resp.CarFenceResp;
|
||||
import com.muyu.server.service.CarFenceService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏数据控制层
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.server.controller
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceController
|
||||
* @Date:2024/9/17 16:46
|
||||
*/
|
||||
@RequestMapping("/carFence")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "查询数据",description = "从围栏信息表中查询数据")
|
||||
@Log4j2
|
||||
public class CarFenceController {
|
||||
|
||||
private final CarFenceService carFenceService;
|
||||
|
||||
/**
|
||||
* 查询围栏信息
|
||||
*/
|
||||
@PostMapping("/selectConnect")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<Page<CarFenceResp>> selectConnect(
|
||||
@Validated @RequestBody CarFenceReq req
|
||||
){
|
||||
Page<CarFenceResp> connects = carFenceService.selectCarFence(req);
|
||||
log.info("查询数据:"+ connects);
|
||||
return Result.success(
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子围栏添加
|
||||
*/
|
||||
@PostMapping("/addCarFence")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<String> addCarFence(
|
||||
@Validated @RequestBody CarFence carFence
|
||||
){
|
||||
Boolean connects = carFenceService.addCarFence(carFence);
|
||||
log.info("shd");
|
||||
return connects?Result.success(
|
||||
null, "操作成功"
|
||||
):Result.success(
|
||||
null, "操作失败"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加电子围栏和车辆中间表
|
||||
*/
|
||||
@PostMapping("/carAddList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<String> addCarFence(
|
||||
@Validated @RequestBody CarGroupReq req
|
||||
){
|
||||
Boolean connects = carFenceService.addCarGroup(req);
|
||||
log.info("添加数据:"+ connects);
|
||||
|
||||
return connects?Result.success(
|
||||
null, "操作成功"
|
||||
):Result.success(
|
||||
null, "操作失败"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加围栏和围栏组中间表
|
||||
*/
|
||||
@PostMapping("/selectFenceMiddleGroup")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<String> selectFenceMiddleGroup(
|
||||
@Validated @RequestBody FenceGroupReq req
|
||||
){
|
||||
Boolean connects = carFenceService.addFenceGroup(req);
|
||||
return connects?Result.success(
|
||||
null, "操作成功"
|
||||
):Result.success(
|
||||
null, "操作失败"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询围栏和围栏组中间围栏
|
||||
*/
|
||||
@PostMapping("/selectCarFenceGroupList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<List<CarFenceGroupResp>> selectCarFenceGroupList(
|
||||
@Validated @RequestBody Integer id
|
||||
){
|
||||
List<CarFenceGroupResp> list = carFenceService.selectCarFenceGroupList(id);
|
||||
return list.size()!=0?Result.success(
|
||||
list, "操作成功"
|
||||
):Result.success(
|
||||
null, "未绑定围栏"
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 查询中间围栏
|
||||
*/
|
||||
@DeleteMapping("/carFenceGroupDel")
|
||||
@Operation(summary = "解除绑定围栏",description = "查询围栏数据")
|
||||
public Result<String> carFenceGroupDel(
|
||||
@Validated @RequestBody CarGroupIdReq carGroupIdReq
|
||||
){
|
||||
Boolean list = carFenceService.carFenceGroupDel(carGroupIdReq);
|
||||
return list?Result.success(
|
||||
null, "操作成功"
|
||||
):Result.success(
|
||||
null, "未绑定围栏"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询车辆围栏组信息
|
||||
*/
|
||||
@PostMapping("/carGroupList")
|
||||
@Operation(summary = "查询车辆围栏组数据",description = "查询车辆围栏组信息")
|
||||
public Result<List<CarFenceGroupsResp>> carGroupList(@RequestBody CarFenceGroupReq req){
|
||||
List<CarFenceGroupsResp> connects = carFenceService.carGroupList(req);
|
||||
return Result.success(
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import com.muyu.server.service.CarMiddleGroupService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏及围栏组控制层
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.server.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupController
|
||||
* @Date:2024/9/23 1:12
|
||||
*/
|
||||
@RequestMapping("/CarFenceGroup")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "查询数据",description = "从中间表中查询数据")
|
||||
@Log4j2
|
||||
public class CarFenceGroupController {
|
||||
|
||||
private final CarMiddleGroupService carMiddleGroupService;
|
||||
|
||||
/**
|
||||
* 查询围栏信息
|
||||
*/
|
||||
@PostMapping("/selectCarMiddleGroup")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<List<CarFenceGroup>> selectConnect(){
|
||||
List<CarFenceGroup> connects = carMiddleGroupService.selectCarFence();
|
||||
return Result.success(
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFenceType;
|
||||
import com.muyu.server.service.CarFenceTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 围栏类型控制层
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.server.controller
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceClazzController
|
||||
* @Date:2024/9/20 14:31
|
||||
*/
|
||||
@RequestMapping("/carFenceType")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "查询数据",description = "从围栏信息表中查询数据")
|
||||
@Log4j2
|
||||
public class CarFenceTypeController {
|
||||
|
||||
private final CarFenceTypeService carFenceTypeService;
|
||||
|
||||
/**
|
||||
* 查询围栏业务信息
|
||||
*/
|
||||
@PostMapping("/selectType")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<List<CarFenceType>> selectConnect(){
|
||||
List<CarFenceType> connects = carFenceTypeService.list();
|
||||
return Result.success(
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarInformation;
|
||||
import com.muyu.domain.req.CarInformationAddReq;
|
||||
import com.muyu.domain.req.CarInformationListReq;
|
||||
import com.muyu.domain.req.CarInformationUpdReq;
|
||||
import com.muyu.domain.resp.CarInformationResp;
|
||||
import com.muyu.server.service.CarInformationService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆信息管理控制层
|
||||
* @author 17353
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/carinformation")
|
||||
@Tag(name = "车辆信息管理控制层" ,description = "进行车辆管理基础业务操作")
|
||||
public class CarInformationController {
|
||||
@Resource
|
||||
private CarInformationService carInformationService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询围栏业务信息
|
||||
*/
|
||||
@PostMapping("/selectCarInformation")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<List<CarInformation>> selectConnect(){
|
||||
List<CarInformation> connects = carInformationService.list()
|
||||
.stream()
|
||||
.map(CarInformation::carInformationBuilder)
|
||||
.toList();
|
||||
return Result.success(
|
||||
connects, "操作成功"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业车辆管理列表
|
||||
* 联查--> 车辆管理--车辆类型表--车辆电子围栏
|
||||
* 搜索-->(车辆唯一VIN carInformationVIN 精确查
|
||||
* 车辆类型ID carTypeId 精确查
|
||||
* 车辆电子围栏外键ID carInformationFence 精确查
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
* carInformationState 精确查
|
||||
* 车辆电机厂商 carInformationMotorManufacturer 模糊查
|
||||
* 车辆电机型号 carInformationMotorModel 精确查
|
||||
* 车辆电池厂商 carInformationBatteryManufacturer 模糊查
|
||||
* 车辆电池型号 carInformationBatteryModel 精确查
|
||||
* )
|
||||
* 分页--> 分页页数 pageNum 分页条数 pageSize
|
||||
*
|
||||
* @param carInformationListReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/selectCarInformationList")
|
||||
@Operation(summary = "企业车辆管理列表")
|
||||
public Result<Page<CarInformationResp>> selectCarInformationList(@Validated @RequestBody CarInformationListReq carInformationListReq) {
|
||||
Page<CarInformationResp> pageInfo = carInformationService.selectCarInformationList(carInformationListReq);
|
||||
log.info("企业车辆管理列表查询",carInformationListReq,pageInfo);
|
||||
return Result.success(pageInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业车辆添加管理
|
||||
* @param carInformationAddReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addCarInformation")
|
||||
@Operation(summary = "企业车辆添加管理")
|
||||
public Result addCarInformation(@Validated @RequestBody CarInformationAddReq carInformationAddReq){
|
||||
return carInformationService.addCarInformation(carInformationAddReq)
|
||||
?Result.success("添加车辆成功")
|
||||
:Result.error(402,"添加车辆失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业车辆删除
|
||||
* @param carInformationId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/delBycarInformationId/{carInformationId}")
|
||||
@Operation(summary = "企业车辆删除")
|
||||
public Result delBycarInformationId(@Validated @RequestParam(name = "carInformationId") Integer carInformationId){
|
||||
boolean delBycarInformationId = carInformationService.delBycarInformationId(carInformationId);
|
||||
if (delBycarInformationId){
|
||||
return Result.success(delBycarInformationId ,"删除车辆成功");
|
||||
}
|
||||
return Result.error(402,"删除车辆失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业车辆修改管理
|
||||
* @param carInformationUpdReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updatecarInformation")
|
||||
@Operation(summary = "企业车辆修改管理")
|
||||
public Result updateCarMessage(@Validated @RequestBody CarInformationUpdReq carInformationUpdReq){
|
||||
boolean updatecarInformation = carInformationService.updatecarInformation(carInformationUpdReq);
|
||||
log.info(updatecarInformation);
|
||||
System.out.println("我在这个里:"+updatecarInformation);
|
||||
if(updatecarInformation)
|
||||
{
|
||||
return Result.success(carInformationUpdReq,"修改成功");
|
||||
}
|
||||
return Result.error( 402,"修改失败");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* To 电子围栏负责人
|
||||
* 查询企业车辆 carInformationID 和 carInformationLicensePlate
|
||||
* 无参
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectCarInformationIdAndLicensePlate")
|
||||
@Operation(summary = "查询企业车辆 carInformationID 和 carInformationLicensePlate")
|
||||
public Result<List<CarInformationResp>> selectCarInformationIdAndLicensePlate(){
|
||||
List<CarInformationResp> carInformations = carInformationService.selectBycarInformationIDAndLicensePlate();
|
||||
return Result.success(carInformations);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarMessage;
|
||||
import com.muyu.server.service.CarMessageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报文模板展示列表控制层
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/carMessage")
|
||||
@Tag(name = "信息报文模块" )
|
||||
public class CarMessageController {
|
||||
@Resource
|
||||
private CarMessageService carMessageService;
|
||||
/**
|
||||
* 根据所属车类别 解析 车辆报文模板
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/selectCarMessageList")
|
||||
@Operation(summary = "报文模板展示列表")
|
||||
public Result<List<CarMessage>> selectCarMessageList(){
|
||||
List<CarMessage> carMessages = carMessageService.selectCarMessageList();
|
||||
return Result.success(carMessages);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加车辆报文规则
|
||||
*/
|
||||
@PostMapping("/insertCarMessage")
|
||||
@Operation(summary = "添加报文信息")
|
||||
public Result<Integer> insertCarMessage(@Validated @RequestBody CarMessage carMessage){
|
||||
int inserted = carMessageService.insertCarMessage(carMessage);
|
||||
if (inserted>0){
|
||||
return Result.success(200,"添加成功");
|
||||
}
|
||||
return Result.error(402,"添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除车辆报文规则
|
||||
*
|
||||
*/
|
||||
@PostMapping("/delectByCarMessageId")
|
||||
@Operation(summary = "删除报文信息")
|
||||
public Result<Integer> delectByCarMessageId(@RequestParam(name = "carMessageId") Integer carMessageId){
|
||||
int deleteByCarMessageId = carMessageService.delectByCarMessageId(carMessageId);
|
||||
if (deleteByCarMessageId>0){
|
||||
return Result.success(200,"删除成功");
|
||||
}
|
||||
return Result.error(402,"删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改车辆报文规则
|
||||
*/
|
||||
@PostMapping("/updateCarMessage")
|
||||
@Operation(summary = "修改报文信息")
|
||||
public Result<Integer> updateCarMessage(@Validated @RequestBody CarMessage carMessage){
|
||||
int updateCarMessage = carMessageService.updateCarMessage(carMessage);
|
||||
if(updateCarMessage>0)
|
||||
{
|
||||
return Result.success(200,"修改成功");
|
||||
}
|
||||
return Result.error( 402,"修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 测试分割字符
|
||||
*/
|
||||
public class MessageParser{
|
||||
public static void main(String[] args) {
|
||||
String message = "01,02,03," +
|
||||
"04,05,06,07,08,09," +
|
||||
"10,11,12,13,14,15,16" +
|
||||
",17,18,19,20,21,22,23," +
|
||||
"24,25,26,27,28,29,30" +
|
||||
",31,32,33,34,35,36,37," +
|
||||
"38,39,40,41,42,43,44,45," +
|
||||
"46";
|
||||
|
||||
|
||||
String[] split = message.split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
System.out.println(split[i]);
|
||||
if(i == 0){
|
||||
System.out.println("开始");
|
||||
}else if(i == split.length - 1){
|
||||
System.out.println("结束");
|
||||
}
|
||||
}
|
||||
System.out.println(split.length);
|
||||
System.out.println(message.length());
|
||||
|
||||
System.out.println(message.substring(0,1));
|
||||
System.out.println(message.substring(1,2));
|
||||
System.out.println(message.substring(2,3));
|
||||
System.out.println(message.substring(3,4));
|
||||
System.out.println(message.substring(4,5));
|
||||
System.out.println(message.substring(5,6));
|
||||
System.out.println(message.substring(6,7));
|
||||
System.out.println(message.substring(7,8));
|
||||
System.out.println(message.substring(8,9));
|
||||
System.out.println(message.substring(9,10));
|
||||
System.out.println(message.substring(10,11));
|
||||
System.out.println(message.substring(11,12));
|
||||
System.out.println(message.substring(12,13));
|
||||
System.out.println(message.substring(13,14));
|
||||
System.out.println(message.substring(14,15));
|
||||
System.out.println(message.substring(15,16));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarMiddle;
|
||||
import com.muyu.server.service.CarMiddleSerivce;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏添加中间表控制层
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.server.controller
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarMiddleController
|
||||
* @Date:2024/9/20 16:33
|
||||
*/
|
||||
@RequestMapping("/carMiddle")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "添加数据",description = "从中间表添加数据")
|
||||
@Log4j2
|
||||
public class CarMiddleController {
|
||||
|
||||
private CarMiddleSerivce carMiddleSerivce;
|
||||
|
||||
/**
|
||||
* 添加车辆和电子围栏组中间表
|
||||
*/
|
||||
@PostMapping("/carAddList")
|
||||
@Operation(summary = "查询数据",description = "查询数据")
|
||||
public Result<String> addCarFence(
|
||||
@Validated @RequestBody CarMiddle carMiddle
|
||||
){
|
||||
boolean connects = carMiddleSerivce.save(carMiddle);
|
||||
return connects?Result.success(
|
||||
null, "操作成功"
|
||||
):Result.success(
|
||||
null, "操作失败"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.server.service.CarTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 车辆类型控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarTypeController
|
||||
* @Date:2024/9/21 19:01
|
||||
*/
|
||||
|
||||
@RequestMapping("/cartype")
|
||||
@RestController
|
||||
public class CarTypeController {
|
||||
|
||||
@Autowired
|
||||
private CarTypeService carTypeService;
|
||||
|
||||
|
||||
/**
|
||||
* 车辆类型
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "车辆类型",description = "车辆类型信息")
|
||||
public Result carTypeList(){
|
||||
return Result.success(carTypeService.selectcarType());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.req.FaultCodeAddReq;
|
||||
import com.muyu.domain.req.FaultCodeListReq;
|
||||
import com.muyu.domain.req.FaultCodeUpdReq;
|
||||
import com.muyu.domain.resp.FaultCodeTotalListResp;
|
||||
import com.muyu.server.service.FaultCodeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 车辆故障码控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeController
|
||||
* @Date:2024/9/17 14:51
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faultcode")
|
||||
public class FaultCodeController {
|
||||
|
||||
@Autowired
|
||||
private FaultCodeService faultCodeService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障码展示(故障码联查)
|
||||
* @param faultCodeListReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultcodelist")
|
||||
@Operation(summary = "故障码列表(多)",description = "展示故障码信息")
|
||||
public Result<FaultCodeTotalListResp> selectfaultcodelist(@Validated @RequestBody FaultCodeListReq faultCodeListReq){
|
||||
return Result.success(faultCodeService.selectfaultcodelist(faultCodeListReq));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增故障码
|
||||
* @param faultCodeAddReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultcodeadd")
|
||||
@Operation(summary = "新增故障码",description = "新增故障码信息")
|
||||
public Result insertfaultcode(@Validated @RequestBody FaultCodeAddReq faultCodeAddReq){
|
||||
faultCodeService.insert(faultCodeAddReq);
|
||||
return Result.success(null,"新增成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改故障码
|
||||
* @param faultCodeUpdReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultcodeupd")
|
||||
@Operation(summary = "修改故障码",description = "修改故障码信息")
|
||||
public Result updfaultcode(@Validated @RequestBody FaultCodeUpdReq faultCodeUpdReq){
|
||||
faultCodeService.upd(faultCodeUpdReq);
|
||||
return Result.success(null,"修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除故障码
|
||||
* @param messageTypeId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultcodedel/{messageTypeId}")
|
||||
@Operation(summary = "删除故障码",description = "删除故障码信息")
|
||||
public Result delfaultcode(@PathVariable("messageTypeId") Integer messageTypeId){
|
||||
faultCodeService.del(messageTypeId);
|
||||
return Result.success(null,"删除成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.FaultCondition;
|
||||
import com.muyu.domain.req.FaultConditionAddReq;
|
||||
import com.muyu.domain.req.FaultConditionListReq;
|
||||
import com.muyu.domain.req.FaultConditionUpdReq;
|
||||
import com.muyu.server.service.FaultConditionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障规则控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultRuleController
|
||||
* @Date:2024/9/19 22:10
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faultcondition")
|
||||
public class FaultConditionController {
|
||||
|
||||
@Autowired
|
||||
private FaultConditionService faultConditionService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障规则
|
||||
* @param faultConditionListReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "故障规则列表展示",description = "故障规则列表展示")
|
||||
public Result getfaultrulelist(@RequestBody @Validated FaultConditionListReq faultConditionListReq){
|
||||
return Result.success(faultConditionService.getfaultrulelist(faultConditionListReq));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 故障规则添加
|
||||
* @param faultConditionAddReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultconditionadd")
|
||||
@Operation(summary = "添加规则",description = "添加故障规则")
|
||||
public Result faultconditionadd(@RequestBody FaultConditionAddReq faultConditionAddReq){
|
||||
//判断车辆类型是否已存在所对应的故障规则
|
||||
List<FaultCondition> faultConditionList = faultConditionService.selectBytypeAndlabel(faultConditionAddReq);
|
||||
if (faultConditionList.size()>0){
|
||||
return Result.error("此车辆类型已存在所对应的故障规则,无需重新制定,可在原规则上进行修改");
|
||||
}
|
||||
faultConditionService.save(FaultCondition.faultConditionadd(faultConditionAddReq));
|
||||
return Result.success(null,"规则制定成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 故障规则修改
|
||||
* @param
|
||||
* @param faultConditionUpdReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultconditionupd")
|
||||
@Operation(summary = "修改规则",description = "修改故障规则")
|
||||
public Result faultconditionupd(
|
||||
@RequestBody @Validated FaultConditionUpdReq faultConditionUpdReq){
|
||||
faultConditionService.updateById(FaultCondition.faultConditionupd(faultConditionUpdReq,()->faultConditionUpdReq.getCarconditionId()));
|
||||
return Result.success(null,"规则修改成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 故障规则删除
|
||||
* @param carconditionId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/faultconditiondel/{carconditionId}")
|
||||
@Operation(summary = "删除规则",description = "删除故障规则")
|
||||
public Result faultconditiondel(@PathVariable("carconditionId") long carconditionId){
|
||||
faultConditionService.removeById(carconditionId);
|
||||
return Result.success(null,"规则删除成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.server.controller;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.server.service.FaultLabelService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 故障项选择控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultTypeController
|
||||
* @Date:2024/9/18 20:58
|
||||
*/
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faultlabel")
|
||||
public class FaultLabelController {
|
||||
|
||||
@Autowired
|
||||
private FaultLabelService faultLabelService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障名称
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "故障名称查询",description = "故障名称信息")
|
||||
public Result findfaulttype(){
|
||||
return Result.success(faultLabelService.select());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.req.FaultLogListReq;
|
||||
import com.muyu.server.service.FaultLogService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 故障日志控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogController
|
||||
* @Date:2024/9/20 9:30
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faultlog")
|
||||
public class FaultLogController {
|
||||
@Autowired
|
||||
private FaultLogService faultLogService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障日志列表
|
||||
* @param faultLogListReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "故障日志列表",description = "故障日志列表展示")
|
||||
public Result selectfaultlog(@Validated @RequestBody FaultLogListReq faultLogListReq){
|
||||
return Result.success(faultLogService.selectfaultlog(faultLogListReq));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFaultRule;
|
||||
import com.muyu.domain.Vehicle;
|
||||
import com.muyu.server.service.FaultRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 故障检测控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultRuleController
|
||||
* @Date:2024/9/19 22:10
|
||||
*/
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faultrule")
|
||||
public class FaultRuleController {
|
||||
|
||||
@Autowired
|
||||
private FaultRuleService faultRuleService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障参数匹配检查
|
||||
* @param carFaultRule
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/cheakfaults")
|
||||
@Operation(summary = "故障参数匹配检查",description = "获取报文数据与故障参数进行比较")
|
||||
public Result cheakfaults(@Validated @RequestBody CarFaultRule carFaultRule){
|
||||
List<Vehicle> checkfault = faultRuleService.checkfault(carFaultRule);
|
||||
return Result.success(checkfault);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.server.controller;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.server.service.FaultTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
/**
|
||||
* 故障码分类控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultTypeController
|
||||
* @Date:2024/9/18 20:58
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/faulttype")
|
||||
public class FaultTypeController {
|
||||
|
||||
@Autowired
|
||||
private FaultTypeService faultTypeService;
|
||||
|
||||
|
||||
/**
|
||||
* 故障码分类查询
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "故障码分类查询",description = "故障码分类信息")
|
||||
public Result findfaulttype(){
|
||||
return Result.success(faultTypeService.select());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.req.FirmListReq;
|
||||
import com.muyu.domain.resp.FirmTotalListResp;
|
||||
import com.muyu.server.service.FirmManageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 企业信息控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:FirmManageController
|
||||
* @Date:2024/9/27 12:27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/firmmanage")
|
||||
@Tag(name = "公司相关事务",description = "公司相关事务操作")
|
||||
public class FirmManageController {
|
||||
|
||||
@Autowired
|
||||
private FirmManageService firmManageService;
|
||||
|
||||
|
||||
/**
|
||||
* 公司列表信息展示
|
||||
* @param firmListReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/firmmessageList")
|
||||
@Operation(summary = "公司信息列表展示",description = "展示公司信息的列表")
|
||||
public Result firmmessageList(@Validated @RequestBody FirmListReq firmListReq){
|
||||
FirmTotalListResp firmTotalListResp = firmManageService.firmmessageList(firmListReq);
|
||||
return Result.success(firmTotalListResp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.message.Message;
|
||||
import com.muyu.domain.message.MessageReq;
|
||||
import com.muyu.domain.message.MessageSendReq;
|
||||
import com.muyu.server.service.MessageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 站内信控制层
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:MessageController
|
||||
* @Date:2024/9/22 10:56
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/message")
|
||||
public class MessageController {
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
/**
|
||||
* 消息发送
|
||||
* @param messageSendReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/sendmessage")
|
||||
@Operation(summary = "发送消息",description = "站内信消息发送")
|
||||
public Result sendmessage(@Validated MessageSendReq messageSendReq){
|
||||
messageService.sendmessage(messageSendReq);
|
||||
return Result.success(null,"发送成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息查看
|
||||
* @param messageReq
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/messagelist")
|
||||
@Operation(summary = "消息查看(能根据登录人新的信息查看当前登录人的消息栏)",description = "消息查看")
|
||||
public Result selectmessage(@Validated @RequestBody MessageReq messageReq){
|
||||
return Result.success(messageService.selectmessage(messageReq));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看消息改变状态
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/changestatus")
|
||||
@Operation(summary = "状态改变",description = "状态改变")
|
||||
public Result changestatus(@RequestBody Message message){
|
||||
messageService.changestatus(message);
|
||||
return Result.success(null,"成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查看未读的消息
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/unread")
|
||||
@Operation(summary = "查看未读的消息",description = "查看未读的消息")
|
||||
public Result unread(){
|
||||
return Result.success(messageService.unread());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
package com.muyu.server.controller;
|
||||
import com.muyu.common.wechat.domain.TextMessage;
|
||||
import com.muyu.domain.Articles;
|
||||
import com.muyu.domain.NewsMessage;
|
||||
import com.muyu.server.util.WordUtil;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.io.IOException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 微信公众号控制层
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.controller
|
||||
* @Project:WXApplication
|
||||
* @name:WXController
|
||||
* @Date:2024/9/17 下午8:27
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "微信公众号")
|
||||
public class WXController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
public String hello(){
|
||||
return "Hello Wechat";
|
||||
}
|
||||
|
||||
@GetMapping("/wechat")
|
||||
public String check(
|
||||
@RequestParam("signature") String signature,
|
||||
@RequestParam("timestamp") String timestamp,
|
||||
@RequestParam("nonce") String nonce,
|
||||
@RequestParam("echostr") String echostr
|
||||
){
|
||||
// 1)将token、timestamp、nonce三个参数进行字典序排序
|
||||
String token = "Psan";
|
||||
List<String> list = Arrays.asList(token, timestamp, nonce);
|
||||
//排序
|
||||
Collections.sort(list);
|
||||
// 2)将三个参数字符串拼接成一个字符串进行sha1加密
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (String s : list) {
|
||||
stringBuilder.append(s);
|
||||
}
|
||||
//加密
|
||||
try {
|
||||
MessageDigest instance = MessageDigest.getInstance("sha1");
|
||||
//使用sha1进行加密,获得byte数组
|
||||
byte[] digest = instance.digest(stringBuilder.toString().getBytes());
|
||||
StringBuilder sum = new StringBuilder();
|
||||
for (byte b : digest) {
|
||||
sum.append(Integer.toHexString((b>>4)&15));
|
||||
sum.append(Integer.toHexString(b&15));
|
||||
}
|
||||
System.out.println("signature:"+signature);
|
||||
System.out.println("sum:"+sum);
|
||||
// 3)开发者获得加密后的字符串可与signature对比,标识该请求来源于微信
|
||||
if (!StringUtils.isEmpty(signature)&&signature.equals(sum.toString())){
|
||||
return echostr;
|
||||
}
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
public String receiveMessage(HttpServletRequest request) throws IOException {
|
||||
ServletInputStream inputStream = request.getInputStream();
|
||||
|
||||
// 查看发送信息类型
|
||||
// byte[] bytes = new byte[1024];
|
||||
// int len = 0;
|
||||
// while ((len = inputStream.read(bytes)) != -1) {
|
||||
// System.out.println(new String(bytes, 0, len));
|
||||
// }
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
// xstream工具类
|
||||
SAXReader reader = new SAXReader();
|
||||
try {
|
||||
//读取request输入流,获取Document对象
|
||||
Document document = reader.read(inputStream);
|
||||
//获取root节点
|
||||
Element rootElement = document.getRootElement();
|
||||
//获取所有子节点
|
||||
List<Element> elements = rootElement.elements();
|
||||
for (Element element : elements) {
|
||||
map.put(element.getName(), element.getStringValue());
|
||||
}
|
||||
} catch (DocumentException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
System.out.println(map);
|
||||
String massage = null;
|
||||
if ("图文".equals(map.get("Content"))) {
|
||||
massage = getReplyNewsMessage(map);
|
||||
} else {
|
||||
massage = getReplyMessage(map);
|
||||
}
|
||||
// String massage = getReplyMessageByWord(map);
|
||||
return massage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得回复的信息内容
|
||||
* @param map
|
||||
* @return xml格式的字符串
|
||||
*/
|
||||
private String getReplyMessage(HashMap<String, String> map) {
|
||||
TextMessage textMessage = new TextMessage();
|
||||
textMessage.setToUserName(map.get("FromUserName"));
|
||||
textMessage.setFromUserName(map.get("ToUserName"));
|
||||
textMessage.setMsgType("text");
|
||||
textMessage.setContent("你好吖");
|
||||
textMessage.setCreateTime(System.currentTimeMillis()/1000);
|
||||
|
||||
//XStream将java对象转换为xml字符串
|
||||
XStream xStream = new XStream();
|
||||
xStream.processAnnotations(TextMessage.class);
|
||||
String xml = xStream.toXML(textMessage);
|
||||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得同义词
|
||||
* @param map
|
||||
* @return xml格式的字符串
|
||||
*/
|
||||
private String getReplyMessageByWord(HashMap<String, String> map) {
|
||||
TextMessage textMessage = new TextMessage();
|
||||
textMessage.setToUserName(map.get("FromUserName"));
|
||||
textMessage.setFromUserName(map.get("ToUserName"));
|
||||
textMessage.setMsgType("text");
|
||||
textMessage.setContent(WordUtil.getWords(map.get("Content")));
|
||||
textMessage.setCreateTime(System.currentTimeMillis()/1000);
|
||||
|
||||
//XStream将java对象转换为xml字符串
|
||||
XStream xStream = new XStream();
|
||||
xStream.processAnnotations(TextMessage.class);
|
||||
String xml = xStream.toXML(textMessage);
|
||||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得回复的图文信息内容
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
private String getReplyNewsMessage(HashMap<String, String> map) {
|
||||
NewsMessage newsMessage = new NewsMessage();
|
||||
newsMessage.setToUserName(map.get("FromUserName"));
|
||||
newsMessage.setFromUserName(map.get("ToUserName"));
|
||||
newsMessage.setMsgType("news");
|
||||
newsMessage.setCreateTime(System.currentTimeMillis()/1000);
|
||||
newsMessage.setArticleCount(1);
|
||||
List<Articles> articles = new ArrayList<>();
|
||||
Articles article = new Articles();
|
||||
article.setTitle("蓬叁测试公众号");
|
||||
article.setDescription("来自蓬叁");
|
||||
article.setUrl("http://www.psan.com");
|
||||
article.setPicUrl("http://mmbiz.qpic.cn/mmbiz_jpg/ZR9F78J7iasww9HxBJRjsBMInrZ78YbXzKvgwy6iabyfZCiaM0CJKzOIS3fUAboIbh07s8icPfYW7RMiajLmx2opticw/0");
|
||||
articles.add(article);
|
||||
newsMessage.setArticles(articles);
|
||||
|
||||
//XStream将java对象转换为xml字符串
|
||||
XStream xStream = new XStream();
|
||||
xStream.processAnnotations(NewsMessage.class);
|
||||
String xml = xStream.toXML(newsMessage);
|
||||
return xml;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.WarnLogs;
|
||||
import com.muyu.server.service.WarnLogsService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.muyu.common.core.domain.Result.error;
|
||||
import static com.muyu.common.core.domain.Result.success;
|
||||
import static com.muyu.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 预警日志控制层
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnLogsController
|
||||
* @Date:2024/9/20 下午7:29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/logs")
|
||||
@Tag(name = "预警日志")
|
||||
public class WarnLogsController extends BaseController {
|
||||
|
||||
@Autowired private WarnLogsService warnLogsService;
|
||||
|
||||
/**
|
||||
* 查询预警日志列表
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<WarnLogs>> list(WarnLogs warnLogs)
|
||||
{
|
||||
startPage();
|
||||
List<WarnLogs> list = warnLogsService.selectWarnLogsList(warnLogs);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出预警日志列表
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WarnLogs warnLogs)
|
||||
{
|
||||
List<WarnLogs> list = warnLogsService.selectWarnLogsList(warnLogs);
|
||||
ExcelUtil<WarnLogs> util = new ExcelUtil<WarnLogs>(WarnLogs.class);
|
||||
util.exportExcel(response, list, "预警日志数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预警日志详细信息
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result<List<WarnLogs>> getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnLogsService.selectWarnLogsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预警日志
|
||||
* @param warnLogs 新增预警日志信息
|
||||
* @return 新增结果
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:add")
|
||||
@PostMapping
|
||||
public Result<Integer> add(
|
||||
@Validated @RequestBody WarnLogs warnLogs
|
||||
){
|
||||
if (warnLogsService.checkIdUnique(warnLogs)){
|
||||
return error("新增 预警日志 '"+ warnLogs +"' 失败,预警日志已存在 ");
|
||||
}
|
||||
return toAjax(warnLogsService.save(warnLogs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预警日志
|
||||
* @param warnLogs 修改预警日志信息
|
||||
* @return 修改结果
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:edit")
|
||||
@PutMapping
|
||||
public Result<Integer> edit(
|
||||
@Validated @RequestBody WarnLogs warnLogs
|
||||
){
|
||||
if (!warnLogsService.checkIdUnique(warnLogs)){
|
||||
return error("修改 预警日志'"+ warnLogs +"'失败,预警日志不存在");
|
||||
}
|
||||
return toAjax(warnLogsService.updateById(warnLogs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预警日志
|
||||
* @param ids 删除预警日志id
|
||||
* @return 删除结果
|
||||
*/
|
||||
@RequiresPermissions("platform:logs:remove")
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
|
||||
{
|
||||
warnLogsService.removeBatchByIds(Arrays.asList(ids));
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.muyu.server.controller;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.domain.WarnRule;
|
||||
import com.muyu.domain.resp.CarMessageResp;
|
||||
import com.muyu.server.service.WarnRuleService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警规则控制层
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnLogsController
|
||||
* @Date:2024/9/20 下午7:29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
@Tag(name = "预警规则控制层")
|
||||
public class WarnRuleController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private WarnRuleService warnRuleService;
|
||||
|
||||
/**
|
||||
* 查询预警规则列表
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<WarnRule>> list(WarnRule warnRule)
|
||||
{
|
||||
startPage();
|
||||
List<WarnRule> list = warnRuleService.selectWarnRuleList(warnRule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出预警规则列表
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WarnRule warnRule)
|
||||
{
|
||||
List<WarnRule> list = warnRuleService.selectWarnRuleList(warnRule);
|
||||
ExcelUtil<WarnRule> util = new ExcelUtil<WarnRule>(WarnRule.class);
|
||||
util.exportExcel(response, list, "预警规则数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预警规则详细信息
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result<List<WarnRule>> getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnRuleService.selectWarnRuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预警规则
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:add")
|
||||
@PostMapping
|
||||
public Result<Integer> add(
|
||||
@Validated @RequestBody WarnRule warnRule)
|
||||
{
|
||||
if (warnRuleService.checkIdUnique(warnRule)) {
|
||||
return error("新增 预警规则 '" + warnRule + "'失败,预警规则已存在");
|
||||
}
|
||||
return toAjax(warnRuleService.save(warnRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预警规则
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:edit")
|
||||
@PutMapping
|
||||
public Result<Integer> edit(
|
||||
@Validated @RequestBody WarnRule warnRule)
|
||||
{
|
||||
if (!warnRuleService.checkIdUnique(warnRule)) {
|
||||
return error("修改 预警规则 '" + warnRule + "'失败,预警规则不存在");
|
||||
}
|
||||
// warnRule.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(warnRuleService.updateById(warnRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预警规则
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:remove")
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result<Integer> remove(@PathVariable("ids") Long[] ids)
|
||||
{
|
||||
warnRuleService.removeBatchByIds(Arrays.asList(ids));
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车辆类型报文
|
||||
*/
|
||||
@RequiresPermissions("platform:rule:msg")
|
||||
@GetMapping("/msg/{id}")
|
||||
public Result<List<CarMessageResp>> findByMsg(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnRuleService.findByMsg(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue