220 changed files with 5005 additions and 993 deletions
@ -0,0 +1,58 @@ |
|||
/** |
|||
* fshows.com |
|||
* Copyright (C) 2013-2025 All Rights Reserved. |
|||
*/ |
|||
package com.kms.yg.df.controller; |
|||
|
|||
import com.kms.yg.df.service.BsSgcDfSpPlayService; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.df.dto.DfSpPlayDto; |
|||
import com.kms.yxgh.df.dto.DfSpPlayQueDto; |
|||
import com.kms.yxgh.df.dto.ReservoirListDto; |
|||
import com.shuili.common.core.controller.BaseController; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @version SpTest.java, v 0.1 2025-03-07 15:56 lyd |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/safe/operation") |
|||
@Api(tags = "安全运行-视频播放") |
|||
public class BsSgcDfSpPlayController extends BaseController { |
|||
|
|||
@Autowired |
|||
private BsSgcDfSpPlayService bsSgcDfSpPlayService; |
|||
|
|||
/** |
|||
* 视频播放 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@PostMapping("/play") |
|||
@ApiOperation("视频播放") |
|||
public Response<DfSpPlayDto> Play(@RequestBody DfSpPlayQueDto dto) { |
|||
return Response.ok(bsSgcDfSpPlayService.play(dto)); |
|||
} |
|||
|
|||
/** |
|||
* 水库列表 |
|||
* |
|||
* @param |
|||
* @return |
|||
*/ |
|||
@PostMapping("/reservoirList") |
|||
@ApiOperation("水库列表") |
|||
public Response<ReservoirListDto> reservoirList(@RequestBody ReservoirListDto dto) { |
|||
return Response.ok(bsSgcDfSpPlayService.reservoirList(dto)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,204 @@ |
|||
package com.kms.yg.df.service; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.kms.yxgh.df.dto.DfSpPlayDto; |
|||
import com.kms.yxgh.df.dto.DfSpPlayQueDto; |
|||
import com.kms.yxgh.df.dto.ReservoirListDto; |
|||
import com.kms.yxgh.util.DataCenterRestTemplateUtils; |
|||
import com.kms.yxgh.util.RestTemplateUtil; |
|||
import lombok.Data; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.http.*; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.util.LinkedMultiValueMap; |
|||
import org.springframework.util.MultiValueMap; |
|||
import org.springframework.util.StringUtils; |
|||
import org.springframework.web.client.RestTemplate; |
|||
|
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
|
|||
/** |
|||
* 水文特征Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-01-16 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class BsSgcDfSpPlayService { |
|||
|
|||
@Value("${dataSync.url:}") |
|||
private String dataSyncUrl; |
|||
@Value("#{${dataSync.paths:{}}}") |
|||
private Map<String, String> paths = new HashMap<>(); |
|||
|
|||
@Value("${video.url:}") |
|||
private String videoUrl; |
|||
@Value("${video.phone:}") |
|||
private String videoPhone; |
|||
|
|||
@Autowired |
|||
private DataCenterRestTemplateUtils dataCenterRestTemplateUtils; |
|||
static final String BELONG_URL = "dws_rel_wmst_res"; |
|||
|
|||
static final String OAUTH_TOKEN = "/vsap-opp-service/resourceSharing/oauth/token"; |
|||
|
|||
static final String SP_PLAY_URL = "/vsap-opp-service/resourceSharing/startTransform"; |
|||
|
|||
public ReservoirListDto reservoirList(ReservoirListDto dto) { |
|||
ReservoirListDto listDto = new ReservoirListDto(); |
|||
// 1. 获取水库信息
|
|||
String uri = paths.get(BELONG_URL); |
|||
if (StringUtils.isEmpty(uri) || StringUtils.isEmpty(dataSyncUrl)) { |
|||
return new ReservoirListDto(); |
|||
} |
|||
String belongReservoirUrlJson = dataCenterRestTemplateUtils.doPostRequest(dataSyncUrl + uri, dto); |
|||
|
|||
DataResponse response = JSON.parseObject(belongReservoirUrlJson, DataResponse.class); |
|||
ReservoirListDto result = new ReservoirListDto(); |
|||
if (response.isSuccess()) { |
|||
result.setCameraIds(response.getData().stream().map(Item::getWmstCode).collect(Collectors.toList())); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
@Data |
|||
public static class DataResponse { |
|||
private String msg; |
|||
private String code; |
|||
private List<Item> data = new ArrayList<>(); |
|||
|
|||
public Boolean isSuccess() { |
|||
return "0".equals(getCode()); |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
public static class Item { |
|||
@JSONField(name = "WMST_CODE") |
|||
private String wmstCode; |
|||
} |
|||
|
|||
public DfSpPlayDto play(DfSpPlayQueDto dto) { |
|||
DfSpPlayDto rest = new DfSpPlayDto(); |
|||
try { |
|||
// 2. 获取令牌
|
|||
String spOauthTokenUrlJson = getToken(dto); |
|||
JSONObject tokenJson = parseJson(spOauthTokenUrlJson); |
|||
if (tokenJson == null || !isSuccess(tokenJson)) { |
|||
return rest; |
|||
} |
|||
JSONObject tokenData = tokenJson.getJSONObject("data"); |
|||
if (tokenData == null) { |
|||
log.warn("令牌数据为空"); |
|||
return rest; |
|||
} |
|||
String token = String.valueOf(tokenData.get("token")); |
|||
dto.setToken(token); |
|||
// 3. 调用第三方接口获取播放地址
|
|||
String playOauthTokenUrlJson = getSpPlayUrls(dto); |
|||
VideoInfo videoInfo = JSON.parseObject(playOauthTokenUrlJson, VideoInfo.class); |
|||
if (videoInfo.isSuccess()) { |
|||
rest.setUrlsMap(videoInfo.getData().getUrls()); |
|||
} |
|||
return rest; |
|||
} catch (Exception e) { |
|||
log.error("请求接口异常: {}", e.getMessage(), e); |
|||
} |
|||
return rest; |
|||
} |
|||
|
|||
@Data |
|||
public static class VideoInfo { |
|||
private String status; |
|||
private VideoData data; |
|||
|
|||
public Boolean isSuccess() { |
|||
return "0".equals(status); |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
public static class VideoData { |
|||
private Url urls; |
|||
} |
|||
|
|||
@Data |
|||
public static class Url { |
|||
private String rtspPlayUrl; |
|||
private String flvPlayUrl; |
|||
private String rtmpPlayUrl; |
|||
private String hlsPlayUrl; |
|||
} |
|||
|
|||
/** |
|||
* 解析 JSON 字符串为 JSONObject |
|||
*/ |
|||
private JSONObject parseJson(String json) { |
|||
if (StringUtils.isEmpty(json)) { |
|||
return null; |
|||
} |
|||
return JSONObject.parseObject(json); |
|||
} |
|||
|
|||
/** |
|||
* 解析 JSON 字符串为 JSONArray |
|||
*/ |
|||
private JSONArray parseJsonArray(Object obj) { |
|||
if (obj == null) { |
|||
return null; |
|||
} |
|||
return JSON.parseArray(obj.toString()); |
|||
} |
|||
|
|||
/** |
|||
* 判断接口响应是否成功 |
|||
*/ |
|||
private boolean isSuccess(JSONObject json) { |
|||
return json != null && Objects.equals(200, json.getIntValue("code")); |
|||
} |
|||
|
|||
public String getSpPlayUrls(DfSpPlayQueDto dto) { |
|||
HttpHeaders headers = new HttpHeaders(); |
|||
Map<String, String> uriVariables = new HashMap<>(); |
|||
MultiValueMap<String, String> headValues = new LinkedMultiValueMap<>(); |
|||
headValues.put("token", Collections.singletonList(dto.getToken())); |
|||
Map<String, String> paramMap = new HashMap<>(); |
|||
paramMap.put("cameraId", dto.getCameraId()); |
|||
headers.setContentType(MediaType.APPLICATION_JSON); |
|||
String seqResult2 = null; |
|||
try { |
|||
seqResult2 = RestTemplateUtil.postForObjectWithHead(paramMap, headValues, videoUrl + SP_PLAY_URL, String.class, uriVariables); |
|||
log.info("获取播放地址响应SP_PLAY_URL: {}", seqResult2); |
|||
} catch (Exception e) { |
|||
log.warn("请求接口SP_PLAY_URL返回异常: {}", e.getMessage()); |
|||
} |
|||
return seqResult2; |
|||
} |
|||
|
|||
public String getToken(DfSpPlayQueDto dto) { |
|||
dto.setMobile(videoPhone); |
|||
RestTemplate restTemplate = new RestTemplate(); |
|||
String token = null; |
|||
String requestStr = JSONObject.toJSONString(dto); |
|||
HttpHeaders headers = new HttpHeaders(); |
|||
headers.setContentType(MediaType.APPLICATION_JSON); |
|||
HttpEntity<String> httpEntity = new HttpEntity<>(requestStr, headers); |
|||
String seqResult = ""; |
|||
try { |
|||
ResponseEntity<String> responseEntity = restTemplate.exchange(videoUrl + OAUTH_TOKEN, HttpMethod.POST, httpEntity, String.class); |
|||
seqResult = responseEntity.getBody(); |
|||
log.info("获取播放地址响应SP_PLAY_URL: {}", seqResult); |
|||
} catch (Exception e) { |
|||
log.warn("请求接口OAUTH_TOKEN返回异常: {}", e.getMessage()); |
|||
} |
|||
return token; |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.kms.yxgh.common.controller; |
|||
|
|||
import com.kms.yg.cz.dto.CharInfoDto; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.common.dto.ObjectStatisticQueDto; |
|||
import com.kms.yxgh.common.enums.StaticIndexEnum; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.Map; |
|||
import java.util.function.Function; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/statistic") |
|||
@Api(tags = "通用统计接口") |
|||
public class CommonStatisticController { |
|||
|
|||
@PostMapping("/chart") |
|||
@ApiOperation("查询图表信息") |
|||
public Response<CharInfoDto> chart(@RequestBody ObjectStatisticQueDto sp) { |
|||
if (sp.getGroup() == null) { |
|||
return Response.ok(new CharInfoDto()); |
|||
} |
|||
Map<StaticIndexEnum, Map<String, String>> data = |
|||
Stream.concat(sp.getGroup().getLeftElements().stream(), sp.getGroup().getRightElements().stream()) |
|||
.distinct() |
|||
.collect(Collectors.toMap(Function.identity(), k -> k.getSource().statistic(sp))); |
|||
CharInfoDto infoDto = sp.getGroup().toChar(data); |
|||
return Response.ok(infoDto); |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CountDateDto { |
|||
private String myDate; |
|||
private String mySum; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CountDto { |
|||
|
|||
private String code; |
|||
private Integer sum; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CountLevelDto { |
|||
|
|||
private String level; |
|||
private String sum; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CountQxDto { |
|||
|
|||
private String date; |
|||
private String sum; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CountYhDto { |
|||
|
|||
private String date; |
|||
private String sum; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class DocV2Dto { |
|||
@ApiModelProperty(value = "图片") |
|||
private List<Item> images = Collections.emptyList(); |
|||
@ApiModelProperty(value = "音频") |
|||
private List<Item> audios = Collections.emptyList(); |
|||
@ApiModelProperty(value = "文档") |
|||
private List<Item> docs = Collections.emptyList(); |
|||
|
|||
@Data |
|||
public static class Item { |
|||
private String name; |
|||
private String url; |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.kms.yxgh.common.dto; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.common.enums.ProjectCharEnum; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("工程对象请求参数") |
|||
public class ObjectStatisticQueDto implements IAdcd { |
|||
|
|||
@ApiModelProperty(value = "查询类型") |
|||
private ProjectCharEnum group; |
|||
|
|||
@ApiModelProperty(value = "行政区划") |
|||
private String adcd; |
|||
|
|||
@ApiModelProperty(value = "工程对象编码") |
|||
private String code; |
|||
|
|||
@JSONField(name = "START_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@NotNull(message = "开始时间不能为空") |
|||
@ApiModelProperty(value = "开始时间", required = true) |
|||
private Date startTime; |
|||
|
|||
@JSONField(name = "END_TIME", format = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@NotNull(message = "结束时间不能为空") |
|||
@ApiModelProperty(value = "结束时间", required = true) |
|||
private Date endTime; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.kms.yxgh.common.enums; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public enum DfYhV2StatusEnum { |
|||
|
|||
DURING_INSPECTION("巡查中", "1"), |
|||
INSPECTED("已巡检", "2"), |
|||
NO_DEFECTS("无隐患", "3"), |
|||
UNDER_MAINTENANCE("养护中", "4"), |
|||
ACCEPTED("已验收", "5"), |
|||
YES_UNDER("已养护", "6"); |
|||
|
|||
|
|||
|
|||
private final String name; |
|||
private final String value; |
|||
|
|||
DfYhV2StatusEnum(String name, String value) { |
|||
this.name = name; |
|||
this.value = value; |
|||
} |
|||
|
|||
public static DfYhV2StatusEnum getDfYhV2StatusEnum(String value) { |
|||
for (DfYhV2StatusEnum statusEnum : DfYhV2StatusEnum.values()) { |
|||
if (statusEnum.getValue().equals(value)) { |
|||
return statusEnum; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.kms.yxgh.common.enums; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public enum PatrolMaintenanceCategory { |
|||
PROJECT_PATROL("工程巡查", "1"), |
|||
JD_PATROL("机电巡查", "2"), |
|||
|
|||
|
|||
DJ_LX("零星", "1"), |
|||
DJ_YB("一般", "2"), |
|||
DJ_JD("较大", "3"), |
|||
DJ_ZD("重大", "4"); |
|||
|
|||
private final String name; |
|||
private final String value; |
|||
|
|||
PatrolMaintenanceCategory(String name, String value) { |
|||
this.name = name; |
|||
this.value = value; |
|||
} |
|||
} |
@ -0,0 +1,140 @@ |
|||
package com.kms.yxgh.common.enums; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.kms.yg.cz.dto.CharInfoDto; |
|||
import com.shuili.common.utils.StringUtils; |
|||
import lombok.Getter; |
|||
|
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
|
|||
@Getter |
|||
public enum ProjectCharEnum { |
|||
|
|||
C_14("巡查记录分析", Arrays.asList(StaticIndexEnum.DF_JL_ONE_DATE_SUM, StaticIndexEnum.DF_JL_TWO_DATE_SUM), "数量", Collections.emptyList()), |
|||
C_15("巡查缺陷分析", Arrays.asList(StaticIndexEnum.DF_QX_ONE_DATE_SUM, StaticIndexEnum.DF_QX_TWO_DATE_SUM), "数量", Collections.emptyList()), |
|||
C_16("缺陷问题等级分析", Arrays.asList(StaticIndexEnum.DF_QX_DJ_LX_SUM, StaticIndexEnum.DF_QX_DJ_JD_SUM, StaticIndexEnum.DF_QX_DJ_ZD_SUM, StaticIndexEnum.DF_QX_DJ_YB_SUM), "数量", Collections.emptyList()), |
|||
C_17("缺陷养护对比分析", Arrays.asList(StaticIndexEnum.DF_BD_YH_SUM, StaticIndexEnum.DF_BD_QX_SUM), "数量", Collections.emptyList()), |
|||
C_18("巡查项目总数", Collections.singletonList(StaticIndexEnum.DF_XM_SUM), "数量", Collections.emptyList()), |
|||
|
|||
|
|||
C_1("工程分布", Collections.singletonList(StaticIndexEnum.DF_PROJECT_ADCD_SUM), "数量", Collections.emptyList()), |
|||
C_2("巡查分析", Arrays.asList(StaticIndexEnum.DF_CHECKING_ADCD_SUM, StaticIndexEnum.DF_JD_ADCD_SUM), "数量", Collections.emptyList()), |
|||
C_3("缺陷和养护对比", Arrays.asList(StaticIndexEnum.DF_QX_ADCD_SUM, StaticIndexEnum.DF_YH_ADCD_SUM), "数量", Collections.emptyList()), |
|||
; |
|||
|
|||
|
|||
private final String title; |
|||
private final List<StaticIndexEnum> leftElements; |
|||
private final String leftName; |
|||
private final String leftUnit; |
|||
private final List<StaticIndexEnum> rightElements; |
|||
private final String rightName; |
|||
private final String rightUnit; |
|||
|
|||
ProjectCharEnum(String title, List<StaticIndexEnum> leftElements, List<StaticIndexEnum> rightElements) { |
|||
this.title = title; |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getZhName(); |
|||
this.rightName = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getZhName(); |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
ProjectCharEnum(String title, List<StaticIndexEnum> leftElements, List<StaticIndexEnum> rightElements, String rightName) { |
|||
this.title = title; |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getZhName(); |
|||
this.rightName = rightName; |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
ProjectCharEnum(String title, List<StaticIndexEnum> leftElements, String leftName, List<StaticIndexEnum> rightElements) { |
|||
this.title = title; |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getZhName(); |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
ProjectCharEnum(String title, List<StaticIndexEnum> leftElements, String leftName, List<StaticIndexEnum> rightElements, String rightName) { |
|||
this.title = title; |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = rightName; |
|||
this.leftUnit = CollectionUtil.isEmpty(this.leftElements) ? "" : this.leftElements.get(0).getUnit(); |
|||
this.rightUnit = CollectionUtil.isEmpty(this.rightElements) ? "" : this.rightElements.get(0).getUnit(); |
|||
} |
|||
|
|||
ProjectCharEnum(String title, List<StaticIndexEnum> leftElements, String leftName, String leftUnit, List<StaticIndexEnum> rightElements, String rightName, String rightUnit) { |
|||
this.title = title; |
|||
this.leftElements = leftElements; |
|||
this.rightElements = rightElements; |
|||
this.leftName = leftName; |
|||
this.rightName = rightName; |
|||
this.leftUnit = leftUnit; |
|||
this.rightUnit = rightUnit; |
|||
} |
|||
|
|||
|
|||
public CharInfoDto toChar(Map<StaticIndexEnum, Map<String, String>> dataMap) { |
|||
CharInfoDto charInfoDto = new CharInfoDto(); |
|||
charInfoDto.setTitle(this.title); |
|||
charInfoDto.setXAxis(Stream.concat(this.leftElements.stream(), this.rightElements.stream()) |
|||
.flatMap(type -> dataMap.getOrDefault(type, new HashMap<>()).keySet().stream() |
|||
).filter(Objects::nonNull) |
|||
.distinct() |
|||
.sorted() |
|||
.collect(Collectors.toList())); |
|||
List<CharInfoDto.YAxis> yAxis = new ArrayList<>(); |
|||
|
|||
if (CollectionUtil.isNotEmpty(this.leftElements)) { |
|||
CharInfoDto.YAxis left = new CharInfoDto.YAxis(); |
|||
left.setName(this.leftName); |
|||
left.setUnit(this.leftUnit); |
|||
left.setSeries(getCollect(this.leftElements, dataMap, charInfoDto)); |
|||
yAxis.add(left); |
|||
} |
|||
if (CollectionUtil.isNotEmpty(this.rightElements)) { |
|||
CharInfoDto.YAxis right = new CharInfoDto.YAxis(); |
|||
right.setName(this.rightName); |
|||
right.setUnit(this.rightUnit); |
|||
right.setSeries(getCollect(this.rightElements, dataMap, charInfoDto)); |
|||
yAxis.add(right); |
|||
} |
|||
charInfoDto.setYAxis(yAxis); |
|||
return charInfoDto; |
|||
} |
|||
|
|||
private List<CharInfoDto.Series> getCollect(List<StaticIndexEnum> element, Map<StaticIndexEnum, Map<String, String>> dataMap, CharInfoDto charInfoDto) { |
|||
return element.stream() |
|||
.map(type -> { |
|||
CharInfoDto.Series series = new CharInfoDto.Series(); |
|||
series.setName(type.getZhName()); |
|||
series.setCode(type.name()); |
|||
Map<String, String> values = dataMap.getOrDefault(type, new HashMap<>()); |
|||
series.setData(charInfoDto.getXAxis().stream() |
|||
.map(time -> { |
|||
Object value = values.get(time); |
|||
return value == null || StringUtils.isEmpty(value.toString()) ? type.getDefaultValue() : value.toString(); |
|||
}).collect(Collectors.toList())); |
|||
series.setSum(series.getData().stream().mapToDouble(Double::parseDouble).sum() + ""); |
|||
return series; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
|
|||
public static ProjectCharEnum getEnum(String name) { |
|||
return Arrays.stream(ProjectCharEnum.values()) |
|||
.filter(item -> item.name().equals(name)) |
|||
.findFirst() |
|||
.orElse(null); |
|||
} |
|||
} |
@ -0,0 +1,175 @@ |
|||
package com.kms.yxgh.common.enums; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.kms.system.domain.SysXzqh; |
|||
import com.kms.system.service.SysXzqhService; |
|||
import com.kms.yxgh.common.dto.*; |
|||
import com.kms.yxgh.common.service.Statistic; |
|||
import com.kms.yxgh.df.mapper.DfCheckingProblemV2Mapper; |
|||
import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper; |
|||
import com.kms.yxgh.df.mapper.DfCheckingV2Mapper; |
|||
import com.kms.yxgh.df.mapper.DfYhV2Mapper; |
|||
import com.shuili.common.utils.SpringUtils; |
|||
import lombok.Getter; |
|||
|
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Getter |
|||
public enum StaticIndexEnum { |
|||
|
|||
DF_JL_ONE_DATE_SUM("机电巡查", sp -> { |
|||
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.JD_PATROL); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
DF_JL_TWO_DATE_SUM("工程巡查", sp -> { |
|||
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countDateGroup(sp, PatrolMaintenanceCategory.PROJECT_PATROL); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
|
|||
|
|||
DF_QX_ONE_DATE_SUM("机电巡查", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countDate(sp, PatrolMaintenanceCategory.JD_PATROL); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
DF_QX_TWO_DATE_SUM("工程巡查", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countDate(sp, PatrolMaintenanceCategory.PROJECT_PATROL); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
|
|||
|
|||
DF_QX_DJ_LX_SUM("零星", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
DF_QX_DJ_YB_SUM("一般", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
DF_QX_DJ_JD_SUM("较大", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
DF_QX_DJ_ZD_SUM("重大", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
|
|||
|
|||
DF_BD_YH_SUM("养护次数", sp -> { |
|||
DfYhV2Mapper mapper = SpringUtils.getBean(DfYhV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countYhDto(sp); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
|
|||
DF_BD_QX_SUM("缺陷次数", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDateDto> list = mapper.countQx(sp); |
|||
return dataGroup(list); |
|||
}, "个", "0"), |
|||
|
|||
DF_XM_SUM("巡查项目数", sp -> { |
|||
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|||
int list = mapper.countXm(sp); |
|||
Map<String, String> map = new HashMap<>(); |
|||
map.put("sum", String.valueOf(list)); |
|||
return map; |
|||
}, "个", "0"), |
|||
|
|||
|
|||
DF_QX_ADCD_SUM("缺陷数量", sp -> { |
|||
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|||
List<CountDto> list = mapper.count(sp); |
|||
return adcdGroup(list, sp); |
|||
}, "个", "0"), |
|||
DF_YH_ADCD_SUM("养护次数", sp -> { |
|||
DfYhV2Mapper mapper = SpringUtils.getBean(DfYhV2Mapper.class); |
|||
List<CountDto> list = mapper.count(sp); |
|||
return adcdGroup(list, sp); |
|||
}, "个", "0"), |
|||
DF_PROJECT_ADCD_SUM("工程数量", sp -> { |
|||
DfCheckingV2Mapper mapper = SpringUtils.getBean(DfCheckingV2Mapper.class); |
|||
List<CountDto> list = mapper.count(sp); |
|||
return adcdGroup(list, sp); |
|||
}, "个", "0"), |
|||
DF_CHECKING_ADCD_SUM("工程巡查", sp -> { |
|||
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|||
List<CountDto> list = mapper.count(sp, PatrolMaintenanceCategory.PROJECT_PATROL); |
|||
return adcdGroup(list, sp); |
|||
}, "个", "0"), |
|||
DF_JD_ADCD_SUM("机电巡查", sp -> { |
|||
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|||
List<CountDto> list = mapper.count(sp, PatrolMaintenanceCategory.JD_PATROL); |
|||
return adcdGroup(list, sp); |
|||
}, "个", "0"), |
|||
|
|||
; |
|||
|
|||
|
|||
private final String zhName; |
|||
private final Statistic source; |
|||
private final String unit; |
|||
private final String defaultValue; |
|||
|
|||
StaticIndexEnum(String zhName, Statistic source, String unit, String defaultValue) { |
|||
this.zhName = zhName; |
|||
this.source = source; |
|||
this.unit = unit; |
|||
this.defaultValue = defaultValue; |
|||
} |
|||
|
|||
|
|||
|
|||
public static Map<String, String> dataGroup(List<CountDateDto> list) { |
|||
if (CollectionUtil.isEmpty(list) && list.isEmpty()) { |
|||
return Collections.emptyMap(); |
|||
} |
|||
return list.stream() |
|||
.collect(Collectors.toMap(CountDateDto::getMyDate, CountDateDto::getMySum)); |
|||
} |
|||
|
|||
|
|||
public static Map<String, String> adcdGroup(List<CountDto> list, ObjectStatisticQueDto sp) { |
|||
if (CollectionUtil.isEmpty(list)) { |
|||
return Collections.emptyMap(); |
|||
} |
|||
String queryAdcd = sp.getAdcdQx(); |
|||
int index = queryAdcd.length(); |
|||
List<String> adcds = list.stream() |
|||
.map(co -> fullAdcd(co.getCode(), index)) |
|||
.distinct() |
|||
.collect(Collectors.toList()); |
|||
SysXzqhService service = SpringUtils.getBean(SysXzqhService.class); |
|||
Map<String, SysXzqh> map = service.get(adcds); |
|||
return list.stream().map(item -> { |
|||
String code = fullAdcd(item.getCode(), index); |
|||
SysXzqh sysXzqh = map.get(code); |
|||
if (sysXzqh != null) { |
|||
item.setCode(sysXzqh.getName()); |
|||
return item; |
|||
} else { |
|||
return null; |
|||
} |
|||
}).filter(Objects::nonNull) |
|||
.collect(Collectors.groupingBy(CountDto::getCode, |
|||
Collectors.reducing("0", item -> item.getSum() + "", (a, b) -> { |
|||
int sum = Integer.parseInt(a); |
|||
int add = Integer.parseInt(b); |
|||
return String.valueOf(sum + add); |
|||
} |
|||
))); |
|||
} |
|||
|
|||
public static String fullAdcd(String adcd, int index) { |
|||
return (adcd.substring(0, index + 2) + "0000000000000000").substring(0, 12); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.kms.yxgh.common.service; |
|||
|
|||
import com.kms.yxgh.common.dto.ObjectStatisticQueDto; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@FunctionalInterface |
|||
public interface Statistic { |
|||
|
|||
|
|||
/** |
|||
* 统计 |
|||
* |
|||
* @param sp 请求条件 |
|||
* @return 统计结果 |
|||
*/ |
|||
Map<String, String> statistic(ObjectStatisticQueDto sp); |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.kms.yxgh.df.controller.v2; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.df.dto.v2.DfProblemV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto; |
|||
import com.kms.yxgh.df.service.DfCheckingProblemV2Service; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/df/v2/problem") |
|||
@Api(tags = "堤防巡查缺陷v2") |
|||
public class DfCheckingProblemV2Controller { |
|||
|
|||
private final DfCheckingProblemV2Service dfCheckingProblemV2Service; |
|||
|
|||
|
|||
/** |
|||
* 查询堤防巡视检查记录列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("堤防巡查缺陷列表v2") |
|||
public IPage<DfProblemV2Dto> list(@RequestBody SearchParam<DfRecordSearchV2Dto> sp) { |
|||
return dfCheckingProblemV2Service.list(sp); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.kms.yxgh.df.controller.v2; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordDetailV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto; |
|||
import com.kms.yxgh.df.service.DfCheckingRecordV2Service; |
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/df/v2/record") |
|||
@Api(tags = "堤防巡视检查记录v2") |
|||
public class DfCheckingRecordV2Controller { |
|||
|
|||
private final DfCheckingRecordV2Service dfCheckingRecordV2Service; |
|||
|
|||
/** |
|||
* 查询堤防巡视检查记录列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("堤防巡视检查记录列表v2") |
|||
public IPage<DfRecordDetailV2Dto> list(@RequestBody SearchParam<DfRecordSearchV2Dto> sp) { |
|||
return dfCheckingRecordV2Service.list(sp); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡视检查记录详情v2") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<DfRecordDetailV2Dto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(dfCheckingRecordV2Service.getInfo(id)); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡视检查记录新增或修改v2") |
|||
@Log(title = "堤防巡视检查记录新增或修改v2", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/{commit}") |
|||
public Response<DfRecordDetailV2Dto> edit(@Validated(UpdateGroup.class) |
|||
@RequestBody DfRecordDetailV2Dto dfRecord, |
|||
@PathVariable("commit") Boolean commit) { |
|||
return Response.ok(dfCheckingRecordV2Service.edit(dfRecord, commit)); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡视检查记录删除v2") |
|||
@Log(title = "堤防巡视检查记录删除v2", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public Response<Boolean> myRemove(@PathVariable("ids") String[] ids) { |
|||
return Response.ok(dfCheckingRecordV2Service.myRemove(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.kms.yxgh.df.controller.v2; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.df.dto.v2.DfV2CheckingDto; |
|||
import com.kms.yxgh.df.dto.v2.DfV2CheckingSearchDto; |
|||
import com.kms.yxgh.df.service.DfCheckingV2Service; |
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* 堤防巡视检查计划Controller |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/df/v2/checking") |
|||
@Api(tags = "堤防巡查项目v2") |
|||
public class DfCheckingV2Controller { |
|||
|
|||
|
|||
private final DfCheckingV2Service dfCheckingV2Service; |
|||
|
|||
|
|||
@PostMapping("/list") |
|||
@ApiOperation("堤防巡查项目列表") |
|||
public IPage<DfV2CheckingDto> list(@RequestBody SearchParam<DfV2CheckingSearchDto> sp) { |
|||
return dfCheckingV2Service.list(sp); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡查项目详情") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<DfV2CheckingDto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(dfCheckingV2Service.getInfo(id)); |
|||
} |
|||
|
|||
@Log(title = "堤防巡查项目新增", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ApiOperation("堤防巡查项目新增") |
|||
public Response<DfV2CheckingDto> add(@RequestBody DfV2CheckingDto dfV2Ck) { |
|||
return Response.ok(dfCheckingV2Service.add(dfV2Ck)); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡查项目修改") |
|||
@Log(title = "堤防巡查项目修改", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
public Response<DfV2CheckingDto> edit(@RequestBody DfV2CheckingDto dfV2Ck) { |
|||
return Response.ok(dfCheckingV2Service.edit(dfV2Ck)); |
|||
} |
|||
|
|||
@ApiOperation("堤防巡查项目删除") |
|||
@Log(title = "堤防巡查项目删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public Response<Boolean> remove(@PathVariable("ids") String[] ids) { |
|||
return Response.ok(dfCheckingV2Service.myRemove(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.kms.yxgh.df.controller.v2; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import com.kms.yxgh.common.ApprovalTypeEnum; |
|||
import com.kms.yxgh.common.controller.ApprovalAbstractController; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfYhApproveDto; |
|||
import com.kms.yxgh.df.dto.v2.DfYhDetailV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfYhListV2Dto; |
|||
import com.kms.yxgh.df.service.DfYhV2Service; |
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import static com.kms.yxgh.common.ApprovalTypeEnum.YH_V2_RECORD; |
|||
|
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/df/v2/yh") |
|||
@Api(tags = "堤防养护v2") |
|||
public class DfYhV2Controller extends ApprovalAbstractController<DfRecordSearchV2Dto, DfYhApproveDto> { |
|||
|
|||
private final DfYhV2Service dfYhV2Service; |
|||
|
|||
@PostMapping("/list") |
|||
@ApiOperation("堤防养护列表v2") |
|||
public IPage<DfYhListV2Dto> list(@RequestBody SearchParam<DfRecordSearchV2Dto> sp) { |
|||
return dfYhV2Service.list(sp); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("堤防养护详情v2") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<DfYhDetailV2Dto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(dfYhV2Service.getInfo(id)); |
|||
} |
|||
|
|||
@ApiOperation("堤防养护新增或修改v2") |
|||
@Log(title = "堤防养护新增或修改v2", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/{commit}") |
|||
public Response<DfYhDetailV2Dto> edit(@Validated(UpdateGroup.class) |
|||
@RequestBody DfYhDetailV2Dto dfYh, |
|||
@PathVariable("commit") Boolean commit) { |
|||
return Response.ok(dfYhV2Service.edit(dfYh, commit)); |
|||
} |
|||
|
|||
@ApiOperation("堤防养护删除v2") |
|||
@Log(title = "堤防养护删除v2", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public Response<Boolean> myRemove(@PathVariable("ids") String[] ids) { |
|||
return Response.ok(dfYhV2Service.myRemove(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public ApprovalTypeEnum getApprovalType() { |
|||
return YH_V2_RECORD; |
|||
} |
|||
} |
@ -0,0 +1,143 @@ |
|||
package com.kms.yxgh.df.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 缺陷记录 bs_sgc_df_xcqx |
|||
* |
|||
* @author sy |
|||
* @date 2024-01-04 |
|||
*/ |
|||
@TableName("bs_sgc_df_xcqx") |
|||
@Data |
|||
@ApiModel("缺陷记录") |
|||
public class DfCheckingProblemV2 extends SyBaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String itemId; |
|||
|
|||
/** |
|||
* 问题位置 |
|||
*/ |
|||
@ApiModelProperty("部位") |
|||
private String parts; |
|||
|
|||
|
|||
@ApiModelProperty("问题等级") |
|||
private String problemLevel; |
|||
|
|||
/** |
|||
* 项目id |
|||
*/ |
|||
@ApiModelProperty("项目id") |
|||
private String checkingId; |
|||
|
|||
/** |
|||
* 记录id |
|||
*/ |
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
|
|||
/** |
|||
* 巡查状态字典:patrol_maintenance_status |
|||
*/ |
|||
@ApiModelProperty("巡查状态字典:patrol_maintenance_status") |
|||
private String status; |
|||
|
|||
|
|||
/** |
|||
* 巡查项目名称 |
|||
*/ |
|||
@ApiModelProperty("巡查项目名称") |
|||
private String checkingName; |
|||
|
|||
|
|||
/** |
|||
* 巡查类型 字典:patrol_maintenance_type |
|||
*/ |
|||
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type") |
|||
private String type; |
|||
|
|||
/** |
|||
* 巡查类别字典:key_jf_patrol_category |
|||
*/ |
|||
@ApiModelProperty("巡查类别字典:patrol_maintenance_category") |
|||
private String category; |
|||
|
|||
|
|||
/** |
|||
* 巡查责任人 |
|||
*/ |
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolderName; |
|||
|
|||
/** |
|||
* 巡查责任人id |
|||
*/ |
|||
@ApiModelProperty("巡查责任人id") |
|||
private String dutyHolderId; |
|||
|
|||
/** |
|||
* 堤防代码 |
|||
*/ |
|||
@ApiModelProperty("堤防代码") |
|||
private String dikeCode; |
|||
|
|||
|
|||
/** |
|||
* 堤防代码名称 |
|||
*/ |
|||
@ApiModelProperty("堤防代码名称") |
|||
private String dikeName; |
|||
|
|||
/** |
|||
* 巡查开始时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("巡查开始时间") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 巡查开始时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("巡查结束时间") |
|||
private Date endDate; |
|||
|
|||
/** |
|||
* 问题位置 |
|||
*/ |
|||
@ApiModelProperty("问题位置") |
|||
private String position; |
|||
|
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
/** |
|||
* 文档 |
|||
*/ |
|||
@ApiModelProperty("文档") |
|||
private String doc; |
|||
|
|||
/** |
|||
* 创建人id |
|||
*/ |
|||
@ApiModelProperty("创建人id") |
|||
private String createUid; |
|||
|
|||
|
|||
/** |
|||
* 附加配置 |
|||
*/ |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
|
|||
|
|||
} |
@ -0,0 +1,122 @@ |
|||
package com.kms.yxgh.df.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
import java.util.Date; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 害堤动物防治计划对象 bs_sgc_df_xcitem |
|||
* |
|||
* @author sy |
|||
* @date 2024-01-04 |
|||
*/ |
|||
@TableName("bs_sgc_df_xsxcjl") |
|||
@Data |
|||
@ApiModel("项目管理记录") |
|||
public class DfCheckingRecord extends SyBaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 开始时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 结束时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
|
|||
/** |
|||
* 巡查范围 |
|||
*/ |
|||
@ApiModelProperty("巡查范围") |
|||
private String scope; |
|||
|
|||
|
|||
/** |
|||
* 项目id |
|||
*/ |
|||
@ApiModelProperty("项目id") |
|||
private String checkingId; |
|||
|
|||
/** |
|||
* 巡查状态字典:patrol_maintenance_status |
|||
*/ |
|||
@ApiModelProperty("巡查状态字典:patrol_maintenance_status") |
|||
private String status; |
|||
|
|||
/** |
|||
* 巡查责任人 |
|||
*/ |
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolderName; |
|||
|
|||
/** |
|||
* 巡查责任人id |
|||
*/ |
|||
@ApiModelProperty("巡查责任人id") |
|||
private String dutyHolderId; |
|||
|
|||
/** |
|||
* 项目名称 |
|||
*/ |
|||
@ApiModelProperty("项目名称") |
|||
private String checkingName; |
|||
|
|||
/** |
|||
* 巡查类型 字典:patrol_maintenance_type |
|||
*/ |
|||
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type") |
|||
private String type; |
|||
|
|||
/** |
|||
* 巡查类别字典:key_jf_patrol_category |
|||
*/ |
|||
@ApiModelProperty("巡查类别字典:patrol_maintenance_category") |
|||
private String category; |
|||
|
|||
/** |
|||
* 堤防代码 |
|||
*/ |
|||
@ApiModelProperty("堤防代码") |
|||
private String dikeCode; |
|||
|
|||
|
|||
/** |
|||
* 堤防代码名称 |
|||
*/ |
|||
@ApiModelProperty("堤防代码名称") |
|||
private String dikeName; |
|||
|
|||
|
|||
/** |
|||
* 创建人id |
|||
*/ |
|||
@ApiModelProperty("创建人id") |
|||
private String createUid; |
|||
|
|||
|
|||
/** |
|||
* 附加配置 |
|||
*/ |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
|
|||
/** |
|||
* 创建人名称 |
|||
*/ |
|||
@ApiModelProperty("创建人名称") |
|||
private String createName; |
|||
|
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.kms.yxgh.df.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 项目管理子项 |
|||
* |
|||
* @author sy |
|||
* @date 2024-01-04 |
|||
*/ |
|||
@TableName("bs_sgc_df_xcitem") |
|||
@Data |
|||
@ApiModel("项目管理子项") |
|||
public class DfCheckingV2ProjectItem extends SyBaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 项目id |
|||
*/ |
|||
@ApiModelProperty("项目id") |
|||
private String checkingId; |
|||
|
|||
/** |
|||
* 检查部位 |
|||
*/ |
|||
@ApiModelProperty("检查部位") |
|||
private String parts; |
|||
|
|||
/** |
|||
* 检查内容 |
|||
*/ |
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
|
|||
|
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.kms.yxgh.df.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import com.shuili.common.annotation.Excel; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 害堤动物防治计划对象 bs_sgc_df_hdjh |
|||
* |
|||
* @author sy |
|||
* @date 2024-01-04 |
|||
*/ |
|||
@TableName("bs_sgc_df_xmgl") |
|||
@Data |
|||
@ApiModel("项目管理") |
|||
public class DfCheckingV2ProjectManage extends SyBaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 堤防代码 |
|||
*/ |
|||
@ApiModelProperty("堤防代码") |
|||
private String dikeCode; |
|||
|
|||
|
|||
/** |
|||
* 堤防代码名称 |
|||
*/ |
|||
@ApiModelProperty("堤防代码名称") |
|||
private String dikeName; |
|||
|
|||
/** |
|||
* 项目名称 |
|||
*/ |
|||
@ApiModelProperty("项目名称") |
|||
private String name; |
|||
|
|||
|
|||
/** |
|||
* 巡查类型 字典:patrol_maintenance_type |
|||
*/ |
|||
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type") |
|||
private String type; |
|||
|
|||
|
|||
/** |
|||
* 巡查类别字典:key_jf_patrol_category |
|||
*/ |
|||
@ApiModelProperty("巡查类别字典:patrol_maintenance_category") |
|||
private String category; |
|||
|
|||
/** |
|||
* 附加配置 |
|||
*/ |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
|
|||
/** |
|||
* 创建人名称 |
|||
*/ |
|||
@ApiModelProperty("创建人名称") |
|||
private String createName; |
|||
|
|||
|
|||
} |
@ -0,0 +1,136 @@ |
|||
package com.kms.yxgh.df.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.SyBaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 缺陷记录 bs_sgc_df_xcqx |
|||
* |
|||
* @author sy |
|||
* @date 2024-01-04 |
|||
*/ |
|||
@TableName("bs_sgc_df_xcyj") |
|||
@Data |
|||
@ApiModel("堤防巡视养护管理表") |
|||
public class DfYhV2 extends SyBaseEntity { |
|||
|
|||
/** |
|||
* 巡查项目id |
|||
*/ |
|||
@ApiModelProperty("巡查项目id") |
|||
private String checkingId; |
|||
/** |
|||
* 缺陷id |
|||
*/ |
|||
@ApiModelProperty("缺陷id") |
|||
private String problemId; |
|||
/** |
|||
* 文档 |
|||
*/ |
|||
@ApiModelProperty("文档") |
|||
private String doc; |
|||
|
|||
|
|||
/** |
|||
* 维养责任人id |
|||
*/ |
|||
@ApiModelProperty("维养责任人id") |
|||
private String dutyHolderId; |
|||
|
|||
/** |
|||
* 维养责任人名称 |
|||
*/ |
|||
@ApiModelProperty("维养责任人名称") |
|||
private String dutyHolderName; |
|||
|
|||
|
|||
/** |
|||
* 问题等级 |
|||
*/ |
|||
@ApiModelProperty("问题等级") |
|||
private String problemLevel; |
|||
|
|||
|
|||
/** |
|||
* 记录id |
|||
*/ |
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
/** |
|||
* 巡查状态字典:patrol_maintenance_status |
|||
*/ |
|||
@ApiModelProperty("巡查状态字典:patrol_maintenance_status") |
|||
private String status; |
|||
|
|||
/** |
|||
* name |
|||
*/ |
|||
@ApiModelProperty("name") |
|||
private String name; |
|||
|
|||
/** |
|||
* 巡查类型 字典:patrol_maintenance_type |
|||
*/ |
|||
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type") |
|||
private String type; |
|||
|
|||
/** |
|||
* 巡查类别字典:key_jf_patrol_category |
|||
*/ |
|||
@ApiModelProperty("巡查类别字典:patrol_maintenance_category") |
|||
private String category; |
|||
|
|||
/** |
|||
* 堤防代码 |
|||
*/ |
|||
@ApiModelProperty("堤防代码") |
|||
private String dikeCode; |
|||
|
|||
|
|||
/** |
|||
* 堤防代码名称 |
|||
*/ |
|||
@ApiModelProperty("堤防代码名称") |
|||
private String dikeName; |
|||
|
|||
/** |
|||
* 维养开始时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("维养开始时间") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 维养结束时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("维养结束时间") |
|||
private Date endDate; |
|||
|
|||
|
|||
/** |
|||
* 创建人id |
|||
*/ |
|||
@ApiModelProperty("创建人id") |
|||
private String createUid; |
|||
|
|||
|
|||
/** |
|||
* 附加配置 |
|||
*/ |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
|
|||
|
|||
private String content; |
|||
|
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.kms.yxgh.df.dto; |
|||
|
|||
import com.kms.yg.df.service.BsSgcDfSpPlayService; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@ApiModel("视频播放") |
|||
@Data |
|||
public class DfSpPlayDto { |
|||
|
|||
@ApiModelProperty(value = "播放地址") |
|||
private BsSgcDfSpPlayService.Url urlsMap; |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.kms.yxgh.df.dto; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @ClassName: DfSpPlayQueDto |
|||
* @Description: TODO |
|||
* @Date: 2024/3/5 上午10:18 |
|||
* * |
|||
* @author: hxh |
|||
* @version: 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@ApiModel("安全运行-视频播放") |
|||
public class DfSpPlayQueDto { |
|||
private static final long serialVersionUID = 1L; |
|||
@ApiModelProperty("手机号码") |
|||
private String mobile; |
|||
|
|||
@ApiModelProperty("视频id") |
|||
private String cameraId; |
|||
|
|||
@ApiModelProperty(value = "token") |
|||
private String token; |
|||
|
|||
@ApiModelProperty(value = "页码") |
|||
private Integer pageSize = 10; |
|||
|
|||
@ApiModelProperty(value = "每页条数") |
|||
private Integer pageNum = 1; |
|||
|
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.kms.yxgh.df.dto; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@ApiModel("视频播放") |
|||
@Data |
|||
public class ReservoirListDto { |
|||
@ApiModelProperty(value = "视频ids") |
|||
private List<String> cameraIds = new ArrayList<>(); |
|||
|
|||
@JSONField(name = "RES_CODE") |
|||
@ApiModelProperty(value = "水库编码") |
|||
private String resCode; |
|||
|
|||
|
|||
@ApiModelProperty(value = "页码") |
|||
private Integer pageSize = 1000; |
|||
@ApiModelProperty(value = "每页条数") |
|||
private Integer pageNum = 1; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.kms.yxgh.df.dto; |
|||
|
|||
import com.alibaba.fastjson.annotation.JSONField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @ClassName: ReservoirListQueDto |
|||
* @Description: TODO |
|||
* @Date: 2024/3/5 上午10:18 |
|||
* * |
|||
* @author: hxh |
|||
* @version: 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@ApiModel("水库视频列表") |
|||
public class ReservoirListQueDto { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty(value = "页码") |
|||
private Integer pageSize = 10; |
|||
|
|||
@ApiModelProperty(value = "每页条数") |
|||
private Integer pageNum = 1; |
|||
|
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.AddGroup; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import com.kms.yxgh.common.dto.DocV2Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("堤防巡查问题v2") |
|||
public class DfProblemV2Dto { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@ApiModelProperty("id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 问题位置 |
|||
*/ |
|||
@ApiModelProperty("问题位置") |
|||
private String position; |
|||
|
|||
/** |
|||
* 文档 |
|||
*/ |
|||
@ApiModelProperty("文档") |
|||
private String doc; |
|||
|
|||
/** |
|||
* 问题位置 |
|||
*/ |
|||
@ApiModelProperty("部位") |
|||
private String parts; |
|||
|
|||
|
|||
@ApiModelProperty("问题等级") |
|||
private String problemLevel; |
|||
|
|||
@ApiModelProperty("问题Id") |
|||
private String problemId; |
|||
|
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
|
|||
@ApiModelProperty("巡查项目ID") |
|||
private String checkingId; |
|||
|
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
@ApiModelProperty("巡查项目名称") |
|||
private String checkingName; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private String status; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private String type; |
|||
|
|||
@ApiModelProperty("巡查类别") |
|||
private String category; |
|||
|
|||
@NotNull(message = "开始时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
|
|||
@NotNull(message = "结束时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
|
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolderId; |
|||
|
|||
@ApiModelProperty("巡查责任人名称") |
|||
private String dutyHolderName; |
|||
|
|||
} |
@ -0,0 +1,118 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.AddGroup; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import com.kms.yxgh.common.dto.DocV2Dto; |
|||
import com.kms.yxgh.df.dto.DfCheckingDetailDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Collections; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel("堤防巡视检查记录详情v2") |
|||
public class DfRecordDetailV2Dto { |
|||
|
|||
|
|||
@ApiModelProperty("文档") |
|||
private DocV2Dto doc; |
|||
|
|||
@NotBlank(message = "巡查记录ID不能为空") |
|||
@ApiModelProperty("巡查记录") |
|||
private String id; |
|||
|
|||
@NotBlank(message = "巡查项目ID不能为空", groups = {UpdateGroup.class}) |
|||
@ApiModelProperty("巡查项目ID") |
|||
private String checkingId; |
|||
|
|||
@ApiModelProperty("巡查项目名称") |
|||
private String checkingName; |
|||
|
|||
@NotBlank(message = "堤防编码不能为空", groups = {UpdateGroup.class}) |
|||
@ApiModelProperty("堤防编码") |
|||
private String dikeCode; |
|||
|
|||
@NotBlank(message = "堤防名称不能为空", groups = {UpdateGroup.class}) |
|||
@ApiModelProperty("堤防名称") |
|||
private String dikeName; |
|||
|
|||
@ApiModelProperty("堤防类型") |
|||
private String dikeType; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private String status; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private String type; |
|||
|
|||
@ApiModelProperty("巡查类别") |
|||
private String category; |
|||
|
|||
@NotNull(message = "开始时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
|
|||
@NotNull(message = "结束时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
|
|||
@ApiModelProperty("巡查范围") |
|||
private String scope; |
|||
|
|||
@ApiModelProperty("创建者") |
|||
private String createUid; |
|||
|
|||
@ApiModelProperty("创建者名称") |
|||
private String createName; |
|||
|
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
|
|||
|
|||
@ApiModelProperty("巡查详情") |
|||
private List<DfRecordItemDetailV2Dto> problems = Collections.emptyList(); |
|||
|
|||
|
|||
@Data |
|||
public static class DfRecordItemDetailV2Dto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("检查项ID") |
|||
private String itemId; |
|||
|
|||
@ApiModelProperty("检查部位") |
|||
private List<String> parts = Collections.emptyList(); |
|||
|
|||
@ApiModelProperty("位置") |
|||
private String position; |
|||
|
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
|
|||
@ApiModelProperty("问题等级") |
|||
private String problemLevel; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private String status; |
|||
//
|
|||
@ApiModelProperty("问题图片") |
|||
private List<String> problemImages = Collections.emptyList(); |
|||
|
|||
} |
|||
|
|||
@ApiModelProperty("检查项") |
|||
private List<DfCheckingDetailDto.DfCheckingItemDto> items = Collections.emptyList(); |
|||
; |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("堤防巡视检查记录检索条件v2") |
|||
public class DfRecordSearchV2Dto { |
|||
|
|||
@ApiModelProperty("堤防名称") |
|||
private String dikeName; |
|||
@ApiModelProperty("堤防类型") |
|||
private String dikeType; |
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolder; |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
@ApiModelProperty("巡查类型") |
|||
private String type; |
|||
@ApiModelProperty("巡查类别") |
|||
private String category; |
|||
@ApiModelProperty("问题级别") |
|||
private String problemLevel; |
|||
@ApiModelProperty("状态") |
|||
private String status; |
|||
|
|||
|
|||
@ApiModelProperty("记录详情列表标识查询 巡查中的数据 1是 0否") |
|||
private int recordDetailsFlag; |
|||
|
|||
/** |
|||
* 问题位置 |
|||
*/ |
|||
@ApiModelProperty("部位") |
|||
private String parts; |
|||
|
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty(value = "开始时间") |
|||
private Date startDate; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty(value = "结束时间") |
|||
private Date endDate; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.df.dto.DfCheckingDetailDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@ApiModel(value = "堤防巡查项目信息v2") |
|||
@Data |
|||
public class DfV2CheckingDto { |
|||
|
|||
@ApiModelProperty("堤防编码") |
|||
private String dikeCode; |
|||
@ApiModelProperty("堤防名称") |
|||
private String dikeName; |
|||
@ApiModelProperty("堤防类型") |
|||
private String dikeType; |
|||
|
|||
@NotNull |
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private String type; |
|||
|
|||
@ApiModelProperty("巡查类别") |
|||
private String category; |
|||
|
|||
@ApiModelProperty("创建时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
|
|||
@ApiModelProperty("创建者") |
|||
private String createUid; |
|||
|
|||
@ApiModelProperty("创建者名称") |
|||
private String createName; |
|||
|
|||
|
|||
@ApiModelProperty("是否领取") |
|||
private Boolean isReceive; |
|||
|
|||
@ApiModelProperty("检查项") |
|||
private List<DfCheckingDetailDto.DfCheckingItemDto> items; |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue