调整,添加故障查询功能
All checks were successful
local-test分支构建docker并发布运行 / Docker-Build (push) Successful in 1m14s
All checks were successful
local-test分支构建docker并发布运行 / Docker-Build (push) Successful in 1m14s
This commit is contained in:
parent
cc5ab22cb1
commit
28727c9eac
@ -9,10 +9,12 @@ import club.joylink.xiannccda.dto.alertTip.AlertTipQueryDTO;
|
||||
import club.joylink.xiannccda.dto.alertTip.AlertTipSaveDTO;
|
||||
import club.joylink.xiannccda.dto.fq.FaultQueryReqDTO;
|
||||
import club.joylink.xiannccda.dto.fq.FaultType;
|
||||
import club.joylink.xiannccda.dto.fq.FaultType.FaultTypeDetail;
|
||||
import club.joylink.xiannccda.entity.AlertTip;
|
||||
import club.joylink.xiannccda.entity.FaultQuery;
|
||||
import club.joylink.xiannccda.repository.IFaultQueryRepository;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
@ -54,15 +56,14 @@ public class FaultQueryController {
|
||||
@Operation(summary = "查询故障类型")
|
||||
@GetMapping("/type")
|
||||
// @CommonLogAnno(name = "决策信息-查看", logType = CommonLogTypeEnum.OPERATE, subLogType = SubEventType.QUERY)
|
||||
public Map<Integer, List<FaultType>> faultType() {
|
||||
Map<Integer, List<FaultType>> mapTypList = Maps.newHashMap();
|
||||
mapTypList.put(3, List.of(new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE, "车辆故障应急处置指导关键点"), new FaultType(FaultQueryType.FAULT_EXIT_SERVICE, "车辆故障退出服务地点")));
|
||||
mapTypList.put(4, List.of(new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_DK37, "车辆故障应急处置指导关键点-DK37车型"),
|
||||
new FaultType(FaultQueryType.FAULT_EXIT_SERVICE_T_DK37, "车辆故障退出服务地点-DK37车型")
|
||||
, new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_CCD_5037, "车辆故障应急处置指导关键点CCD-5037车型"),
|
||||
new FaultType(FaultQueryType.FAULT_EXIT_SERVICE_T_CCD_5037, "车辆故障退出服务地点CCD-5037车型")));
|
||||
|
||||
return mapTypList;
|
||||
public List<FaultType> faultType() {
|
||||
return List.of(new FaultType(3,
|
||||
List.of(new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE, "车辆故障应急处置指导关键点"), new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE, "车辆故障退出服务地点")))
|
||||
, new FaultType(4, List.of(new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_DK37, "车辆故障应急处置指导关键点-DK37车型"),
|
||||
new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE_T_DK37, "车辆故障退出服务地点-DK37车型")
|
||||
, new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_CCD_5037, "车辆故障应急处置指导关键点CCD-5037车型"),
|
||||
new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE_T_CCD_5037, "车辆故障退出服务地点CCD-5037车型")))
|
||||
);
|
||||
}
|
||||
|
||||
@SecurityRequirement(name = "jwt")
|
||||
|
@ -1,16 +1,28 @@
|
||||
package club.joylink.xiannccda.dto.fq;
|
||||
|
||||
import club.joylink.xiannccda.constants.common.FaultQueryType;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FaultType {
|
||||
|
||||
private Integer lineId;
|
||||
private List<FaultTypeDetail> fts;
|
||||
|
||||
public FaultType(Integer lineId, List<FaultTypeDetail> fts) {
|
||||
this.lineId = lineId;
|
||||
this.fts = fts;
|
||||
}
|
||||
|
||||
public static class FaultTypeDetail {
|
||||
|
||||
private String faultType;
|
||||
private String typeName;
|
||||
|
||||
public FaultType(FaultQueryType qt, String name) {
|
||||
public FaultTypeDetail(FaultQueryType qt, String name) {
|
||||
this.faultType = qt.name();
|
||||
this.typeName = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user