package com.steerinfo.dil.controller; /** * @ author :TXF * @ time :2021/9/4 9:32 */ import com.steerinfo.dil.service.impl.DropDownServiceImpl; import com.steerinfo.dil.util.BaseRESTfulController; import com.steerinfo.framework.controller.RESTfulResult; import io.swagger.annotations.ApiOperation; import org.apache.ibatis.type.YearTypeHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.websocket.server.PathParam; import java.util.HashMap; import java.util.List; import java.util.Map; @RestController @RequestMapping("/${api.version}/dropDown") public class DropDownController extends BaseRESTfulController { //********************************运输计划下拉框接口****************************************** @Autowired DropDownServiceImpl dropDownService; @ApiOperation(value="查询所有的批次") @GetMapping("/getDilBatch") public RESTfulResult getDilBatch(){ List> batch = dropDownService.getDilBatch(); return success(batch); } @ApiOperation(value="查询所有的承运商") @GetMapping("/getCarrier") public RESTfulResult getRailPlan(){ List> carrier = dropDownService.getCarrier(); return success(carrier); } @ApiOperation(value="查询所有的作业路径") @GetMapping("/getLine") public RESTfulResult getLine(){ List> line = dropDownService.getLine(); return success(line); } @ApiOperation(value="查询所有的仓库") @GetMapping("/getWarehouse") public RESTfulResult getWarehouse(@PathParam("type") Integer type){ Map map = new HashMap<>(); if(type != null){ map.put("type", type); } List> warehouse = dropDownService.getWarehouse(map); return success(warehouse); } @ApiOperation(value="查询所有的门岗") @GetMapping("/getGatepost") public RESTfulResult getGatepost(){ List> gatepost = dropDownService.getGatepost(); return success(gatepost); } @ApiOperation(value="查询所有的采购订单号") @GetMapping("/getAPO") public RESTfulResult getAPO(){ List> APO = dropDownService.getAPO(); return success(APO); } @ApiOperation(value="查询特定所有的物资") @GetMapping("/getFuMaterial/{type}") public RESTfulResult getFuMaterial(@PathVariable("type")Integer type){ List> material = dropDownService.getFuMaterial(type); return success(material); } @ApiOperation(value="查询所有的辅料车辆") @GetMapping("/getFuCapacityId") public RESTfulResult getFuCapacityId(){ List> capacityId = dropDownService.getFuCapacityId(); return success(capacityId); } @ApiOperation(value="查询所有的港口") @GetMapping("/getPort") public RESTfulResult getPort(){ List> port = dropDownService.getPort(); return success(port); } @ApiOperation(value="查询所有的月台") @GetMapping("/getPlatformId") public RESTfulResult getPlatformId(){ List> port = dropDownService.getPlatformId(); return success(port); } //内转物流下拉框 @ApiOperation(value="查询装货地点") @GetMapping("/getLoadedPlace") public RESTfulResult getLoadedPlace(){ List> loadedPlace = dropDownService.getLoadedPlace(); return success(loadedPlace); } @ApiOperation(value="查询外轮船名") @GetMapping("/getForeignName") public RESTfulResult getForeignName(){ List> foreignName = dropDownService.getForeignName(); return success(foreignName); } @ApiOperation(value="查询卸货点") @GetMapping("/getUnloadPoint/{type}") public RESTfulResult getUnloadPoint(@PathVariable("type") Integer type){ List> mes = dropDownService.getUnloadPoint(type); return success(mes); } @ApiOperation(value="查询订单下的物资") @GetMapping("/getOrderMaterial/{orderId}") public RESTfulResult getOrderMaterial(@PathVariable("orderId") Integer orderId){ List> mes = dropDownService.getOrderMaterial(orderId); return success(mes); } @ApiOperation(value="查询仓库下所有月台") @GetMapping("/getPlatformIdByWarehouse/{warehouseId}") public RESTfulResult getPlatformIdByWarehouse(@PathVariable("warehouseId") Integer warehouseId){ List> mes = dropDownService.getPlatformIdByWarehouse(warehouseId); return success(mes); } }