|
|
@@ -2,8 +2,11 @@ package com.railway.web.controller.business.baseinfo;
|
|
|
|
|
|
import com.railway.business.baseinfo.domain.BaseDeptStation;
|
|
|
import com.railway.business.baseinfo.domain.BusSdtz;
|
|
|
+import com.railway.business.baseinfo.domain.BusZzdzxx;
|
|
|
+import com.railway.business.baseinfo.domain.vo.BusSmartQueryVo;
|
|
|
import com.railway.business.baseinfo.service.IBaseStationService;
|
|
|
import com.railway.business.baseinfo.service.IBusSdtzService;
|
|
|
+import com.railway.business.baseinfo.service.IBusZzdzxxService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -25,11 +28,13 @@ public class BusSdtzController extends BaseController {
|
|
|
|
|
|
private final IBusSdtzService busSdtzService;
|
|
|
private final IBaseStationService stationService;
|
|
|
+ private final IBusZzdzxxService busZzdzxxService;
|
|
|
|
|
|
public BusSdtzController(IBusSdtzService busSdtzService,
|
|
|
- IBaseStationService stationService) {
|
|
|
+ IBaseStationService stationService, IBusZzdzxxService busZzdzxxService) {
|
|
|
this.busSdtzService = busSdtzService;
|
|
|
this.stationService = stationService;
|
|
|
+ this.busZzdzxxService = busZzdzxxService;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增")
|
|
|
@@ -73,4 +78,28 @@ public class BusSdtzController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "智能查询")
|
|
|
+ @GetMapping(value = "smartQuery")
|
|
|
+ public TableDataInfo smartQuery(BusSmartQueryVo busSmartQueryVo) {
|
|
|
+ //如果传入查询条件为支柱号则将支柱号转化为公里标
|
|
|
+ if(busSmartQueryVo.getPillarCode()!=null){
|
|
|
+ BusZzdzxx busZzdzxx = new BusZzdzxx();
|
|
|
+ busZzdzxx.setPillarCode(busSmartQueryVo.getPillarCode());
|
|
|
+ busZzdzxx.setXingbie(busSmartQueryVo.getXingbie());
|
|
|
+ busZzdzxx.setStationId(busSmartQueryVo.getStationId());
|
|
|
+ List<BusZzdzxx> list = busZzdzxxService.getList(busZzdzxx);
|
|
|
+ if(list!=null&&list.size()==1){
|
|
|
+ busSmartQueryVo.setMarker(list.get(0).getMarker());
|
|
|
+ }else{
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(busSmartQueryVo.getPillarArea()==null||busSmartQueryVo.getPillarArea().equals("")){
|
|
|
+ busSmartQueryVo.setPillarArea("500");
|
|
|
+ }
|
|
|
+ startPage();
|
|
|
+ List<BusSdtz> list = busSdtzService.smartQuery(busSmartQueryVo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
}
|