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 ++++++++++++
iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml | 5 +++++
iWara.SCADA.Code/iWare.Wms.Application/Service/EquipmentBaseInfo/Dto/EquipmentBaseInfoInput.cs | 6 ++++++
iWara.SCADA.Code/iWare.Wms.EntityFramework.Core/dbsettings.json | 5 ++++-
4 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/iWara.SCADA.Code/iWare.Wms.Application/Service/EquipmentBaseInfo/Dto/EquipmentBaseInfoInput.cs b/iWara.SCADA.Code/iWare.Wms.Application/Service/EquipmentBaseInfo/Dto/EquipmentBaseInfoInput.cs
index fe1bf11..f843547 100644
--- a/iWara.SCADA.Code/iWare.Wms.Application/Service/EquipmentBaseInfo/Dto/EquipmentBaseInfoInput.cs
+++ b/iWara.SCADA.Code/iWare.Wms.Application/Service/EquipmentBaseInfo/Dto/EquipmentBaseInfoInput.cs
@@ -21,6 +21,12 @@
/// </summary>
public string AlertType { get; set; }
+
+ /// <summary>
+ /// 琛╲_get_equipment_alert鐨� id鍊� 銆怑ditby shaocx,2025-12-03銆�
+ /// </summary>
+ public long v_get_equipment_alert_id { get; set; }
+
}
/// <summary>
/// 鏌ヨ璁惧鍛婅淇℃伅
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;
}
diff --git a/iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml b/iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml
index 99df09c..2a7381d 100644
--- a/iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml
+++ b/iWara.SCADA.Code/iWare.Wms.Application/iWare.Wms.Application.xml
@@ -1525,6 +1525,11 @@
鍛婅绫诲瀷 锛�1锛氭竻娲楁恫鏇存崲鍛婅锛�2锛氬垁鍏锋洿鎹㈠憡璀︼紱3锛氬垏鍓婃恫鏇存崲鍛婅锛�4锛氳澶囧憡璀︼級
</summary>
</member>
+ <member name="P:iWare.Wms.Application.EquipmentAlertClose.v_get_equipment_alert_id">
+ <summary>
+ 琛╲_get_equipment_alert鐨� id鍊� 銆怑ditby shaocx,2025-12-03銆�
+ </summary>
+ </member>
<member name="T:iWare.Wms.Application.EquipmentAlertSearch">
<summary>
鏌ヨ璁惧鍛婅淇℃伅
diff --git a/iWara.SCADA.Code/iWare.Wms.EntityFramework.Core/dbsettings.json b/iWara.SCADA.Code/iWare.Wms.EntityFramework.Core/dbsettings.json
index 1831657..0223c9b 100644
--- a/iWara.SCADA.Code/iWare.Wms.EntityFramework.Core/dbsettings.json
+++ b/iWara.SCADA.Code/iWare.Wms.EntityFramework.Core/dbsettings.json
@@ -15,7 +15,10 @@
//"MultiTenantConnection": "Data Source=localhost;Database=Admin.NET_SaaS;User ID=root;Password=123456;pooling=true;port=3306;sslmode=none;CharSet=utf8;"
//MSSQL杩炴帴瀛楃涓�
- "DefaultConnection": "Server=192.168.216.203;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;"
+ //"DefaultConnection": "Server=.;Database=iWare.WMS;User=sa;Password=123abc.com;MultipleActiveResultSets=True;"
+ //"DefaultConnection": "Server=82.156.32.44;Database=iWare.WMS;User=sa;Password=123abc.com;MultipleActiveResultSets=True;"
+ //"DefaultConnection": "Server=192.168.216.203;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;"
+ "DefaultConnection": "Server=localhost\\MSSQLSERVER2022;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;"
//"MultiTenantConnection": "Server=localhost;Database=Admin.NET_SaaS;User=sa;Password=123456;MultipleActiveResultSets=True;"
}
}
\ No newline at end of file
--
Gitblit v1.9.3