From e7ad5effbf152b64b57a7b235771d98931f7b9c5 Mon Sep 17 00:00:00 2001
From: yyy <1083599556@qq.com>
Date: 星期四, 23 四月 2026 15:14:47 +0800
Subject: [PATCH] 1.现场情况上报 调试修改
---
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPointSituationReportController.java | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPointSituationReportController.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPointSituationReportController.java
index 23cae47..41174b8 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPointSituationReportController.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPointSituationReportController.java
@@ -3,7 +3,10 @@
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.hutool.core.util.StrUtil;
+import com.xiaopeng.api.feignClient.account.XpOperationUserClient;
import com.xiaopeng.api.model.account.SysUser;
+import com.xiaopeng.api.model.account.XpOperationsUser;
import com.xiaopeng.api.model.operation.XpPasswordFreePolicy;
import com.xiaopeng.api.model.operation.XpPointSituationReport;
import com.xiaopeng.api.query.operation.XpPointSituationReportQuery;
@@ -19,6 +22,7 @@
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -30,6 +34,7 @@
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
@RestController
@RequestMapping("")
@@ -41,6 +46,8 @@
@Resource
private TokenService tokenService;
+ @Resource
+ private XpOperationUserClient xpOperationUserClient;
@@ -50,19 +57,23 @@
@ApiOperation(value = "现场情况上报分页列表", tags = {"管理后台-运维-现场情况上报"}, response = XpPasswordFreePolicy.class)
@PostMapping("/api/v1/pointSituationReport/pageList")
public R<PageInfo<XpPointSituationReportVo>> pageList(@RequestBody XpPointSituationReportQuery query) {
+
+
+
+
PageInfo<XpPointSituationReportVo> pageInfo = xpPointSituationReportService.pageList(query);
return R.ok(pageInfo);
}
/**
- * 删除路线规划配置
+ * 详情现场情况上报
*/
@ApiOperation(value = "详情现场情况上报", tags = {"管理后台-运维-现场情况上报"})
@GetMapping("/api/v1/pointSituationReport/getdetail/{id}")
public R<?> getdetail(@PathVariable Long id) {
- xpPointSituationReportService.getdetail(id);
- return R.ok();
+ XpPointSituationReportVo detail = xpPointSituationReportService.getdetail(id);
+ return R.ok(detail);
}
@@ -72,13 +83,27 @@
@ApiOperation(value = "删除现场情况上报", tags = {"管理后台-运维-现场情况上报"})
@DeleteMapping("/api/v1/pointSituationReport/deleteById/{id}")
public R<?> deleteById(@PathVariable Long id) {
- xpPointSituationReportService.deleteById(id);
- return R.ok();
+
+ try {
+ boolean b = xpPointSituationReportService.deleteById(id);
+ if(b){
+ return R.ok();
+ }
+ return R.fail("删除失败");
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+
+
}
@ApiOperation(value = "导出现场情况上报", tags = {"管理后台-运维-现场情况上报"})
@PostMapping(value = "/api/v1/pointSituationReport/exportExcels")
public void exportExcels(@RequestBody XpPointSituationReportQuery query) {
+ if(query.getIds().isEmpty()){
+ return;
+ }
List<XpPointSituationReportVo> exportList = xpPointSituationReportService.exportList(query);
List<XpPointSituationReportExportExcel> exportExcels = new ArrayList<>();
long sequence = 1L;
@@ -115,7 +140,7 @@
}
- @ApiOperation(value = "现场情况上报", tags = {"运维APP-站点管理"}, response = XpPointSituationReport.class)
+ @ApiOperation(value = "现场情况上报", tags = {"运维APP-现场情况上报"}, response = XpPointSituationReport.class)
@PostMapping("/maintenance-app/api/v1/pointSituationReport/addPointSituationReport")
public R<?> addPointSituationReport(@RequestBody XpPointSituationReport xpPointSituationReport){
LoginOperationUser loginOperationUser = tokenService.getLoginOperationUser();
--
Gitblit v1.7.1