From f269c61bc0ebc13dcf1351cfaf7233e2fa72890e Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 12 十月 2021 14:42:22 +0800
Subject: [PATCH] 器具退库单 往来单位
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 70 ++++++++++++++++++++++++++--------
1 files changed, 53 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 7597ede..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() + "]";
@@ -581,7 +600,7 @@
string HSupNumber = mainList[0].HSupNumber;
long HPrintQty = mainList[0].HPrintQty;
-
+
//涓昏〃
oCN.RunProc("Insert Into Gy_MouldFileMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -597,7 +616,7 @@
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
- "," + HSubjoin + ",'" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
+ ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
"," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +
@@ -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