|
@@ -1,12 +1,24 @@
|
|
|
package com.railway.web.controller.business.baseinfo;
|
|
package com.railway.web.controller.business.baseinfo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import com.github.pagehelper.Page;
|
|
|
|
|
+import com.railway.business.baseinfo.domain.BusPrevent;
|
|
|
|
|
+import com.railway.business.baseinfo.domain.BusSdtz;
|
|
|
|
|
+import com.railway.business.baseinfo.domain.BusZzdzxx;
|
|
|
|
|
+import com.railway.business.baseinfo.service.IBusLineService;
|
|
|
|
|
+import com.railway.business.baseinfo.service.IBusPreventService;
|
|
|
|
|
+import com.railway.business.baseinfo.service.IBusZzdzxxService;
|
|
|
import com.railway.common.core.controller.BaseController;
|
|
import com.railway.common.core.controller.BaseController;
|
|
|
|
|
+import com.railway.common.core.page.TableDataInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
+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;
|
|
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @author wuhonghao
|
|
* @author wuhonghao
|
|
|
*/
|
|
*/
|
|
@@ -16,6 +28,34 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RequestMapping(value = "business/catenary/bus/prevent")
|
|
@RequestMapping(value = "business/catenary/bus/prevent")
|
|
|
public class BusPreventController extends BaseController {
|
|
public class BusPreventController extends BaseController {
|
|
|
|
|
|
|
|
|
|
+ private final IBusPreventService busPreventService;
|
|
|
|
|
+ private final IBusZzdzxxService busZzdzxxService;
|
|
|
|
|
+
|
|
|
|
|
+ public BusPreventController(IBusPreventService busPreventService,IBusZzdzxxService busZzdzxxService) {
|
|
|
|
|
+ this.busPreventService = busPreventService;
|
|
|
|
|
+ this.busZzdzxxService = busZzdzxxService;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation(value = "智能查询")
|
|
|
|
|
+ @GetMapping(value = "smartQuery")
|
|
|
|
|
+ public TableDataInfo smartQuery(BusPrevent busPrevent) {
|
|
|
|
|
+ //如果传入查询条件为支柱号则将支柱号转化为公里标
|
|
|
|
|
+ if(busPrevent.getPillarCode()!=null){
|
|
|
|
|
+ BusZzdzxx busZzdzxx = new BusZzdzxx();
|
|
|
|
|
+ busZzdzxx.setPillarCode(busPrevent.getPillarCode());
|
|
|
|
|
+ busZzdzxx.setXingbie(busPrevent.getXingbie());
|
|
|
|
|
+ busZzdzxx.setStationId(busPrevent.getStationId());
|
|
|
|
|
+ List<BusZzdzxx> list = busZzdzxxService.getList(busZzdzxx);
|
|
|
|
|
+ if(list!=null&&list.size()==1){
|
|
|
|
|
+ busPrevent.setMarker(list.get(0).getMarker());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ List<BusPrevent> list = busPreventService.smartQuery(busPrevent);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|