From d6263c64301ae2f1c605bd3704a4cae5bfae2338 Mon Sep 17 00:00:00 2001 From: lcj <2331845269@qq.com> Date: Tue, 14 Oct 2025 15:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E8=B4=A8=E9=87=8F=E3=80=81?= =?UTF-8?q?=E7=89=A9=E8=B5=84=E3=80=81=E8=AF=86=E5=88=AB=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/java/org/dromara/test/DemoTest.java | 45 ++++++++++++++++++- .../EnterpriseBigScreenController.java | 26 +++++------ .../ProjectBigScreenController.java | 32 +++++++------ .../controller/FacRedLineController.java | 3 +- .../manager/ys7manager/Ys7Constant.java | 5 +++ .../service/impl/MatMaterialsServiceImpl.java | 4 +- .../MatMaterialsUseRecordServiceImpl.java | 9 +--- .../QltQualityInspectionListGisVo.java | 2 +- .../impl/QltQualityInspectionServiceImpl.java | 3 +- .../recognizerecord/HseRecognizeRecordVo.java | 6 +++ .../impl/HseRecognizeRecordServiceImpl.java | 12 ++++- 11 files changed, 102 insertions(+), 45 deletions(-) diff --git a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java index 42970f35..7f1a28b5 100644 --- a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java +++ b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java @@ -3,6 +3,10 @@ package org.dromara.test; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdcardUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; @@ -22,6 +26,11 @@ import org.dromara.facility.service.IFacMatrixService; import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; import org.dromara.facility.service.IFacPhotovoltaicPanelService; import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; +import org.dromara.manager.ys7manager.Ys7Constant; +import org.dromara.manager.ys7manager.Ys7Manager; +import org.dromara.manager.ys7manager.vo.Ys7ResponseVo; +import org.dromara.other.domain.OthYs7Device; +import org.dromara.other.service.IOthYs7DeviceService; import org.dromara.out.domain.OutConstructionValue; import org.dromara.out.domain.OutConstructionValueRange; import org.dromara.out.service.IOutConstructionValueRangeService; @@ -101,6 +110,12 @@ public class DemoTest { @Resource private IOutConstructionValueService constructionValueService; + @Resource + private IOthYs7DeviceService ys7DeviceService; + + @Resource + private Ys7Manager ys7Manager; + @Test void testConstructionValue() { @@ -114,7 +129,7 @@ public class DemoTest { log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday); Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/ LocalDate start = LocalDate.of(2024, 1, 1); // 起始时间(2024-01-01) - LocalDate end = LocalDate.of(2025, 9, 15); // 截止时间(2025-09-15) + LocalDate end = LocalDate.of(2025, 10, 13); // 截止时间(2025-09-15) // 如果起始不是周一,调整到当周的周一 if (start.getDayOfWeek() != DayOfWeek.MONDAY) { @@ -505,4 +520,32 @@ public class DemoTest { } } + @Test + void openSxtLx() { + String token = ys7Manager.getToken(); + List list = ys7DeviceService.list(); + for (OthYs7Device othYs7Device : list) { + HashMap paramMap = new HashMap<>(); + paramMap.put("accessToken", token); + paramMap.put("deviceSerial", othYs7Device.getDeviceSerial()); + paramMap.put("enable", 1); + String errorMsg = "Ys7 Token 请求失败"; + try (HttpResponse response = HttpRequest.post(Ys7Constant.setDeviceVideoUrlByPost) + .form(paramMap) + .execute()) { + if (!response.isOk()) { + log.error("{}:{}", errorMsg, response.getStatus()); +// throw new ServiceException(errorMsg + response.getStatus()); + } + String body = response.body(); + Ys7ResponseVo responseVo = JSONUtil.toBean(body, Ys7ResponseVo.class); + if (!responseVo.getCode().equals("200")) { + log.error("{},状态码:{},{}", errorMsg, responseVo.getCode(), responseVo.getMsg()); +// throw new ServiceException(errorMsg + responseVo.getMsg()); + } + log.info("Ys7 Token 请求成功:{}", body); + } + } + } + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/EnterpriseBigScreenController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/EnterpriseBigScreenController.java index 8ff4225b..9bfd18b6 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/EnterpriseBigScreenController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/EnterpriseBigScreenController.java @@ -1,10 +1,8 @@ package org.dromara.bigscreen.controller; -import cn.dev33.satoken.annotation.SaCheckPermission; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletRequest; import org.dromara.bigscreen.domain.dto.WeatherQueryReq; import org.dromara.bigscreen.domain.vo.*; import org.dromara.bigscreen.mapper.ProjectBigScreenMapper; @@ -52,14 +50,10 @@ public class EnterpriseBigScreenController { @Resource private IBusProjectService projectService; - @Resource - private ProjectBigScreenMapper projectBigScreenMapper; - - /** * 获取关键指标 */ - @SaCheckPermission("enterprise:bigScreen:keyIndex") +// @SaCheckPermission("enterprise:bigScreen:keyIndex") @GetMapping("/keyIndex") public R getEnterpriseKeyIndex() { return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex()); @@ -68,7 +62,7 @@ public class EnterpriseBigScreenController { /** * 项目进度分析 */ - @SaCheckPermission("enterprise:bigScreen:projectProgress") +// @SaCheckPermission("enterprise:bigScreen:projectProgress") @GetMapping("/projectProgress") public R getProjectProgress() { return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis()); @@ -77,7 +71,7 @@ public class EnterpriseBigScreenController { /** * 项目产值对比 */ - @SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison") +// @SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison") @GetMapping("/projectOutputValueComparison") public R> getProjectOutputValueComparison() { return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison()); @@ -86,7 +80,7 @@ public class EnterpriseBigScreenController { /** * 项目进度完成度和计划容量 */ - @SaCheckPermission("enterprise:bigScreen:projectProgressCapacity") +// @SaCheckPermission("enterprise:bigScreen:projectProgressCapacity") @GetMapping("/projectProgressCapacity") public R> getProjectProgressCapacity() { return R.ok(enterpriseBigScreenService.getProjectProgressCapacity()); @@ -95,7 +89,7 @@ public class EnterpriseBigScreenController { /** * 风险预警 */ - @SaCheckPermission("enterprise:bigScreen:riskEarlyWarning") +// @SaCheckPermission("enterprise:bigScreen:riskEarlyWarning") @GetMapping("/riskEarlyWarning") public R> getRiskEarlyWarning() { return R.ok(enterpriseBigScreenService.getRiskEarlyWarning()); @@ -104,7 +98,7 @@ public class EnterpriseBigScreenController { /** * 查询天气 */ - @SaCheckPermission("enterprise:bigScreen:weather") +// @SaCheckPermission("enterprise:bigScreen:weather") @GetMapping("/weather") public R> getProjectWeather(WeatherQueryReq req) { return R.ok(enterpriseBigScreenService.getWeather3DaysList(req)); @@ -113,7 +107,7 @@ public class EnterpriseBigScreenController { /** * 查询安全天数 */ - @SaCheckPermission("enterprise:bigScreen:safetyDay") +// @SaCheckPermission("enterprise:bigScreen:safetyDay") @GetMapping("/safetyDay") public R getProjectSafetyDay() { LocalDate date = LocalDate.of(2023, 1, 1); @@ -125,7 +119,7 @@ public class EnterpriseBigScreenController { /** * 人数统计 */ - @SaCheckPermission("enterprise:bigScreen:peopleCount") +// @SaCheckPermission("enterprise:bigScreen:peopleCount") @GetMapping("/peopleCount") public R getProjectPeopleCount() { PeopleCountVo peopleCountVo = new PeopleCountVo(); @@ -156,7 +150,7 @@ public class EnterpriseBigScreenController { /** * 出勤人数统计 */ - @SaCheckPermission("enterprise:bigScreen:allAttendanceCount") +// @SaCheckPermission("enterprise:bigScreen:allAttendanceCount") @GetMapping("/allAttendanceCount") public R getAllAttendanceCount() { TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo(); @@ -195,7 +189,7 @@ public class EnterpriseBigScreenController { /** * 每个项目的出勤人数 */ - @SaCheckPermission("enterprise:bigScreen:projectAttendanceCount") +// @SaCheckPermission("enterprise:bigScreen:projectAttendanceCount") @GetMapping("/projectAttendanceCount") public R> getProjectAttendanceCount() { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProjectBigScreenController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProjectBigScreenController.java index d65d3bcc..3a873c37 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProjectBigScreenController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProjectBigScreenController.java @@ -89,6 +89,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目土地统计 */ +// @SaCheckPermission("project:big:screen") @GetMapping("/{projectId}") public R> landCount(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -160,7 +161,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目天气 */ - @SaCheckPermission("project:bigScreen:weather") +// @SaCheckPermission("project:big:screen") @GetMapping("/weather/{projectId}") public R> getProjectWeather(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -170,7 +171,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目安全天数 */ - @SaCheckPermission("project:bigScreen:safetyDay") +// @SaCheckPermission("project:big:screen") @GetMapping("/safetyDay/{projectId}") public R getProjectSafetyDay(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -180,7 +181,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目公告 */ - @SaCheckPermission("project:bigScreen:news") +// @SaCheckPermission("project:big:screen") @GetMapping("/news/{projectId}") public R> getProjectNews(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -198,7 +199,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目AI安全巡检 */ - @SaCheckPermission("project:bigScreen:safetyInspection") +// @SaCheckPermission("project:big:screen") @GetMapping("/safetyInspection/{projectId}") public R> getProjectSafetyInspection(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -225,7 +226,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目人员情况 */ - @SaCheckPermission("project:bigScreen:people") +// @SaCheckPermission("project:big:screen") @GetMapping("/people/{projectId}") public R getProjectPeople(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -280,7 +281,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目形象进度 */ - @SaCheckPermission("project:bigScreen:imageProgress") +// @SaCheckPermission("project:big:screen") @GetMapping("/imageProgress/{projectId}") public R> getProjectImageProgress(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -290,7 +291,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目概括 */ - @SaCheckPermission("project:bigScreen:generalize") +// @SaCheckPermission("project:big:screen") @GetMapping("/generalize/{projectId}") public R getProjectGeneralize(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -311,7 +312,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询设备列表 */ - @SaCheckPermission("project:bigScreen:getClientList") +// @SaCheckPermission("project:big:screen") @GetMapping("/getClientList/{projectId}") public R>> getClientList(@NotNull(message = "主键不能为空") @PathVariable Long projectId) { @@ -321,6 +322,7 @@ public class ProjectBigScreenController extends BaseController { /** * 修改萤石摄像头 */ +// @SaCheckPermission("project:big:screen") @RepeatSubmit() @PutMapping("/device") public R edit(@Validated @RequestBody Ys7DeviceUpdateReq req) { @@ -356,6 +358,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询质量信息 */ +// @SaCheckPermission("project:big:screen") @GetMapping("/getQualityList/gis") public R queryGisList(QltQualityInspectionGisReq req) { return R.ok(qualityInspectionService.queryGisList(req)); @@ -364,6 +367,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询大屏安全信息 */ +// @SaCheckPermission("project:big:screen") @GetMapping("/getSafetyList/gis") public R queryGisList(HseSafetyInspectionGisReq req) { return R.ok(safetyInspectionService.queryGisList(req)); @@ -372,7 +376,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询GPS设备用户列表 */ - @SaCheckPermission("project:bigScreen:getList") + @SaCheckPermission("project:big:screen") @GetMapping("/getList") public R> getList(Long projectId) { return R.ok(projectBigScreenService.getList(projectId)); @@ -381,7 +385,7 @@ public class ProjectBigScreenController extends BaseController { /** * 新增GPS设备详细 */ - @SaCheckPermission("project:bigScreen:setList") +// @SaCheckPermission("project:big:screen") @Log(title = "GPS设备详细", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping("/setList") @@ -392,7 +396,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询地图项目分类 */ -// @SaCheckPermission("project:bigScreen:getProjectMapList") + @SaCheckPermission("project:big:screen") @GetMapping("/getProjectMapList") public R>>> getProjectMapList() { return R.ok(projectService.getProjectMapList()); @@ -402,7 +406,7 @@ public class ProjectBigScreenController extends BaseController { /** * 查询项目地域分散图 */ -// @SaCheckPermission("project:bigScreen:getProjectMapList") +// @SaCheckPermission("project:big:screen") @GetMapping("/getProjectDiYv") public R> getProjectDiYv() { return R.ok(projectService.getProjectDiYv()); @@ -411,7 +415,7 @@ public class ProjectBigScreenController extends BaseController { /** * 计划和实际容量对比 */ -// @SaCheckPermission("project:bigScreen:getProjectMapList") +// @SaCheckPermission("project:big:screen") @GetMapping("/getProjectCapacity") public R>> getProjectCapacity() { return R.ok(projectService.getProjectCapacity()); @@ -421,6 +425,7 @@ public class ProjectBigScreenController extends BaseController { /** * 更新无人机缓存 */ +// @SaCheckPermission("project:big:screen") @GetMapping("/setWrjHc") public void setWrjHc(){ projectBigScreenService.setWrjHc(); @@ -429,6 +434,7 @@ public class ProjectBigScreenController extends BaseController { /** * 更新无人机缓存 */ +// @SaCheckPermission("project:big:screen") @GetMapping("/getInfoData") public R>> getInfoData(TanchuangInfoReq req){ return R.ok(projectBigScreenService.getInfoData(req)); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/controller/FacRedLineController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/controller/FacRedLineController.java index 28a43957..1b7c791c 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/controller/FacRedLineController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/controller/FacRedLineController.java @@ -1,6 +1,7 @@ package org.dromara.facility.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; @@ -41,7 +42,7 @@ public class FacRedLineController extends BaseController { /** * 查询设施-红线列表 */ - @SaCheckPermission("facility:redLine:list") + @SaCheckPermission(value = {"facility:redLine:list", "project:big:screen"}, mode = SaMode.OR) @GetMapping("/list") public TableDataInfo list(FacRedLineBo bo, PageQuery pageQuery) { return facRedLineService.queryPageList(bo, pageQuery); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/ys7manager/Ys7Constant.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/ys7manager/Ys7Constant.java index d2ebf00f..a919dc35 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/ys7manager/Ys7Constant.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/ys7manager/Ys7Constant.java @@ -56,4 +56,9 @@ public interface Ys7Constant { */ String captureDeviceUrlByPost = "https://open.ys7.com/api/lapp/device/capture"; + /** + * 设置设备录像开关请求地址 Post + */ + String setDeviceVideoUrlByPost = "https://open.ys7.com/api/lapp/device/fullday/record/switch/set"; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsServiceImpl.java index 0cd9ff03..c3272099 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsServiceImpl.java @@ -17,7 +17,6 @@ import org.dromara.common.core.utils.StringUtils; import org.dromara.common.json.utils.JsonUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.materials.domain.MatMaterialReceive; import org.dromara.materials.domain.MatMaterials; import org.dromara.materials.domain.MatMaterialsInventory; @@ -651,7 +650,8 @@ public class MatMaterialsServiceImpl extends ServiceImpl outList, List useList) { Map putMap = putList.stream() - .collect(Collectors.toMap(MatMaterialsInventory::getMaterialsId, inventory -> inventory)); + .collect(Collectors.toMap(MatMaterialsInventory::getMaterialsId, inventory -> inventory, + (existing, replacement) -> replacement)); return materials.stream().map(material -> { MatMaterialsUseDetailVo vo = new MatMaterialsUseDetailVo(); BeanUtils.copyProperties(material, vo); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsUseRecordServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsUseRecordServiceImpl.java index 8c892d11..e82c0720 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsUseRecordServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/materials/service/impl/MatMaterialsUseRecordServiceImpl.java @@ -104,7 +104,7 @@ public class MatMaterialsUseRecordServiceImpl extends ServiceImpl "2".equals(q.getIsReply())) .toList() .size()); - gisVo.setCorrectSituation(String.format("%.2f", passCount * 100.0 / qualityInspectionList.size())); + gisVo.setCorrectSituation(passCount); +// gisVo.setCorrectSituation(String.format("%.2f", passCount * 100.0 / qualityInspectionList.size())); return gisVo; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/recognizerecord/HseRecognizeRecordVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/recognizerecord/HseRecognizeRecordVo.java index 0e0e1770..4d0aa533 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/recognizerecord/HseRecognizeRecordVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/recognizerecord/HseRecognizeRecordVo.java @@ -84,4 +84,10 @@ public class HseRecognizeRecordVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createTime; + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseRecognizeRecordServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseRecognizeRecordServiceImpl.java index 4fccd16c..f87e81b4 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseRecognizeRecordServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseRecognizeRecordServiceImpl.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.annotation.Resource; import org.dromara.common.core.constant.HttpStatus; import org.dromara.common.core.exception.ServiceException; -import org.dromara.common.core.utils.ObjectUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -106,6 +105,7 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl + wrapper.eq(HseRecognizeRecord::getProjectId, projectId) + .or() + .isNull(HseRecognizeRecord::getProjectId) + ); + } else { + lqw.isNull(HseRecognizeRecord::getProjectId); + } lqw.eq(StringUtils.isNotBlank(recordCategory), HseRecognizeRecord::getRecordCategory, recordCategory); lqw.eq(StringUtils.isNotBlank(violationType), HseRecognizeRecord::getViolationType, violationType); lqw.like(StringUtils.isNotBlank(description), HseRecognizeRecord::getDescription, description);