From 100bf842af4b578183cc89b3b3e6dc6ec1221a92 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 30 三月 2022 17:29:25 +0800
Subject: [PATCH] 器具档案批量生成
---
WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs | 79 +++++++++++++++++++++++++++++++++++++--
1 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs b/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs
index e4e6bb2..07f34a6 100644
--- a/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs
@@ -81,10 +81,46 @@
}
#endregion
+ #region 鎷f枡閰嶉�佸崟 鍒犻櫎
+ [Route("Sc_ComplementGoods/DelComplementGoodsList")]
+ [HttpGet]
+ public object DelComplementGoodsList(string HInterID, string HEntryID,string HOrgID, string user)
+ {
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_ComplementGoodsBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.RunProc($"exec Del_ComplementGoodsBillInfo {HInterID},{HEntryID},{HOrgID}");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 閰嶆枡鍗曞垪琛�
[Route("Sc_ComplementGoods/ComplementGoodsBill")]
[HttpGet]
- public object ComplementGoodsBill(string sWhere, string user)
+ public object ComplementGoodsBill(string sWhere)
{
try
{
@@ -96,12 +132,45 @@
objJsonResult.data = new DataTable();
return objJsonResult;
}
- //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
- ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString());
+ ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoods_Load '{sWhere}'", "h_p_JIT_ComplementGoods_Load");
- //ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoods_Load '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," +
- // $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍖归厤搴撳瓨
+ [Route("Sc_ComplementGoods/ComplementGoodsBill_C")]
+ [HttpGet]
+ public object ComplementGoodsBill_C(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = new DataTable();
+ return objJsonResult;
+ }
+
+ oCN.RunProc($"exec h_p_JIT_ComplementGoodsBill_C_Add '{sWhere}'");
+
+ ds = oCN.RunProcReturn("exec h_p_JIT_GetComplementGoodsBill_C " + sWhere, "h_p_JIT_GetComplementGoodsBill_C");
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1