lengfaqiang 2 年之前
父節點
當前提交
04aaf156ba

+ 7 - 5
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/controller/ProjectController.java

@@ -4,13 +4,11 @@ import com.alibaba.fastjson2.JSONObject;
 import com.sckw.core.annotation.Log;
 import com.sckw.core.web.response.HttpResult;
 import com.sckw.log.TraceLog.TraceLog;
-import com.sckw.slope.detection.model.dto.BindDevice;
-import com.sckw.slope.detection.model.dto.DeviceDeleteDTO;
-import com.sckw.slope.detection.model.dto.ProjectAddDTO;
-import com.sckw.slope.detection.model.dto.ProjectUpdateDTO;
+import com.sckw.slope.detection.model.dto.*;
 import com.sckw.slope.detection.model.param.DeviceQuery;
 import com.sckw.slope.detection.model.param.ProjectChartLogParam;
 import com.sckw.slope.detection.model.param.ProjectQuery;
+import com.sckw.slope.detection.service.CommonService;
 import com.sckw.slope.detection.service.ProjectService;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.validation.Valid;
@@ -32,6 +30,9 @@ public class ProjectController {
     @Autowired
     ProjectService projectService;
 
+    @Autowired
+    CommonService commonService;
+
     @Log(description = "项目查询-分页")
     //@RepeatSubmit(interval = 3000, message = "两次请求间隔未超过3秒")
     @RequestMapping(name = "项目查询-分页", value = "/select", method = RequestMethod.POST)
@@ -156,7 +157,8 @@ public class ProjectController {
     @RequestMapping(name = "数据总览", value = "/dataScreening", method = RequestMethod.GET)
     public HttpResult dataScreening(/*@RequestParam("projectId") */String companyId,/*@RequestParam("projectId") */String projectId ,HttpServletRequest request) {
         log.info("数据总览 dataScreening param:{}", projectId,companyId);
-        return projectService.dataScreening(projectId,companyId);
+        HeaderData headerData = commonService.getHeaderData(request);
+        return projectService.dataScreening(projectId,headerData.getCompanyId());
     }
 
     @Log(description = "项目查询(项目+设备)")