Merge branch 'dev.breakdown'
commit
ec9ebde88c
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.breakdown.controller;
|
package com.muyu.breakdown.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.muyu.breakdown.domain.SysCarFault;
|
import com.muyu.breakdown.domain.SysCarFault;
|
||||||
import com.muyu.breakdown.service.SysCarFaultService;
|
import com.muyu.breakdown.service.SysCarFaultService;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
@ -72,12 +73,13 @@ public class SysCarFaultController extends BaseController
|
||||||
@Validated @RequestBody SysCarFault sysCarFault)
|
@Validated @RequestBody SysCarFault sysCarFault)
|
||||||
{
|
{
|
||||||
if (sysCarFaultService.checkIdUnique(sysCarFault)) {
|
if (sysCarFaultService.checkIdUnique(sysCarFault)) {
|
||||||
return error("新增 车辆故障管理 '" + sysCarFault + "'失败,车辆故障管理已存在");
|
return error("新增 车辆故障管理 ,失败,车辆故障码已存在");
|
||||||
}
|
}
|
||||||
sysCarFault.setCreateBy(SecurityUtils.getUsername());
|
sysCarFault.setCreateBy(SecurityUtils.getUsername());
|
||||||
return toAjax(sysCarFaultService.save(sysCarFault));
|
return toAjax(sysCarFaultService.save(sysCarFault));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改车辆故障管理
|
* 修改车辆故障管理
|
||||||
*/
|
*/
|
||||||
|
@ -103,4 +105,28 @@ public class SysCarFaultController extends BaseController
|
||||||
sysCarFaultService.removeBatchByIds(Arrays.asList(ids));
|
sysCarFaultService.removeBatchByIds(Arrays.asList(ids));
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用告警
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
@PutMapping("/enableWarningsById/{id}")
|
||||||
|
public void enableWarningsById(@PathVariable("id")Long id){
|
||||||
|
UpdateWrapper<SysCarFault> wrapper = new UpdateWrapper<>();
|
||||||
|
wrapper.eq("id",id);
|
||||||
|
wrapper.set("warn_status",0);
|
||||||
|
sysCarFaultService.update(wrapper);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 禁用告警
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
@PutMapping("/disableWarningsById/{id}")
|
||||||
|
public void disableWarningsById(@PathVariable("id")Long id){
|
||||||
|
UpdateWrapper<SysCarFault> wrapper = new UpdateWrapper<>();
|
||||||
|
wrapper.eq("id",id);
|
||||||
|
wrapper.set("warn_status",1);
|
||||||
|
sysCarFaultService.update(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.muyu.breakdown.controller;
|
||||||
|
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
import com.muyu.breakdown.service.SysCarFaultMessageService;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 14:39
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/message")
|
||||||
|
public class SysCarFaultMessageController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private SysCarFaultMessageService service;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result<TableDataInfo<SysCarFaultMessage>> list(){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultMessage> list = service.list();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/listStatusOne")
|
||||||
|
public Result<TableDataInfo<SysCarFaultMessage>>listStatusOne(){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultMessage> list = service.listStatusOnt();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/listStatusTwo")
|
||||||
|
public Result<TableDataInfo<SysCarFaultMessage>>listStatusTwo(){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultMessage> list = service.listStatusTwo();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.muyu.breakdown.controller;
|
||||||
|
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
import com.muyu.breakdown.service.SysCarFaultLogService;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 21:08
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/log")
|
||||||
|
public class sysCarFaultLogController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private SysCarFaultLogService service;
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
public Result<TableDataInfo<SysCarFaultLog>> list(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultLog> list = service.selectSysCarFaultLogList(sysCarFaultLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/listStatusIgnore")
|
||||||
|
public Result<TableDataInfo<SysCarFaultLog>>listStatusIgnore(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultLog> list = service.listStatusIgnore(sysCarFaultLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/listStatusSolve")
|
||||||
|
public Result<TableDataInfo<SysCarFaultLog>>listStatusSolve(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultLog> list = service.listStatusSolve(sysCarFaultLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/listStatusProcess")
|
||||||
|
public Result<TableDataInfo<SysCarFaultLog>>listStatusProcess(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||||
|
startPage();
|
||||||
|
List<SysCarFaultLog> list = service.listStatusProcess(sysCarFaultLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
public Result<Integer> add(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||||
|
|
||||||
|
return toAjax(service.save(sysCarFaultLog));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -30,6 +30,7 @@ public class SysCarFault extends BaseEntity{
|
||||||
@TableId( type = IdType.AUTO)
|
@TableId( type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
/** 故障码编码 */
|
/** 故障码编码 */
|
||||||
@Excel(name = "故障码编码")
|
@Excel(name = "故障码编码")
|
||||||
private String faultCode;
|
private String faultCode;
|
||||||
|
@ -42,17 +43,13 @@ public class SysCarFault extends BaseEntity{
|
||||||
@Excel(name = "故障类型")
|
@Excel(name = "故障类型")
|
||||||
private Long typeId;
|
private Long typeId;
|
||||||
|
|
||||||
/** 车辆VIN码 */
|
|
||||||
@Excel(name = "车辆VIN码")
|
|
||||||
private String carVin;
|
|
||||||
|
|
||||||
/** 故障标签 */
|
/** 故障标签 */
|
||||||
@Excel(name = "故障标签")
|
@Excel(name = "故障标签")
|
||||||
private String faultLabel;
|
private String faultLabel;
|
||||||
|
|
||||||
/** 故障组 */
|
|
||||||
@Excel(name = "故障组")
|
|
||||||
private String faultGroup;
|
|
||||||
|
|
||||||
/** 故障位 */
|
/** 故障位 */
|
||||||
@Excel(name = "故障位")
|
@Excel(name = "故障位")
|
||||||
|
@ -80,11 +77,11 @@ public class SysCarFault extends BaseEntity{
|
||||||
|
|
||||||
/** 启用状态(1.待处理 2.处理中 3.已处理 4.忽略) */
|
/** 启用状态(1.待处理 2.处理中 3.已处理 4.忽略) */
|
||||||
@Excel(name = "启用状态(1.待处理 2.处理中 3.已处理 4.忽略)")
|
@Excel(name = "启用状态(1.待处理 2.处理中 3.已处理 4.忽略)")
|
||||||
private Long status;
|
private Integer status;
|
||||||
|
|
||||||
/** 是否警告(0.开启 1.禁止) */
|
/** 是否警告(0.开启 1.禁止) */
|
||||||
@Excel(name = "是否警告(0.开启 1.禁止)")
|
@Excel(name = "是否警告(0.开启 1.禁止)")
|
||||||
private Long warnStatus;
|
private Integer warnStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,9 +92,7 @@ public class SysCarFault extends BaseEntity{
|
||||||
.append("faultCode", getFaultCode())
|
.append("faultCode", getFaultCode())
|
||||||
.append("faultName", getFaultName())
|
.append("faultName", getFaultName())
|
||||||
.append("typeId", getTypeId())
|
.append("typeId", getTypeId())
|
||||||
.append("carVin", getCarVin())
|
|
||||||
.append("faultLabel", getFaultLabel())
|
.append("faultLabel", getFaultLabel())
|
||||||
.append("faultGroup", getFaultGroup())
|
|
||||||
.append("faultBit", getFaultBit())
|
.append("faultBit", getFaultBit())
|
||||||
.append("faultValue", getFaultValue())
|
.append("faultValue", getFaultValue())
|
||||||
.append("faultRank", getFaultRank())
|
.append("faultRank", getFaultRank())
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.muyu.breakdown.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 20:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName("sys_car_fault_log")
|
||||||
|
public class SysCarFaultLog extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 参数主键 */
|
||||||
|
@TableId( type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
/** 故障码编码 */
|
||||||
|
private Integer sysCarFaultId;
|
||||||
|
/**记录时间*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 结束时间*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
/** VIN码 */
|
||||||
|
private String vin;
|
||||||
|
|
||||||
|
/** 处理状态 1-解决 2-处理中 3-忽略 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.muyu.breakdown.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription: 站内信息对象 sys_car_fault_message
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 11:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName("sys_car_fault_message")
|
||||||
|
public class SysCarFaultMessage extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 参数主键 */
|
||||||
|
@TableId( type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 内容 */
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**开始时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**是否已读 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
|
@ -1,24 +0,0 @@
|
||||||
package com.muyu.breakdown.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
import lombok.*;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassDescription:
|
|
||||||
* @JdkVersion: 1.8
|
|
||||||
* @Author: YZL
|
|
||||||
* @Created: 2024/9/20 11:34
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Setter
|
|
||||||
@Getter
|
|
||||||
@SuperBuilder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@TableName("sys_car_fault_type")
|
|
||||||
public class SysCarFaultType {
|
|
||||||
private Long faultTypeId;
|
|
||||||
private String faultTypeName;
|
|
||||||
}
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.muyu.breakdown.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 21:06
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysCarFaultLogMapper extends BaseMapper<SysCarFaultLog> {
|
||||||
|
|
||||||
|
|
||||||
|
@Select("select * from sys_car_fault_log where is_read=1")
|
||||||
|
public List<SysCarFaultLog> listIsReadAlready( );
|
||||||
|
@Select("select * from sys_car_fault_log where is_read=2")
|
||||||
|
public List<SysCarFaultLog>listISReadNotYet( );
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.muyu.breakdown.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 11:59
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysCarFaultMessageMapper extends BaseMapper<SysCarFaultMessage> {
|
||||||
|
|
||||||
|
@Select("select * from sys_car_fault_message where status=1")
|
||||||
|
public List<SysCarFaultMessage>listStatusOnt( );
|
||||||
|
@Select("select * from sys_car_fault_message where status=2")
|
||||||
|
public List<SysCarFaultMessage>listStatusTwo( );
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.muyu.breakdown.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 21:07
|
||||||
|
*/
|
||||||
|
public interface SysCarFaultLogService extends IService<SysCarFaultLog> {
|
||||||
|
|
||||||
|
public List<SysCarFaultLog>selectSysCarFaultLogList(SysCarFaultLog sysCarFaultLog);
|
||||||
|
|
||||||
|
public List<SysCarFaultLog> listStatusIgnore(SysCarFaultLog sysCarFaultLog);
|
||||||
|
public List<SysCarFaultLog>listStatusProcess(SysCarFaultLog sysCarFaultLog );
|
||||||
|
|
||||||
|
public List<SysCarFaultLog>listStatusSolve(SysCarFaultLog sysCarFaultLog);
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.muyu.breakdown.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFault;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 14:35
|
||||||
|
*/
|
||||||
|
public interface SysCarFaultMessageService extends IService<SysCarFaultMessage> {
|
||||||
|
public List<SysCarFaultMessage> selectSysCarFaultMessageList(SysCarFaultMessage sysCarFaultMessage);
|
||||||
|
|
||||||
|
public List<SysCarFaultMessage>listStatusOnt( );
|
||||||
|
public List<SysCarFaultMessage>listStatusTwo( );
|
||||||
|
}
|
|
@ -35,4 +35,6 @@ public interface SysCarFaultService extends IService<SysCarFault> {
|
||||||
*/
|
*/
|
||||||
Boolean checkIdUnique(SysCarFault sysCarFault);
|
Boolean checkIdUnique(SysCarFault sysCarFault);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.muyu.breakdown.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFault;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
|
import com.muyu.breakdown.mapper.SysCarFaultMessageMapper;
|
||||||
|
import com.muyu.breakdown.service.SysCarFaultMessageService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 14:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysCarFaultMessageServiceImpl extends ServiceImpl<SysCarFaultMessageMapper, SysCarFaultMessage> implements SysCarFaultMessageService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultMessage> selectSysCarFaultMessageList(SysCarFaultMessage sysCarFaultMessage) {
|
||||||
|
LambdaQueryWrapper<SysCarFaultMessage> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
return baseMapper.selectList(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultMessage> listStatusOnt( ) {
|
||||||
|
return baseMapper.listStatusOnt();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultMessage> listStatusTwo( ) {
|
||||||
|
return baseMapper.listStatusTwo();
|
||||||
|
}
|
||||||
|
}
|
|
@ -57,6 +57,9 @@ public class SysCarFaultServiceImpl
|
||||||
if (sysCarFault.getFaultRank()!=null){
|
if (sysCarFault.getFaultRank()!=null){
|
||||||
queryWrapper.eq(SysCarFault::getFaultRank, sysCarFault.getFaultRank());
|
queryWrapper.eq(SysCarFault::getFaultRank, sysCarFault.getFaultRank());
|
||||||
}
|
}
|
||||||
|
if (sysCarFault.getTypeId()!=null){
|
||||||
|
queryWrapper.eq(SysCarFault::getTypeId,sysCarFault.getTypeId());
|
||||||
|
}
|
||||||
return this.list(queryWrapper);
|
return this.list(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +72,10 @@ public class SysCarFaultServiceImpl
|
||||||
public Boolean checkIdUnique(SysCarFault sysCarFault) {
|
public Boolean checkIdUnique(SysCarFault sysCarFault) {
|
||||||
LambdaQueryWrapper<SysCarFault> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysCarFault> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(SysCarFault::getId, sysCarFault.getId());
|
queryWrapper.eq(SysCarFault::getId, sysCarFault.getId());
|
||||||
return this.count(queryWrapper) > 0;
|
queryWrapper.eq(SysCarFault::getFaultCode,sysCarFault.getFaultCode());
|
||||||
|
return this.count(queryWrapper) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.muyu.breakdown.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
|
import com.muyu.breakdown.mapper.SysCarFaultLogMapper;
|
||||||
|
import com.muyu.breakdown.mapper.SysCarFaultMapper;
|
||||||
|
import com.muyu.breakdown.service.SysCarFaultLogService;
|
||||||
|
import com.muyu.breakdown.service.SysCarFaultLogService;
|
||||||
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
|
import org.apache.poi.util.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassDescription:
|
||||||
|
* @JdkVersion: 1.8
|
||||||
|
* @Author: YZL
|
||||||
|
* @Created: 2024/9/22 21:07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper, SysCarFaultLog> implements SysCarFaultLogService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultLog> selectSysCarFaultLogList(SysCarFaultLog sysCarFaultLog) {
|
||||||
|
LambdaQueryWrapper<SysCarFaultLog> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (StringUtils.isNotEmpty(sysCarFaultLog.getVin())){
|
||||||
|
wrapper.eq(SysCarFaultLog::getVin,sysCarFaultLog.getVin());
|
||||||
|
}
|
||||||
|
if (sysCarFaultLog.getStatus()!=null){
|
||||||
|
wrapper.eq(SysCarFaultLog::getStatus,sysCarFaultLog.getStatus());
|
||||||
|
}
|
||||||
|
return this.list(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 只展示忽略的数据
|
||||||
|
* @param sysCarFaultLog
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultLog> listStatusIgnore(SysCarFaultLog sysCarFaultLog) {
|
||||||
|
LambdaQueryWrapper<SysCarFaultLog> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SysCarFaultLog::getStatus,3);
|
||||||
|
if (StringUtils.isNotEmpty(sysCarFaultLog.getVin())){
|
||||||
|
wrapper.eq(SysCarFaultLog::getVin,sysCarFaultLog.getVin());
|
||||||
|
}
|
||||||
|
return this.list(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 只展示处理中的数据
|
||||||
|
* @param sysCarFaultLog
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultLog> listStatusProcess(SysCarFaultLog sysCarFaultLog) {
|
||||||
|
LambdaQueryWrapper<SysCarFaultLog> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SysCarFaultLog::getStatus,2);
|
||||||
|
if (StringUtils.isNotEmpty(sysCarFaultLog.getVin())){
|
||||||
|
wrapper.eq(SysCarFaultLog::getVin,sysCarFaultLog.getVin());
|
||||||
|
}
|
||||||
|
return this.list(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
//只展示已解决的数据
|
||||||
|
@Override
|
||||||
|
public List<SysCarFaultLog> listStatusSolve(SysCarFaultLog sysCarFaultLog) {
|
||||||
|
LambdaQueryWrapper<SysCarFaultLog> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SysCarFaultLog::getStatus,1);
|
||||||
|
if (StringUtils.isNotEmpty(sysCarFaultLog.getVin())){
|
||||||
|
wrapper.eq(SysCarFaultLog::getVin,sysCarFaultLog.getVin());
|
||||||
|
}
|
||||||
|
return this.list(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
<result property="faultCode" column="fault_code" />
|
<result property="faultCode" column="fault_code" />
|
||||||
<result property="faultName" column="fault_name" />
|
<result property="faultName" column="fault_name" />
|
||||||
<result property="typeId" column="type_id" />
|
<result property="typeId" column="type_id" />
|
||||||
<result property="carVin" column="car_vin" />
|
|
||||||
<result property="faultLabel" column="fault_label" />
|
<result property="faultLabel" column="fault_label" />
|
||||||
<result property="faultGroup" column="fault_group" />
|
|
||||||
<result property="faultBit" column="fault_bit" />
|
<result property="faultBit" column="fault_bit" />
|
||||||
<result property="faultValue" column="fault_value" />
|
<result property="faultValue" column="fault_value" />
|
||||||
<result property="faultRank" column="fault_rank" />
|
<result property="faultRank" column="fault_rank" />
|
||||||
|
@ -28,7 +26,7 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysCarFaultVo">
|
<sql id="selectSysCarFaultVo">
|
||||||
select id, fault_code, fault_name, type_id, car_vin, fault_label, fault_group, fault_bit, fault_value, fault_rank, fault_desc, fault_min_threshold, fault_max_threshold, status, warn_status, remark, create_by, create_time, update_by, update_time from sys_car_fault
|
select id, fault_code, fault_name, type_id, fault_label, fault_bit, fault_value, fault_rank, fault_desc, fault_min_threshold, fault_max_threshold, status, warn_status, remark, create_by, create_time, update_by, update_time from sys_car_fault
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysCarFaultList" parameterType="com.muyu.breakdown.domain.SysCarFault" resultMap="SysCarFaultResult">
|
<select id="selectSysCarFaultList" parameterType="com.muyu.breakdown.domain.SysCarFault" resultMap="SysCarFaultResult">
|
||||||
|
@ -51,9 +49,7 @@
|
||||||
<if test="faultCode != null and faultCode != ''">fault_code,</if>
|
<if test="faultCode != null and faultCode != ''">fault_code,</if>
|
||||||
<if test="faultName != null">fault_name,</if>
|
<if test="faultName != null">fault_name,</if>
|
||||||
<if test="typeId != null">type_id,</if>
|
<if test="typeId != null">type_id,</if>
|
||||||
<if test="carVin != null">car_vin,</if>
|
|
||||||
<if test="faultLabel != null">fault_label,</if>
|
<if test="faultLabel != null">fault_label,</if>
|
||||||
<if test="faultGroup != null">fault_group,</if>
|
|
||||||
<if test="faultBit != null">fault_bit,</if>
|
<if test="faultBit != null">fault_bit,</if>
|
||||||
<if test="faultValue != null">fault_value,</if>
|
<if test="faultValue != null">fault_value,</if>
|
||||||
<if test="faultRank != null">fault_rank,</if>
|
<if test="faultRank != null">fault_rank,</if>
|
||||||
|
@ -72,9 +68,7 @@
|
||||||
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
|
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
|
||||||
<if test="faultName != null">#{faultName},</if>
|
<if test="faultName != null">#{faultName},</if>
|
||||||
<if test="typeId != null">#{typeId},</if>
|
<if test="typeId != null">#{typeId},</if>
|
||||||
<if test="carVin != null">#{carVin},</if>
|
|
||||||
<if test="faultLabel != null">#{faultLabel},</if>
|
<if test="faultLabel != null">#{faultLabel},</if>
|
||||||
<if test="faultGroup != null">#{faultGroup},</if>
|
|
||||||
<if test="faultBit != null">#{faultBit},</if>
|
<if test="faultBit != null">#{faultBit},</if>
|
||||||
<if test="faultValue != null">#{faultValue},</if>
|
<if test="faultValue != null">#{faultValue},</if>
|
||||||
<if test="faultRank != null">#{faultRank},</if>
|
<if test="faultRank != null">#{faultRank},</if>
|
||||||
|
@ -97,9 +91,7 @@
|
||||||
<if test="faultCode != null and faultCode != ''">fault_code = #{faultCode},</if>
|
<if test="faultCode != null and faultCode != ''">fault_code = #{faultCode},</if>
|
||||||
<if test="faultName != null">fault_name = #{faultName},</if>
|
<if test="faultName != null">fault_name = #{faultName},</if>
|
||||||
<if test="typeId != null">type_id = #{typeId},</if>
|
<if test="typeId != null">type_id = #{typeId},</if>
|
||||||
<if test="carVin != null">car_vin = #{carVin},</if>
|
|
||||||
<if test="faultLabel != null">fault_label = #{faultLabel},</if>
|
<if test="faultLabel != null">fault_label = #{faultLabel},</if>
|
||||||
<if test="faultGroup != null">fault_group = #{faultGroup},</if>
|
|
||||||
<if test="faultBit != null">fault_bit = #{faultBit},</if>
|
<if test="faultBit != null">fault_bit = #{faultBit},</if>
|
||||||
<if test="faultValue != null">fault_value = #{faultValue},</if>
|
<if test="faultValue != null">fault_value = #{faultValue},</if>
|
||||||
<if test="faultRank != null">fault_rank = #{faultRank},</if>
|
<if test="faultRank != null">fault_rank = #{faultRank},</if>
|
||||||
|
@ -127,4 +119,11 @@
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<update id="enableWarningsById" parameterType="Long">
|
||||||
|
update sys_car_fault set warn_status = 0 where id = #{id}
|
||||||
|
</update>
|
||||||
|
<update id="disableWarningsById" parameterType="Long">
|
||||||
|
update sys_car_fault set warn_status = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class WxTestController {
|
||||||
// message.setMsgType(map.get("MsgType"));
|
// message.setMsgType(map.get("MsgType"));
|
||||||
message.setMsgType("text");
|
message.setMsgType("text");
|
||||||
message.setCreateTime(System.currentTimeMillis() / 1000);
|
message.setCreateTime(System.currentTimeMillis() / 1000);
|
||||||
message.setContent("自动回复:您好");
|
message.setContent("官方回复:您好");
|
||||||
//XStream将java对象转换为xml字符串
|
//XStream将java对象转换为xml字符串
|
||||||
XStream xStream = new XStream();
|
XStream xStream = new XStream();
|
||||||
xStream.processAnnotations(Message.class);
|
xStream.processAnnotations(Message.class);
|
||||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
||||||
addr: 47.101.53.251:8848
|
addr: 47.101.53.251:8848
|
||||||
user-name: nacos
|
user-name: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
namespace: four
|
namespace: yzl
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
Loading…
Reference in New Issue