Compare commits
20 Commits
afdc7b3421
...
443350c8f4
Author | SHA1 | Date |
---|---|---|
|
443350c8f4 | |
|
19f99ac116 | |
|
e5b5222c39 | |
|
d24110090c | |
|
14cc2afd35 | |
|
535eae941e | |
|
bd2865ebc5 | |
|
eef2467a61 | |
|
a66329500c | |
|
f98c11e825 | |
|
c241897dfe | |
|
6f9079ec5f | |
|
eff427473f | |
|
c87bf8a2fa | |
|
0bb5a912f7 | |
|
1d43fa7888 | |
|
61dc7f9277 | |
|
6eff930c84 | |
|
ecf81cc79e | |
|
63ebaee731 |
|
@ -1,8 +1,11 @@
|
||||||
package com.muyu.common.cache;
|
package com.muyu.common.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import com.muyu.common.redis.service.RedisService;
|
import com.muyu.common.redis.service.RedisService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽象缓存层
|
* 抽象缓存层
|
||||||
* * @className: CacheAbsBasic ️✈️
|
* * @className: CacheAbsBasic ️✈️
|
||||||
|
@ -18,16 +21,43 @@ public abstract class CacheAbsBasic <K, V> implements CacheBasic<K, V>{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(K key, V value) {
|
public void put(K key, V value) {
|
||||||
redisService.setCacheObject(encode(key), value);
|
|
||||||
|
try {
|
||||||
|
redisService.setCacheObject(encode(key), value,30L,TimeUnit.MINUTES);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V get(K key) {
|
public V get(K key) {
|
||||||
|
|
||||||
|
try {
|
||||||
return redisService.getCacheObject(encode(key));
|
return redisService.getCacheObject(encode(key));
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(K key) {
|
public void remove(K key) {
|
||||||
|
|
||||||
|
try {
|
||||||
redisService.deleteObject(encode(key));
|
redisService.deleteObject(encode(key));
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hashKey(K key){
|
||||||
|
Boolean b = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
b = redisService.hasKey(encode(key));
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||||
|
}
|
||||||
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package com.muyu.common.cache;
|
package com.muyu.common.cache;
|
||||||
|
|
||||||
|
import org.springframework.data.redis.core.TimeoutUtils;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存基础
|
* 缓存基础
|
||||||
* * @className: CacheBasic ️✈️
|
* * @className: CacheBasic ️✈️
|
||||||
|
@ -14,4 +19,6 @@ public interface CacheBasic<K, V> extends PrimaryKeyBasic<K> {
|
||||||
V get(K key);
|
V get(K key);
|
||||||
|
|
||||||
void remove(K key);
|
void remove(K key);
|
||||||
|
|
||||||
|
boolean hashKey(K key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.common.core.web.controller;
|
package com.muyu.common.core.web.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
import com.muyu.common.core.utils.PageUtils;
|
import com.muyu.common.core.utils.PageUtils;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
|
|
@ -34,6 +34,11 @@
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
<module>cloud-common-system</module>
|
<module>cloud-common-system</module>
|
||||||
<module>cloud-common-xxl</module>
|
<module>cloud-common-xxl</module>
|
||||||
<module>cloud-common-rabbit</module>
|
<module>cloud-common-rabbit</module>
|
||||||
<module>cloud-common-kafka</module>
|
|
||||||
<module>cloud-common-cache</module>
|
<module>cloud-common-cache</module>
|
||||||
|
<module>cloud-common-kafka</module>
|
||||||
<module>cloud-common-iotdb</module>
|
<module>cloud-common-iotdb</module>
|
||||||
<module>cloud-common-caffeine</module>
|
<module>cloud-common-caffeine</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
|
@ -34,6 +34,11 @@
|
||||||
<groupId>io.swagger.core.v3</groupId>
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.muyu.data.basics;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.concurrent.LinkedBlockingDeque;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author WangXin
|
||||||
|
* @Data 2024/9/29
|
||||||
|
* @Description 事件队列配置
|
||||||
|
* @Version 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class EventQueueConfig {
|
||||||
|
|
||||||
|
private LinkedBlockingDeque<EventProcessBasics> taskNodeQueue = new LinkedBlockingDeque<>();
|
||||||
|
|
||||||
|
public void addEvent(EventProcessBasics obj){
|
||||||
|
this.taskNodeQueue.add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hashEventNext(){
|
||||||
|
return !taskNodeQueue.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
private EventProcessBasics nextTaskNode(){
|
||||||
|
return taskNodeQueue.poll();
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,10 +4,10 @@ server:
|
||||||
|
|
||||||
# nacos线上地址
|
# nacos线上地址
|
||||||
nacos:
|
nacos:
|
||||||
addr: 127.0.0.1:8848
|
addr: 123.57.152.124:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: wx
|
namespace: five
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
@ -59,7 +59,3 @@ spring:
|
||||||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
# xxl-job 配置文件
|
# xxl-job 配置文件
|
||||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
com.muyu.system.mapper: DEBUG
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?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>enterpise-cache</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>cloud-common-cache</artifactId>
|
||||||
|
<version>${muyu.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>enterpise-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.muyu.enterpise.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.cache.CacheAbsBasic;
|
||||||
|
import com.muyu.domain.MessageValue;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author xie ya ru
|
||||||
|
* @Date 2024/9/29 20:04
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class MessageValueCacheService extends CacheAbsBasic<String, List<MessageValue>>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前缀
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String keyPre() {
|
||||||
|
return"messageValue:info:";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encode(String key) {
|
||||||
|
return super.encode(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解密
|
||||||
|
* @param key 缓存建
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String decode(String key) {
|
||||||
|
return key.replace("messageValue:info:","");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.muyu.enterpise.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.cache.CacheAbsBasic;
|
||||||
|
import com.muyu.domain.SysCar;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author xie ya ru
|
||||||
|
* @Date 2024/9/30 11:06
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class SysCarCacheService extends CacheAbsBasic<String, SysCar> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String keyPre() {
|
||||||
|
return "sysCar:info:";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encode(String key) {
|
||||||
|
return super.encode(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String decode(String key) {
|
||||||
|
return super.decode(key);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.muyu.enterpise.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.cache.CacheAbsBasic;
|
||||||
|
import com.muyu.domain.SysCarType;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author xie ya ru
|
||||||
|
* @Date 2024/9/30 11:18
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class SysCarTypeCacheService extends CacheAbsBasic<String, SysCarType> {
|
||||||
|
@Override
|
||||||
|
public String keyPre() {
|
||||||
|
return "sysCarType:info:";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encode(String key) {
|
||||||
|
return super.encode(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String decode(String key) {
|
||||||
|
return super.decode(key);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
com.muyu.enterpise.cache.MessageValueCacheService
|
||||||
|
com.muyu.enterpise.cache.SysCarCacheService
|
|
@ -0,0 +1,45 @@
|
||||||
|
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.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆电子围栏中间表
|
||||||
|
* * @Author:yan
|
||||||
|
* * @Package:com.muyu.car.domain
|
||||||
|
* * @Project:plues
|
||||||
|
* * @name:FenceAndGroupMiddle
|
||||||
|
* * @Date:2024/9/22 09:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@Tag(name = "车辆和电子围栏组中间表")
|
||||||
|
@TableName(value = "car_group_middle",autoResultMap = true)
|
||||||
|
public class CarAndGroupMiddle {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
@Schema(name = "id")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 车id
|
||||||
|
*/
|
||||||
|
@Schema(name = "围栏id")
|
||||||
|
private Integer carId;
|
||||||
|
/**
|
||||||
|
* 围栏组id
|
||||||
|
*/
|
||||||
|
@Schema(name = "围栏组id")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.muyu.domain;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.domain.req.FenceGroupUpdateReq;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -30,7 +31,7 @@ public class FenceGroup {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "group_id",type = IdType.AUTO)
|
@TableId(value = "group_id",type = IdType.AUTO)
|
||||||
@Schema(name = "围栏组id")
|
@Schema(name = "围栏组id")
|
||||||
private Integer groupId;
|
private Long groupId;
|
||||||
/**
|
/**
|
||||||
* 围栏组名称
|
* 围栏组名称
|
||||||
*/
|
*/
|
||||||
|
@ -42,5 +43,18 @@ public class FenceGroup {
|
||||||
@Schema(name = "围栏组状态")
|
@Schema(name = "围栏组状态")
|
||||||
private Integer groupStates;
|
private Integer groupStates;
|
||||||
|
|
||||||
|
public static FenceGroup carFenceUpdateById(Integer states, FenceGroupUpdateReq fenceGroupBuilder ){
|
||||||
|
return FenceGroup.builder()
|
||||||
|
.groupId(fenceGroupBuilder.getGroupId())
|
||||||
|
.groupStates(states)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FenceGroup closeCarFenceUpdateById(Integer states, Long groupId ){
|
||||||
|
return FenceGroup.builder()
|
||||||
|
.groupId(groupId)
|
||||||
|
.groupStates(states)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import com.muyu.domain.req.MessageValueAddReq;
|
import com.muyu.domain.req.MessageValueAddReq;
|
||||||
|
import com.muyu.domain.resp.MessageValueListResp;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -82,4 +83,14 @@ public class MessageValue extends BaseEntity {
|
||||||
.messageEndIndex(messageValueAddReq.getMessageEndIndex())
|
.messageEndIndex(messageValueAddReq.getMessageEndIndex())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
public static MessageValue addRollback(MessageValueListResp messageValueListResp){
|
||||||
|
return MessageValue.builder()
|
||||||
|
.templateId(messageValueListResp.getMessageId())
|
||||||
|
.messageType(messageValueListResp.getMessageType())
|
||||||
|
.messageCode(messageValueListResp.getMessageCode())
|
||||||
|
.messageLabel(messageValueListResp.getMessageLabel())
|
||||||
|
.messageStartIndex(messageValueListResp.getMessageStartIndex())
|
||||||
|
.messageEndIndex(messageValueListResp.getMessageEndIndex())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class SysCarType extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@Schema(name = "车辆类型主键")
|
@Schema(name = "车辆类型主键")
|
||||||
private String id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆类型名称
|
* 车辆类型名称
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.muyu.domain.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
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:yan
|
||||||
|
* @Package:com.muyu.domain.req
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarFenceUpdateReq
|
||||||
|
* @Date:2024/9/29 20:22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Tag(name = "修改围栏的状态", description = "修改围栏的状态")
|
||||||
|
public class FenceGroupUpdateReq {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "group_id", type = IdType.AUTO)
|
||||||
|
@Schema(title = "围栏组Id")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
}
|
|
@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.*;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
@ -21,14 +18,13 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @date 2024-09-18
|
* @date 2024-09-18
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TableName(value = "sys_car", autoResultMap = true)
|
@TableName(value = "sys_car", autoResultMap = true)
|
||||||
@Tag(name = "车辆基础信息对象")
|
@Tag(name = "车辆基础信息对象")
|
||||||
public class SysCar extends BaseEntity{
|
public class SysCarReq {
|
||||||
|
|
||||||
/** 自增主键 */
|
/** 自增主键 */
|
||||||
@TableId( type = IdType.AUTO)
|
@TableId( type = IdType.AUTO)
|
||||||
|
@ -68,24 +64,4 @@ public class SysCar extends BaseEntity{
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("carVin", getCarVin())
|
|
||||||
.append("carPlate", getCarPlate())
|
|
||||||
.append("carBrand", getCarBrand())
|
|
||||||
.append("carModel", getCarModel())
|
|
||||||
.append("carType", getCarType())
|
|
||||||
.append("warnStrategy", getWarnStrategy())
|
|
||||||
.append("groupCode", getGroupCode())
|
|
||||||
.append("state", getState())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@ package com.muyu.domain.resp;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.domain.SysCar;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -89,19 +90,19 @@ public class SysCarResp {
|
||||||
@Schema(description = "启用状态")
|
@Schema(description = "启用状态")
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
public static SysCarResp reverseResp(SysCar sysCar){
|
||||||
return "SysCarResp{" +
|
return SysCarResp.builder()
|
||||||
"id=" + id +
|
.id(sysCar.getId())
|
||||||
", carVin='" + carVin + '\'' +
|
.carVin(sysCar.getCarVin())
|
||||||
", carPlate='" + carPlate + '\'' +
|
.carPlate(sysCar.getCarPlate())
|
||||||
", carBrand='" + carBrand + '\'' +
|
.carBrand(sysCar.getCarBrand())
|
||||||
", carModel='" + carModel + '\'' +
|
.carModel(sysCar.getCarModel())
|
||||||
", carType=" + carType +
|
.carType(sysCar.getCarType())
|
||||||
", sysTypeName='" + sysTypeName + '\'' +
|
.warnStrategy(sysCar.getWarnStrategy())
|
||||||
", warnStrategy=" + warnStrategy +
|
.groupCode(sysCar.getGroupCode())
|
||||||
", groupCode='" + groupCode + '\'' +
|
.state(sysCar.getState())
|
||||||
", state=" + state +
|
.build();
|
||||||
'}';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,14 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>cloud-common-xxl</artifactId>
|
<artifactId>cloud-common-xxl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- cache缓存框架 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>enterpise-cache</artifactId>
|
||||||
|
<version>${muyu.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.muyu.controller;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
import com.muyu.service.CarAndFenceGroupMiddleService;
|
||||||
|
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.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆和围栏组中间表
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.controller
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarAndFenceGroupMiddleController
|
||||||
|
* @Date:2024/9/29 20:09
|
||||||
|
*/
|
||||||
|
@RequestMapping("/carandfencemiddle")
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Log4j2
|
||||||
|
@Tag(name = "车辆和围栏组中间表")
|
||||||
|
public class CarAndFenceGroupMiddleController {
|
||||||
|
@Autowired
|
||||||
|
private CarAndFenceGroupMiddleService carAndFenceGroupMiddleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据围栏组和车辆的id添加中间表
|
||||||
|
*/
|
||||||
|
@PostMapping("/addFenceGroupAddCarMiddle")
|
||||||
|
@Operation(summary = "根据围栏组和车辆的id添加中间表",description = "根据围栏组和车辆的id添加中间表")
|
||||||
|
public Result addFenceGroupAddCarMiddle(@RequestParam("carId") Integer carId , @RequestBody List<FenceGroup> fenceGroups ){
|
||||||
|
boolean b = carAndFenceGroupMiddleService.saveBatch(fenceGroups,carId);
|
||||||
|
return Result.success("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
|
||||||
import com.muyu.domain.CarFenceClazz;
|
import com.muyu.domain.CarFenceClazz;
|
||||||
import com.muyu.service.CarFenceClazzService;
|
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,12 +1,12 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.CarFence;
|
import com.muyu.domain.CarFence;
|
||||||
import com.muyu.domain.req.CarFenceReq;
|
import com.muyu.domain.req.CarFenceReq;
|
||||||
import com.muyu.domain.resp.CarFenceResq;
|
import com.muyu.domain.resp.CarFenceResq;
|
||||||
import com.muyu.service.CarFenceService;
|
import com.muyu.enterpise.service.CarFenceService;
|
||||||
import com.muyu.service.CarFenceServiceMybaits;
|
import com.muyu.enterpise.service.CarFenceServiceMybaits;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.CarFenceType;
|
import com.muyu.domain.CarFenceType;
|
||||||
import com.muyu.service.CarFenceTypeService;
|
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.muyu.controller;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
import com.muyu.domain.req.FenceGroupUpdateReq;
|
||||||
|
import com.muyu.service.CarFenceUpdateService;
|
||||||
|
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.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏组的修改状态
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.controller
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarFenceUpdateController
|
||||||
|
* @Date:2024/9/30 09:10
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/fenceUpdate")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Log4j2
|
||||||
|
@Tag(name = "修改围栏组的状态")
|
||||||
|
public class CarFenceUpdateController {
|
||||||
|
@Autowired
|
||||||
|
private CarFenceUpdateService carFenceUpdateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动围栏组
|
||||||
|
*/
|
||||||
|
@PutMapping("/activate")
|
||||||
|
@Operation(summary = "启动围栏状态",description = "启动围栏状态")
|
||||||
|
public Result activate(@RequestBody FenceGroupUpdateReq fenceGroupUpdateReq){
|
||||||
|
Integer states = 0;
|
||||||
|
boolean b = carFenceUpdateService.updateById(FenceGroup.carFenceUpdateById(states, fenceGroupUpdateReq));
|
||||||
|
return Result.success("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改围栏状态为关闭
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/updateFenceGroupById")
|
||||||
|
@Operation(summary = "修改围栏状态为关闭",description = "修改围栏状态为关闭")
|
||||||
|
public Result updateFenceGroupById(@RequestParam("groupId") Long groupId){
|
||||||
|
Integer states = 1;
|
||||||
|
carFenceUpdateService.updateById(FenceGroup.closeCarFenceUpdateById(states,groupId));
|
||||||
|
|
||||||
|
return Result.success("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.service.CarTypeService;
|
import com.muyu.enterpise.service.CarTypeService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import com.muyu.domain.req.FaultCodeAddReq;
|
||||||
import com.muyu.domain.req.FaultCodeListReq;
|
import com.muyu.domain.req.FaultCodeListReq;
|
||||||
import com.muyu.domain.req.FaultCodeUpdReq;
|
import com.muyu.domain.req.FaultCodeUpdReq;
|
||||||
import com.muyu.domain.resp.FaultCodeTotalListResp;
|
import com.muyu.domain.resp.FaultCodeTotalListResp;
|
||||||
import com.muyu.service.FaultCodeService;
|
import com.muyu.enterpise.service.FaultCodeService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import com.muyu.domain.FaultCondition;
|
||||||
import com.muyu.domain.req.FaultConditionAddReq;
|
import com.muyu.domain.req.FaultConditionAddReq;
|
||||||
import com.muyu.domain.req.FaultConditionListReq;
|
import com.muyu.domain.req.FaultConditionListReq;
|
||||||
import com.muyu.domain.req.FaultConditionUpdReq;
|
import com.muyu.domain.req.FaultConditionUpdReq;
|
||||||
import com.muyu.service.FaultConditionService;
|
import com.muyu.enterpise.service.FaultConditionService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.service.FaultLabelService;
|
import com.muyu.enterpise.service.FaultLabelService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.req.FaultLogListReq;
|
import com.muyu.domain.req.FaultLogListReq;
|
||||||
import com.muyu.service.FaultLogService;
|
import com.muyu.enterpise.service.FaultLogService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,10 +1,10 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.CarFaultRule;
|
import com.muyu.domain.CarFaultRule;
|
||||||
import com.muyu.domain.FaultRule;
|
import com.muyu.domain.FaultRule;
|
||||||
import com.muyu.service.FaultRuleService;
|
import com.muyu.enterpise.service.FaultRuleService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.service.FaultTypeService;
|
import com.muyu.enterpise.service.FaultTypeService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
||||||
import com.muyu.service.FenceGroupService;
|
import com.muyu.enterpise.service.FenceGroupService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.message.Message;
|
import com.muyu.domain.message.Message;
|
||||||
import com.muyu.domain.message.MessageReq;
|
import com.muyu.domain.message.MessageReq;
|
||||||
import com.muyu.domain.message.MessageSendReq;
|
import com.muyu.domain.message.MessageSendReq;
|
||||||
import com.muyu.service.MessageService;
|
import com.muyu.enterpise.service.MessageService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,10 +1,10 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.MessageTemplate;
|
import com.muyu.domain.MessageTemplate;
|
||||||
import com.muyu.domain.req.MessageTemplateAddReq;
|
import com.muyu.domain.req.MessageTemplateAddReq;
|
||||||
import com.muyu.domain.resp.MessageTemplateListResp;
|
import com.muyu.domain.resp.MessageTemplateListResp;
|
||||||
import com.muyu.service.MessageTemplateService;
|
import com.muyu.enterpise.service.MessageTemplateService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
@ -6,15 +6,14 @@ import com.muyu.domain.MessageValue;
|
||||||
import com.muyu.domain.req.MessageValueAddReq;
|
import com.muyu.domain.req.MessageValueAddReq;
|
||||||
import com.muyu.domain.req.MessageValueReq;
|
import com.muyu.domain.req.MessageValueReq;
|
||||||
import com.muyu.domain.resp.MessageValueListResp;
|
import com.muyu.domain.resp.MessageValueListResp;
|
||||||
import com.muyu.service.MessageValueService;
|
import com.muyu.enterpise.cache.MessageValueCacheService;
|
||||||
|
import com.muyu.enterpise.service.MessageValueService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,8 +32,8 @@ public class MessageValueController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MessageValueService messageValueService;
|
private MessageValueService messageValueService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private RedisTemplate<String,MessageValue> redisTemplate;
|
private MessageValueCacheService messageValueCacheService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报文数据列表查询
|
* 报文数据列表查询
|
||||||
|
@ -56,7 +55,6 @@ public class MessageValueController extends BaseController {
|
||||||
@PostMapping("/")
|
@PostMapping("/")
|
||||||
@Operation(summary = "添加报文数据", description = "新增报文数据")
|
@Operation(summary = "添加报文数据", description = "新增报文数据")
|
||||||
public Result<String> save(@RequestBody MessageValueAddReq messageValueAddReq){
|
public Result<String> save(@RequestBody MessageValueAddReq messageValueAddReq){
|
||||||
redisTemplate.boundValueOps("messageValue:" +messageValueAddReq.getTemplateId()).increment(1);
|
|
||||||
messageValueService.save(MessageValue.addBuild(messageValueAddReq));
|
messageValueService.save(MessageValue.addBuild(messageValueAddReq));
|
||||||
return Result.success("添加成功");
|
return Result.success("添加成功");
|
||||||
}
|
}
|
||||||
|
@ -82,12 +80,4 @@ public class MessageValueController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping({"/findByTemplateId/{stringVin}"})
|
|
||||||
@Operation(
|
|
||||||
summary = "根据车辆类型查询报文模版ID",
|
|
||||||
description = "根据车辆类型查询报文模版ID"
|
|
||||||
)
|
|
||||||
public Result<Long> findByTemplateId(@PathVariable("stringVin") String stringVin) {
|
|
||||||
return Result.success(this.messageValueService.findByTemplateId(stringVin), "查询成功");
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@ package com.muyu.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
||||||
import com.muyu.domain.req.CarFenceAdd;
|
import com.muyu.domain.req.CarFenceAdd;
|
||||||
|
import com.muyu.domain.req.FenceGroupUpdateReq;
|
||||||
import com.muyu.service.CarFenceServiceMybaits;
|
import com.muyu.service.CarFenceServiceMybaits;
|
||||||
import com.muyu.service.MiddleService;
|
import com.muyu.service.MiddleService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
@ -28,23 +29,17 @@ import java.util.List;
|
||||||
@Tag(name = "中间表添加",description = "添加")
|
@Tag(name = "中间表添加",description = "添加")
|
||||||
@Log4j2
|
@Log4j2
|
||||||
public class MiddleController {
|
public class MiddleController {
|
||||||
@Autowired
|
|
||||||
private MiddleService middleService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CarFenceServiceMybaits carFenceServiceMybaits;
|
private CarFenceServiceMybaits carFenceServiceMybaits;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加围栏组 多对多
|
* 添加围栏组 多对多
|
||||||
*/
|
*/
|
||||||
@PostMapping("/addCarFence")
|
@PostMapping("/addCarFence")
|
||||||
@Operation(summary = "添加中间",description = "添加中间")
|
@Operation(summary = "添加中间围栏和围栏组",description = "添加中间")
|
||||||
public Result addCarFence(@RequestParam("fenceGroupId") Integer fenceGroupId, @RequestBody List<CarFenceAdd> carFences){
|
public Result addCarFence(@RequestParam("fenceGroupId") Integer fenceGroupId, @RequestBody List<CarFenceAdd> carFences){
|
||||||
carFenceServiceMybaits.addFenceGroup(fenceGroupId,carFences);
|
boolean i = carFenceServiceMybaits.saveBatch(carFences,fenceGroupId);
|
||||||
System.out.println("围栏组Id"+fenceGroupId);
|
return i?Result.success("添加成功"):Result.error("失败");
|
||||||
System.out.println("围栏Id"+carFences);
|
|
||||||
return Result.success("成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,18 +50,11 @@ public class MiddleController {
|
||||||
@GetMapping("/updateFenceGroupById")
|
@GetMapping("/updateFenceGroupById")
|
||||||
@Operation(summary = "修改围栏状态",description = "修改围栏状态")
|
@Operation(summary = "修改围栏状态",description = "修改围栏状态")
|
||||||
public Result updateFenceGroupById(@RequestParam("groupId") Integer groupId){
|
public Result updateFenceGroupById(@RequestParam("groupId") Integer groupId){
|
||||||
|
carFenceServiceMybaits.updateFenceGroupById(groupId);
|
||||||
|
|
||||||
return Result.success(carFenceServiceMybaits.updateFenceGroupById(groupId));
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 启动围栏
|
|
||||||
*/
|
|
||||||
@GetMapping("/activate")
|
|
||||||
@Operation(summary = "启动围栏状态",description = "启动围栏状态")
|
|
||||||
public Result activate(@RequestParam("groupId") Integer groupId){
|
|
||||||
return Result.success(carFenceServiceMybaits.activate(groupId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据围栏组的id查询绑定的围栏的中间表
|
* 根据围栏组的id查询绑定的围栏的中间表
|
||||||
|
@ -74,20 +62,12 @@ public class MiddleController {
|
||||||
@GetMapping("/BoundFenceGroup")
|
@GetMapping("/BoundFenceGroup")
|
||||||
@Operation(summary = "根据围栏组的id查询绑定的围栏的中间表",description = "根据围栏组的id查询绑定的围栏的中间表")
|
@Operation(summary = "根据围栏组的id查询绑定的围栏的中间表",description = "根据围栏组的id查询绑定的围栏的中间表")
|
||||||
public Result BoundFenceGroup(@RequestParam("groupId") Integer groupId){
|
public Result BoundFenceGroup(@RequestParam("groupId") Integer groupId){
|
||||||
|
carFenceServiceMybaits.BoundFenceGroup(groupId);
|
||||||
return Result.success(carFenceServiceMybaits.BoundFenceGroup(groupId));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据围栏组和车辆的id添加中间表
|
|
||||||
*/
|
|
||||||
@PostMapping("/addFenceGroupAddCarMiddle")
|
|
||||||
@Operation(summary = "根据围栏组和车辆的id添加中间表",description = "根据围栏组和车辆的id添加中间表")
|
|
||||||
public Result addFenceGroupAddCarMiddle(@RequestParam("carId") Integer carId , @RequestBody List<FenceGroup> fenceGroups ){
|
|
||||||
carFenceServiceMybaits.addFenceGroupAddCarMiddle(carId,fenceGroups);
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取绑定的围栏组
|
* 获取绑定的围栏组
|
||||||
*/
|
*/
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
@ -6,8 +6,10 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.SysCar;
|
import com.muyu.domain.SysCar;
|
||||||
|
import com.muyu.domain.req.SysCarReq;
|
||||||
import com.muyu.domain.resp.SysCarResp;
|
import com.muyu.domain.resp.SysCarResp;
|
||||||
import com.muyu.service.SysCarService;
|
import com.muyu.enterpise.cache.SysCarCacheService;
|
||||||
|
import com.muyu.enterpise.service.SysCarService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -29,15 +31,18 @@ public class SysCarController extends BaseController
|
||||||
@Resource
|
@Resource
|
||||||
private SysCarService sysCarService;
|
private SysCarService sysCarService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCarCacheService sysCarCacheService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆基础信息列表
|
* 查询车辆基础信息列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("car:car:list")
|
@RequiresPermissions("car:car:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<TableDataInfo<SysCarResp>> list(SysCar sysCar)
|
public Result<TableDataInfo<SysCarResp>> list(SysCarReq sysCarReq)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<SysCarResp> list = sysCarService.selectSysCarList(sysCar);
|
List<SysCarResp> list = sysCarService.selectSysCarList(sysCarReq);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +67,9 @@ public class SysCarController extends BaseController
|
||||||
if (sysCarService.checkIdUnique(sysCar)) {
|
if (sysCarService.checkIdUnique(sysCar)) {
|
||||||
return error("新增 车辆基础信息 '" + sysCar + "'失败,车辆基础信息已存在");
|
return error("新增 车辆基础信息 '" + sysCar + "'失败,车辆基础信息已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
sysCar.setCreateBy(SecurityUtils.getUsername());
|
sysCar.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
sysCarCacheService.put(sysCar.getCarVin(),sysCar);
|
||||||
return toAjax(sysCarService.save(sysCar));
|
return toAjax(sysCarService.save(sysCar));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
|
@ -7,7 +7,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.SysCarFault;
|
import com.muyu.domain.SysCarFault;
|
||||||
import com.muyu.service.ISysCarFaultService;
|
import com.muyu.enterpise.service.ISysCarFaultService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
|
@ -1,10 +1,12 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.domain.SysCarType;
|
import com.muyu.domain.SysCarType;
|
||||||
import com.muyu.service.SysTypeService;
|
import com.muyu.enterpise.cache.SysCarCacheService;
|
||||||
|
import com.muyu.enterpise.cache.SysCarTypeCacheService;
|
||||||
|
import com.muyu.enterpise.service.SysTypeService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -29,6 +31,9 @@ public class SysTypeController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private SysTypeService sysTypeService;
|
private SysTypeService sysTypeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCarTypeCacheService sysCarTypeCacheService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆类型列表
|
* 查询车辆类型列表
|
||||||
|
@ -37,6 +42,10 @@ public class SysTypeController extends BaseController {
|
||||||
public Result<TableDataInfo<SysCarType>> list() {
|
public Result<TableDataInfo<SysCarType>> list() {
|
||||||
startPage();
|
startPage();
|
||||||
List<SysCarType> list = sysTypeService.selectSysTypeList();
|
List<SysCarType> list = sysTypeService.selectSysTypeList();
|
||||||
|
for (SysCarType sysCarType : list) {
|
||||||
|
sysCarTypeCacheService.put(String.valueOf(sysCarType.getId()),sysCarType);
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.WarnLogs;
|
import com.muyu.domain.WarnLogs;
|
||||||
import com.muyu.service.IWarnLogsService;
|
import com.muyu.enterpise.service.IWarnLogsService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.WarnRule;
|
import com.muyu.domain.WarnRule;
|
||||||
import com.muyu.service.IWarnRuleService;
|
import com.muyu.enterpise.service.IWarnRuleService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.enterpise.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.WarnStrategy;
|
import com.muyu.domain.WarnStrategy;
|
||||||
import com.muyu.service.IWarnStrategyService;
|
import com.muyu.enterpise.service.IWarnStrategyService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.muyu.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
import com.muyu.domain.CarAndGroupMiddle;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆和围栏组中间表
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.mapper
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarAndFenceGroupMiddleMapper
|
||||||
|
* @Date:2024/9/29 20:12
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CarAndFenceGroupMiddleMapper extends BaseMapper<CarAndGroupMiddle> {
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.CarFenceClazz;
|
import com.muyu.domain.CarFenceClazz;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.CarFence;
|
import com.muyu.domain.CarFence;
|
|
@ -1,8 +1,9 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.CarFence;
|
import com.muyu.domain.CarFence;
|
||||||
import com.muyu.domain.CarMiddle;
|
import com.muyu.domain.CarMiddle;
|
||||||
import com.muyu.domain.FenceAndGroupMiddle;
|
import com.muyu.domain.CarAndGroupMiddle;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
||||||
import com.muyu.domain.req.CarFenceGroup;
|
import com.muyu.domain.req.CarFenceGroup;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
@ -19,7 +20,7 @@ import java.util.List;
|
||||||
* * @Date:2024/9/22 19:25
|
* * @Date:2024/9/22 19:25
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CarFenceServiceMybaitsMapper {
|
public interface CarFenceServiceMybaitsMapper extends BaseMapper<CarMiddle> {
|
||||||
|
|
||||||
void fenceAdd(CarFenceGroup carFence);
|
void fenceAdd(CarFenceGroup carFence);
|
||||||
|
|
||||||
|
@ -32,17 +33,6 @@ public interface CarFenceServiceMybaitsMapper {
|
||||||
*/
|
*/
|
||||||
Integer addFenceGroup(@Param("fenceGroupId") Integer fenceGroupId, @Param("id") Integer id);
|
Integer addFenceGroup(@Param("fenceGroupId") Integer fenceGroupId, @Param("id") Integer id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改围栏组状态
|
|
||||||
* @param groupId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
void updateFenceGroupById(@Param("groupId") Integer groupId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 启动围栏
|
|
||||||
*/
|
|
||||||
void activate(@Param("groupId") Integer groupId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据围栏组的id查询绑定的围栏的中间表
|
* 根据围栏组的id查询绑定的围栏的中间表
|
||||||
|
@ -71,12 +61,12 @@ public interface CarFenceServiceMybaitsMapper {
|
||||||
* @param carId
|
* @param carId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<FenceAndGroupMiddle> selectBoundGFenceGroup(@Param("carId") Integer carId);
|
List<CarAndGroupMiddle> selectBoundGFenceGroup(@Param("carId") Integer carId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取围栏组的数据
|
* 获取围栏组的数据
|
||||||
* @param carGroupId 参数
|
* @param carGroupId 参数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
FenceGroup selectGroup(@Param("carGroupId") Integer carGroupId);
|
FenceGroup selectGroup(@Param("carGroupId") Long carGroupId);
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.CarFenceType;
|
import com.muyu.domain.CarFenceType;
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.muyu.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.domain.CarFence;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏组的修改状态
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.mapper
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarFenceUpdateMapper
|
||||||
|
* @Date:2024/9/30 09:13
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CarFenceUpdateMapper extends BaseMapper<FenceGroup> {
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.CarType;
|
import com.muyu.domain.CarType;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultCode;
|
import com.muyu.domain.FaultCode;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultCondition;
|
import com.muyu.domain.FaultCondition;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultLabel;
|
import com.muyu.domain.FaultLabel;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultLog;
|
import com.muyu.domain.FaultLog;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultRule;
|
import com.muyu.domain.FaultRule;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FaultType;
|
import com.muyu.domain.FaultType;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.message.Message;
|
import com.muyu.domain.message.Message;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.MessageTemplate;
|
import com.muyu.domain.MessageTemplate;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.MessageValue;
|
import com.muyu.domain.MessageValue;
|
||||||
|
@ -14,6 +14,5 @@ import org.apache.ibatis.annotations.Select;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MessageValueMapper extends BaseMapper<MessageValue> {
|
public interface MessageValueMapper extends BaseMapper<MessageValue> {
|
||||||
@Select({"SELECT sct.message_template_id FROM sys_car sc LEFT JOIN sys_car_type sct on sct.id = sc.car_type WHERE sc.car_vin = ${stringVin}"})
|
|
||||||
Long findByTemplateId(String stringVin);
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.SysCarFault;
|
import com.muyu.domain.SysCarFault;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.SysCar;
|
import com.muyu.domain.SysCar;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.SysCarType;
|
import com.muyu.domain.SysCarType;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.domain.WarnLogs;
|
import com.muyu.domain.WarnLogs;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.enterpise.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.muyu.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.domain.CarAndGroupMiddle;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆和围栏组中间表
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.service
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarAndFenceGroupMiddleService
|
||||||
|
* @Date:2024/9/29 20:10
|
||||||
|
*/
|
||||||
|
public interface CarAndFenceGroupMiddleService extends IService<CarAndGroupMiddle> {
|
||||||
|
/**
|
||||||
|
* 根据围栏组和车辆的id添加中间表
|
||||||
|
*/
|
||||||
|
boolean saveBatch(List<FenceGroup> fenceGroups, Integer carId);
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.CarFenceClazz;
|
import com.muyu.domain.CarFenceClazz;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.CarFence;
|
import com.muyu.domain.CarFence;
|
||||||
|
import com.muyu.domain.CarMiddle;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
||||||
import com.muyu.domain.req.CarFenceAdd;
|
import com.muyu.domain.req.CarFenceAdd;
|
||||||
|
|
||||||
|
@ -14,15 +16,18 @@ import java.util.List;
|
||||||
* * @name:CarFenceServiceMybaits
|
* * @name:CarFenceServiceMybaits
|
||||||
* * @Date:2024/9/22 19:24
|
* * @Date:2024/9/22 19:24
|
||||||
*/
|
*/
|
||||||
public interface CarFenceServiceMybaits {
|
public interface CarFenceServiceMybaits extends IService<CarMiddle> {
|
||||||
void add(Integer fenceGroupId, List<Integer> carFenceId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加多对多围栏组
|
* 添加多对多围栏组
|
||||||
|
*
|
||||||
* @param fenceGroupId
|
* @param fenceGroupId
|
||||||
* @param carFences
|
* @param carFences
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
void addFenceGroup(Integer fenceGroupId, List<CarFenceAdd> carFences);
|
boolean saveBatch(List<CarFenceAdd> carFences, Integer fenceGroupId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改围栏状态
|
* 修改围栏状态
|
||||||
|
@ -31,19 +36,18 @@ public interface CarFenceServiceMybaits {
|
||||||
*/
|
*/
|
||||||
Object updateFenceGroupById(Integer groupId);
|
Object updateFenceGroupById(Integer groupId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动围栏
|
* 启动围栏
|
||||||
*/
|
*/
|
||||||
Object activate(Integer groupId);
|
Object activate(Integer groupId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据围栏组的id查询绑定的围栏的中间表
|
* 根据围栏组的id查询绑定的围栏的中间表
|
||||||
*/
|
*/
|
||||||
List<CarFence> BoundFenceGroup(Integer groupId);
|
List<CarFence> BoundFenceGroup(Integer groupId);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据围栏组和车辆的id添加中间表
|
|
||||||
*/
|
|
||||||
void addFenceGroupAddCarMiddle(Integer id, List<FenceGroup> fenceGroups);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取绑定的围栏组
|
* 获取绑定的围栏组
|
||||||
|
@ -51,4 +55,6 @@ public interface CarFenceServiceMybaits {
|
||||||
*/
|
*/
|
||||||
List<FenceGroup> selectBoundGFenceGroup(Integer carId);
|
List<FenceGroup> selectBoundGFenceGroup(Integer carId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.CarFenceType;
|
import com.muyu.domain.CarFenceType;
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.muyu.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.domain.CarFence;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏组的修改状态
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.service
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarFenceUpdateService
|
||||||
|
* @Date:2024/9/30 09:12
|
||||||
|
*/
|
||||||
|
public interface CarFenceUpdateService extends IService<FenceGroup> {
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.CarType;
|
import com.muyu.domain.CarType;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FaultCondition;
|
import com.muyu.domain.FaultCondition;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.muyu.domain.CarFaultRule;
|
import com.muyu.domain.CarFaultRule;
|
||||||
import com.muyu.domain.FaultReport;
|
import com.muyu.domain.FaultReport;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障检测策略的接口
|
* 故障检测策略的接口
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FaultLabel;
|
import com.muyu.domain.FaultLabel;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FaultLog;
|
import com.muyu.domain.FaultLog;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FaultRule;
|
import com.muyu.domain.FaultRule;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FaultType;
|
import com.muyu.domain.FaultType;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.SysCarFault;
|
import com.muyu.domain.SysCarFault;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.WarnLogs;
|
import com.muyu.domain.WarnLogs;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.WarnRule;
|
import com.muyu.domain.WarnRule;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.WarnStrategy;
|
import com.muyu.domain.WarnStrategy;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.message.Message;
|
import com.muyu.domain.message.Message;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.MessageTemplate;
|
import com.muyu.domain.MessageTemplate;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.MessageValue;
|
import com.muyu.domain.MessageValue;
|
||||||
|
@ -27,6 +27,6 @@ public interface MessageValueService extends IService<MessageValue> {
|
||||||
* @param str
|
* @param str
|
||||||
*/
|
*/
|
||||||
void test(String str);
|
void test(String str);
|
||||||
Long findByTemplateId(String stringVin);
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 中间表服务接口
|
* 中间表服务接口
|
|
@ -1,7 +1,8 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.SysCar;
|
import com.muyu.domain.SysCar;
|
||||||
|
import com.muyu.domain.req.SysCarReq;
|
||||||
import com.muyu.domain.resp.SysCarResp;
|
import com.muyu.domain.resp.SysCarResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -26,7 +27,7 @@ public interface SysCarService extends IService<SysCar> {
|
||||||
* @param sysCar 车辆基础信息
|
* @param sysCar 车辆基础信息
|
||||||
* @return 车辆基础信息集合
|
* @return 车辆基础信息集合
|
||||||
*/
|
*/
|
||||||
public List<SysCarResp> selectSysCarList(SysCar sysCar);
|
public List<SysCarResp> selectSysCarList(SysCarReq sysCarReq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断 车辆基础信息 id是否唯一
|
* 判断 车辆基础信息 id是否唯一
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service;
|
package com.muyu.enterpise.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.SysCarType;
|
import com.muyu.domain.SysCarType;
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.muyu.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.domain.CarAndGroupMiddle;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
import com.muyu.mapper.CarAndFenceGroupMiddleMapper;
|
||||||
|
import com.muyu.service.CarAndFenceGroupMiddleService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆和围栏组中间表
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.service.impl
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarAndFenceGroupMiddleServiceImpl
|
||||||
|
* @Date:2024/9/29 20:11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CarAndFenceGroupMiddleServiceImpl extends ServiceImpl<CarAndFenceGroupMiddleMapper, CarAndGroupMiddle> implements CarAndFenceGroupMiddleService {
|
||||||
|
@Autowired
|
||||||
|
private CarAndFenceGroupMiddleMapper carAndFenceGroupMiddleMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据围栏组和车辆的id添加中间表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean saveBatch(List<FenceGroup> fenceGroups, Integer carId) {
|
||||||
|
List<CarAndGroupMiddle> list = fenceGroups.stream().map(fenceGroup -> {
|
||||||
|
CarAndGroupMiddle carAndGroupMiddle = new CarAndGroupMiddle();
|
||||||
|
//获取围栏组的id
|
||||||
|
carAndGroupMiddle.setGroupId(fenceGroup.getGroupId());
|
||||||
|
carAndGroupMiddle.setCarId(carId);
|
||||||
|
return carAndGroupMiddle;
|
||||||
|
}).toList();
|
||||||
|
boolean b = this.saveBatch(list);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.service.impl;
|
package com.muyu.enterpise.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.domain.CarFenceClazz;
|
import com.muyu.domain.CarFenceClazz;
|
||||||
import com.muyu.mapper.CarFenceClazzMapper;
|
import com.muyu.enterpise.mapper.CarFenceClazzMapper;
|
||||||
import com.muyu.service.CarFenceClazzService;
|
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.service.impl;
|
package com.muyu.enterpise.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -9,10 +9,10 @@ import com.muyu.domain.CarFenceClazz;
|
||||||
import com.muyu.domain.CarFenceType;
|
import com.muyu.domain.CarFenceType;
|
||||||
import com.muyu.domain.req.CarFenceReq;
|
import com.muyu.domain.req.CarFenceReq;
|
||||||
import com.muyu.domain.resp.CarFenceResq;
|
import com.muyu.domain.resp.CarFenceResq;
|
||||||
import com.muyu.mapper.CarFenceMapper;
|
import com.muyu.enterpise.mapper.CarFenceMapper;
|
||||||
import com.muyu.service.CarFenceClazzService;
|
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||||
import com.muyu.service.CarFenceService;
|
import com.muyu.enterpise.service.CarFenceService;
|
||||||
import com.muyu.service.CarFenceTypeService;
|
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
|
@ -1,12 +1,16 @@
|
||||||
package com.muyu.service.impl;
|
package com.muyu.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.domain.CarFence;
|
import com.muyu.domain.CarFence;
|
||||||
import com.muyu.domain.CarMiddle;
|
import com.muyu.domain.CarMiddle;
|
||||||
import com.muyu.domain.FenceAndGroupMiddle;
|
import com.muyu.domain.CarAndGroupMiddle;
|
||||||
import com.muyu.domain.FenceGroup;
|
import com.muyu.domain.FenceGroup;
|
||||||
import com.muyu.domain.req.CarFenceAdd;
|
import com.muyu.domain.req.CarFenceAdd;
|
||||||
import com.muyu.mapper.CarFenceServiceMybaitsMapper;
|
import com.muyu.mapper.CarFenceServiceMybaitsMapper;
|
||||||
import com.muyu.service.CarFenceServiceMybaits;
|
import com.muyu.service.CarFenceServiceMybaits;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -22,59 +26,36 @@ import java.util.List;
|
||||||
* * @Date:2024/9/22 19:24
|
* * @Date:2024/9/22 19:24
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class CarFenceServiceMybaitsImpl implements CarFenceServiceMybaits {
|
@Log4j2
|
||||||
|
public class CarFenceServiceMybaitsImpl extends ServiceImpl<CarFenceServiceMybaitsMapper,CarMiddle> implements CarFenceServiceMybaits {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CarFenceServiceMybaitsMapper carFenceServiceMybaitsMapper;
|
private CarFenceServiceMybaitsMapper carFenceServiceMybaitsMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加多对多围栏组
|
|
||||||
* @param fenceGroupId
|
|
||||||
* @param carFenceId
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void add(Integer fenceGroupId, List<Integer> carFenceId) {
|
|
||||||
|
|
||||||
for (Integer integer : carFenceId) {
|
|
||||||
Integer addMiddle = carFenceServiceMybaitsMapper.addGroup(fenceGroupId,integer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加多对多围栏组
|
* 添加多对多围栏组
|
||||||
|
*
|
||||||
* @param fenceGroupId
|
* @param fenceGroupId
|
||||||
* @param carFences
|
* @param carFences
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addFenceGroup(Integer fenceGroupId, List<CarFenceAdd> carFences) {
|
|
||||||
for (CarFenceAdd carFence : carFences) {
|
|
||||||
Integer id = carFence.getId();
|
|
||||||
Integer addMiddle = carFenceServiceMybaitsMapper.addFenceGroup(fenceGroupId,id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改围栏组状态
|
|
||||||
* @param groupId
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object updateFenceGroupById(Integer groupId) {
|
public boolean saveBatch(List<CarFenceAdd> carFences, Integer fenceGroupId) {
|
||||||
carFenceServiceMybaitsMapper.updateFenceGroupById(groupId);
|
List<CarMiddle> list = carFences.stream().map(carFenceAdd -> {
|
||||||
return null;
|
CarMiddle carMiddle = new CarMiddle();
|
||||||
|
carMiddle.setCarFenceId(carFenceAdd.getId());
|
||||||
|
carMiddle.setCarGroupId(fenceGroupId);
|
||||||
|
return carMiddle;
|
||||||
|
}).toList();
|
||||||
|
boolean b = this.saveBatch(list);
|
||||||
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 启动围栏
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Object activate(Integer groupId) {
|
|
||||||
carFenceServiceMybaitsMapper.activate(groupId);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据围栏组的id查询绑定的围栏的中间表
|
* 根据围栏组的id查询绑定的围栏的中间表
|
||||||
|
@ -93,20 +74,9 @@ public class CarFenceServiceMybaitsImpl implements CarFenceServiceMybaits {
|
||||||
return carFences;
|
return carFences;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据围栏组和车辆的id添加中间表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addFenceGroupAddCarMiddle(Integer id, List<FenceGroup> fenceGroups) {
|
|
||||||
|
|
||||||
//遍历集合
|
|
||||||
for (FenceGroup fenceGroup : fenceGroups) {
|
|
||||||
//获取围栏组的id
|
|
||||||
Integer groupId = fenceGroup.getGroupId();
|
|
||||||
carFenceServiceMybaitsMapper.addFenceGroupAddCarMiddle(id,groupId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取绑定的围栏组
|
* 获取绑定的围栏组
|
||||||
|
@ -115,18 +85,22 @@ public class CarFenceServiceMybaitsImpl implements CarFenceServiceMybaits {
|
||||||
@Override
|
@Override
|
||||||
public List<FenceGroup> selectBoundGFenceGroup(Integer carId) {
|
public List<FenceGroup> selectBoundGFenceGroup(Integer carId) {
|
||||||
/*根据id查询围栏组的id*/
|
/*根据id查询围栏组的id*/
|
||||||
List<FenceAndGroupMiddle> list = carFenceServiceMybaitsMapper.selectBoundGFenceGroup(carId);
|
List<CarAndGroupMiddle> list = carFenceServiceMybaitsMapper.selectBoundGFenceGroup(carId);
|
||||||
ArrayList<FenceGroup> fenceGroups = new ArrayList<>();
|
ArrayList<FenceGroup> fenceGroups = new ArrayList<>();
|
||||||
|
|
||||||
/*循环*/
|
/*循环*/
|
||||||
for (FenceAndGroupMiddle fenceAndGroupMiddle : list) {
|
for (CarAndGroupMiddle fenceAndGroupMiddle : list) {
|
||||||
/**
|
/**
|
||||||
* 获取围栏组的id
|
* 获取围栏组的id
|
||||||
*/
|
*/
|
||||||
Integer carGroupId = fenceAndGroupMiddle.getGroupId();
|
Long carGroupId = fenceAndGroupMiddle.getGroupId();
|
||||||
//获取围栏组的数据 并 存入list
|
//获取围栏组的数据 并 存入list
|
||||||
fenceGroups.add(carFenceServiceMybaitsMapper.selectGroup(carGroupId));
|
fenceGroups.add(carFenceServiceMybaitsMapper.selectGroup(carGroupId));
|
||||||
}
|
}
|
||||||
return fenceGroups;
|
return fenceGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.service.impl;
|
package com.muyu.enterpise.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.domain.CarFenceType;
|
import com.muyu.domain.CarFenceType;
|
||||||
import com.muyu.mapper.CarFenceTypeMapper;
|
import com.muyu.enterpise.mapper.CarFenceTypeMapper;
|
||||||
import com.muyu.service.CarFenceTypeService;
|
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.muyu.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.domain.CarFence;
|
||||||
|
import com.muyu.domain.FenceGroup;
|
||||||
|
import com.muyu.mapper.CarFenceUpdateMapper;
|
||||||
|
import com.muyu.service.CarFenceUpdateService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏组的修改状态
|
||||||
|
* @Author:yan
|
||||||
|
* @Package:com.muyu.service.impl
|
||||||
|
* @Project:plues
|
||||||
|
* @name:CarFenceUpdateServiceImpl
|
||||||
|
* @Date:2024/9/30 09:12
|
||||||
|
* 围栏组的修改状态
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CarFenceUpdateServiceImpl extends ServiceImpl<CarFenceUpdateMapper, FenceGroup> implements CarFenceUpdateService {
|
||||||
|
@Autowired
|
||||||
|
private CarFenceUpdateMapper carFenceUpdateMapper;
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue