15 changed files with 548 additions and 3 deletions
@ -0,0 +1,55 @@ |
|||||
|
package com.kms.yxgh.df.controller; |
||||
|
import com.kms.yxgh.base.Response; |
||||
|
import com.kms.yxgh.df.dto.DfYhCharHiddenDangerDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhCharInfoDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhHiddenDangerQueDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhStatisticsQueDto; |
||||
|
import com.kms.yxgh.df.service.DfYhStatisticsService; |
||||
|
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 |
||||
|
* @date 2025/03/04 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/run/df/yh/statistics") |
||||
|
@Api(tags = "堤防维修养护记录统计") |
||||
|
public class DfYhStatisticsController extends BaseController { |
||||
|
|
||||
|
@Autowired |
||||
|
private DfYhStatisticsService dfYhStatisticsService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取巡查情况概览统计 |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/situation") |
||||
|
@ApiOperation("获取巡查情况概览统计") |
||||
|
public Response<DfYhCharInfoDto> situation(@RequestBody DfYhStatisticsQueDto dto) { |
||||
|
return Response.ok(dfYhStatisticsService.situation(dto)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取巡查隐患概览统计 |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/hiddenDanger") |
||||
|
@ApiOperation("获取巡查情况概览统计") |
||||
|
public Response<DfYhCharHiddenDangerDto> hiddenDanger(@RequestBody DfYhHiddenDangerQueDto dto) { |
||||
|
return Response.ok(dfYhStatisticsService.hiddenDanger(dto)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@ApiModel("获取巡查情况概览统计图表信息") |
||||
|
@Data |
||||
|
public class DfYhCharHiddenDangerDto { |
||||
|
@ApiModelProperty(value = "x轴") |
||||
|
private List<String> xAxis = Collections.emptyList(); |
||||
|
|
||||
|
@ApiModelProperty(value = "y轴") |
||||
|
private List<YAxis> yAxis = Collections.emptyList(); |
||||
|
; |
||||
|
|
||||
|
@ApiModelProperty(value = "标线") |
||||
|
private List<MarkLine> markLine = Collections.emptyList(); |
||||
|
; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("y轴") |
||||
|
public static class YAxis { |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "单位") |
||||
|
private String unit; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据") |
||||
|
private List<Series> series; |
||||
|
} |
||||
|
|
||||
|
@ApiModel("y轴数据") |
||||
|
@Data |
||||
|
public static class Series { |
||||
|
@ApiModelProperty("次数") |
||||
|
private Integer count; |
||||
|
@ApiModelProperty("隐患数量对应的类型1,处理数量对应的是2") |
||||
|
private Integer type; |
||||
|
} |
||||
|
|
||||
|
@ApiModel("标线") |
||||
|
@Data |
||||
|
public static class MarkLine { |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "值") |
||||
|
private String value; |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@ApiModel("获取巡查情况概览统计图表信息") |
||||
|
@Data |
||||
|
public class DfYhCharInfoDto { |
||||
|
@ApiModelProperty(value = "x轴") |
||||
|
private List<String> xAxis = Collections.emptyList(); |
||||
|
|
||||
|
@ApiModelProperty(value = "y轴") |
||||
|
private List<YAxis> yAxis = Collections.emptyList(); |
||||
|
; |
||||
|
|
||||
|
@ApiModelProperty(value = "标线") |
||||
|
private List<MarkLine> markLine = Collections.emptyList(); |
||||
|
; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("y轴") |
||||
|
public static class YAxis { |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "单位") |
||||
|
private String unit; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据") |
||||
|
private List<Series> series; |
||||
|
} |
||||
|
|
||||
|
@ApiModel("y轴数据") |
||||
|
@Data |
||||
|
public static class Series { |
||||
|
@ApiModelProperty("次数") |
||||
|
private Integer count; |
||||
|
@ApiModelProperty("负责人类型") |
||||
|
private String dutyHolderType; |
||||
|
} |
||||
|
|
||||
|
@ApiModel("标线") |
||||
|
@Data |
||||
|
public static class MarkLine { |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
|
||||
|
@ApiModelProperty(value = "值") |
||||
|
private String value; |
||||
|
} |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: DfYhHiddenDangerDto |
||||
|
* @Description: 巡查隐患概览统计 |
||||
|
* @Date: 2024/3/5 上午10:51 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@ApiModel("巡查隐患概览统计") |
||||
|
@Data |
||||
|
public class DfYhHiddenDangerDto { |
||||
|
|
||||
|
@ApiModelProperty("隐患类别和数量") |
||||
|
private Map<String, Integer> HiddenDangerMap; |
||||
|
|
||||
|
@ApiModelProperty("隐患概览统计表数据 key是地区,value是具体数据集") |
||||
|
private Map<String, List<HiddenDangerItem>> DfYhStatisticsItemMap; |
||||
|
|
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public static class HiddenDangerItem { |
||||
|
@ApiModelProperty("次数") |
||||
|
private Integer count; |
||||
|
@ApiModelProperty("隐患数量对应的类型1,处理数量对应的是2") |
||||
|
private Integer type; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import com.kms.yxgh.common.dto.IAdcd; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: DfYhHiddenDangerQueDto |
||||
|
* @Description: 巡查隐患概览统计 |
||||
|
* @Date: 2024/3/5 上午10:18 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("巡查隐患概览统计") |
||||
|
public class DfYhHiddenDangerQueDto implements IAdcd { |
||||
|
|
||||
|
@ApiModelProperty("查询开始时间") |
||||
|
private String patrolStart; |
||||
|
@ApiModelProperty("查询结束时间") |
||||
|
private String patrolEnd; |
||||
|
@ApiModelProperty("隐患类型 无:0、一般隐患:1、较大至重大:2、重大隐患:3 ") |
||||
|
private String problem; |
||||
|
@ApiModelProperty("地区code") |
||||
|
private String adcd; |
||||
|
@ApiModelProperty("处置状态") |
||||
|
private Integer handleStatus; |
||||
|
|
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: DfYhStatisticsDto |
||||
|
* @Description: 巡查情况概览 |
||||
|
* @Date: 2024/3/5 上午10:51 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@ApiModel("巡查情况概览") |
||||
|
@Data |
||||
|
public class DfYhStatisticsDto { |
||||
|
|
||||
|
@ApiModelProperty("数据集") |
||||
|
private Map<String,List<DfYhStatisticsItem>> map= Collections.emptyMap(); |
||||
|
|
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public static class DfYhStatisticsItem { |
||||
|
@ApiModelProperty("次数") |
||||
|
private Integer count; |
||||
|
@ApiModelProperty("负责人类型") |
||||
|
private String dutyHolderType; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
/** |
||||
|
* @ClassName: DfYqExceedIndexDto |
||||
|
* @Description: TODO |
||||
|
* @Date: 2024/3/5 上午10:18 |
||||
|
* * |
||||
|
* @author: hxh |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("责任人巡查情况概览统计") |
||||
|
public class DfYhStatisticsQueDto { |
||||
|
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private String patrolStart; |
||||
|
|
||||
|
@ApiModelProperty("查询结束时间 yyyy-MM-dd HH:mm:ss") |
||||
|
private String patrolEnd; |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.kms.yxgh.df.service; |
||||
|
import com.kms.yxgh.df.dto.DfYhCharHiddenDangerDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhCharInfoDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhHiddenDangerQueDto; |
||||
|
import com.kms.yxgh.df.dto.DfYhStatisticsQueDto; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: DfYhStatisticsService |
||||
|
* @Description: 工程巡查概况统计 |
||||
|
* @Date: 2024/3/5 上午10:12 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@AllArgsConstructor |
||||
|
@Service |
||||
|
public class DfYhStatisticsService { |
||||
|
|
||||
|
|
||||
|
private final DfYhRecordService dfYhRecordService; |
||||
|
|
||||
|
private final DfRecordService dfRecordService; |
||||
|
|
||||
|
public DfYhCharInfoDto situation(DfYhStatisticsQueDto dto){ |
||||
|
return dfYhRecordService.situation(dto); |
||||
|
} |
||||
|
|
||||
|
public DfYhCharHiddenDangerDto hiddenDanger(DfYhHiddenDangerQueDto dto){ |
||||
|
return dfRecordService.hiddenDanger(dto); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.kms.yxgh.model; |
||||
|
|
||||
|
import com.kms.yxgh.df.dto.DfYhHiddenDangerDto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
/** |
||||
|
* @ClassName: DfYhHiddenDangerModel |
||||
|
* @Description: 巡查隐患概览统计 |
||||
|
* @Date: 2024/3/5 上午10:51 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@ApiModel("巡查隐患概览统计") |
||||
|
@Data |
||||
|
public class DfYhHiddenDangerModel { |
||||
|
|
||||
|
@ApiModelProperty("地区code") |
||||
|
private String adcd; |
||||
|
|
||||
|
@ApiModelProperty("隐患类型") |
||||
|
private Integer problem; |
||||
|
|
||||
|
@ApiModelProperty("数量") |
||||
|
private Integer count; |
||||
|
|
||||
|
@ApiModelProperty("处置状态") |
||||
|
private Integer handleStatus; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.kms.yxgh.model; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName: DfYhStatisticsModelDto |
||||
|
* @Date: 2024/3/5 上午10:51 |
||||
|
* * |
||||
|
* @author: lyd |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
|
||||
|
@ApiModel("巡查情况概览") |
||||
|
@Data |
||||
|
public class DfYhStatisticsModelDto { |
||||
|
|
||||
|
@ApiModelProperty("次数") |
||||
|
private Integer count; |
||||
|
@ApiModelProperty("堤防代码") |
||||
|
private String adcd; |
||||
|
@ApiModelProperty("巡查责任人类型") |
||||
|
private String dutyHolderType; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue