diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java index 9e3747a9cf..1c4b340ad5 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java @@ -21,16 +21,18 @@ public class IcEventCategoryAnalysisFormDTO { public interface TotalPie { } + public interface OrgTotalPie { + } /** * 要查询的组织ID */ - @NotBlank(message = "组织ID为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + @NotBlank(message = "组织ID为必填项", groups = {TotalPie.class,OrgTotalPie.class}) private String orgId; /** * 组织类型。grid,agency */ - @NotBlank(message = "组织类型为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + @NotBlank(message = "组织类型为必填项", groups = {TotalPie.class,OrgTotalPie.class}) private String orgType; /** @@ -38,7 +40,7 @@ public class IcEventCategoryAnalysisFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + @NotNull(message = "查询时间为必填项", groups = {TotalPie.class,OrgTotalPie.class}) private Date queryStartTime; /** @@ -46,14 +48,19 @@ public class IcEventCategoryAnalysisFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + @NotNull(message = "查询时间为必填项", groups = {TotalPie.class,OrgTotalPie.class}) private Date queryEndTime; + + private String categoryCode; + /** * 一级分类 code长度 */ private Integer categoryOneLength; + private String gridPids; + //以下参数从token中获取 /** * 当前登录用户 diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java new file mode 100644 index 0000000000..14210200d4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +@Data +public class IcEventAnalysisOrgResDTO implements Serializable { + private String orgId; + private String orgType; + private String orgName; + private Integer total = 0; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index cd04510c43..5c73ea0243 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -216,6 +216,19 @@ public class IcEventController { return new Result().ok(icEventService.detail(formDTO)); } - + /** + * 事件分类分析- 饼图2,直属下级 事件数量 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("category-analysis/org-total") + public Result> analysisOrgTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,IcEventCategoryAnalysisFormDTO.OrgTotalPie.class); + List list = icEventService.analysisOrgTotal(formDTO); + return new Result>().ok(list); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 0021dc6bc7..767a49494c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -132,4 +132,10 @@ public interface IcEventService extends BaseService { **/ IcEventListResultDTO detail(IcEventListFormDTO formDTO); + /** + * 事件分类分析- 饼图2,直属下级 事件数量 + * @param formDTO + * @return + */ + List analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index e2ad6eef57..837943cae4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -747,5 +747,17 @@ public class IcEventServiceImpl extends BaseServiceImpl analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO) { + //todo + return null; + } + } \ No newline at end of file