|
|
|
@ -4,10 +4,15 @@ import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.shxy.xymanager_common.base.BaseController;
|
|
|
|
|
import com.shxy.xymanager_common.base.ResponseReult;
|
|
|
|
|
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.vo.TerminalSelectVo;
|
|
|
|
|
import com.shxy.xymanager_service.service.LeadPullsService;
|
|
|
|
|
import com.shxy.xymanager_service.service.TerminalService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@ -22,6 +27,8 @@ public class LeadPullsController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
LeadPullsService service;
|
|
|
|
|
@Resource
|
|
|
|
|
TerminalService terminalService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("list")
|
|
|
|
|
@ApiOperation("查询列表")
|
|
|
|
@ -33,4 +40,24 @@ public class LeadPullsController extends BaseController {
|
|
|
|
|
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()) {
|
|
|
|
|
LeadPulls last = service.getLast(terminals.getId());
|
|
|
|
|
terminals.setLastLeadPulls(last);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ResponseReult.success(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|