| | |
| | | List<MdcUtilizationRateDto> list = mdcUtilizationRateService.getByType(type); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据类型获取数据区间和颜色 |
| | | * |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "率参数设置-根据类型获取颜色标签", notes = "率参数设置-根据类型获取颜色标签") |
| | | @GetMapping("/getSectionByType") |
| | | public Result<List<MdcUtilizationRate>> getSectionByType(@RequestParam(name = "type", required = true) String type) { |
| | | List<MdcUtilizationRate> list = mdcUtilizationRateService.getSectionByType(type); |
| | | return Result.OK(list); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<MdcUtilizationRateDto> getByType(String type); |
| | | |
| | | /** |
| | | * 据类型获取数据区间和颜色 |
| | | * |
| | | * @param type |
| | | * @return |
| | | */ |
| | | List<MdcUtilizationRate> getSectionByType(String type); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.sql.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 据类型获取数据区间和颜色 |
| | | * |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MdcUtilizationRate> getSectionByType(String type) { |
| | | return this.list(new LambdaQueryWrapper<MdcUtilizationRate>().eq(MdcUtilizationRate::getRateParameterType, type).orderByAsc(MdcUtilizationRate::getRateParameterLevel)); |
| | | } |
| | | } |