Compare commits
30 Commits
c7443b81d7
...
e027acc275
Author | SHA1 | Date |
---|---|---|
|
e027acc275 | |
|
0c1cfb8f28 | |
|
2352def47e | |
|
6ab26976d6 | |
|
de572170ec | |
|
bbd9e52302 | |
|
ffa06bc02e | |
|
4b80034baf | |
|
3947f9414e | |
|
99dc4e832f | |
|
00369a6052 | |
|
a9977b44a9 | |
|
b644752443 | |
|
aaa5d4f868 | |
|
72b634fcc1 | |
|
8d54e991dc | |
|
73c2c159e8 | |
|
422ffa1f32 | |
|
0bbf40741c | |
|
8d5e46108f | |
|
6c16191d90 | |
|
831ba2668c | |
|
08aec277e6 | |
|
757f51a2dd | |
|
5148ae5e14 | |
|
5b499eb8c3 | |
|
c3aee00eff | |
|
c884fc9a19 | |
|
a3f5055ef2 | |
|
143176fd5a |
|
@ -17,9 +17,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
|
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
|
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-common-vehicle</artifactId>
|
|
||||||
|
<artifactId>couplet-common-business</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@ -17,7 +18,6 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- MuYu Common Core-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-common-core</artifactId>
|
<artifactId>couplet-common-core</artifactId>
|
|
@ -1,11 +1,15 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.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.couplet.common.core.annotation.Excel;
|
import com.couplet.common.core.annotation.Excel;
|
||||||
import lombok.*;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
|
@ -23,12 +27,14 @@ public class CoupletTroubleCode {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "trouble_id",type = IdType.AUTO)
|
@TableId(value = "trouble_id",type = IdType.AUTO)
|
||||||
@Excel(name = "故障码主键", cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "故障码主键", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
@NotEmpty(message = "故障码主键不能为空")
|
||||||
private Integer troubleId;
|
private Integer troubleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障码
|
* 故障码
|
||||||
*/
|
*/
|
||||||
@Excel(name = "故障码")
|
@Excel(name = "故障码")
|
||||||
|
@NotEmpty(message = "故障码不能为空")
|
||||||
private String troubleCode;
|
private String troubleCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,11 +59,13 @@ public class CoupletTroubleCode {
|
||||||
* 故障类型Id
|
* 故障类型Id
|
||||||
*/
|
*/
|
||||||
@Excel(name = "故障类型Id")
|
@Excel(name = "故障类型Id")
|
||||||
|
@NotEmpty(message = "故障类型Id不能为空")
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障等级Id
|
* 故障等级Id
|
||||||
*/
|
*/
|
||||||
@Excel(name = "故障等级Id")
|
@Excel(name = "故障等级Id")
|
||||||
|
@NotEmpty(message = "故障等级Id不能为空")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.msg.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -12,14 +12,14 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @date 2024/3/31 21:18
|
* @date 2024/4/2 15:14
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TroubleLog {
|
public class CoupletTroubleLog {
|
||||||
/**
|
/**
|
||||||
* 故障记录Id
|
* 故障记录Id
|
||||||
*/
|
*/
|
||||||
|
@ -31,7 +31,7 @@ public class TroubleLog {
|
||||||
private String troubleLogCode;
|
private String troubleLogCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障记录车辆VIN
|
* 故障码VIN
|
||||||
*/
|
*/
|
||||||
private String troubleLogVin;
|
private String troubleLogVin;
|
||||||
|
|
||||||
|
@ -48,4 +48,5 @@ public class TroubleLog {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date troubleLogEndTime;
|
private Date troubleLogEndTime;
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
|
@ -1,25 +1,20 @@
|
||||||
package com.couplet.map.common.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
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.couplet.common.core.web.domain.BaseEntity;
|
import com.couplet.common.core.web.domain.BaseEntity;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
@ -17,12 +17,11 @@ import lombok.experimental.SuperBuilder;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName("couplet_vehicle")
|
@TableName("couplet_vehicle")
|
||||||
public class Vehicle{
|
public class Vehicle{
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*车辆id
|
*车辆id
|
||||||
* */
|
* */
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.system.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.system.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,6 +1,5 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.couplet.trouble.domain.resp;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -7,7 +7,6 @@ import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.utils;
|
package com.couplet.common.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.log.annotation;
|
package com.couplet.log.annotation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.log.aop;
|
package com.couplet.log.aop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
|
@ -1,15 +1,12 @@
|
||||||
package com.couplet.common.system.remote;
|
package com.couplet.remote;
|
||||||
|
|
||||||
import com.couplet.common.core.constant.ServiceNameConstants;
|
import com.couplet.common.core.constant.ServiceNameConstants;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.system.remote.factory.RemoteVehicleFallbackFactory;
|
import com.couplet.remote.factory.RemoteVehicleFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -49,4 +46,9 @@ public interface RemoteVehicleService {
|
||||||
|
|
||||||
@PostMapping("vehicleAll")
|
@PostMapping("vehicleAll")
|
||||||
public Result<List<Vehicle>> VehicleManageList();
|
public Result<List<Vehicle>> VehicleManageList();
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/findByVIN/{vin}")
|
||||||
|
public Result<List<Vehicle>> findByVIN(@PathVariable("vin") String vin);
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,13 @@
|
||||||
package com.couplet.common.system.remote.factory;
|
package com.couplet.remote.factory;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.system.remote.RemoteVehicleService;
|
import com.couplet.remote.RemoteVehicleService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -14,7 +17,9 @@ import java.util.List;
|
||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2024/4/2 14:46
|
* @date 2024/4/2 14:46
|
||||||
*/
|
*/
|
||||||
|
@Component
|
||||||
public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehicleService> {
|
public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehicleService> {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteVehicleFallbackFactory.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,6 +44,12 @@ public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehic
|
||||||
public Result<List<Vehicle>> VehicleManageList() {
|
public Result<List<Vehicle>> VehicleManageList() {
|
||||||
return Result.error("调用失败....."+cause.getMessage());
|
return Result.error("调用失败....."+cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<Vehicle>> findByVIN(String vin) {
|
||||||
|
return Result.error("车辆服务调用失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.exception;
|
package com.couplet.common.core.exception.vehicle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -1,89 +0,0 @@
|
||||||
package com.couplet.common.system.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ProjectName: five-groups-couplet
|
|
||||||
* @Author: LiuYunHu
|
|
||||||
* @CreateTime: 2024/3/26
|
|
||||||
* @Description: 车辆信息表
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@TableName("couplet_vehicle")
|
|
||||||
public class Vehicle{
|
|
||||||
/*
|
|
||||||
*车辆id
|
|
||||||
* */
|
|
||||||
@TableId(type = IdType.AUTO, value = "vehicle_id")
|
|
||||||
private Long vehicleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*车辆类型
|
|
||||||
* */
|
|
||||||
@TableField(value = "vehicle_type")
|
|
||||||
private Long vehicleType;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆类型名称
|
|
||||||
* */
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String vehicleTypeName;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电机厂商
|
|
||||||
* */
|
|
||||||
@TableField(value = "motor_manufacturer")
|
|
||||||
private String motorManufacturer;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电池厂商
|
|
||||||
* */
|
|
||||||
@TableField(value = "battery_manufacturer")
|
|
||||||
private String batteryManufacturer;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电机编号
|
|
||||||
* */
|
|
||||||
@TableField(value = "motor_number")
|
|
||||||
private String motorNumber;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电池编号
|
|
||||||
* */
|
|
||||||
@TableField(value = "battery_number")
|
|
||||||
private String batteryNumber;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*vin码
|
|
||||||
* */
|
|
||||||
@TableField(value = "vin")
|
|
||||||
private String vin;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*0离线 1在线
|
|
||||||
* */
|
|
||||||
@TableField(value = "vehicle_state")
|
|
||||||
private Integer vehicleState;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*0未删除 1删除
|
|
||||||
* */
|
|
||||||
@TableField(value = "isdelete")
|
|
||||||
private Integer isdelete;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package com.couplet.common.system.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ProjectName: five-groups-couplet
|
|
||||||
* @Author: LiuYunHu
|
|
||||||
* @CreateTime: 2024/3/30
|
|
||||||
* @Description: 车辆和标志中间表
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@TableName("couplet_vehicle_and_logo")
|
|
||||||
public class VehicleAndLogo {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆、标志中间表id
|
|
||||||
* */
|
|
||||||
@TableId(type = IdType.AUTO, value = "vehicle_logo_middle_id")
|
|
||||||
private Long vehicleLogoMiddleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆id
|
|
||||||
* */
|
|
||||||
@TableField("vehicle_id")
|
|
||||||
private Long vehicleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 标志id
|
|
||||||
* */
|
|
||||||
@TableField("logo_id")
|
|
||||||
private Long logoId;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
com.couplet.common.system.remote.factory.RemoteVehicleFallbackFactory
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-common</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-trouble-log</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>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -18,8 +18,8 @@
|
||||||
<module>couplet-common-datascope</module>
|
<module>couplet-common-datascope</module>
|
||||||
<module>couplet-common-datasource</module>
|
<module>couplet-common-datasource</module>
|
||||||
<module>couplet-common-system</module>
|
<module>couplet-common-system</module>
|
||||||
<module>couplet-trouble-log</module>
|
<module>couplet-common-business</module>
|
||||||
<module>couplet-common-vehicle</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>couplet-common</artifactId>
|
<artifactId>couplet-common</artifactId>
|
||||||
|
|
|
@ -15,9 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
|
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
|
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-modules</artifactId>
|
<artifactId>couplet-analyze</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-msg</artifactId>
|
<artifactId>couplet-analyze-msg</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@ -80,5 +80,12 @@
|
||||||
<artifactId>couplet-common-swagger</artifactId>
|
<artifactId>couplet-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- mqttx依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.paho</groupId>
|
||||||
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||||
|
<version>1.2.5</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -1,19 +1,21 @@
|
||||||
package com.couplet.trouble;
|
package com.couplet.analyze.msg;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @date 2024/3/26 21:42
|
* @date 2024/4/2 8:39
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(scanBasePackages = "com.couplet.**")
|
@SpringBootApplication
|
||||||
|
@EnableScheduling
|
||||||
@EnableFeignClients(basePackages = "com.couplet.**")
|
@EnableFeignClients(basePackages = "com.couplet.**")
|
||||||
public class CoupletTroubleApplication {
|
public class CoupletMsgApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(CoupletTroubleApplication.class);
|
SpringApplication.run(CoupletMsgApplication.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.couplet.analyze.msg.contents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @description: Mqtt常量类
|
||||||
|
* @Date 2024/4/1 18:47
|
||||||
|
*/
|
||||||
|
public class MsgContent {
|
||||||
|
|
||||||
|
public static final String BROKER_URL = "tcp://8.130.181.16:1883";
|
||||||
|
|
||||||
|
public static final String CLIENT_ID = "mqttx_32dcaf76";
|
||||||
|
}
|
|
@ -0,0 +1,267 @@
|
||||||
|
package com.couplet.analyze.msg.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/4/2 15:26
|
||||||
|
* @description 报文信息实体类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CoupletMsgData {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VIN 车辆编码
|
||||||
|
*/
|
||||||
|
private String vin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报文创建时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 速度
|
||||||
|
*/
|
||||||
|
private String speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 里程
|
||||||
|
*/
|
||||||
|
private BigDecimal mileage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总电压
|
||||||
|
*/
|
||||||
|
private String voltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总电流
|
||||||
|
*/
|
||||||
|
private String current;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绝缘电阻
|
||||||
|
*/
|
||||||
|
private String resistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档位 P:停车 D:运行
|
||||||
|
*/
|
||||||
|
private String gear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加速踏板行驶值
|
||||||
|
*/
|
||||||
|
private String accelerationPedal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 制动踏板行驶值
|
||||||
|
*/
|
||||||
|
private String brakePedal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 燃料消耗率
|
||||||
|
*/
|
||||||
|
private String fuelConsumptionRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机控制器温度
|
||||||
|
*/
|
||||||
|
private String motorControllerTemperature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机转速
|
||||||
|
*/
|
||||||
|
private String motorSpeed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机转矩
|
||||||
|
*/
|
||||||
|
private String motorTorque;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机温度
|
||||||
|
*/
|
||||||
|
private String motorTemperature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机电压
|
||||||
|
*/
|
||||||
|
private String motorVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电机电流
|
||||||
|
*/
|
||||||
|
private String motorCurrent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池剩余电量SOC
|
||||||
|
*/
|
||||||
|
private BigDecimal remainingBattery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前状态允许的最大反馈功率
|
||||||
|
*/
|
||||||
|
private String maximumFeedbackPower;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前状态允许的最大放电功率
|
||||||
|
*/
|
||||||
|
private String maximumDischargePower;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BMS自检计数器
|
||||||
|
*/
|
||||||
|
private String selfCheckCounter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池充放电电流
|
||||||
|
*/
|
||||||
|
private String totalBatteryCurrent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池负载端电压V3
|
||||||
|
*/
|
||||||
|
private String totalBatteryVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单次最大电压
|
||||||
|
*/
|
||||||
|
private String singleBatteryMaxVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单体电池最低电压
|
||||||
|
*/
|
||||||
|
private String singleBatteryMinVoltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单体电池最高温度
|
||||||
|
*/
|
||||||
|
private String singleBatteryMaxTemperature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单体电池最低温度
|
||||||
|
*/
|
||||||
|
private String singleBatteryMinTemperature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池可用容量
|
||||||
|
*/
|
||||||
|
private String availableBatteryCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int vehicleStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int chargingStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int operatingStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SOC 状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int socStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可充电储能装置工作状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int chargingEnergyStorageStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驱动电机状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int driveMotorStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位是否有效 1:有效 0:无效
|
||||||
|
*/
|
||||||
|
private int positionStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EAS(汽车防盗系统)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int easStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PTC(电动加热器)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int ptcStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EPS(电动助力系统)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int epsStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ABS(防抱死)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int absStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MCU(电机/逆变器)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int mcuStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池加热状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int heatingStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池当前状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int batteryStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池保温状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int batteryInsulationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DCDC(电力交换系统) 状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int dcdcStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CHG(充电机)状态 1:正常 0:故障
|
||||||
|
*/
|
||||||
|
private int chgStatus;
|
||||||
|
|
||||||
|
public CoupletMsgData(String s) {
|
||||||
|
this.vin = s;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.couplet.analyze.msg.mapper;
|
||||||
|
|
||||||
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/2
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface IncidentMapper {
|
||||||
|
/**
|
||||||
|
* 新增存储事件
|
||||||
|
* @param coupletMsgData
|
||||||
|
*/
|
||||||
|
public void reportMapper(CoupletMsgData coupletMsgData);
|
||||||
|
}
|
|
@ -0,0 +1,408 @@
|
||||||
|
package com.couplet.analyze.msg.model;
|
||||||
|
|
||||||
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
import com.couplet.common.core.utils.SpringUtils;
|
||||||
|
import com.couplet.common.core.utils.uuid.IdUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.eclipse.paho.client.mqttv3.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import static com.couplet.analyze.msg.contents.MsgContent.BROKER_URL;
|
||||||
|
import static com.couplet.analyze.msg.contents.MsgContent.CLIENT_ID;
|
||||||
|
import static io.lettuce.core.pubsub.PubSubOutput.Type.message;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/4/2 15:41
|
||||||
|
* @description 解析报文数据
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class ModelMessage {
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private CoupletMsgService coupletMsgService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// public ModelMessage(CoupletMsgService coupletMsgService){
|
||||||
|
// this.coupletMsgService = coupletMsgService;
|
||||||
|
// }
|
||||||
|
static ArrayList<String> strings = new ArrayList<>() {
|
||||||
|
{
|
||||||
|
add("breakdown");
|
||||||
|
add("electronic-fence");
|
||||||
|
add("real-time-data");
|
||||||
|
add("stored-event");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Value("${mq.queueName}")
|
||||||
|
public String queueName;
|
||||||
|
|
||||||
|
//交换机
|
||||||
|
@Value("${mq.exchangeName}")
|
||||||
|
public String exchangeName;
|
||||||
|
|
||||||
|
//路由键
|
||||||
|
@Value("${mq.routingKey}")
|
||||||
|
public String routingKey;
|
||||||
|
|
||||||
|
@Scheduled(cron = "0/5 * * * * ?")
|
||||||
|
public void startMsg() {
|
||||||
|
try {
|
||||||
|
MqttClient mqttClient = new MqttClient(BROKER_URL, CLIENT_ID);
|
||||||
|
|
||||||
|
MqttConnectOptions options = new MqttConnectOptions();
|
||||||
|
|
||||||
|
options.setCleanSession(true);
|
||||||
|
mqttClient.connect(options);
|
||||||
|
|
||||||
|
mqttClient.setCallback(new MqttCallback() {
|
||||||
|
@Override
|
||||||
|
public void connectionLost(Throwable throwable) {
|
||||||
|
log.error("Mqtt[{}-{}]连接断开:[{}]", CLIENT_ID, BROKER_URL, throwable.getMessage(), throwable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void messageArrived(String topic, MqttMessage mqttMessage) throws Exception {
|
||||||
|
//打印接收到的消息和主题
|
||||||
|
log.info("主题='{}':消息内容={}", topic, new String(mqttMessage.getPayload()));
|
||||||
|
String str = hexToString(new String(mqttMessage.getPayload()));
|
||||||
|
List<CoupletMsgData> coupletMsgDataList = sendMsg(str);
|
||||||
|
|
||||||
|
for (CoupletMsgData msgData : coupletMsgDataList) {
|
||||||
|
log.info("解析到车辆数据:{}", msgData);
|
||||||
|
//发送日志到MQ
|
||||||
|
for (String string : strings) {
|
||||||
|
IncidentService incidentService = SpringUtils.getBean(string);
|
||||||
|
incidentService.incident(msgData);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(1000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deliveryComplete(IMqttDeliveryToken token) {
|
||||||
|
log.info("消息已投递成功:{}",token);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mqttClient.subscribe("test",0);
|
||||||
|
|
||||||
|
Thread.sleep(1000*60*10);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将16进制字符串转换为ASCII字符串
|
||||||
|
* @param s 16进制字符串
|
||||||
|
* @return ASCII字符串
|
||||||
|
*/
|
||||||
|
public static String hexToString(String s) {
|
||||||
|
if (s == null || s.equals("")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
s = s.replace(" ", "");
|
||||||
|
byte[] baKeyword = new byte[s.length() / 2];
|
||||||
|
for (int i = 0; i < baKeyword.length; i++) {
|
||||||
|
try {
|
||||||
|
baKeyword[i] = (byte) (0xff & Integer.parseInt(s.substring(i * 2, i * 2 + 2), 16));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
s = new String(baKeyword, StandardCharsets.UTF_8);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<CoupletMsgData> sendMsg(String str) {
|
||||||
|
List<CoupletMsgData> coupletMsgDataList = new ArrayList<>();
|
||||||
|
CoupletMsgData coupletMsgData = new CoupletMsgData();
|
||||||
|
|
||||||
|
coupletMsgData.setVin(str.substring(1,18));
|
||||||
|
|
||||||
|
log.info("vin=="+coupletMsgData.getVin());
|
||||||
|
|
||||||
|
//时间
|
||||||
|
String tim =str.substring(18,31);
|
||||||
|
long timestamp = Long.parseLong(tim);
|
||||||
|
|
||||||
|
Date date = new Date(timestamp);
|
||||||
|
coupletMsgData.setCreateTime(date);
|
||||||
|
|
||||||
|
//经度
|
||||||
|
String lt = str.substring(31,42);
|
||||||
|
// 如果末尾是零,则舍去
|
||||||
|
int endIndex = lt.length() - 1;
|
||||||
|
while (lt.charAt(endIndex) == '0'){
|
||||||
|
endIndex--;
|
||||||
|
}
|
||||||
|
|
||||||
|
String longitude = lt.substring(0, endIndex + 1);
|
||||||
|
coupletMsgData.setLongitude(longitude);
|
||||||
|
|
||||||
|
//维度
|
||||||
|
String latitudeIndex =str.substring(42,52);
|
||||||
|
int endIndexT = latitudeIndex.length() - 1;
|
||||||
|
while (latitudeIndex.charAt(endIndexT) == '0'){
|
||||||
|
endIndexT--;
|
||||||
|
}
|
||||||
|
|
||||||
|
String latitude = latitudeIndex.substring(0, endIndexT + 1);
|
||||||
|
coupletMsgData.setLatitude(latitude);
|
||||||
|
|
||||||
|
//速度speed
|
||||||
|
String speed =str.substring(52,58);
|
||||||
|
coupletMsgData.setSpeed(speed);
|
||||||
|
|
||||||
|
//里程
|
||||||
|
BigDecimal mileage= new BigDecimal(str.substring(58,69));
|
||||||
|
mileage=mileage.stripTrailingZeros();
|
||||||
|
coupletMsgData.setMileage(mileage);
|
||||||
|
|
||||||
|
//总电压
|
||||||
|
String voltage =str.substring(69,75);
|
||||||
|
while (voltage.endsWith("0")) {
|
||||||
|
voltage = voltage.substring(0, voltage.length() - 1); // 去除末尾的零
|
||||||
|
}
|
||||||
|
coupletMsgData.setVoltage(voltage);
|
||||||
|
|
||||||
|
//总电流
|
||||||
|
String current =str.substring(75,80);
|
||||||
|
while (current.endsWith("0")){
|
||||||
|
current=current.substring(0,current.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setCurrent(current);
|
||||||
|
|
||||||
|
//绝缘电阻 resistance
|
||||||
|
String res =str.substring(80,89);
|
||||||
|
String resistance = res.substring(0, 5);
|
||||||
|
coupletMsgData.setResistance(resistance);
|
||||||
|
|
||||||
|
//档位
|
||||||
|
String gear =str.substring(89,90);
|
||||||
|
coupletMsgData.setGear(gear);
|
||||||
|
|
||||||
|
//accelerationPedal 加速踏板行程值
|
||||||
|
String accelerationPedal =str.substring(90,91);
|
||||||
|
coupletMsgData.setAccelerationPedal(accelerationPedal);
|
||||||
|
|
||||||
|
//brakePedal 制动踏板行程值
|
||||||
|
String brakePedal =str.substring(92,93);
|
||||||
|
coupletMsgData.setBrakePedal(brakePedal);
|
||||||
|
|
||||||
|
//fuelConsumptionRate 燃料消耗率
|
||||||
|
String fuelConsumptionRate =str.substring(94,99);
|
||||||
|
coupletMsgData.setFuelConsumptionRate(fuelConsumptionRate);
|
||||||
|
|
||||||
|
//motorControllerTemperature 电机控制器温度
|
||||||
|
String motorControllerTemperature =str.substring(99,105);
|
||||||
|
while (motorControllerTemperature.endsWith("0")){
|
||||||
|
motorControllerTemperature=motorControllerTemperature.substring(0,motorControllerTemperature.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMotorControllerTemperature(motorControllerTemperature);
|
||||||
|
|
||||||
|
//motorSpeed 电机转速
|
||||||
|
String motorSpeed =str.substring(105,110);
|
||||||
|
coupletMsgData.setMotorSpeed(motorSpeed);
|
||||||
|
|
||||||
|
//motorTorque 电机转矩
|
||||||
|
String motorTorque =str.substring(110,114);
|
||||||
|
while (motorTorque.endsWith("0")){
|
||||||
|
motorTorque=motorTorque.substring(0,motorTorque.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMotorTorque(motorTorque);
|
||||||
|
|
||||||
|
//motorTemperature 电机温度
|
||||||
|
String motorTemperature =str.substring(114,120);
|
||||||
|
while (motorTemperature.endsWith("0")){
|
||||||
|
motorTemperature=motorTemperature.substring(0,motorTemperature.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMotorTemperature(motorTemperature);
|
||||||
|
|
||||||
|
//motorVoltage 电机电压
|
||||||
|
String motorVoltage =str.substring(120,125);
|
||||||
|
while (motorVoltage.endsWith("0")){
|
||||||
|
motorVoltage=motorVoltage.substring(0,motorVoltage.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMotorVoltage(motorVoltage);
|
||||||
|
|
||||||
|
//motorCurrent 电机电流
|
||||||
|
String motorCurrent =str.substring(125,133);
|
||||||
|
while (motorCurrent.endsWith("0")){
|
||||||
|
motorCurrent=motorCurrent.substring(0,motorCurrent.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMotorCurrent(motorCurrent);
|
||||||
|
|
||||||
|
//remainingBattery 动力电池剩余电量SOC
|
||||||
|
BigDecimal remainingBattery = new BigDecimal(str.substring(133,138));
|
||||||
|
coupletMsgData.setRemainingBattery(remainingBattery);
|
||||||
|
|
||||||
|
//maximumFeedbackPower 当前状态允许的最大反馈功率
|
||||||
|
String maximumFeedbackPower =str.substring(139,144);
|
||||||
|
while (maximumFeedbackPower.endsWith("0")){
|
||||||
|
maximumFeedbackPower=maximumFeedbackPower.substring(0,maximumFeedbackPower.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMaximumFeedbackPower(maximumFeedbackPower);
|
||||||
|
|
||||||
|
//maximumDischargePower 当前状态允许最大放电功率
|
||||||
|
String maximumDischargePower =str.substring(145,151);
|
||||||
|
while (maximumDischargePower.endsWith("0")){
|
||||||
|
maximumDischargePower=maximumDischargePower.substring(0,maximumDischargePower.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setMaximumDischargePower(maximumDischargePower);
|
||||||
|
|
||||||
|
//selfCheckCounter BMS自检计数器
|
||||||
|
String selfCheckCounter =str.substring(151,153);
|
||||||
|
String selfCheckCounterReplace = selfCheckCounter.replace("0", "");
|
||||||
|
coupletMsgData.setSelfCheckCounter(selfCheckCounterReplace);
|
||||||
|
|
||||||
|
//totalBatteryCurrent 动力电池充放电电流
|
||||||
|
String totalBatteryCurrent =str.substring(153,158);
|
||||||
|
while (totalBatteryCurrent.endsWith("0")){
|
||||||
|
totalBatteryCurrent=totalBatteryCurrent.substring(0,totalBatteryCurrent.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setTotalBatteryCurrent(totalBatteryCurrent);
|
||||||
|
|
||||||
|
//totalBatteryVoltage 动力电池负载端总电压V3
|
||||||
|
String totalBatteryVoltage =str.substring(158,164);
|
||||||
|
while (totalBatteryVoltage.endsWith("0")){
|
||||||
|
totalBatteryVoltage=totalBatteryVoltage.substring(0,totalBatteryVoltage.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setTotalBatteryVoltage(totalBatteryVoltage);
|
||||||
|
|
||||||
|
//singleBatteryMaxVoltage 单次最大电压
|
||||||
|
String singleBatteryMaxVoltage =str.substring(164,168);
|
||||||
|
while (singleBatteryMaxVoltage.endsWith("0")){
|
||||||
|
singleBatteryMaxVoltage=singleBatteryMaxVoltage.substring(0,singleBatteryMaxVoltage.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setSingleBatteryMaxVoltage(singleBatteryMaxVoltage);
|
||||||
|
|
||||||
|
//singleBatteryMinVoltage 单体电池最低电压
|
||||||
|
String singleBatteryMinVoltage =str.substring(168,172);
|
||||||
|
while (singleBatteryMinVoltage.endsWith("0")){
|
||||||
|
singleBatteryMinVoltage=singleBatteryMinVoltage.substring(0,singleBatteryMinVoltage.length()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
coupletMsgData.setSingleBatteryMinVoltage(singleBatteryMinVoltage);
|
||||||
|
|
||||||
|
//singleBatteryMaxTemperature 单体电池最高温度
|
||||||
|
String singleBatteryMaxTemperature =str.substring(172,178);
|
||||||
|
while (singleBatteryMaxTemperature.endsWith("0")){
|
||||||
|
singleBatteryMaxTemperature=singleBatteryMaxTemperature.substring(0,singleBatteryMaxTemperature.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setSingleBatteryMaxTemperature(singleBatteryMaxTemperature);
|
||||||
|
|
||||||
|
//singleBatteryMinTemperature 单体电池最低温度
|
||||||
|
String singleBatteryMinTemperature =str.substring(178,184);
|
||||||
|
while (singleBatteryMinTemperature.endsWith("0")){
|
||||||
|
singleBatteryMinTemperature=singleBatteryMinTemperature.substring(0,singleBatteryMinTemperature.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setSingleBatteryMinTemperature(singleBatteryMinTemperature);
|
||||||
|
|
||||||
|
//availableBatteryCapacity 可用电池容量
|
||||||
|
String availableBatteryCapacity =str.substring(184,190);
|
||||||
|
while (availableBatteryCapacity.endsWith("0")){
|
||||||
|
availableBatteryCapacity=availableBatteryCapacity.substring(0,availableBatteryCapacity.length()-1);
|
||||||
|
}
|
||||||
|
coupletMsgData.setAvailableBatteryCapacity(availableBatteryCapacity);
|
||||||
|
|
||||||
|
//vehicleStatus 车辆状态
|
||||||
|
int vehicleStatus = Integer.parseInt(str.substring(190,191));
|
||||||
|
coupletMsgData.setVehicleStatus(vehicleStatus);
|
||||||
|
|
||||||
|
//chargingStatus 充电状态
|
||||||
|
int chargingStatus = Integer.parseInt(str.substring(191,192));
|
||||||
|
coupletMsgData.setChargingStatus(chargingStatus);
|
||||||
|
|
||||||
|
//operatingStatus 运行状态
|
||||||
|
int operatingStatus = Integer.parseInt(str.substring(192,193));
|
||||||
|
coupletMsgData.setOperatingStatus(operatingStatus);
|
||||||
|
|
||||||
|
//socStatus SOC
|
||||||
|
int socStatus = Integer.parseInt(str.substring(193,194));
|
||||||
|
coupletMsgData.setSocStatus(socStatus);
|
||||||
|
|
||||||
|
//chargingEnergyStorageStatus 可充电储能装置工作状态
|
||||||
|
int chargingEnergyStorageStatus = Integer.parseInt(str.substring(194,195));
|
||||||
|
coupletMsgData.setChargingEnergyStorageStatus(chargingEnergyStorageStatus);
|
||||||
|
|
||||||
|
//driveMotorStatus 驱动电机状态
|
||||||
|
int driveMotorStatus = Integer.parseInt(str.substring(195,196));
|
||||||
|
coupletMsgData.setDriveMotorStatus(driveMotorStatus);
|
||||||
|
|
||||||
|
//positionStatus 定位是否有效
|
||||||
|
int positionStatus = Integer.parseInt(str.substring(196,197));
|
||||||
|
coupletMsgData.setPositionStatus(positionStatus);
|
||||||
|
|
||||||
|
//easStatus EAS(汽车防盗系统)状态
|
||||||
|
int easStatus = Integer.parseInt(str.substring(197,198));
|
||||||
|
coupletMsgData.setEasStatus(easStatus);
|
||||||
|
|
||||||
|
//ptcStatus PTC(电动加热器)状态
|
||||||
|
int ptcStatus = Integer.parseInt(str.substring(198,199));
|
||||||
|
coupletMsgData.setPtcStatus(ptcStatus);
|
||||||
|
|
||||||
|
//epsStatus
|
||||||
|
int epsStatus = Integer.parseInt(str.substring(199,200));
|
||||||
|
coupletMsgData.setEpsStatus(epsStatus);
|
||||||
|
|
||||||
|
//absStatus EPS(电动助力系统)状态
|
||||||
|
int absStatus = Integer.parseInt(str.substring(200,201));
|
||||||
|
coupletMsgData.setAbsStatus(absStatus);
|
||||||
|
|
||||||
|
//mcuStatus MCU(电机/逆变器)状态
|
||||||
|
int mcuStatus = Integer.parseInt(str.substring(201,202));
|
||||||
|
coupletMsgData.setMcuStatus(mcuStatus);
|
||||||
|
|
||||||
|
//heatingStatus 动力电池加热状态
|
||||||
|
int heatingStatus = Integer.parseInt(str.substring(202,203));
|
||||||
|
coupletMsgData.setHeatingStatus(heatingStatus);
|
||||||
|
|
||||||
|
//batteryStatus 动力电池当前状态
|
||||||
|
int batteryStatus = Integer.parseInt(str.substring(203,204));
|
||||||
|
coupletMsgData.setBatteryStatus(batteryStatus);
|
||||||
|
|
||||||
|
//batteryInsulationStatus 动力电池保温状态
|
||||||
|
int batteryInsulationStatus = Integer.parseInt(str.substring(204,205));
|
||||||
|
coupletMsgData.setBatteryInsulationStatus(batteryInsulationStatus);
|
||||||
|
|
||||||
|
//dcdcStatus DCDC(电力交换系统)状态
|
||||||
|
int dcdcStatus = Integer.parseInt(str.substring(205,206));
|
||||||
|
coupletMsgData.setDcdcStatus(dcdcStatus);
|
||||||
|
|
||||||
|
//chgStatus CHG(充电机)状态
|
||||||
|
int chgStatus = Integer.parseInt(str.substring(206,207));
|
||||||
|
coupletMsgData.setChgStatus(chgStatus);
|
||||||
|
|
||||||
|
coupletMsgDataList.add(coupletMsgData);
|
||||||
|
|
||||||
|
return coupletMsgDataList;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.couplet.analyze.msg.service;
|
||||||
|
|
||||||
|
import com.couplet.analyze.msg.contents.MsgContent;
|
||||||
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/2
|
||||||
|
* @Description: 事件系统接口
|
||||||
|
*/
|
||||||
|
public interface IncidentService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件分析
|
||||||
|
*
|
||||||
|
* @param coupletMsgData
|
||||||
|
*/
|
||||||
|
void incident(CoupletMsgData coupletMsgData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取事件名称
|
||||||
|
* @return 事件名称
|
||||||
|
*/
|
||||||
|
String getName();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
//package com.couplet.analyze.msg.service.impl;
|
||||||
|
//
|
||||||
|
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
//import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
//import com.couplet.common.log.annotation.Log;
|
||||||
|
//import lombok.extern.log4j.Log4j2;
|
||||||
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @Author: LiJiaYao
|
||||||
|
// * @Date: 2024/4/2
|
||||||
|
// * @Description: 故障事件
|
||||||
|
// */
|
||||||
|
//@Service("breakdown")
|
||||||
|
//@Log4j2
|
||||||
|
//public class BreakdownServiceImpl implements IncidentService {
|
||||||
|
// /**
|
||||||
|
// * 故障事件
|
||||||
|
// *
|
||||||
|
// * @param coupletMsgData
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
//
|
||||||
|
// log.info("故障事件开始.....");
|
||||||
|
// log.info("故障事件结束.....");
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return 获取事件名称
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public String getName() {
|
||||||
|
// return "breakdown";
|
||||||
|
// }
|
||||||
|
//}
|
|
@ -0,0 +1,33 @@
|
||||||
|
//package com.couplet.analyze.msg.service.impl;
|
||||||
|
//
|
||||||
|
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
//import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @Author: LiJiaYao
|
||||||
|
// * @Date: 2024/4/2
|
||||||
|
// * @Description: 电子围栏事件服务实现类
|
||||||
|
// */
|
||||||
|
//@Service("electronic-fence")
|
||||||
|
//public class ElectronicFenceServiceImpl implements IncidentService {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 电子围栏事件
|
||||||
|
// *
|
||||||
|
// * @param coupletMsgData
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @return 电子围栏service 名称
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public String getName() {
|
||||||
|
// return "electronic-fence";
|
||||||
|
// }
|
||||||
|
//}
|
|
@ -0,0 +1,33 @@
|
||||||
|
//package com.couplet.analyze.msg.service.impl;
|
||||||
|
//
|
||||||
|
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
//import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @Author: LiJiaYao
|
||||||
|
// * @Date: 2024/4/2
|
||||||
|
// * @Description: 实时数据事件
|
||||||
|
// */
|
||||||
|
//@Service("real-time-data")
|
||||||
|
//public class RealTimeDataServiceImpl implements IncidentService {
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 实时数据事件
|
||||||
|
// *
|
||||||
|
// * @param coupletMsgData
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 实时数据事件
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @Override
|
||||||
|
// public String getName() {
|
||||||
|
// return "real-time-data";
|
||||||
|
// }
|
||||||
|
//}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.couplet.analyze.msg.service.impl;
|
||||||
|
|
||||||
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
import com.couplet.analyze.msg.mapper.IncidentMapper;
|
||||||
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/2
|
||||||
|
* @Description: 事件存储服务
|
||||||
|
*/
|
||||||
|
@Service("stored-event")
|
||||||
|
@Log4j2
|
||||||
|
public class StoredEventServiceImpl implements IncidentService {
|
||||||
|
@Autowired
|
||||||
|
private IncidentMapper incidentMapper;
|
||||||
|
/**
|
||||||
|
* 事件存储服务
|
||||||
|
*
|
||||||
|
* @param coupletMsgData
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
|
||||||
|
log.info("开始存储......");
|
||||||
|
incidentMapper.reportMapper(coupletMsgData);
|
||||||
|
log.info("结束存储......");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件存储服务
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "stored-event";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
com.couplet.analyze.msg.config.RabbitMQConfig
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9223
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: couplet-msg
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 121.89.211.230:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 121.89.211.230:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
rabbitmq:
|
||||||
|
host: 39.103.133.57
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
virtual-host: /
|
||||||
|
publisher-confirm-type: correlated #确认消息已发送到交换机(Exchange)
|
||||||
|
publisher-returns: true #确认消息已发送到队列(Queue)
|
||||||
|
listener:
|
||||||
|
simple:
|
||||||
|
prefetch: 1 # 每次只能获取一条,处理完成才能获取下一条
|
||||||
|
#acknowledge-mode: manual # 设置消费端手动ack确认
|
||||||
|
retry:
|
||||||
|
enabled: true # 是否支持重试
|
||||||
|
template:
|
||||||
|
# 只要消息抵达Queue,就会异步发送优先回调return firm
|
||||||
|
mandatory: true
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.couplet.analyze.msg.mapper: DEBUG
|
||||||
|
mybatis-plus:
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
|
||||||
|
# RabbitMQ配置
|
||||||
|
mq:
|
||||||
|
queueName: queue
|
||||||
|
exchangeName: exchange
|
||||||
|
routingKey: routingKey
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.couplet.analyze.msg.mapper.IncidentMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="reportMapper">
|
||||||
|
INSERT INTO `vehicle-resolver`.`resolver_report_data`
|
||||||
|
(`vin`, `create_time`, `longitude`, `latitude`,
|
||||||
|
`speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`,
|
||||||
|
`acceleration_pedal`, `fuel_consumption_rate`,
|
||||||
|
`motor_controller_temperature`, `motor_speed`,
|
||||||
|
`motor_torque`, `motor_temperature`, `motor_voltage`,
|
||||||
|
`motor_current`, `remaining_battery`, `maximum_feedback_power`,
|
||||||
|
`maximum_discharge_power`, `self_check_counter`,
|
||||||
|
`total_battery_current`, `total_battery_voltage`,
|
||||||
|
`single_battery_max_voltage`, `single_battery_min_voltage`,
|
||||||
|
`single_battery_max_temperature`, `single_battery_min_temperature`,
|
||||||
|
`available_battery_capacity`, `vehicle_status`, `charging_status`,
|
||||||
|
`operatingStatus`, `soc_status`, `charging_energy_storage_status`,
|
||||||
|
`drive_motor_status`, `position_status`, `eas_status`, `ptc_status`,
|
||||||
|
`eps_status`, `abs_status`, `mcu_status`, `heating_status`, `battery_status`,
|
||||||
|
`battery_insulation_status`, `dcdc_status`, `chg_status`, `brake_pedal`)
|
||||||
|
VALUES (#{vin},
|
||||||
|
#{createTime},
|
||||||
|
#{longitude},
|
||||||
|
#{latitude},
|
||||||
|
#{speed},
|
||||||
|
#{mileage},
|
||||||
|
#{voltage},
|
||||||
|
#{current},
|
||||||
|
#{resistance},
|
||||||
|
#{gear},
|
||||||
|
#{accelerationPedal},
|
||||||
|
#{fuelConsumptionRate},
|
||||||
|
#{motorControllerTemperature},
|
||||||
|
#{motorSpeed},
|
||||||
|
#{motorTorque},
|
||||||
|
#{motorTemperature},
|
||||||
|
#{motorVoltage},
|
||||||
|
#{motorCurrent},
|
||||||
|
#{remainingBattery},
|
||||||
|
#{maximumFeedbackPower},
|
||||||
|
#{maximumDischargePower},
|
||||||
|
#{selfCheckCounter},
|
||||||
|
#{totalBatteryCurrent},
|
||||||
|
#{totalBatteryVoltage},
|
||||||
|
#{singleBatteryMaxVoltage},
|
||||||
|
#{singleBatteryMinVoltage},
|
||||||
|
#{singleBatteryMaxTemperature},
|
||||||
|
#{singleBatteryMinTemperature},
|
||||||
|
#{availableBatteryCapacity},
|
||||||
|
#{vehicleStatus},
|
||||||
|
#{chargingStatus},
|
||||||
|
#{operatingStatus},
|
||||||
|
#{socStatus},
|
||||||
|
#{chargingEnergyStorageStatus},
|
||||||
|
#{driveMotorStatus},
|
||||||
|
#{positionStatus},
|
||||||
|
#{easStatus},
|
||||||
|
#{ptcStatus},
|
||||||
|
#{epsStatus},
|
||||||
|
#{absStatus},
|
||||||
|
#{mcuStatus},
|
||||||
|
#{heatingStatus},
|
||||||
|
#{batteryStatus},
|
||||||
|
#{batteryInsulationStatus},
|
||||||
|
#{dcdcStatus},
|
||||||
|
#{chgStatus},
|
||||||
|
#{brakePedal}
|
||||||
|
);
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,92 @@
|
||||||
|
package com.couplet.msg;
|
||||||
|
|
||||||
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
import com.couplet.common.core.utils.SpringUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/2
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
public class dome {
|
||||||
|
private static final List<String> msgList = new ArrayList<>(){{
|
||||||
|
add("7E 56 49 4e 31 32 33 34 35 36 37 38 39 44 49 4a 45 34 31 37 31 31 37 36 34 31 30 34 35 30 36 31 31 36 2e 36 36 34 33 38 30 30 33 39 2e 35 33 31 39 39 30 30 37 32 2e 30 30 30 33 31 2e 33 37 36 30 30 30 30 30 32 32 30 30 30 30 32 32 30 30 30 38 35 32 30 30 30 30 30 30 44 30 30 38 30 39 2e 36 30 30 39 34 30 30 30 30 35 38 39 30 36 36 37 39 30 39 33 30 30 30 30 32 30 33 30 30 32 30 33 30 30 30 30 30 34 34 32 38 32 2e 35 35 30 30 30 30 31 34 30 30 30 30 38 30 37 30 30 30 30 37 34 34 30 30 30 33 30 30 30 34 30 30 30 39 35 30 30 30 30 35 38 30 30 30 30 35 34 30 30 30 30 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 24 7E");
|
||||||
|
}};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件列表
|
||||||
|
*/
|
||||||
|
static List<String> list=new ArrayList<>(){
|
||||||
|
{
|
||||||
|
add("breakdown");
|
||||||
|
add("electronic-fence");
|
||||||
|
add("real-time-data");
|
||||||
|
add("stored-event");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static IncidentService incidentService;
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// 去头去尾
|
||||||
|
for (String string : msgList) {
|
||||||
|
String substring = string.substring(2, string.length() - 2);
|
||||||
|
System.out.println("去头去尾字符串:"+ substring);
|
||||||
|
|
||||||
|
String hexStringWithoutSpaces = substring.replaceAll("\\s+", "");
|
||||||
|
String asciiString = hexToString(hexStringWithoutSpaces);
|
||||||
|
System.out.println("16进制解析后的数据:"+asciiString);
|
||||||
|
// //截取前17位
|
||||||
|
String substring1 = asciiString.substring(0, 17);
|
||||||
|
System.out.println("VIN:"+substring1);
|
||||||
|
String substring2 = asciiString.substring(17, 30);
|
||||||
|
System.out.println("时间戳:"+substring2);
|
||||||
|
String substring3 = asciiString.substring(30, 40);
|
||||||
|
System.out.println("经度:" +substring3);
|
||||||
|
String substring4 = asciiString.substring(41, 50);
|
||||||
|
System.out.println("纬度:"+ substring4);
|
||||||
|
String substring5 = asciiString.substring(51, 56);
|
||||||
|
System.out.println("车速:"+ substring5);
|
||||||
|
String substring6 = asciiString.substring(57, 67);
|
||||||
|
System.out.println("总里程:"+ substring6);
|
||||||
|
String substring7 = asciiString.substring(68, 73);
|
||||||
|
System.out.println("总电压:"+ substring7);
|
||||||
|
String pattern = "(.{17})(.{10})(.{9})(.{8})(.{2})";
|
||||||
|
Pattern compile = Pattern.compile(pattern);
|
||||||
|
Matcher matcher = compile.matcher(asciiString);
|
||||||
|
if (matcher.find()) {
|
||||||
|
for (int i = 1; i < matcher.groupCount(); i++) {
|
||||||
|
System.out.println("Group "+ i + ":" + matcher.group(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CoupletMsgData coupletMsgData = new CoupletMsgData();
|
||||||
|
List<CoupletMsgData> objects = msgList.stream().map(CoupletMsgData::new).toList();
|
||||||
|
|
||||||
|
for (CoupletMsgData object : objects) {
|
||||||
|
//测试所有的事件
|
||||||
|
for (String s : list) {
|
||||||
|
IncidentService bean = SpringUtils.getBean(s);
|
||||||
|
|
||||||
|
incidentService.incident(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public static String hexToString(String hexString) {
|
||||||
|
StringBuilder asciiString = new StringBuilder();
|
||||||
|
for (int i = 0; i < hexString.length(); i += 2) {
|
||||||
|
String hex = hexString.substring(i, i + 2);
|
||||||
|
int decimal = Integer.parseInt(hex, 16);
|
||||||
|
asciiString.append((char) decimal);
|
||||||
|
}
|
||||||
|
return asciiString.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,7 +9,11 @@
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-trouble</artifactId>
|
<artifactId>couplet-analyze</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>couplet-analyze-msg</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@ -80,6 +84,10 @@
|
||||||
<artifactId>couplet-common-swagger</artifactId>
|
<artifactId>couplet-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
<dependency>
|
||||||
|
<groupId>org.springframework.kafka</groupId>
|
||||||
|
<artifactId>spring-kafka</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
|
@ -5,25 +5,22 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
<artifactId>couplet-modules</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-server</artifactId>
|
<artifactId>couplet-business</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
<artifactId>couplet-common-business</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
@ -48,7 +45,6 @@
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- Swagger UI -->
|
<!-- Swagger UI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
@ -85,10 +81,6 @@
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-common-swagger</artifactId>
|
<artifactId>couplet-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-system</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -117,5 +109,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.server;
|
package com.couplet.business.server;
|
||||||
|
|
||||||
import com.couplet.common.security.annotation.EnableCustomConfig;
|
import com.couplet.common.security.annotation.EnableCustomConfig;
|
||||||
import com.couplet.common.security.annotation.EnableMyFeignClients;
|
import com.couplet.common.security.annotation.EnableMyFeignClients;
|
||||||
|
@ -7,16 +7,17 @@ import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统模块
|
* @Author: LiJiaYao
|
||||||
*
|
* @Date: 2024/4/3
|
||||||
* @author couplet
|
* @Description: 业务实现启动类
|
||||||
*/
|
*/
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients(basePackages = ("com.couplet"))
|
||||||
@SpringBootApplication
|
@SpringBootApplication(scanBasePackages = {"com.couplet"})
|
||||||
public class CoupletElectronicFenceApplication {
|
public class CoupletBusinessApplication {
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
SpringApplication.run(CoupletElectronicFenceApplication.class, args);
|
SpringApplication.run(CoupletBusinessApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.EmployeeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.common.system.domain.SysUser;
|
import com.couplet.common.system.domain.SysUser;
|
||||||
import com.couplet.server.service.EmployeeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package com.couplet.map.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.FenceService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Fence;
|
||||||
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.map.common.domain.Fence;
|
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.service.FenceService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -52,9 +52,9 @@ public class FenceController extends BaseController {
|
||||||
@RequiresPermissions("couplet:fence:fenceAdd")
|
@RequiresPermissions("couplet:fence:fenceAdd")
|
||||||
@Log(title = "电子围栏新增",businessType = BusinessType.INSERT)
|
@Log(title = "电子围栏新增",businessType = BusinessType.INSERT)
|
||||||
public Result<?> fenceInsert(HttpServletRequest request, @RequestBody FenceRequest fenceRequest){
|
public Result<?> fenceInsert(HttpServletRequest request, @RequestBody FenceRequest fenceRequest){
|
||||||
if (!fenceService.checkFenceKeyUnique(fenceRequest.getFenceName())) {
|
// if (!fenceService.checkFenceKeyUnique(fenceRequest.getFenceName())) {
|
||||||
return error("新增参数'" + fenceRequest.getFenceName() + "'失败,参数键名已存在");
|
// return error("新增参数'" + fenceRequest.getFenceName() + "'失败,参数键名已存在");
|
||||||
}
|
// }
|
||||||
fenceService.fenceInsert(request,fenceRequest);
|
fenceService.fenceInsert(request,fenceRequest);
|
||||||
return Result.success("新增成功");
|
return Result.success("新增成功");
|
||||||
}
|
}
|
|
@ -1,19 +1,17 @@
|
||||||
package com.couplet.map.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.LogoService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.map.common.domain.Logo;
|
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.service.LogoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.*;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.ManageServer;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import com.couplet.server.service.ManageServer;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package com.couplet.trouble.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.SysTroubleService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
|
||||||
import com.couplet.trouble.service.SysTroubleService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
|
@ -1,16 +1,15 @@
|
||||||
package com.couplet.vehicle.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Vehicle;
|
||||||
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
|
||||||
import com.couplet.vehicle.service.VehicleService;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -61,7 +60,7 @@ public class VehicleController extends BaseController {
|
||||||
@RequiresPermissions("couplet:vehicle:deleteById")
|
@RequiresPermissions("couplet:vehicle:deleteById")
|
||||||
@GetMapping("/deleteById/{vehicleId}")
|
@GetMapping("/deleteById/{vehicleId}")
|
||||||
@Log(title = "删除车辆", businessType = BusinessType.DELETE)
|
@Log(title = "删除车辆", businessType = BusinessType.DELETE)
|
||||||
public Result deleteById(@PathVariable Long vehicleId) {
|
public Result<String> deleteById(@PathVariable Long vehicleId) {
|
||||||
String result = vehicleService.deleteById(vehicleId);
|
String result = vehicleService.deleteById(vehicleId);
|
||||||
|
|
||||||
return Result.success(result);
|
return Result.success(result);
|
||||||
|
@ -78,7 +77,7 @@ public class VehicleController extends BaseController {
|
||||||
@RequiresPermissions("couplet:vehicle:editById")
|
@RequiresPermissions("couplet:vehicle:editById")
|
||||||
@PostMapping("/editById")
|
@PostMapping("/editById")
|
||||||
@Log(title = "编辑车辆", businessType = BusinessType.UPDATE)
|
@Log(title = "编辑车辆", businessType = BusinessType.UPDATE)
|
||||||
public Result editById(@RequestBody VehicleEditParams editParams) {
|
public Result<String> editById(@RequestBody VehicleEditParams editParams) {
|
||||||
|
|
||||||
String result = vehicleService.editById(editParams);
|
String result = vehicleService.editById(editParams);
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ public class VehicleController extends BaseController {
|
||||||
@RequiresPermissions("couplet:vehicle:insert")
|
@RequiresPermissions("couplet:vehicle:insert")
|
||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
@Log(title = "新增车辆", businessType = BusinessType.INSERT)
|
@Log(title = "新增车辆", businessType = BusinessType.INSERT)
|
||||||
public Result insert(@RequestBody @Validated VehicleInsertParams insertParams) {
|
public Result<String> insert(@RequestBody @Validated VehicleInsertParams insertParams) {
|
||||||
System.out.println(insertParams);
|
System.out.println(insertParams);
|
||||||
String result = vehicleService.insert(insertParams);
|
String result = vehicleService.insert(insertParams);
|
||||||
|
|
||||||
|
@ -112,7 +111,7 @@ public class VehicleController extends BaseController {
|
||||||
**/
|
**/
|
||||||
@RequiresPermissions("couplet:vehicle:list")
|
@RequiresPermissions("couplet:vehicle:list")
|
||||||
@GetMapping("/getBindLogoById/{vehicleId}")
|
@GetMapping("/getBindLogoById/{vehicleId}")
|
||||||
public Result getBindLogoById(@PathVariable("vehicleId") Long vehicleId) {
|
public Result<List<Long>> getBindLogoById(@PathVariable("vehicleId") Long vehicleId) {
|
||||||
|
|
||||||
List<Long> bindLogoById = vehicleService.getBindLogoById(vehicleId);
|
List<Long> bindLogoById = vehicleService.getBindLogoById(vehicleId);
|
||||||
|
|
||||||
|
@ -121,61 +120,17 @@ public class VehicleController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @param null:
|
* @Author: LiuYunHu
|
||||||
* @return null
|
* @Date: 2024/4/2 15:35
|
||||||
* @author 付凡芮
|
* @Description: 通过vin码查询车辆
|
||||||
* @description 根据员工id查询员工下有哪些车
|
* @Param: [vin]
|
||||||
* @date
|
* @Return: com.couplet.common.core.domain.Result<java.util.List<com.couplet.vehicle.domain.Vehicle>>
|
||||||
*/
|
**/
|
||||||
@PostMapping("UserUnderTheVehicle/{userId}")
|
@GetMapping("/findByVIN/{vin}")
|
||||||
public Result<List<Vehicle>> UserUnderTheVehicleList(@PathVariable Long userId){
|
public Result<List<Vehicle>> findByVIN(@PathVariable("vin") String vin) {
|
||||||
List<Vehicle> userVehicleList = vehicleService.UserUnderTheVehicleList(userId);
|
List<Vehicle> list = vehicleService.findByVIN(vin);
|
||||||
Result<List<Vehicle>> success = Result.success(userVehicleList);
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return Result.success(list);
|
||||||
/*
|
|
||||||
* @param null:
|
|
||||||
* @return null
|
|
||||||
* @author 付凡芮
|
|
||||||
* @description 删除员工所管理的车辆
|
|
||||||
* @date
|
|
||||||
*/
|
|
||||||
@DeleteMapping("/{middleId}")
|
|
||||||
public Result<Integer> deleteVehicle(@PathVariable Long middleId){
|
|
||||||
Integer remove = vehicleService.deleteVehicle(middleId);
|
|
||||||
return Result.success(remove);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @param null:
|
|
||||||
* @return null
|
|
||||||
* @author 付凡芮
|
|
||||||
* @description 添加员工车辆
|
|
||||||
* @date
|
|
||||||
*/
|
|
||||||
@PostMapping
|
|
||||||
public Result<Integer> addVehicle(@RequestBody VehicleMiddle vehicleMiddle){
|
|
||||||
Integer i = vehicleService.addVehicle(vehicleMiddle);
|
|
||||||
return Result.success(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @param null:
|
|
||||||
* @return null
|
|
||||||
* @author 付凡芮
|
|
||||||
* @description 车辆列表查询
|
|
||||||
* @date
|
|
||||||
*/
|
|
||||||
@PostMapping("vehicleAll")
|
|
||||||
public Result<List<Vehicle>> VehicleManageList(){
|
|
||||||
List<Vehicle> vehicleAll = vehicleService.vehicleAll();
|
|
||||||
return Result.success(vehicleAll);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleManageService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.server.service.VehicleManageService;
|
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.vehicle.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.VehicleType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
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;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
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,10 +1,11 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,9 +1,7 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.map.common.domain.Logo;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.trouble.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -27,7 +27,7 @@ public interface FenceService extends IService<Fence> {
|
||||||
*
|
*
|
||||||
* @param fenceRequest
|
* @param fenceRequest
|
||||||
*/
|
*/
|
||||||
void fenceInsert(HttpServletRequest request,FenceRequest fenceRequest);
|
void fenceInsert(HttpServletRequest request, FenceRequest fenceRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除电子围栏
|
* 删除电子围栏
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Logo;
|
import com.couplet.common.domain.Logo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package com.couplet.trouble.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ public interface VehicleService extends IService<Vehicle> {
|
||||||
|
|
||||||
List<Long> getBindLogoById(Long vehicleId);
|
List<Long> getBindLogoById(Long vehicleId);
|
||||||
|
|
||||||
|
List<Vehicle> findByVIN(String vin);
|
||||||
|
|
||||||
List<Vehicle> UserUnderTheVehicleList(Long userId);
|
List<Vehicle> UserUnderTheVehicleList(Long userId);
|
||||||
|
|
||||||
Integer deleteVehicle(Long middleId);
|
Integer deleteVehicle(Long middleId);
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.common.domain.VehicleType;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.EmployeeService;
|
||||||
import com.couplet.common.core.constant.SecurityConstants;
|
import com.couplet.common.core.constant.SecurityConstants;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
||||||
|
@ -8,7 +9,6 @@ import com.couplet.common.system.domain.LoginUser;
|
||||||
import com.couplet.common.system.domain.SysUser;
|
import com.couplet.common.system.domain.SysUser;
|
||||||
import com.couplet.common.system.remote.RemoteEmployeeService;
|
import com.couplet.common.system.remote.RemoteEmployeeService;
|
||||||
import com.couplet.common.system.remote.RemoteUserService;
|
import com.couplet.common.system.remote.RemoteUserService;
|
||||||
import com.couplet.server.service.EmployeeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||||
* @date 2024/3/31 19:42
|
* @date 2024/3/31 19:42
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class EmployeeServiceImpl implements EmployeeService{
|
public class EmployeeServiceImpl implements EmployeeService {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.FenAndLogoMapper;
|
||||||
import com.couplet.map.server.mapper.FenAndLogoMapper;
|
import com.couplet.business.server.service.FenAndLogoService;
|
||||||
import com.couplet.map.server.service.FenAndLogoService;
|
import com.couplet.common.domain.Fence;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -28,7 +28,11 @@ public class FenAndLogoServiceImpl extends ServiceImpl<FenAndLogoMapper, Fence>
|
||||||
@Autowired
|
@Autowired
|
||||||
private StringRedisTemplate redisTemplate;
|
private StringRedisTemplate redisTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务实现:添加中间表
|
||||||
|
* @param fenceId
|
||||||
|
* @param logoIds
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addBach(Integer fenceId, String[] logoIds) {
|
public void addBach(Integer fenceId, String[] logoIds) {
|
||||||
fenAndLogoMapper.addBach(fenceId,logoIds);
|
fenAndLogoMapper.addBach(fenceId,logoIds);
|
|
@ -1,13 +1,13 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.FenceMapper;
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.business.server.service.FenAndLogoService;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.business.server.service.FenceService;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.server.mapper.FenceMapper;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.server.service.FenAndLogoService;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
import com.couplet.map.server.service.FenceService;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -52,14 +52,22 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务实现:添加围栏
|
||||||
|
* @param request
|
||||||
|
* @param fenceRequest
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void fenceInsert(HttpServletRequest request,FenceRequest fenceRequest) {
|
public void fenceInsert(HttpServletRequest request, FenceRequest fenceRequest) {
|
||||||
|
|
||||||
|
//先添加围栏
|
||||||
int a= fenceMapper.insertFence(fenceRequest);
|
int a= fenceMapper.insertFence(fenceRequest);
|
||||||
String[] logoIds = fenceRequest.getLogoIds();
|
String[] logoIds = fenceRequest.getLogoIds();
|
||||||
String[] parts = new String[0];
|
String[] parts = new String[0];
|
||||||
for (String logoId : logoIds) {
|
for (String logoId : logoIds) {
|
||||||
|
//把前台传入的字符串分割成数组
|
||||||
parts = logoId.split(",");
|
parts = logoId.split(",");
|
||||||
|
//再添加围栏和标识中间表
|
||||||
fenAndLogoService.addBach(fenceRequest.getFenceId(),parts);
|
fenAndLogoService.addBach(fenceRequest.getFenceId(),parts);
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,19 +1,14 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.LogoMapper;
|
||||||
import com.couplet.map.common.domain.Logo;
|
import com.couplet.business.server.service.LogoService;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.mapper.LogoMapper;
|
|
||||||
import com.couplet.map.server.service.LogoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,18 +1,16 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.couplet.common.core.constant.SecurityConstants;
|
import com.couplet.business.server.service.ManageServer;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.utils.StringUtils;
|
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.security.utils.SecurityUtils;
|
||||||
import com.couplet.common.system.domain.LoginUser;
|
import com.couplet.common.system.domain.LoginUser;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import com.couplet.common.system.remote.RemoteDeptService;
|
import com.couplet.common.system.remote.RemoteDeptService;
|
||||||
import com.couplet.common.system.remote.RemoteUserService;
|
import com.couplet.common.system.remote.RemoteUserService;
|
||||||
import com.couplet.server.service.ManageServer;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +20,7 @@ import java.util.List;
|
||||||
* @date 2024/3/27 15:34
|
* @date 2024/3/27 15:34
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ManageServiceImpl implements ManageServer{
|
public class ManageServiceImpl implements ManageServer {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RemoteDeptService remoteDeptService;
|
private RemoteDeptService remoteDeptService;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.couplet.trouble.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.couplet.business.server.mapper.SysTroubleMapper;
|
||||||
|
import com.couplet.business.server.service.SysTroubleService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import com.couplet.trouble.mapper.SysTroubleMapper;
|
|
||||||
import com.couplet.trouble.service.SysTroubleService;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, CoupletTroubleCode> implements SysTroubleService{
|
public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, CoupletTroubleCode> implements SysTroubleService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysTroubleMapper sysTroubleMapper;
|
private SysTroubleMapper sysTroubleMapper;
|
|
@ -1,14 +1,13 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.business.server.mapper.VehicleAndLogoMapper;
|
||||||
import com.couplet.vehicle.mapper.VehicleAndLogoMapper;
|
import com.couplet.business.server.service.VehicleAndLogoService;
|
||||||
import com.couplet.vehicle.service.VehicleAndLogoService;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleManageService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
|
import com.couplet.common.domain.Vehicle;
|
||||||
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.security.utils.SecurityUtils;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.remote.RemoteVehicleService;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
|
||||||
import com.couplet.common.system.remote.RemoteVehicleService;
|
|
||||||
import com.couplet.server.service.VehicleManageService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
* @date 2024/4/2 9:05
|
* @date 2024/4/2 9:05
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class VehicleManageServiceImpl implements VehicleManageService{
|
public class VehicleManageServiceImpl implements VehicleManageService {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
|
@ -1,22 +1,21 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.couplet.business.server.mapper.VehicleMapper;
|
||||||
|
import com.couplet.business.server.service.VehicleAndLogoService;
|
||||||
|
import com.couplet.business.server.service.VehicleService;
|
||||||
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.utils.StringUtils;
|
import com.couplet.common.core.utils.StringUtils;
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.core.utils.uuid.UUID;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
import com.couplet.vehicle.mapper.VehicleMapper;
|
|
||||||
import com.couplet.vehicle.service.VehicleAndLogoService;
|
|
||||||
import com.couplet.vehicle.service.VehicleService;
|
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
|
||||||
import com.couplet.vehicle.utils.SnowflakeIdGenerator;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -189,10 +188,24 @@ public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//UUID生成17位随机字符串
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
String string = uuid.toString();
|
||||||
|
String s = string.replaceAll("-", "");
|
||||||
|
String vin = s.substring(0, 17);
|
||||||
|
// System.out.println(vin+" "+vin.length());
|
||||||
|
|
||||||
|
/*
|
||||||
//雪花算法生成随机数
|
//雪花算法生成随机数
|
||||||
SnowflakeIdGenerator idGenerator = new SnowflakeIdGenerator(1, 1);
|
SnowflakeIdGenerator idGenerator = new SnowflakeIdGenerator(1, 1);
|
||||||
long randomId = idGenerator.nextId();
|
long randomId = idGenerator.nextId();
|
||||||
String vin = "VIN" + randomId;
|
//转成字符串,便于切割
|
||||||
|
String vin = "" + randomId;
|
||||||
|
|
||||||
|
//切割,只留后17位
|
||||||
|
vin = vin.substring(vin.length() - 17);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//创建入参对象
|
//创建入参对象
|
||||||
|
@ -269,4 +282,18 @@ public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> impl
|
||||||
return vehicleMapper.vehicleAll();
|
return vehicleMapper.vehicleAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Vehicle> findByVIN(String vin) {
|
||||||
|
|
||||||
|
//创建查询条件包装器
|
||||||
|
LambdaQueryWrapper<Vehicle> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
if (!StringUtils.isEmpty(vin)) {
|
||||||
|
queryWrapper.eq(Vehicle::getVin, vin);
|
||||||
|
}
|
||||||
|
|
||||||
|
//执行查询
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.business.server.mapper.VehicleTypeMapper;
|
||||||
import com.couplet.vehicle.mapper.VehicleTypeMapper;
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
|
@ -6,7 +6,7 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-electronic-fence
|
name: couplet-business
|
||||||
|
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
|
@ -16,11 +16,9 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.map.server.mapper.FenAndLogoMapper">
|
<mapper namespace="com.couplet.business.server.mapper.FenAndLogoMapper">
|
||||||
|
|
||||||
<resultMap id="map" type="com.couplet.map.common.domain.Fence">
|
<resultMap id="map" type="com.couplet.common.domain.Fence">
|
||||||
<id property="fenceId" column="fence_id"/>
|
<id property="fenceId" column="fence_id"/>
|
||||||
<result property="fenceName" column="fence_name"/>
|
<result property="fenceName" column="fence_name"/>
|
||||||
<result property="fenceDescription" column="fence_description"/>
|
<result property="fenceDescription" column="fence_description"/>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<result property="isDelete" column="is_delete" />
|
<result property="isDelete" column="is_delete" />
|
||||||
<result property="maintainerName" column="maintainer_name" />
|
<result property="maintainerName" column="maintainer_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="logoMap" type="com.couplet.map.common.domain.Logo">
|
<resultMap id="logoMap" type="com.couplet.common.domain.Logo">
|
||||||
<id property="logoId" column="logo_id"/>
|
<id property="logoId" column="logo_id"/>
|
||||||
<result property="logoName" column="logo_name" />
|
<result property="logoName" column="logo_name" />
|
||||||
</resultMap>
|
</resultMap>
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.map.server.mapper.FenceMapper">
|
<mapper namespace="com.couplet.business.server.mapper.FenceMapper">
|
||||||
|
|
||||||
<resultMap id="map" type="com.couplet.map.common.domain.Fence">
|
<resultMap id="map" type="com.couplet.common.domain.Fence">
|
||||||
<id property="fenceId" column="fence_id"/>
|
<id property="fenceId" column="fence_id"/>
|
||||||
<result property="fenceName" column="fence_name"/>
|
<result property="fenceName" column="fence_name"/>
|
||||||
<result property="fenceDescription" column="fence_description"/>
|
<result property="fenceDescription" column="fence_description"/>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<result property="isDelete" column="is_delete" />
|
<result property="isDelete" column="is_delete" />
|
||||||
<result property="maintainerName" column="maintainer_name" />
|
<result property="maintainerName" column="maintainer_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="logoMap" type="com.couplet.map.common.domain.Logo">
|
<resultMap id="logoMap" type="com.couplet.common.domain.Logo">
|
||||||
<id property="logoId" column="logo_id"/>
|
<id property="logoId" column="logo_id"/>
|
||||||
<result property="logoName" column="logo_name" />
|
<result property="logoName" column="logo_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
alarm_status
|
alarm_status
|
||||||
FROM couplet_fence_info
|
FROM couplet_fence_info
|
||||||
</sql>
|
</sql>
|
||||||
<insert id="insertFence" parameterType="com.couplet.map.common.domain.request.FenceRequest" keyProperty="fenceId"
|
<insert id="insertFence" parameterType="com.couplet.common.domain.request.FenceRequest" keyProperty="fenceId"
|
||||||
useGeneratedKeys="true">
|
useGeneratedKeys="true">
|
||||||
INSERT INTO `couplet-cloud`.`couplet_fence_info`
|
INSERT INTO `couplet-cloud`.`couplet_fence_info`
|
||||||
(`fence_name`, `fence_longitude_latitude`, `fence_description`, `is_delete`, `fence_state`, `create_time`,
|
(`fence_name`, `fence_longitude_latitude`, `fence_description`, `is_delete`, `fence_state`, `create_time`,
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="changeFence" parameterType="com.couplet.map.common.domain.request.FenceUpdateRequest">
|
<update id="changeFence" parameterType="com.couplet.common.domain.request.FenceUpdateRequest">
|
||||||
|
|
||||||
UPDATE `couplet-cloud`.`couplet_fence_info`
|
UPDATE `couplet-cloud`.`couplet_fence_info`
|
||||||
SET `fence_name` = #{fenceName},
|
SET `fence_name` = #{fenceName},
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
delete from couplet_fence_info where fence_id = #{fenceId}
|
delete from couplet_fence_info where fence_id = #{fenceId}
|
||||||
</delete>
|
</delete>
|
||||||
<select id="pageQuery" resultMap="map"
|
<select id="pageQuery" resultMap="map"
|
||||||
parameterType="com.couplet.map.common.domain.request.FenceConfig">
|
parameterType="com.couplet.common.domain.request.FenceConfig">
|
||||||
<include refid="selectFence"></include>
|
<include refid="selectFence"></include>
|
||||||
<where>
|
<where>
|
||||||
<if test="fenceName!=null and fenceName!='' ">
|
<if test="fenceName!=null and fenceName!='' ">
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.couplet.business.server.mapper.SysTroubleMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.couplet.common.domain.CoupletTroubleCode" id="SysTroubleResult">
|
||||||
|
<id property="troubleId" column="trouble_id"/>
|
||||||
|
<result property="troubleCode" column="trouble_code"/>
|
||||||
|
<result property="troubleValue" column="trouble_value"/>
|
||||||
|
<result property="troublePosition" column="trouble_position"/>
|
||||||
|
<result property="troubleTag" column="trouble_tag"/>
|
||||||
|
<result property="typeId" column="type_id"/>
|
||||||
|
<result property="gradeId" column="grade_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTroubleVo">
|
||||||
|
select t.*,g.grade_name,y.type_name from couplet_trouble_code t
|
||||||
|
LEFT JOIN couplet_trouble_grade g on t.grade_id = g.grade_id
|
||||||
|
LEFT JOIN couplet_trouble_type y on t.type_id= y.type_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTroubleList" parameterType="com.couplet.business.server.mapper.SysTroubleMapper" resultMap="SysTroubleResult">
|
||||||
|
<include refid="selectTroubleVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="troubleCode != null and troubleCode != ''">
|
||||||
|
AND trouble_code = #{troubleCode}
|
||||||
|
</if>
|
||||||
|
<if test="troublePosition != null and troublePosition != ''">
|
||||||
|
AND trouble_position like concat('%', #{troublePosition}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectTroubleListByType" resultType="com.couplet.common.domain.CoupletTroubleType">
|
||||||
|
select * from couplet_trouble_type
|
||||||
|
</select>
|
||||||
|
<select id="selectTroubleListByGrade" resultType="com.couplet.common.domain.CoupletTroubleGrade">
|
||||||
|
select * from couplet_trouble_grade
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.vehicle.mapper.VehicleAndLogoMapper">
|
<mapper namespace="com.couplet.business.server.mapper.VehicleAndLogoMapper">
|
||||||
|
|
||||||
|
|
||||||
<insert id="vehicleBindLogo">
|
<insert id="vehicleBindLogo">
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.vehicle.mapper.VehicleMapper">
|
<mapper namespace="com.couplet.business.server.mapper.VehicleMapper">
|
||||||
|
|
||||||
|
|
||||||
<sql id="selectMiddleUserOrVehicle">
|
<sql id="selectMiddleUserOrVehicle">
|
||||||
|
@ -51,13 +51,13 @@
|
||||||
where middle_id = #{middleId}
|
where middle_id = #{middleId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="UserUnderTheVehicleList" resultType="com.couplet.vehicle.domain.Vehicle">
|
<select id="UserUnderTheVehicleList" resultType="com.couplet.common.domain.Vehicle">
|
||||||
<include refid="selectMiddleUserOrVehicle"/>
|
<include refid="selectMiddleUserOrVehicle"/>
|
||||||
<if test="userId!=null">
|
<if test="userId!=null">
|
||||||
AND m.user_id = #{userId}
|
AND m.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="vehicleAll" resultType="com.couplet.vehicle.domain.Vehicle">
|
<select id="vehicleAll" resultType="com.couplet.common.domain.Vehicle">
|
||||||
<include refid="selectVehicle"/>
|
<include refid="selectVehicle"/>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.couplet.business.server.mapper.VehicleTypeMapper">
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
couplet-electronic-fence-common
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<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.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,29 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-remote</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.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,30 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-modules</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>couplet-electronic-fence-server</module>
|
|
||||||
<module>couplet-electronic-fence-common</module>
|
|
||||||
<module>couplet-electronic-fence-remote</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue