| | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMeter; |
| | | import com.dy.pipIrrGlobal.voPr.VoFlowMonitoring; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.validation.BindingResult; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | |
| | | /** |
| | | * 删除流量计 |
| | | * |
| | | * @param map |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | @Operation(summary = "获得一页流量计记录", description = "返回一页流量计数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页流量计数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = PrFlowmeter.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "getFlowMeters", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoFlowMeter>>> getFlowMeters(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVoFlowMeter vo) { |
| | | try { |
| | | QueryResultVo<List<VoFlowMeter>> res = flowmeterSv.getFlowMeters(vo); |
| | | if (res == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_FLOWMETERS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取流量计记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |