Merge branch 'server_five' of https://gitea.qinmian.online/five-groups/five-groups-couplet into server_five_liuyunhu
# Conflicts: # couplet-modules/pom.xmlserver_five_liuyunhu
commit
c884fc9a19
|
@ -4,6 +4,8 @@ server:
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-auth
|
name: couplet-auth
|
||||||
|
@ -15,15 +17,11 @@ 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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
main:
|
|
||||||
allow-bean-definition-overriding: true
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.couplet.common.core.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongZl
|
||||||
|
* @description: 列表返回结果集
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PageResult<T> implements Serializable {
|
||||||
|
/**
|
||||||
|
* 总条数
|
||||||
|
*/
|
||||||
|
private long total;
|
||||||
|
/**
|
||||||
|
* 结果集合
|
||||||
|
*/
|
||||||
|
private List<T> list;
|
||||||
|
public PageResult() {
|
||||||
|
}
|
||||||
|
public PageResult(long total, List<T> list) {
|
||||||
|
this.total = total;
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
public static <T> PageResult<T> toPageResult(long total, List<T> list){
|
||||||
|
return new PageResult(total , list);
|
||||||
|
}
|
||||||
|
public static <T> Result<PageResult<T>> toResult(long total, List<T> list){
|
||||||
|
return Result.success(PageResult.toPageResult(total,list));
|
||||||
|
}
|
||||||
|
}
|
|
@ -40,6 +40,10 @@ public class SysDept extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 祖级列表
|
* 祖级列表
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,11 +15,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,8 +14,12 @@ 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.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
||||||
|
@ -37,6 +41,8 @@ public class Fence extends BaseEntity{
|
||||||
/**
|
/**
|
||||||
* 围栏名称
|
* 围栏名称
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@NotEmpty(message = "围栏名称不能为空")
|
||||||
private String fenceName;
|
private String fenceName;
|
||||||
/**
|
/**
|
||||||
* 围栏经纬度
|
* 围栏经纬度
|
||||||
|
@ -45,6 +51,7 @@ public class Fence extends BaseEntity{
|
||||||
/**
|
/**
|
||||||
* 围栏描述
|
* 围栏描述
|
||||||
*/
|
*/
|
||||||
|
@NotEmpty(message = "围栏描述不能为空")
|
||||||
private String fenceDescription;
|
private String fenceDescription;
|
||||||
/**
|
/**
|
||||||
* 是否删除
|
* 是否删除
|
||||||
|
@ -66,15 +73,15 @@ public class Fence extends BaseEntity{
|
||||||
@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 updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
@NotEmpty(message = "创建人不能为空")
|
||||||
private String createName;
|
private String createName;
|
||||||
/**
|
/**
|
||||||
* 维护人
|
* 维护人
|
||||||
*/
|
*/
|
||||||
|
@NotEmpty(message = "维护人不能为空")
|
||||||
private String maintainerName;
|
private String maintainerName;
|
||||||
/**
|
/**
|
||||||
* 告警状态
|
* 告警状态
|
||||||
|
@ -86,7 +93,7 @@ public class Fence extends BaseEntity{
|
||||||
/**
|
/**
|
||||||
* 标识
|
* 标识
|
||||||
*/
|
*/
|
||||||
private Integer[] logoId;
|
private Integer logoId;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String logoName;
|
private String logoName;
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,9 @@ import lombok.NoArgsConstructor;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class FenceConfig {
|
public class FenceConfig {
|
||||||
|
|
||||||
|
|
||||||
private String fenceName;
|
private String fenceName;
|
||||||
/**
|
/**
|
||||||
* 围栏状态
|
* 围栏状态
|
||||||
*/
|
*/
|
||||||
private Integer fenceState;
|
private Integer fenceState;
|
||||||
private Integer pageNum=1;
|
|
||||||
private Integer pageSize=3;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ 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
|
||||||
|
@ -69,5 +70,5 @@ public class FenceRequest {
|
||||||
* 标识
|
* 标识
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String[] logoId;
|
private String[] logoIds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.couplet.common.core.utils.PageUtils.startPage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
||||||
* @Date: 2024/3/28
|
* @Date: 2024/3/28
|
||||||
|
@ -39,7 +37,6 @@ public class FenceController extends BaseController {
|
||||||
@RequiresPermissions("couplet:fence:fenceList")
|
@RequiresPermissions("couplet:fence:fenceList")
|
||||||
@PostMapping("/fenceList")
|
@PostMapping("/fenceList")
|
||||||
public Result<?> fenceList(@RequestBody FenceConfig fenceConfig){
|
public Result<?> fenceList(@RequestBody FenceConfig fenceConfig){
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
List<Fence> list = fenceService.pageQuery(fenceConfig);
|
List<Fence> list = fenceService.pageQuery(fenceConfig);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -55,10 +52,11 @@ 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())) {
|
||||||
|
return error("新增参数'" + fenceRequest.getFenceName() + "'失败,参数键名已存在");
|
||||||
|
}
|
||||||
fenceService.fenceInsert(request,fenceRequest);
|
fenceService.fenceInsert(request,fenceRequest);
|
||||||
return Result.success("新增成功");
|
return Result.success("新增成功");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,8 +67,10 @@ public class FenceController extends BaseController {
|
||||||
@PostMapping("/fenceUpdate")
|
@PostMapping("/fenceUpdate")
|
||||||
@RequiresPermissions("couplet:fence:fenceUpdate")
|
@RequiresPermissions("couplet:fence:fenceUpdate")
|
||||||
@Log(title = "电子围栏修改",businessType = BusinessType.UPDATE)
|
@Log(title = "电子围栏修改",businessType = BusinessType.UPDATE)
|
||||||
public Result<?> fenceUpdate(@Validated @RequestBody FenceUpdateRequest fenceUpdateRequest){
|
public Result<?> fenceUpdate(@Validated @RequestBody FenceUpdateRequest fenceUpdateRequest){
|
||||||
|
if (!fenceService.checkFenceKeyUnique(fenceUpdateRequest.getFenceName())) {
|
||||||
|
return error("修改参数'" + fenceUpdateRequest.getFenceName() + "'失败,参数键名已存在");
|
||||||
|
}
|
||||||
fenceService.changeFenceStatus(fenceUpdateRequest);
|
fenceService.changeFenceStatus(fenceUpdateRequest);
|
||||||
return Result.success("修改成功");
|
return Result.success("修改成功");
|
||||||
}
|
}
|
||||||
|
@ -83,19 +83,21 @@ public class FenceController extends BaseController {
|
||||||
@DeleteMapping("/{fenceId}")
|
@DeleteMapping("/{fenceId}")
|
||||||
@RequiresPermissions("couplet:fence:fenceDelete")
|
@RequiresPermissions("couplet:fence:fenceDelete")
|
||||||
@Log(title = "电子围栏删除",businessType = BusinessType.DELETE)
|
@Log(title = "电子围栏删除",businessType = BusinessType.DELETE)
|
||||||
public Result<?> fenceDelete(@PathVariable Long fenceId){
|
public Result<?> fenceDelete(@PathVariable Long fenceId){
|
||||||
boolean b = fenceService.removeById(fenceId);
|
fenceService.removeByFenceId(fenceId);
|
||||||
// fenceService.removeByFenceId(fenceId);
|
return Result.success();
|
||||||
return toAjax(b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用停用
|
||||||
|
* @param fenceUpdateRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("/fenceState")
|
@PostMapping("/fenceState")
|
||||||
@RequiresPermissions("couplet:fence:fenceState")
|
@RequiresPermissions("couplet:fence:fenceState")
|
||||||
@Log(title = "围栏启用和停用",businessType = BusinessType.OTHER)
|
@Log(title = "围栏启用和停用",businessType = BusinessType.OTHER)
|
||||||
public Result<?> fenceState(@RequestBody FenceUpdateRequest fenceUpdateRequest){
|
public Result<?> fenceState(@RequestBody FenceUpdateRequest fenceUpdateRequest){
|
||||||
|
|
||||||
fenceService.changeFenceStatus(fenceUpdateRequest);
|
fenceService.changeFenceStatus(fenceUpdateRequest);
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,4 +32,10 @@ public interface FenceMapper extends BaseMapper<Fence> {
|
||||||
*/
|
*/
|
||||||
List<Fence> pageQuery(FenceConfig fenceConfig);
|
List<Fence> pageQuery(FenceConfig fenceConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断名字唯一
|
||||||
|
* @param fenceName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean checkFenceKeyUnique(String fenceName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,12 @@ public interface FenceService extends IService<Fence> {
|
||||||
*/
|
*/
|
||||||
void removeByFenceId(Long fenceId);
|
void removeByFenceId(Long fenceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断数据是否存在
|
||||||
|
*
|
||||||
|
* @param fenceName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean checkFenceKeyUnique(String fenceName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.map.server.service.impl;
|
||||||
|
|
||||||
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.map.common.domain.Fence;
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.map.common.domain.request.FenceConfig;
|
||||||
|
@ -57,15 +55,13 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements
|
||||||
@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[] logoId = fenceRequest.getLogoId();
|
String[] logoIds = fenceRequest.getLogoIds();
|
||||||
String[] split=null;
|
String[] parts = new String[0];
|
||||||
if (logoId != null && logoId.length> 0){
|
for (String logoId : logoIds) {
|
||||||
split = logoId[0].split(",");
|
parts = logoId.split(",");
|
||||||
}
|
fenAndLogoService.addBach(fenceRequest.getFenceId(),parts);
|
||||||
if (a>0){
|
|
||||||
fenAndLogoService.addBach(fenceRequest.getFenceId(),split);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,4 +70,9 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements
|
||||||
public void removeByFenceId(Long fenceId) {
|
public void removeByFenceId(Long fenceId) {
|
||||||
fenceMapper.removeByFenceId(fenceId);
|
fenceMapper.removeByFenceId(fenceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkFenceKeyUnique(String fenceName) {
|
||||||
|
return fenceMapper.checkFenceKeyUnique(fenceName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,10 @@
|
||||||
|
|
||||||
<insert id="addBach">
|
<insert id="addBach">
|
||||||
INSERT INTO `couplet-cloud`.`couplet_fences_and_logo`
|
INSERT INTO `couplet-cloud`.`couplet_fences_and_logo`
|
||||||
(`fences_id`, `logo_id`) VALUES
|
(`fences_id`, `logo_id`)
|
||||||
<foreach collection="logoIds" item="logoItemId" separator="," close="(" open=")">
|
VALUES
|
||||||
(#{fenceId}, #{logoItemId})
|
<foreach collection="logoIds" item="item" separator=",">
|
||||||
</foreach>
|
(#{fenceId}, #{item})
|
||||||
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectFence">
|
<sql id="selectFence">
|
||||||
SELECT
|
SELECT
|
||||||
fence_id,
|
f.fence_id,
|
||||||
fence_name,
|
fence_name,
|
||||||
fence_longitude_latitude,
|
fence_longitude_latitude,
|
||||||
fence_description,
|
fence_description,
|
||||||
|
@ -33,19 +33,32 @@
|
||||||
maintainer_name,
|
maintainer_name,
|
||||||
alarm_status,
|
alarm_status,
|
||||||
l.logo_id,
|
l.logo_id,
|
||||||
logo_name
|
GROUP_CONCAT(logo_name) as logoName
|
||||||
FROM couplet_fence_info f INNER JOIN couplet_fences_and_logo m on
|
FROM couplet_fence_info f INNER JOIN couplet_fences_and_logo m on
|
||||||
f.fence_id=m.fences_id INNER JOIN couplet_logo_info l on l.logo_id=m.logo_id GROUP BY fence_id
|
f.fence_id=m.fences_id INNER JOIN couplet_logo_info l on l.logo_id=m.logo_id
|
||||||
|
</sql>
|
||||||
|
<sql id="fence">
|
||||||
|
SELECT
|
||||||
|
fence_id,
|
||||||
|
fence_name,
|
||||||
|
fence_longitude_latitude,
|
||||||
|
fence_description,
|
||||||
|
is_delete,
|
||||||
|
fence_state,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
create_name,
|
||||||
|
maintainer_name,
|
||||||
|
alarm_status
|
||||||
|
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.map.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_description`, `is_delete`, `fence_state`, `create_time`,
|
(`fence_name`, `fence_longitude_latitude`, `fence_description`, `is_delete`, `fence_state`, `create_time`,
|
||||||
`create_name`, `maintainer_name`, `alarm_status`)
|
`update_time`, `create_name`, `maintainer_name`, `alarm_status`)
|
||||||
VALUES
|
VALUES
|
||||||
(#{fenceName}, #{fenceDescription}, 0, 0, now(), #{createTime},
|
(#{fenceName}, null, #{fenceDescription}, 0, 0, now(), null, null, #{maintainerName}, 0)
|
||||||
#{createName}, 0);
|
|
||||||
|
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -78,5 +91,9 @@
|
||||||
and fence_state = #{fenceState}
|
and fence_state = #{fenceState}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
GROUP BY f.fence_id
|
||||||
|
</select>
|
||||||
|
<select id="checkFenceKeyUnique" resultType="java.lang.Boolean">
|
||||||
|
<include refid="fence"/> where fence_name = #{fenceName}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -15,11 +15,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -4,6 +4,8 @@ server:
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-gen
|
name: couplet-gen
|
||||||
|
@ -15,11 +17,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -4,6 +4,8 @@ server:
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-job
|
name: couplet-job
|
||||||
|
@ -15,11 +17,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?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>
|
||||||
|
|
||||||
|
<artifactId>couplet-msg</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>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Actuator -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger UI -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${swagger.fox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MuYu Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,382 @@
|
||||||
|
package com.couplet.msg.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/3/31 16:01
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MsgData {
|
||||||
|
/**
|
||||||
|
* VIN
|
||||||
|
*/
|
||||||
|
private String vin;
|
||||||
|
/**
|
||||||
|
* 行驶路线
|
||||||
|
*/
|
||||||
|
private String drivingRoute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 速度
|
||||||
|
*/
|
||||||
|
private String speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 里程
|
||||||
|
*/
|
||||||
|
private BigDecimal mileage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总电压
|
||||||
|
*/
|
||||||
|
private String voltage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总电流
|
||||||
|
*/
|
||||||
|
private String current;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绝缘电阻
|
||||||
|
*/
|
||||||
|
private String resistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档位
|
||||||
|
*/
|
||||||
|
private String gear = "P";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加速踏板行程值
|
||||||
|
*/
|
||||||
|
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 BigDecimal batteryLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前状态允许的最大反馈功率
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆状态
|
||||||
|
*/
|
||||||
|
private int vehicleStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电状态
|
||||||
|
*/
|
||||||
|
private int chargingStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态
|
||||||
|
*/
|
||||||
|
private int operatingStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SOC
|
||||||
|
*/
|
||||||
|
private int socStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可充电储能装置工作状态
|
||||||
|
*/
|
||||||
|
private int chargingEnergyStorageStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驱动电机状态
|
||||||
|
*/
|
||||||
|
private int driveMotorStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位是否有效
|
||||||
|
*/
|
||||||
|
private int positionStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EAS(汽车防盗系统)状态
|
||||||
|
*/
|
||||||
|
private int easStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PTC(电动加热器)状态
|
||||||
|
*/
|
||||||
|
private int ptcStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EPS(电动助力系统)状态
|
||||||
|
*/
|
||||||
|
private int epsStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ABS(防抱死)状态
|
||||||
|
*/
|
||||||
|
private int absStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MCU(电机/逆变器)状态
|
||||||
|
*/
|
||||||
|
private int mcuStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池加热状态
|
||||||
|
*/
|
||||||
|
private int heatingStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池当前状态
|
||||||
|
*/
|
||||||
|
private int batteryStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动力电池保温状态
|
||||||
|
*/
|
||||||
|
private int batteryInsulationStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DCDC(电力交换系统)状态
|
||||||
|
*/
|
||||||
|
private int dcdcStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CHG(充电机)状态
|
||||||
|
*/
|
||||||
|
private int chgStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆状态 报文
|
||||||
|
*/
|
||||||
|
private String vehicleStatusMsg;
|
||||||
|
/**
|
||||||
|
* 智能硬件 报文
|
||||||
|
*/
|
||||||
|
private String smartHardwareMsg;
|
||||||
|
/**
|
||||||
|
* 电池报文
|
||||||
|
*/
|
||||||
|
private String batteryMsg;
|
||||||
|
|
||||||
|
public String getMsg(){
|
||||||
|
//第一位VIN
|
||||||
|
return vin +
|
||||||
|
// 当前时间戳
|
||||||
|
System.currentTimeMillis() +
|
||||||
|
//第二位经度 longitude latitude
|
||||||
|
getValue(longitude, 11) +
|
||||||
|
//第三位维度 longitude latitude
|
||||||
|
getValue(latitude, 10) +
|
||||||
|
//车速
|
||||||
|
getValue(speed, 6) +
|
||||||
|
//总里程
|
||||||
|
getValue(mileage == null ? "" : mileage.toString(), 11) +
|
||||||
|
// 总电压
|
||||||
|
getValue(voltage, 6) +
|
||||||
|
//总电流
|
||||||
|
getValue(current, 5) +
|
||||||
|
//绝缘电阻 79 - 87
|
||||||
|
getValue(resistance, 9) +
|
||||||
|
//档位
|
||||||
|
(gear == null ? "D" : gear) +
|
||||||
|
// 加速踏板行程值
|
||||||
|
getValue(accelerationPedal, 2) +
|
||||||
|
// 制动踏板行程值
|
||||||
|
getValue(brakePedal, 2) +
|
||||||
|
// 燃料消耗率
|
||||||
|
getValue(fuelConsumptionRate, 5) +
|
||||||
|
//电机控制器温度
|
||||||
|
getValue(motorControllerTemperature, 6) +
|
||||||
|
//电机转速
|
||||||
|
getValue(motorSpeed, 5) +
|
||||||
|
//点击转矩
|
||||||
|
getValue(motorTorque, 4) +
|
||||||
|
//电机温度
|
||||||
|
getValue(motorTemperature, 6) +
|
||||||
|
//电机电压
|
||||||
|
getValue(motorVoltage, 5) +
|
||||||
|
//电机电流
|
||||||
|
getValue(motorCurrent, 8) +
|
||||||
|
//动力电池剩余电量SOC
|
||||||
|
getValue(remainingBattery == null ? "" : remainingBattery.toString(), 6) +
|
||||||
|
//当前状态允许的最大反馈功率
|
||||||
|
getValue(maximumFeedbackPower, 6) +
|
||||||
|
//当前状态允许最大放电功率
|
||||||
|
getValue(maximumDischargePower, 6) +
|
||||||
|
//BMS自检计数器
|
||||||
|
getValue(selfCheckCounter, 2) +
|
||||||
|
//动力电池充放电电流
|
||||||
|
getValue(totalBatteryCurrent, 5) +
|
||||||
|
//动力电池负载端总电压V3
|
||||||
|
getValue(totalBatteryVoltage, 6) +
|
||||||
|
//单次最大电压
|
||||||
|
getValue(singleBatteryMaxVoltage, 4) +
|
||||||
|
//单体电池最低电压
|
||||||
|
getValue(singleBatteryMinVoltage, 4) +
|
||||||
|
//单体电池最高温度
|
||||||
|
getValue(singleBatteryMaxTemperature, 6) +
|
||||||
|
//单体电池最低温度
|
||||||
|
getValue(singleBatteryMinTemperature, 6) +
|
||||||
|
//动力电池可用容量
|
||||||
|
getValue(availableBatteryCapacity, 6) +
|
||||||
|
//车辆状态
|
||||||
|
vehicleStatus +
|
||||||
|
//充电状态
|
||||||
|
chargingStatus +
|
||||||
|
//运行状态
|
||||||
|
operatingStatus +
|
||||||
|
//SOC
|
||||||
|
socStatus +
|
||||||
|
//可充电储能装置工作状态
|
||||||
|
chargingEnergyStorageStatus +
|
||||||
|
//驱动电机状态
|
||||||
|
driveMotorStatus +
|
||||||
|
//定位是否有效
|
||||||
|
positionStatus +
|
||||||
|
//EAS
|
||||||
|
easStatus +
|
||||||
|
//PTC
|
||||||
|
ptcStatus +
|
||||||
|
//EPS
|
||||||
|
epsStatus +
|
||||||
|
//ABS
|
||||||
|
absStatus +
|
||||||
|
//MCU
|
||||||
|
mcuStatus +
|
||||||
|
//动力电池加热状态
|
||||||
|
heatingStatus +
|
||||||
|
//动力电池当前状态
|
||||||
|
batteryStatus +
|
||||||
|
//动力电池保温状态
|
||||||
|
batteryInsulationStatus +
|
||||||
|
//DCDC
|
||||||
|
dcdcStatus +
|
||||||
|
//CHG
|
||||||
|
chgStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue(String val , int valLength){
|
||||||
|
if(val == null){
|
||||||
|
val = "";
|
||||||
|
}
|
||||||
|
int length = val.length();
|
||||||
|
if (length > valLength){
|
||||||
|
return val.substring( 0 , valLength);
|
||||||
|
}
|
||||||
|
val = val + "0".repeat(valLength - length);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.couplet.msg.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/3/31 21:18
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TroubleLog {
|
||||||
|
/**
|
||||||
|
* 故障记录Id
|
||||||
|
*/
|
||||||
|
private Integer troubleLogId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障码
|
||||||
|
*/
|
||||||
|
private String troubleLogCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障记录车辆VIN
|
||||||
|
*/
|
||||||
|
private String troubleLogVin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始预警时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date troubleLogStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束预警时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date troubleLogEndTime;
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.couplet.msg;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/3/31 16:57
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String msgString = "VIN123456789DIJE41711764104506116.664380039.531990072.00031.3760000022000022000852000000D00809.600940000589066790930000203002030000044282.55000014000080700007440003000400095000058000054000011111111111111111";
|
||||||
|
|
||||||
|
//使用正则表达式匹配需要的部分
|
||||||
|
String pattern = "(.{17})(.{10})(.{4})(.{2})(.{2})";
|
||||||
|
Pattern compile = Pattern.compile(pattern);
|
||||||
|
Matcher matcher = compile.matcher(msgString);
|
||||||
|
|
||||||
|
if (matcher.find()) {
|
||||||
|
for (int i = 1; i <= matcher.groupCount(); i++) {
|
||||||
|
System.out.println("Group "+ i + ":" + matcher.group(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.couplet.msg;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/3/30 11:39
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public class ParsingMsg {
|
||||||
|
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");
|
||||||
|
}};
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将16进制字符串转换为ASCII字符串
|
||||||
|
* @param hexString 16进制字符串
|
||||||
|
* @return ASCII字符串
|
||||||
|
*/
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -66,7 +66,7 @@ public class SysFirmController {
|
||||||
* @param deptId
|
* @param deptId
|
||||||
* @return com.couplet.common.core.domain.Result
|
* @return com.couplet.common.core.domain.Result
|
||||||
**/
|
**/
|
||||||
@DeleteMapping("delFirm/{deptId}")
|
@PostMapping("delFirm/{deptId}")
|
||||||
public Result delFirm(@PathVariable Integer deptId){
|
public Result delFirm(@PathVariable Integer deptId){
|
||||||
int i = sysFirmService.delFirm(deptId);
|
int i = sysFirmService.delFirm(deptId);
|
||||||
Result<Integer> success = Result.success(i);
|
Result<Integer> success = Result.success(i);
|
||||||
|
|
|
@ -223,7 +223,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateDept (SysDept dept) {
|
public int updateDept (SysDept dept) {
|
||||||
SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId());
|
SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId());
|
||||||
SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId());
|
SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId());
|
||||||
if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) {
|
if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) {
|
||||||
|
|
|
@ -4,6 +4,8 @@ server:
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-system
|
name: couplet-system
|
||||||
|
@ -15,11 +17,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
package com.couplet.trouble.controller;
|
package com.couplet.trouble.controller;
|
||||||
|
|
||||||
|
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.core.web.page.TableDataInfo;
|
|
||||||
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.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.req.TroubleUpdReq;
|
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 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.*;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,13 +29,28 @@ public class SysTroubleController extends BaseController {
|
||||||
private SysTroubleService troubleService;
|
private SysTroubleService troubleService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障管理列表
|
* 故障码管理列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/troubleList")
|
@PostMapping("/troubleList")
|
||||||
public Result<TableDataInfo<coupletTroubleCode>> list(@RequestBody coupletTroubleCode trouble) {
|
public Result<PageResult<CoupletTroubleCode>> list(@RequestBody TroubleResp troubleReq) {
|
||||||
startPage();
|
PageResult<CoupletTroubleCode> result = troubleService.selectTroubleList(troubleReq);
|
||||||
List<coupletTroubleCode> list = troubleService.selectTroubleList(trouble);
|
return Result.success(result);
|
||||||
return getDataTable(list);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障类型信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/troubleTypeList")
|
||||||
|
public List<CoupletTroubleType> listType() {
|
||||||
|
return troubleService.selectTroubleListByType();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障等级信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/troubleGradeList")
|
||||||
|
public List<CoupletTroubleGrade> listGrade() {
|
||||||
|
return troubleService.selectTroubleListByGrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,16 +58,16 @@ public class SysTroubleController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@Log(title = "新增故障码数据", businessType = BusinessType.INSERT)
|
@Log(title = "新增故障码数据", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("insertTrouble")
|
@PostMapping("insertTrouble")
|
||||||
public Result<?> insert(@Validated @RequestBody coupletTroubleCode troubleAddReq) {
|
public Result<?> insert(@Validated @RequestBody CoupletTroubleCode troubleAddReq) {
|
||||||
return toAjax(troubleService.save(troubleAddReq));
|
return toAjax(troubleService.save(troubleAddReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存故障码数据
|
* 修改故障码数据
|
||||||
*/
|
*/
|
||||||
@Log(title = "修改故障码数据",businessType = BusinessType.UPDATE)
|
@Log(title = "修改故障码数据",businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("updateTrouble")
|
@PostMapping("updateTrouble")
|
||||||
public Result<?> edit(@Validated @RequestBody coupletTroubleCode troubleUpdReq) {
|
public Result<?> edit(@Validated @RequestBody CoupletTroubleCode troubleUpdReq) {
|
||||||
return toAjax(troubleService.updateById(troubleUpdReq));
|
return toAjax(troubleService.updateById(troubleUpdReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +76,7 @@ public class SysTroubleController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@Log(title = "删除故障码",businessType = BusinessType.DELETE)
|
@Log(title = "删除故障码",businessType = BusinessType.DELETE)
|
||||||
@GetMapping("/remove/{troubleId}")
|
@GetMapping("/remove/{troubleId}")
|
||||||
public Result<?> remove(@PathVariable Long troubleId) {
|
public Result<?> remove(@PathVariable Integer troubleId) {
|
||||||
troubleService.removeById(troubleId);
|
troubleService.removeById(troubleId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.couplet.trouble.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 com.couplet.common.core.web.domain.BaseEntity;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ import lombok.experimental.SuperBuilder;
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class coupletTroubleCode {
|
public class CoupletTroubleCode {
|
||||||
/**
|
/**
|
||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
|
@ -53,10 +52,12 @@ public class coupletTroubleCode {
|
||||||
/**
|
/**
|
||||||
* 故障类型Id
|
* 故障类型Id
|
||||||
*/
|
*/
|
||||||
private Integer troubleTypeId;
|
@Excel(name = "故障类型Id")
|
||||||
|
private Integer typeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障等级Id
|
* 故障等级Id
|
||||||
*/
|
*/
|
||||||
private Integer troubleGradeId;
|
@Excel(name = "故障等级Id")
|
||||||
|
private Integer gradeId;
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@ import lombok.Data;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class coupletTroubleGrade {
|
public class CoupletTroubleGrade {
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
private String gradeName;
|
private String gradeName;
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@ import lombok.Data;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class coupletTroubleType {
|
public class CoupletTroubleType {
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
private String typeName;
|
private String typeName;
|
||||||
}
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.couplet.trouble.domain.resp;
|
||||||
|
|
||||||
|
import com.couplet.trouble.domain.CoupletTroubleCode;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DongXiaoDong
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2024/3/30 19:22
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class TroubleResp extends CoupletTroubleCode implements Serializable {
|
||||||
|
private Integer pageNum=1;
|
||||||
|
private Integer pageSize=5;
|
||||||
|
private String troubleCode;
|
||||||
|
private String troublePosition;
|
||||||
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
package com.couplet.trouble.mapper;
|
package com.couplet.trouble.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.trouble.domain.coupletTroubleCode;
|
import com.couplet.trouble.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.req.TroubleAddReq;
|
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.req.TroubleUpdReq;
|
import com.couplet.trouble.domain.CoupletTroubleType;
|
||||||
|
import com.couplet.trouble.domain.resp.TroubleResp;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -15,8 +16,12 @@ import java.util.List;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SysTroubleMapper extends BaseMapper<coupletTroubleCode> {
|
public interface SysTroubleMapper extends BaseMapper<CoupletTroubleCode> {
|
||||||
List<coupletTroubleCode> selectTroubleList(coupletTroubleCode trouble);
|
List<CoupletTroubleCode> selectTroubleList(TroubleResp troubleReq);
|
||||||
|
|
||||||
|
List<CoupletTroubleType> selectTroubleListByType();
|
||||||
|
|
||||||
|
List<CoupletTroubleGrade> selectTroubleListByGrade();
|
||||||
|
|
||||||
// int addTrouble(TroubleAddReq troubleAddReq);
|
// int addTrouble(TroubleAddReq troubleAddReq);
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package com.couplet.trouble.service;
|
package com.couplet.trouble.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.trouble.domain.coupletTroubleCode;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.req.TroubleAddReq;
|
import com.couplet.trouble.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.req.TroubleUpdReq;
|
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
||||||
|
import com.couplet.trouble.domain.CoupletTroubleType;
|
||||||
|
import com.couplet.trouble.domain.resp.TroubleResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,8 +15,12 @@ import java.util.List;
|
||||||
* @date 2024/3/26 22:38
|
* @date 2024/3/26 22:38
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
public interface SysTroubleService extends IService<coupletTroubleCode> {
|
public interface SysTroubleService extends IService<CoupletTroubleCode> {
|
||||||
List<coupletTroubleCode> selectTroubleList(coupletTroubleCode trouble);
|
PageResult<CoupletTroubleCode> selectTroubleList(TroubleResp troubleReq);
|
||||||
|
|
||||||
|
List<CoupletTroubleType> selectTroubleListByType();
|
||||||
|
|
||||||
|
List<CoupletTroubleGrade> selectTroubleListByGrade();
|
||||||
|
|
||||||
// int addTrouble (TroubleAddReq troubleAddReq);
|
// int addTrouble (TroubleAddReq troubleAddReq);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
package com.couplet.trouble.service.impl;
|
package com.couplet.trouble.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.trouble.domain.coupletTroubleCode;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.req.TroubleAddReq;
|
import com.couplet.trouble.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.req.TroubleUpdReq;
|
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
||||||
|
import com.couplet.trouble.domain.CoupletTroubleType;
|
||||||
|
import com.couplet.trouble.domain.resp.TroubleResp;
|
||||||
import com.couplet.trouble.mapper.SysTroubleMapper;
|
import com.couplet.trouble.mapper.SysTroubleMapper;
|
||||||
import com.couplet.trouble.service.SysTroubleService;
|
import com.couplet.trouble.service.SysTroubleService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
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,19 +22,32 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询故障码列表
|
* 查询故障码列表
|
||||||
* @param trouble
|
* @param troubleReq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<coupletTroubleCode> selectTroubleList(coupletTroubleCode trouble) {
|
public PageResult<CoupletTroubleCode> selectTroubleList(TroubleResp troubleReq) {
|
||||||
return sysTroubleMapper.selectTroubleList(trouble);
|
PageHelper.startPage(troubleReq.getPageNum(), troubleReq.getPageSize());
|
||||||
|
List<CoupletTroubleCode> troubleList = sysTroubleMapper.selectTroubleList(troubleReq);
|
||||||
|
PageInfo<CoupletTroubleCode> info = new PageInfo<>(troubleList);
|
||||||
|
return PageResult.toPageResult(info.getTotal(),troubleList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CoupletTroubleType> selectTroubleListByType() {
|
||||||
|
return sysTroubleMapper.selectTroubleListByType();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CoupletTroubleGrade> selectTroubleListByGrade() {
|
||||||
|
return sysTroubleMapper.selectTroubleListByGrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.trouble.mapper.SysTroubleMapper">
|
<mapper namespace="com.couplet.trouble.mapper.SysTroubleMapper">
|
||||||
|
|
||||||
<resultMap type="com.couplet.trouble.domain.coupletTroubleCode" id="SysTroubleResult">
|
<resultMap type="com.couplet.trouble.domain.CoupletTroubleCode" id="SysTroubleResult">
|
||||||
<id property="troubleId" column="trouble_id"/>
|
<id property="troubleId" column="trouble_id"/>
|
||||||
<result property="troubleCode" column="trouble_code"/>
|
<result property="troubleCode" column="trouble_code"/>
|
||||||
<result property="troubleGradeId" column="trouble_gradeId"/>
|
<result property="troubleValue" column="trouble_value"/>
|
||||||
<result property="troublePosition" column="trouble_position"/>
|
<result property="troublePosition" column="trouble_position"/>
|
||||||
<result property="troubleTag" column="trouble_tag"/>
|
<result property="troubleTag" column="trouble_tag"/>
|
||||||
<result property="troubleTypeId" column="trouble_typeId"/>
|
<result property="typeId" column="type_id"/>
|
||||||
<result property="troubleValue" column="trouble_value"/>
|
<result property="gradeId" column="grade_id"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTroubleVo">
|
<sql id="selectTroubleVo">
|
||||||
select t.*,g.grade_name,y.type_name from couplet_trouble_code t
|
select t.*,g.grade_name,y.type_name from couplet_trouble_code t
|
||||||
LEFT JOIN couplet_trouble_grade g on t.trouble_grade_id = g.grade_id
|
LEFT JOIN couplet_trouble_grade g on t.grade_id = g.grade_id
|
||||||
LEFT JOIN couplet_trouble_type y on t.trouble_type_id= y.type_id
|
LEFT JOIN couplet_trouble_type y on t.type_id= y.type_id
|
||||||
</sql>
|
</sql>
|
||||||
<!-- <insert id="addTrouble">-->
|
<!-- <insert id="addTrouble">-->
|
||||||
<!-- insert into couplet_trouble_code (trouble_code,trouble_position,trouble_value,trouble_tag,trouble_type_id,trouble_grade_id)-->
|
<!-- insert into couplet_trouble_code (trouble_code,trouble_position,trouble_value,trouble_tag,trouble_type_id,trouble_grade_id)-->
|
||||||
|
@ -56,7 +56,12 @@
|
||||||
AND trouble_position like concat('%', #{troublePosition}, '%')
|
AND trouble_position like concat('%', #{troublePosition}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by trouble_position desc
|
</select>
|
||||||
|
<select id="selectTroubleListByType" resultType="com.couplet.trouble.domain.CoupletTroubleType">
|
||||||
|
select * from couplet_trouble_type
|
||||||
|
</select>
|
||||||
|
<select id="selectTroubleListByGrade" resultType="com.couplet.trouble.domain.CoupletTroubleGrade">
|
||||||
|
select * from couplet_trouble_grade
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<module>couplet-modules-mq</module>
|
<module>couplet-modules-mq</module>
|
||||||
<module>couplet-enterprisemanagement</module>
|
<module>couplet-enterprisemanagement</module>
|
||||||
<module>couplet-modules-onLine</module>
|
<module>couplet-modules-onLine</module>
|
||||||
|
<module>couplet-msg</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>couplet-modules</artifactId>
|
<artifactId>couplet-modules</artifactId>
|
||||||
|
|
|
@ -15,11 +15,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
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue