From b5e1bceabb36fe1d1e5e88397280d12e7044c6dd Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期五, 06 十一月 2026 15:32:31 +0800
Subject: [PATCH] 完善设备采集、安全管理及采购业务
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/safety/SafetyInspectionController.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/safety/SafetyInspectionController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/safety/SafetyInspectionController.java
index a2c2850..f66b4da 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/safety/SafetyInspectionController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/safety/SafetyInspectionController.java
@@ -64,6 +64,8 @@
@PreAuthorize("@ss.hasPermission('safety:inspection-point:query')")
public CommonResult<SafetyInspectionPointRespVO> getPoint(@RequestParam("id") Long id) {
var point = inspectionService.getPoint(id);
+ // 鍗曟潯鏌ヨ涔熻鍥炲~涓绘暟鎹渶鏂板�硷紝涓嶈兘鍙繑鍥炲揩鐓�
+ inspectionService.fillPointRefs(java.util.List.of(point));
var resp = BeanUtils.toBean(point, SafetyInspectionPointRespVO.class);
SafetyInspectionService.fillPointDisplay(point, resp);
resp.setLastInspectTime(inspectionService.getLastInspectTime(id));
@@ -76,6 +78,7 @@
public CommonResult<PageResult<SafetyInspectionPointRespVO>> getPointPage(
@Valid SafetyInspectionPointPageReqVO reqVO) {
var page = inspectionService.getPointPage(reqVO);
+ inspectionService.fillPointRefs(page.getList());
var result = BeanUtils.toBean(page, SafetyInspectionPointRespVO.class);
for (int i = 0; i < page.getList().size(); i++) {
SafetyInspectionService.fillPointDisplay(page.getList().get(i), result.getList().get(i));
@@ -87,7 +90,9 @@
@Operation(summary = "鑾峰緱鍚敤涓殑宸℃鐐逛綅绮剧畝鍒楄〃锛堢Щ鍔ㄧ宸℃閫夋嫨锛�")
@PreAuthorize("@ss.hasPermission('safety:inspection-point:query')")
public CommonResult<List<SafetyInspectionPointRespVO>> getPointSimpleList() {
- List<SafetyInspectionPointRespVO> list = inspectionService.getEnabledPointList().stream()
+ var points = inspectionService.getEnabledPointList();
+ inspectionService.fillPointRefs(points);
+ List<SafetyInspectionPointRespVO> list = points.stream()
.map(point -> {
var resp = BeanUtils.toBean(point, SafetyInspectionPointRespVO.class);
SafetyInspectionService.fillPointDisplay(point, resp);
@@ -128,6 +133,7 @@
@PreAuthorize("@ss.hasPermission('safety:inspection:query')")
public CommonResult<SafetyInspectionRespVO> getRecord(@RequestParam("id") Long id) {
var record = inspectionService.getInspection(id);
+ inspectionService.fillInspectorNames(java.util.List.of(record));
var resp = BeanUtils.toBean(record, SafetyInspectionRespVO.class);
resp.setPointTypeName(cn.iocoder.yudao.module.mes.enums.safety.SafetyInspectionPointTypeEnum
.getNameByType(record.getPointType()));
@@ -141,6 +147,7 @@
public CommonResult<PageResult<SafetyInspectionRespVO>> getRecordPage(
@Valid SafetyInspectionPageReqVO reqVO) {
var page = inspectionService.getInspectionPage(reqVO);
+ inspectionService.fillInspectorNames(page.getList());
var result = BeanUtils.toBean(page, SafetyInspectionRespVO.class);
for (int i = 0; i < page.getList().size(); i++) {
var record = page.getList().get(i);
--
Gitblit v1.9.3