From b5be74851f7657d8782379853429b5dd1c3bcfcb Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 27 八月 2021 14:44:14 +0800
Subject: [PATCH] 供应商、客户列表
---
WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
index ce1908d..97ddaa3 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
@@ -358,6 +358,86 @@
}
}
+ /// <summary>
+ /// 渚涘簲鍟嗗垪琛ㄥ垹闄�
+ /// </summary>
+ /// <param name="HItemID">鍒犻櫎鍒楃殑ID</param>
+ /// <param name="User">褰撳墠鐧诲綍鐢ㄦ埛</param>
+ /// <param name="ModRightNameDelete"></param>
+ /// <returns></returns>
+ [Route("Gy_Supplier/Delete_Json")]
+ [HttpGet]
+ public object Delete_Json(long HItemID, string User, string ModRightNameDelete)
+ {
+ DAL.ClsGy_Supplier_Ctl oGroup = new DAL.ClsGy_Supplier_Ctl();
+ DAL.ClsGy_Supplier_View oGroupHlp = new DAL.ClsGy_Supplier_View();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oGroupHlp.GetInfoByID(HItemID))
+ {
+ if (oGroup.HavChildCodes(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍒犻櫎鍓嶅垽鏂槸鍚� 宸蹭娇鐢� 20141020
+ if (oGroupHlp.omodel.HUseFlag != "鏈娇鐢�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ら」鐩凡浣跨敤鎴栬�呮湭妫�娴嬶紝涓嶈兘鍒犻櫎锛佽閲嶆柊妫�娴嬪啀鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //
+ if (oGroup.DeleteByID(HItemID))
+ {
+ //鍐欏叆鏃ュ織
+ ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oGroupHlp.omodel.HNumber + ",鍚嶇О锛�" + oGroupHlp.omodel.HName, ClsPub.CurUserName);
+ //鏇存柊涓婄骇涓� 鏈骇
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID = " + HItemID, "Gy_Department");
+
+ 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;
+ }
+ }
//
}
}
\ No newline at end of file
--
Gitblit v1.9.1