调整,添加故障查询功能
All checks were successful
local-test分支构建docker并发布运行 / Docker-Build (push) Successful in 1m14s

This commit is contained in:
tiger_zhou 2024-11-07 17:49:46 +08:00
parent cc5ab22cb1
commit 28727c9eac
2 changed files with 27 additions and 14 deletions

View File

@ -9,10 +9,12 @@ import club.joylink.xiannccda.dto.alertTip.AlertTipQueryDTO;
import club.joylink.xiannccda.dto.alertTip.AlertTipSaveDTO; import club.joylink.xiannccda.dto.alertTip.AlertTipSaveDTO;
import club.joylink.xiannccda.dto.fq.FaultQueryReqDTO; import club.joylink.xiannccda.dto.fq.FaultQueryReqDTO;
import club.joylink.xiannccda.dto.fq.FaultType; 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.AlertTip;
import club.joylink.xiannccda.entity.FaultQuery; import club.joylink.xiannccda.entity.FaultQuery;
import club.joylink.xiannccda.repository.IFaultQueryRepository; import club.joylink.xiannccda.repository.IFaultQueryRepository;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
@ -54,15 +56,14 @@ public class FaultQueryController {
@Operation(summary = "查询故障类型") @Operation(summary = "查询故障类型")
@GetMapping("/type") @GetMapping("/type")
// @CommonLogAnno(name = "决策信息-查看", logType = CommonLogTypeEnum.OPERATE, subLogType = SubEventType.QUERY) // @CommonLogAnno(name = "决策信息-查看", logType = CommonLogTypeEnum.OPERATE, subLogType = SubEventType.QUERY)
public Map<Integer, List<FaultType>> faultType() { public List<FaultType> faultType() {
Map<Integer, List<FaultType>> mapTypList = Maps.newHashMap(); return List.of(new FaultType(3,
mapTypList.put(3, List.of(new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE, "车辆故障应急处置指导关键点"), new FaultType(FaultQueryType.FAULT_EXIT_SERVICE, "车辆故障退出服务地点"))); List.of(new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE, "车辆故障应急处置指导关键点"), new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE, "车辆故障退出服务地点")))
mapTypList.put(4, List.of(new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_DK37, "车辆故障应急处置指导关键点-DK37车型"), , new FaultType(4, List.of(new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_DK37, "车辆故障应急处置指导关键点-DK37车型"),
new FaultType(FaultQueryType.FAULT_EXIT_SERVICE_T_DK37, "车辆故障退出服务地点-DK37车型") new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE_T_DK37, "车辆故障退出服务地点-DK37车型")
, new FaultType(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_CCD_5037, "车辆故障应急处置指导关键点CCD-5037车型"), , new FaultTypeDetail(FaultQueryType.FAULT_EMERGENCY_GUIDE_T_CCD_5037, "车辆故障应急处置指导关键点CCD-5037车型"),
new FaultType(FaultQueryType.FAULT_EXIT_SERVICE_T_CCD_5037, "车辆故障退出服务地点CCD-5037车型"))); new FaultTypeDetail(FaultQueryType.FAULT_EXIT_SERVICE_T_CCD_5037, "车辆故障退出服务地点CCD-5037车型")))
);
return mapTypList;
} }
@SecurityRequirement(name = "jwt") @SecurityRequirement(name = "jwt")

View File

@ -1,16 +1,28 @@
package club.joylink.xiannccda.dto.fq; package club.joylink.xiannccda.dto.fq;
import club.joylink.xiannccda.constants.common.FaultQueryType; import club.joylink.xiannccda.constants.common.FaultQueryType;
import java.util.List;
import lombok.Data; import lombok.Data;
@Data @Data
public class FaultType { public class FaultType {
private String faultType; private Integer lineId;
private String typeName; private List<FaultTypeDetail> fts;
public FaultType(FaultQueryType qt, String name) { public FaultType(Integer lineId, List<FaultTypeDetail> fts) {
this.faultType = qt.name(); this.lineId = lineId;
this.typeName = name; this.fts = fts;
}
public static class FaultTypeDetail {
private String faultType;
private String typeName;
public FaultTypeDetail(FaultQueryType qt, String name) {
this.faultType = qt.name();
this.typeName = name;
}
} }
} }