1 changed files with 99 additions and 0 deletions
@ -0,0 +1,99 @@ |
|||||
|
package com.gaotao.modules.automatedWarehouse.controller; |
||||
|
|
||||
|
import com.gaotao.common.utils.PageUtils; |
||||
|
import com.gaotao.common.utils.R; |
||||
|
import com.gaotao.modules.automatedWarehouse.entity.AgvStationData; |
||||
|
import com.gaotao.modules.automatedWarehouse.entity.Area; |
||||
|
import com.gaotao.modules.automatedWarehouse.service.AgvStationService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @Description AGV站点信息管理Controller - rqrq |
||||
|
* @Author rqrq |
||||
|
* @Date 2025/10/14 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/wcsSystem/agvStation") |
||||
|
public class AgvStationController { |
||||
|
|
||||
|
@Autowired |
||||
|
private AgvStationService agvStationService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询AGV站点列表 - rqrq |
||||
|
* @param data 查询条件 |
||||
|
* @return R |
||||
|
* @author rqrq |
||||
|
* @date 2025/10/14 |
||||
|
*/ |
||||
|
@PostMapping(value="/list") |
||||
|
@ResponseBody |
||||
|
public R list(@RequestBody AgvStationData data) throws Exception { |
||||
|
PageUtils page = agvStationService.queryPage(data); |
||||
|
return R.ok().put("page", page); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 新增AGV站点 - rqrq |
||||
|
* @param data 站点信息 |
||||
|
* @return R |
||||
|
* @author rqrq |
||||
|
* @date 2025/10/14 |
||||
|
*/ |
||||
|
@PostMapping(value="/add") |
||||
|
@ResponseBody |
||||
|
public R add(@RequestBody AgvStationData data) throws Exception { |
||||
|
agvStationService.addAgvStation(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 修改AGV站点 - rqrq |
||||
|
* @param data 站点信息 |
||||
|
* @return R |
||||
|
* @author rqrq |
||||
|
* @date 2025/10/14 |
||||
|
*/ |
||||
|
@PostMapping(value="/update") |
||||
|
@ResponseBody |
||||
|
public R update(@RequestBody AgvStationData data) throws Exception { |
||||
|
agvStationService.updateAgvStation(data); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取区域类型下拉选项 - rqrq |
||||
|
* @return R |
||||
|
* @author rqrq |
||||
|
* @date 2025/10/14 |
||||
|
*/ |
||||
|
@PostMapping(value="/getAreaOptions") |
||||
|
@ResponseBody |
||||
|
public R getAreaOptions() throws Exception { |
||||
|
List<Area> areaList = agvStationService.getAreaOptions(); |
||||
|
return R.ok().put("rows", areaList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取状态下拉选项 - rqrq |
||||
|
* @return R |
||||
|
* @author rqrq |
||||
|
* @date 2025/10/14 |
||||
|
*/ |
||||
|
@PostMapping(value="/getStatusOptions") |
||||
|
@ResponseBody |
||||
|
public R getStatusOptions() throws Exception { |
||||
|
List<Map<String, Object>> statusList = List.of( |
||||
|
Map.of("value", 0, "label", "空闲"), |
||||
|
Map.of("value", 1, "label", "有货"), |
||||
|
Map.of("value", 2, "label", "待放货"), |
||||
|
Map.of("value", 3, "label", "待取货") |
||||
|
); |
||||
|
return R.ok().put("rows", statusList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue