fix: 去掉已转移到TerminalExtController的

dev
huangfeng 1 year ago
parent 02c0c718f0
commit 8dbf4329a9

@ -4,16 +4,11 @@ import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.entity.LeadPulls; import com.shxy.xymanager_common.entity.LeadPulls;
import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals;
import com.shxy.xymanager_common.page.TableDataInfo;
import com.shxy.xymanager_common.util.EasyExcelUtil; import com.shxy.xymanager_common.util.EasyExcelUtil;
import com.shxy.xymanager_common.vo.TerminalSelectVo;
import com.shxy.xymanager_service.service.LeadPullsService; import com.shxy.xymanager_service.service.LeadPullsService;
import com.shxy.xymanager_service.service.TerminalService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -29,8 +24,6 @@ public class LeadPullsController extends BaseController {
@Resource @Resource
LeadPullsService service; LeadPullsService service;
@Resource
TerminalService terminalService;
@GetMapping("list") @GetMapping("list")
@ApiOperation("查询列表") @ApiOperation("查询列表")
@ -53,24 +46,4 @@ public class LeadPullsController extends BaseController {
EasyExcelUtil.createExcel(response, "覆冰数据", result.getList(), LeadPulls.class); EasyExcelUtil.createExcel(response, "覆冰数据", result.getList(), LeadPulls.class);
} }
@GetMapping("latest")
@ApiOperation("查询最新的")
public ResponseReult<TableDataInfo<View_Dy_Line_Tower_Terminals>> latest(Integer dyId, Integer lineId, Integer towerId,
int pageNum, int pageSize) {
TerminalSelectVo vo = new TerminalSelectVo();
vo.setDyId(dyId);
vo.setLineId(lineId);
vo.setTowerId(towerId);
vo.setPageindex(pageNum);
vo.setPagesize(pageSize);
TableDataInfo<View_Dy_Line_Tower_Terminals> result = terminalService.getTerminalList(vo).getData();
if (!CollectionUtils.isEmpty(result.getList())) {
for (View_Dy_Line_Tower_Terminals terminals : result.getList()) {
LeadPulls last = service.getLast(terminals.getId());
terminals.setLastLeadPulls(last);
}
}
return ResponseReult.success(result);
}
} }

@ -3,16 +3,11 @@ package com.shxy.xymanager_admin.controller;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals;
import com.shxy.xymanager_common.entity.Weathers; import com.shxy.xymanager_common.entity.Weathers;
import com.shxy.xymanager_common.page.TableDataInfo;
import com.shxy.xymanager_common.vo.TerminalSelectVo;
import com.shxy.xymanager_service.service.TerminalService;
import com.shxy.xymanager_service.service.WeatherService; import com.shxy.xymanager_service.service.WeatherService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -25,8 +20,6 @@ public class WeatherController extends BaseController {
@Resource @Resource
WeatherService service; WeatherService service;
@Resource
TerminalService terminalService;
@GetMapping("list") @GetMapping("list")
@ApiOperation("查询列表") @ApiOperation("查询列表")
@ -38,24 +31,4 @@ public class WeatherController extends BaseController {
return ResponseReult.success(result); return ResponseReult.success(result);
} }
@GetMapping("latest")
@ApiOperation("查询最新的")
public ResponseReult<TableDataInfo<View_Dy_Line_Tower_Terminals>> latest(Integer dyId, Integer lineId, Integer towerId,
int pageNum, int pageSize) {
TerminalSelectVo vo = new TerminalSelectVo();
vo.setDyId(dyId);
vo.setLineId(lineId);
vo.setTowerId(towerId);
vo.setPageindex(pageNum);
vo.setPagesize(pageSize);
TableDataInfo<View_Dy_Line_Tower_Terminals> result = terminalService.getTerminalList(vo).getData();
if (!CollectionUtils.isEmpty(result.getList())) {
for (View_Dy_Line_Tower_Terminals terminals : result.getList()) {
Weathers last = service.getLast(terminals.getId());
terminals.setLastWeathers(last);
}
}
return ResponseReult.success(result);
}
} }

Loading…
Cancel
Save