From 43e9944347e51d5628166f8c1b78d98cfd2013ea Mon Sep 17 00:00:00 2001
From: yyy <1083599556@qq.com>
Date: 星期三, 22 四月 2026 22:12:22 +0800
Subject: [PATCH] 1.调试接口修改问题 2.修改定向服务的播单和 改派
---
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpStationManagementController.java | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpStationManagementController.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpStationManagementController.java
index 9463971..3df23bf 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpStationManagementController.java
+++ b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpStationManagementController.java
@@ -13,12 +13,14 @@
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.common.security.service.TokenService;
import com.xiaopeng.map.exportExcel.XpStationExportExcel;
+import com.xiaopeng.map.service.XpPointService;
import com.xiaopeng.map.service.XpStationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.BeanUtils;
+import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -46,16 +48,17 @@
@Resource
private TokenService tokenService;
+ @Resource
+ private XpPointService xpPointService;
@ApiOperation(value = "场站管理已经启动列表", tags = {"管理后台-运营-场站管理"})
@GetMapping("/findListEnable")
public R<List<XpStation>> findListEnable(@RequestParam String cityCode) {
- LambdaQueryWrapper<XpStation> queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(XpStation::getStatus, 2);
- queryWrapper.eq(XpStation::getCityCode, cityCode);
- queryWrapper.eq(XpStation::getDeleted, false);
- return R.ok( xpStationService.list(queryWrapper));
+
+ XpStationQuery query = new XpStationQuery();
+ query.setCityCode(cityCode);
+ return R.ok( xpStationService.findList(query));
}
@ApiOperation(value = "场站管理分页列表", tags = {"管理后台-运营-场站管理"})
@@ -63,6 +66,19 @@
public R<PageInfo<XpStation>> pageList(@RequestBody XpStationQuery query) {
PageInfo<XpStation> pageList = xpStationService.pageList(query);
return R.ok(pageList);
+ }
+
+ @GetMapping("/getById/{id}")
+ @ApiOperation(value = "详情场站管理", tags = {"管理后台-运营-场站管理"})
+ public R getById(@PathVariable Long id) {
+ XpStation bean = xpStationService.getById(id);
+ if (bean == null) {
+ return R.fail("参数错误");
+ }
+ XpStationVo beanVo = new XpStationVo();
+ BeanUtils.copyProperties(bean, beanVo);
+ beanVo.setXpPointList(xpPointService.listByStationId(bean.getId()));
+ return R.ok(beanVo);
}
/**
@@ -120,7 +136,7 @@
*/
@ApiOperation(value = "停用" , tags = {"管理后台-运营-场站管理"})
@GetMapping("/updateStatus/{id}")
- public R updateStatusStop(@PathVariable Long id, @RequestParam Boolean isEnable, @RequestParam Boolean pointStop) {
+ public R updateStatus(@PathVariable Long id, @RequestParam Boolean isEnable, @RequestParam Boolean pointStop) {
XpStation bean = xpStationService.getById(id);
if (bean == null) {
throw new ServiceException("场站不存在,请刷新重试");
@@ -128,9 +144,9 @@
if(isEnable){
xpStationService.updateStatusEnable(bean);
}else{
- if(bean.getStatus() == 2){//场站状态 0=草稿 1=待启用 2=启用中 3=已停用 4=失效
- return R.fail("场站状态未启动,不能停用");
- }
+// if(bean.getStatus() == 2){//场站状态 0=草稿 1=待启用 2=启用中 3=已停用 4=失效
+// return R.fail("场站状态启动中,不能停用");
+// }
//场站状态 0=草稿 1=待测试 2=测试中 3=测试不通过 4=可运营 5=待生效 6=启用中 7=已停用 8=失效
xpStationService.updateStatusStop(bean,pointStop);
}
--
Gitblit v1.7.1