From 5fa0ffb025dcfc01df2682801b8d436ade460024 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 12 十月 2021 14:42:29 +0800
Subject: [PATCH] nothing
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 66 +++++++++++++++++++++++++-------
1 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 05fabe2..97299d5 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -359,10 +359,18 @@
/// </summary>
[Route("Gy_Mould/list1")]
[HttpGet]
- public object list1(string sWhere)
+ public object list1(string sWhere,string ModRightNameSelect, string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameSelect, 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere, "h_v_Gy_MouldFileList");
@@ -508,14 +516,27 @@
///杩斿洖鍊硷細object銆�
/// </summary>
[Route("Gy_Mould_Edit/AddBill")]
- [HttpPost]
- public object AddBill([FromBody] JObject sMainSub)
+ [HttpGet]
+ public object AddBill([FromBody] JObject oMain)
{
- var _value = sMainSub["oMain"].ToString();
+ var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();//褰撳墠浜�
+ string msg4 = sArray[2].ToString();//妯″潡鏉冮檺
+
oCN.BeginTran();
+ if (!DBUtility.ClsPub.Security_Log(msg4, 1, true, msg3))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//淇濆瓨涓昏〃
- objJsonResult = AddBillMain(msg1);
+ objJsonResult = AddBillMain(msg2);
if (objJsonResult.code == "0")
{
oCN.RollBack();
@@ -532,10 +553,8 @@
return objJsonResult;
}
- public json AddBillMain(string msg1)
+ public json AddBillMain(string msg2)
{
- string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string msg2 = sArray[0].ToString();
try
{
msg2 = "[" + msg2.ToString() + "]";
@@ -650,16 +669,25 @@
[HttpPost]
public object AddBill1([FromBody] JObject oMain)
{
-
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();//褰撳墠浜�
+ string msg4 = sArray[2].ToString();//妯″潡鏉冮檺
try
{
+ if (!DBUtility.ClsPub.Security_Log(msg4, 1, true, msg3))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
DAL.ClsGy_MouldFile oMould = new DAL.ClsGy_MouldFile();
DAL.ClsGy_MouldFileMain_View oDeptHlp = new DAL.ClsGy_MouldFileMain_View();
- var _value = oMain["oMain"].ToString();
- string msg1 = _value.ToString();
- string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string msg2 = sArray[0].ToString();
//鍙嶅簭鍒楀寲
msg2 = "[" + msg2.ToString() + "]";
@@ -814,12 +842,20 @@
/// </summary>
[Route("Gy_Mould_Edit/Delete_Json")]
[HttpGet]
- public object Delete_Json(long hmainid)
+ public object Delete_Json(long hmainid, string ModRightNameDelete, string user)
{
DAL.ClsGy_MouldFile oBill = new DAL.ClsGy_MouldFile();
try
{
- if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo))
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo))
{
//鍐欏叆鏃ュ織
ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oBill.omodel.HMouldNo + ",鍚嶇О锛�" + oBill.omodel.HName, ClsPub.CurUserName);
--
Gitblit v1.9.1