From 525dfb4adc6afd6f6a256150a451a3420588fa8d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 03 12月 2025 11:39:19 +0800
Subject: [PATCH] 消警处理

---
 iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
index f56d5f8..8203f06 100644
--- a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
+++ b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
@@ -165,6 +165,8 @@
         [HttpPost("UpdateAlertStatus")]
         public async Task<int> UpdateAlertStatus(EquipmentAlertClose input)
         {
+            var v_GetEquipmentAlert = await _v_GetEquipmentAlertRep.FirstAsync(x => x.Id == input.v_get_equipment_alert_id);
+
             var equipmentBaseInfo = await _equipmentBaseInfoRep.FirstOrDefaultAsync(u => u.EquipmentId == input.EquipmentId && u.IsDeleted == false);
 
             if (equipmentBaseInfo == null)
@@ -175,17 +177,21 @@
             {
                 throw Oops.Oh($"鏈紶鍏ラ渶鍏抽棴鐨勫憡璀︾被鍨�,涓嶈兘鍏抽棴锛�");
             }
+            //鍛婅绫诲瀷  锛�1锛氭竻娲楁恫鏇存崲鍛婅锛�2锛氬垁鍏锋洿鎹㈠憡璀︼紱3锛氬垏鍓婃恫鏇存崲鍛婅锛�4锛氳澶囧憡璀︼級
             if (input.AlertType.Equals("1"))
             {
                 equipmentBaseInfo.Detergentchangetime = DateTime.Now;
+                v_GetEquipmentAlert.IsAlertDetergent = false;
             }
             else if (input.AlertType.Equals("2"))
             {
                 equipmentBaseInfo.KnifeToolChangeTime = DateTime.Now;
+                v_GetEquipmentAlert.IsAlertKnifeTool = false;
             }
             else if (input.AlertType.Equals("3"))
             {
                 equipmentBaseInfo.CuttingFluidChangeTime = DateTime.Now;
+                v_GetEquipmentAlert.IsAlertCuttingFluid = false;
             }
             else if (input.AlertType.Equals("4"))
             {
@@ -193,12 +199,18 @@
                 if (equipmentCurrentMonitor != null)
                 {
                     equipmentCurrentMonitor.IsCloseAlert = true;
+                    await _equipmentCurrentMonitorRep.UpdateAsync(equipmentCurrentMonitor);
                 }
+                v_GetEquipmentAlert.IsAlert = false;
             }
             else
             {
                 throw Oops.Oh($"璁惧{input.EquipmentId}浼犲叆鍛婅绫诲瀷{input.AlertType}涓嶅瓨鍦�,涓嶈兘鍏抽棴锛�");
             }
+
+            var isSucess = await _equipmentBaseInfoRep.UpdateAsync(equipmentBaseInfo);
+            await _v_GetEquipmentAlertRep.UpdateAsync(v_GetEquipmentAlert);
+
             return 0;
         }
 

--
Gitblit v1.9.3