7 changed files with 283 additions and 16 deletions
@ -0,0 +1,9 @@ |
|||||||
|
package jnpf.service; |
||||||
|
|
||||||
|
import jnpf.model.dto.IndicatorStatisticsDto; |
||||||
|
|
||||||
|
public interface IndicatorStatisticsService { |
||||||
|
IndicatorStatisticsDto.ProjectsNumberResponse projectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param); |
||||||
|
|
||||||
|
IndicatorStatisticsDto.MoneyAndProjectsNumberResponse moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param); |
||||||
|
} |
||||||
@ -0,0 +1,45 @@ |
|||||||
|
package jnpf.controller; |
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import jnpf.base.ActionResult; |
||||||
|
import jnpf.base.Pagination; |
||||||
|
import jnpf.base.vo.PageListVO; |
||||||
|
import jnpf.base.vo.PaginationVO; |
||||||
|
import jnpf.entity.ContractEntity; |
||||||
|
import jnpf.model.ContractListVO; |
||||||
|
import jnpf.model.dto.IndicatorStatisticsDto; |
||||||
|
import jnpf.service.BiddingProjectSubscribeService; |
||||||
|
import jnpf.service.IndicatorStatisticsService; |
||||||
|
import jnpf.util.JsonUtil; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@RestController |
||||||
|
@Tag(name = "指标统计接口", description = "indicator") |
||||||
|
@RequestMapping("/indicator") |
||||||
|
@AllArgsConstructor |
||||||
|
public class IndicatorStatisticsController { |
||||||
|
private final IndicatorStatisticsService indicatorStatisticsService; |
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "审批/备案项目数") |
||||||
|
@GetMapping("/projectsNumber") |
||||||
|
public ActionResult<IndicatorStatisticsDto.ProjectsNumberResponse> projectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param) { |
||||||
|
return ActionResult.success(indicatorStatisticsService.projectsNumber(param)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "项目数 金额") |
||||||
|
@GetMapping("/moneyAndProjectsNumber") |
||||||
|
public ActionResult<IndicatorStatisticsDto.MoneyAndProjectsNumberResponse> moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param) { |
||||||
|
return ActionResult.success(indicatorStatisticsService.moneyAndProjectsNumber(param)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,97 @@ |
|||||||
|
package jnpf.model.dto; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class IndicatorStatisticsDto { |
||||||
|
@Data |
||||||
|
public static class ProjectsNumberParam { |
||||||
|
/** |
||||||
|
* 查询类型 1-本月(默认本月):到日。2-当年:按月。3-累计:按年 |
||||||
|
*/ |
||||||
|
private String type="1"; |
||||||
|
/** |
||||||
|
* 权限控制 |
||||||
|
*/ |
||||||
|
private String menuId; |
||||||
|
/** |
||||||
|
* 根据type 传入对应参数 eg:月份查询传入某年某月 不传入默认为当年当月 返回当月当月日统计 |
||||||
|
* 月份传入 yyyy-MM |
||||||
|
* 年份传入 yyyy |
||||||
|
* 累计无需传入 |
||||||
|
*/ |
||||||
|
private String corresponding; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Data |
||||||
|
public static class ProjectsNumberResponse { |
||||||
|
/** |
||||||
|
* 返回时间类型 用于前端展示使用 |
||||||
|
*/ |
||||||
|
private LocalDateTime corresponding; |
||||||
|
/** |
||||||
|
* 根据type 传入对应参数 eg:月份查询传入某年某月 不传入默认为当年当月 返回当月当月日统计 |
||||||
|
*/ |
||||||
|
private List<Indicator> indicatorList = new ArrayList<>(); |
||||||
|
} |
||||||
|
|
||||||
|
@Data |
||||||
|
public static class Indicator { |
||||||
|
/** |
||||||
|
* x轴数据 |
||||||
|
*/ |
||||||
|
private String xData; |
||||||
|
/** |
||||||
|
* y轴数据 |
||||||
|
*/ |
||||||
|
private String yData; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Data |
||||||
|
public static class MoneyAndProjectsNumberParam { |
||||||
|
/** |
||||||
|
* 查询类型 1-本月 默认本月。2-当年。3-累计 |
||||||
|
*/ |
||||||
|
private String queryDateType = "1"; |
||||||
|
/** |
||||||
|
* 查询类型 1-所有(默认所有) 2-按组织形式分布 3-按事项分类分布 4-按招标方式分布 |
||||||
|
*/ |
||||||
|
private String classificationType = "1"; |
||||||
|
/** |
||||||
|
* 权限控制 |
||||||
|
*/ |
||||||
|
private String menuId; |
||||||
|
private String corresponding; |
||||||
|
} |
||||||
|
|
||||||
|
@Data |
||||||
|
public static class MoneyAndProjectsNumberResponse { |
||||||
|
/** |
||||||
|
* 1-所有(默认所有) 2-按组织形式分布 3-按事项分类分布 4-按招标方式分布 |
||||||
|
*/ |
||||||
|
private String classificationType; |
||||||
|
private List<MoneyAndProjectsNumberChild> dataList=new ArrayList<>(); |
||||||
|
} |
||||||
|
|
||||||
|
@Data |
||||||
|
public static class MoneyAndProjectsNumberChild { |
||||||
|
/** |
||||||
|
* 类型名称 |
||||||
|
*/ |
||||||
|
private String yName; |
||||||
|
/** |
||||||
|
* 项目数量 |
||||||
|
*/ |
||||||
|
private String projectsNumber; |
||||||
|
/** |
||||||
|
* 金额 |
||||||
|
*/ |
||||||
|
private String money; |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue