From 3a2d6d52075f869d8b07bced96408823c9e51706 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 19 十二月 2025 09:06:49 +0800
Subject: [PATCH] 生产订单:添加日志
---
MESApplication/Controllers/WomcaaController.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
MES.Service/service/WomcaaManager.cs | 5 +++--
2 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs
index 516c7d0..1b2d1da 100644
--- a/MES.Service/service/WomcaaManager.cs
+++ b/MES.Service/service/WomcaaManager.cs
@@ -400,6 +400,7 @@
throw new InvalidOperationException($"鐢熸垚瀛愯〃ID澶辫触锛屾棤娉曡幏鍙栨暟鎹簱搴忓垪鍊�: {ex.Message}", ex);
}
}
+ //鍞竴閿粍鍚堬細涓昏〃灏辨槸宸ュ崟鍗曞埆+宸ュ崟鍗曞彿锛屽瓙琛ㄦ槸宸ュ崟鍗曞彿+宸ュ崟鍗曞彿+鏉愭枡鍝佸彿
/// <summary>
/// 鏁村崟鍒犻櫎锛岃皟鐢ㄥ瓨鍌ㄨ繃绋�
@@ -421,7 +422,7 @@
new SugarParameter("@outSum", outSum, typeof(int), ParameterDirection.Output)
};
- Db.Ado.UseStoredProcedure().ExecuteCommand("ERP_DeleteMesRohInByBillNo", parameters);
+ Db.Ado.UseStoredProcedure().ExecuteCommand("ERP_DeleteWomcaaByBillNo", parameters);
outMsg = parameters[2].Value?.ToString() ?? "";
outSum = parameters[3].Value != null ? Convert.ToInt32(parameters[index: 3].Value) : -1;
@@ -429,7 +430,7 @@
}
catch (Exception ex)
{
- throw new InvalidOperationException($"璋冪敤瀛樺偍杩囩▼ ERP_DeleteMesRohInByBillNo 澶辫触: {ex.Message}", ex);
+ throw new InvalidOperationException($"璋冪敤瀛樺偍杩囩▼ ERP_DeleteWomcaaByBillNo 澶辫触: {ex.Message}", ex);
}
}
}
\ No newline at end of file
diff --git a/MESApplication/Controllers/WomcaaController.cs b/MESApplication/Controllers/WomcaaController.cs
index 398bb75..3447579 100644
--- a/MESApplication/Controllers/WomcaaController.cs
+++ b/MESApplication/Controllers/WomcaaController.cs
@@ -258,4 +258,55 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ /// <summary>
+ /// 鏁村崟鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("Delete")]
+ public ResponseResult Delete([FromBody] DeleteRequestDto data)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Delete";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(data);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ entity.Route = data.FBillNo;
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ // 璋冪敤鍒犻櫎锛岃幏鍙栧瓨鍌ㄨ繃绋嬭繑鍥炵殑鐘舵�佸拰娑堟伅
+ var (outSum, outMsg) = m.Delete(data.FBillNo, data.FBillTypeID);
+ resultInfos.OutSum = outSum;
+ resultInfos.OutMsg = outMsg;
+
+ entity.Result = 0;
+ if (resultInfos.OutSum == 1) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ entity.ResultData = outMsg;
+ return new ResponseResult
+ {
+ //status = outSum,
+ status = 0,
+ message = outMsg,
+ };
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+
+ entity.DealWith = 0;
+
+ entity.ResultData = ex.Message;
+
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3