|
|
|
@ -7,7 +7,6 @@ import com.shxy.xymanager_common.entity.*;
|
|
|
|
|
import com.shxy.xymanager_common.exception.ApiException;
|
|
|
|
|
import com.shxy.xymanager_common.model.PhotoDayModel;
|
|
|
|
|
import com.shxy.xymanager_common.model.TerminalGpsModel;
|
|
|
|
|
import com.shxy.xymanager_common.page.TableDataInfo;
|
|
|
|
|
import com.shxy.xymanager_common.vo.TerminalSelectVo;
|
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalPositionsDao;
|
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
|
|
|
@ -20,7 +19,6 @@ import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@ -85,22 +83,22 @@ public class TerminalExtController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("listWithAll")
|
|
|
|
|
@ApiOperation("查询附带全部额外信息")
|
|
|
|
|
public ResponseReult<List<View_Dy_Line_Tower_Terminals>> listWithAll(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Long start, Long end,
|
|
|
|
|
Integer channelId,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
public ResponseReult<PageInfo<View_Dy_Line_Tower_Terminals>> listWithAll(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Long start, Long end,
|
|
|
|
|
Integer channelId,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
pageNum = this.initPageNum(pageNum);
|
|
|
|
|
pageSize = this.initPageSize(pageSize);
|
|
|
|
|
long cost = System.currentTimeMillis();
|
|
|
|
|
List<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
PageInfo<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
isonline, protocol, devType,
|
|
|
|
|
pageNum, pageSize);
|
|
|
|
|
cost = System.currentTimeMillis() - cost;
|
|
|
|
|
log.info("getTerminalList cost=" + cost);
|
|
|
|
|
if (!CollectionUtils.isEmpty(result)) {
|
|
|
|
|
if (!CollectionUtils.isEmpty(result.getList())) {
|
|
|
|
|
cost = System.currentTimeMillis();
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result) {
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result.getList()) {
|
|
|
|
|
TerminalGpsModel last = gpsService.getTermLastGPSPosition(terminal.getId())
|
|
|
|
|
.getData();
|
|
|
|
|
terminal.setLastGps(last);
|
|
|
|
@ -124,16 +122,16 @@ public class TerminalExtController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("listWithWeather")
|
|
|
|
|
@ApiOperation("查询附带天气")
|
|
|
|
|
public ResponseReult<List<View_Dy_Line_Tower_Terminals>> listWithWeather(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
public ResponseReult<PageInfo<View_Dy_Line_Tower_Terminals>> listWithWeather(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
pageNum = this.initPageNum(pageNum);
|
|
|
|
|
pageSize = this.initPageSize(pageSize);
|
|
|
|
|
List<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
PageInfo<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
isonline, protocol, devType,
|
|
|
|
|
pageNum, pageSize);
|
|
|
|
|
if (!CollectionUtils.isEmpty(result)) {
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result) {
|
|
|
|
|
if (!CollectionUtils.isEmpty(result.getList())) {
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result.getList()) {
|
|
|
|
|
Weathers last = weatherService.getLast(terminal.getId());
|
|
|
|
|
last.setCmdid(terminal.getCmdid());
|
|
|
|
|
last.setPhase(terminal.getPhase());
|
|
|
|
@ -145,16 +143,16 @@ public class TerminalExtController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("listWithLeadPull")
|
|
|
|
|
@ApiOperation("查询附带拉力")
|
|
|
|
|
public ResponseReult<List<View_Dy_Line_Tower_Terminals>> listWithLeadPull(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
public ResponseReult<PageInfo<View_Dy_Line_Tower_Terminals>> listWithLeadPull(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
pageNum = this.initPageNum(pageNum);
|
|
|
|
|
pageSize = this.initPageSize(pageSize);
|
|
|
|
|
List<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
PageInfo<View_Dy_Line_Tower_Terminals> result = this.getTerminalPage(dyId, lineId, towerId, search,
|
|
|
|
|
isonline, protocol, devType,
|
|
|
|
|
pageNum, pageSize);
|
|
|
|
|
if (!CollectionUtils.isEmpty(result)) {
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result) {
|
|
|
|
|
if (!CollectionUtils.isEmpty(result.getList())) {
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals terminal : result.getList()) {
|
|
|
|
|
LeadPulls last = leadPullsService.getLast(terminal.getId());
|
|
|
|
|
last.setCmdid(terminal.getCmdid());
|
|
|
|
|
last.setPhase(terminal.getPhase());
|
|
|
|
@ -171,9 +169,9 @@ public class TerminalExtController extends BaseController {
|
|
|
|
|
return ResponseReult.success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<View_Dy_Line_Tower_Terminals> getTerminalPage(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
private PageInfo<View_Dy_Line_Tower_Terminals> getTerminalPage(Integer dyId, Integer lineId, Integer towerId, String search,
|
|
|
|
|
Integer isonline, Integer protocol, Integer devType,
|
|
|
|
|
Integer pageNum, Integer pageSize) {
|
|
|
|
|
TerminalSelectVo vo = new TerminalSelectVo();
|
|
|
|
|
vo.setDyId(dyId);
|
|
|
|
|
vo.setLineId(lineId);
|
|
|
|
@ -184,7 +182,7 @@ public class TerminalExtController extends BaseController {
|
|
|
|
|
vo.setDevType(devType);
|
|
|
|
|
vo.setPageindex(pageNum);
|
|
|
|
|
vo.setPagesize(pageSize);
|
|
|
|
|
List<View_Dy_Line_Tower_Terminals> result = terminalExtService.getTerminalList(vo);
|
|
|
|
|
PageInfo<View_Dy_Line_Tower_Terminals> result = terminalExtService.getTerminalList(vo);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|