From 4129e9310993e1bfd62cf827556b868c8829dfb2 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 25 七月 2025 14:41:05 +0800
Subject: [PATCH] 故障报修状态

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java |   10 +++++++++-
 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java  |    1 +
 db/430设备管理数据库设计.pdma.json                                                                                |    8 ++++----
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git "a/db/430\350\256\276\345\244\207\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json" "b/db/430\350\256\276\345\244\207\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json"
index 9aedf87..b64c4ac 100644
--- "a/db/430\350\256\276\345\244\207\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json"
+++ "b/db/430\350\256\276\345\244\207\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json"
@@ -4,7 +4,7 @@
   "avatar": "",
   "version": "4.9.4",
   "createdTime": "2025-3-10 16:38:19",
-  "updatedTime": "2025-7-23 11:43:01",
+  "updatedTime": "2025-7-23 19:33:38",
   "dbConns": [],
   "profile": {
     "default": {
@@ -33104,12 +33104,12 @@
   "dbConn": [
     {
       "defKey": "949F6F53-7669-4EC7-923F-649A7D4D8273",
-      "defName": "hangyu",
+      "defName": "430",
       "type": "BFC87171-C74F-494A-B7C2-76B9C55FACC9",
       "properties": {
         "driver_class_name": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
-        "url": "jdbc:sqlserver://192.168.1.118:1433;DatabaseName=LXZN_TEST_HANGYU",
-        "password": "123",
+        "url": "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=LXZN_TEST_430_NEW",
+        "password": "",
         "username": "sa",
         "customer_driver": ""
       }
diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
index eb2d6fc..e406f2a 100644
--- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
+++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
@@ -205,6 +205,7 @@
             BeanUtils.copyProperties(eamReportRepairRequest, eamReportAccidentsRegister);
             eamReportAccidentsRegister.setReportId(eamReportRepair.getId());
             eamReportAccidentsRegister.setDelFlag(CommonConstant.DEFAULT_0);
+            eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_SUBMIT.name());
             iEamReportAccidentsRegisterService.save(eamReportAccidentsRegister);
         }
         //鐢熸垚缁翠慨宸ュ崟,鍙兘浼氭湁棰嗗彇鎿嶄綔
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java
index cb14634..52f42da 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java
@@ -19,7 +19,9 @@
 import org.jeecg.modules.eam.constant.BusinessCodeConst;
 import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto;
 import org.jeecg.modules.eam.entity.EamRepairOrder;
+import org.jeecg.modules.eam.entity.EamRepairPerson;
 import org.jeecg.modules.eam.entity.EamReportAccidentsRegister;
+import org.jeecg.modules.eam.entity.EamReportRepair;
 import org.jeecg.modules.eam.request.EamRepairOrderRequest;
 import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery;
 import org.jeecg.modules.eam.service.IEamReportAccidentsRegisterService;
@@ -29,6 +31,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
+import org.jeecg.modules.eam.service.IEamReportRepairService;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -58,7 +61,8 @@
 public class EamReportAccidentsRegisterController extends JeecgController<EamReportAccidentsRegister, IEamReportAccidentsRegisterService> {
 	@Autowired
 	private IEamReportAccidentsRegisterService eamReportAccidentsRegisterService;
-
+	@Autowired
+	private IEamReportRepairService eamReportRepairService;
 	/**
 	 * 鍒嗛〉鍒楄〃鏌ヨ
 	 *
@@ -218,6 +222,10 @@
 		if(eamReportAccidentsRegister==null) {
 			return Result.error("鏈壘鍒板搴旀暟鎹�");
 		}
+		EamReportRepair eamReportRepair=eamReportRepairService.getById(eamReportAccidentsRegister.getReportId());
+		eamReportAccidentsRegister.setScrapPartNumber(eamReportRepair.getScrapPartNumber());
+		eamReportAccidentsRegister.setScrapPartValue(eamReportRepair.getScrapPartValue());
+		eamReportAccidentsRegister.setScrapPartQuantity(eamReportRepair.getScrapPartQuantity());
 		return Result.OK(eamReportAccidentsRegister);
 	}
 

--
Gitblit v1.9.3