From 2609bffee3a8de0d1e08b1b2c3fa3cfe13064f4e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 24 三月 2025 11:40:14 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 445 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 439 insertions(+), 6 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index cd2fed4..4d4d311 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -134,12 +134,14 @@
objJsonResult.data = null;
return objJsonResult;
}
+
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn("exec h_p_Gy_MaterialList " + page + "," + size + ",'" + Organization +"'," + "''", "h_p_Gy_MaterialList");
}
else
{
+ sWhere = sWhere.Replace("'", "''");
ds = oCN.RunProcReturn("exec h_p_Gy_MaterialList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Gy_MaterialList");
}
@@ -1118,11 +1120,11 @@
[HttpGet]
public object DeltetGy_Material(string HItemID, string user)
{
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ oCN.BeginTran();//寮�濮嬩簨鍔�
DataSet ds;
try
{
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-
if (user == "10000")//api鍚屾鏂瑰紡
{
oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID);
@@ -1150,7 +1152,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();//寮�濮嬩簨鍔�
+
ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -1384,7 +1386,49 @@
}
#endregion
+ #region 鑾峰彇褰撳墠鍏徃鍚�
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Xt_getInfo/getCompanyName")]
+ [HttpGet]
+ public object getCompanyName()
+ {
+ try
+ {
+ string sErr = "";
+ if(oSystemParameter.ShowBill(ref sErr))
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = oSystemParameter.omodel.WMS_CampanyName;
+ objJsonResult.data = oSystemParameter.omodel.WMS_CampanyName;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍏徃鍚嶈幏鍙栧け璐ワ紒" ;
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
/// <summary>
@@ -1432,6 +1476,63 @@
return objJsonResult;
}
}
+
+ #region 妯″叿鍒楄〃鍒嗛〉鍒楄〃
+ [Route("Gy_Mould/page")]
+ [HttpGet]
+ public object Gy_MouldPage(string sWhere,string ModRightNameSelect,string user, int page, int size)
+ {
+ DataSet ds;
+ json res = new json();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameSelect, 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Gy_MouldFileList " + page + "," + size + ",''", "h_p_Gy_MouldFileList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_Gy_MouldFileList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_MouldFileList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ res.code = CodeConstant.SUCCEED;
+ res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ res.Message = "Sucess锛�";
+ res.list = columnNameList;
+ res.data = ds.Tables[0];
+ return res;
+ }
+ catch (Exception e)
+ {
+ res.code = CodeConstant.FAIL;
+ res.count = CountConstant.FAIL;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return res;
+ }
+ }
+ #endregion
+
+
#region 鍣ㄥ叿妗f鍒楄〃 鏍戠姸鍥� 璁惧鍒嗙被鏌ヨ
@@ -2036,6 +2137,9 @@
string HMouldClass = mainList[0].HMouldClass;
int HNowWHID = mainList[0].HNowWHID;
int HNowSPID = mainList[0].HNowSPID;
+ string HMouldUseStatus = mainList[0].HMouldUseStatus;
+ int HCREATEORGID = mainList[0].HCREATEORGID;
+ int HUSEORGID = mainList[0].HUSEORGID;
//淇濆瓨鍓嶆帶鍒�=========================================
string HBillNote = "";
@@ -2071,7 +2175,7 @@
",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
- ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " +
+ ",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus,HCREATEORGID,HUSEORGID) " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
@@ -2081,7 +2185,7 @@
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
"," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
- ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') ");
+ ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "',"+ HCREATEORGID + ","+ HUSEORGID + ") ");
//瀛愯〃
oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -2231,9 +2335,33 @@
string HMouldClass = mainList[0].HMouldClass;
int HNowWHID = mainList[0].HNowWHID;
int HNowSPID = mainList[0].HNowSPID;
-
+ string HMouldUseStatus = mainList[0].HMouldUseStatus;
+ int HUSEORGID = mainList[0].HUSEORGID;
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
//涓昏〃
oCN.RunProc("UpDate Gy_MouldFileMain set " +
" HBillNo='" + HBillNo + "'" + //鍥哄畾璧嬪��===============
@@ -2254,6 +2382,7 @@
",HPICNo='" + HPICNo + "'" +
",HWorkMaterModel='" + HWorkMaterModel + "'" +
",HMaterID=" + HMaterID.ToString() +
+ ",HUSEORGID=" + HUSEORGID.ToString() +
",HMaterNumber='" + HMaterNumber + "'" +
",HMouldClass='" + HMouldClass + "'" +
",HMouldType=" + HMouleTypeID.ToString() +
@@ -2288,6 +2417,7 @@
",HNowWHID=" + HNowWHID +
",HNowSPID=" + HNowSPID +
",HInitLife='" + HInitLife +
+ "',HMouldUseStatus='" + HMouldUseStatus +
"' where HInterID=" + HInterID.ToString());
//淇敼瀛愰」鐩唬鐮�
@@ -2299,6 +2429,29 @@
oCN.RunProc("delete from Gy_MouldFileSub_MaintainRule where HInterID='" + HInterID + "'");
oCN.RunProc("delete from Gy_MouldFileSub_DotCheckRule where HInterID='" + HInterID + "'");
objJsonResult = AddBillSub(msg5, msg6, msg7, HInterID, HBillNo);
+
+
+ //淇濆瓨鍚庢帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_AfterSaveCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //=========================================================
oCN.Commit();
objJsonResult.code = "1";
@@ -2485,8 +2638,56 @@
}
if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo))
{
+ oCN.BeginTran();
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_BeforeDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_BeforeDelCtrl");
+
+ if (ds == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
oCN.RunProc("Delete From Gy_MouldFileSub_MaintainRule where HInterID=" + hmainid);
oCN.RunProc("Delete From Gy_MouldFileSub_DotCheckRule where HInterID=" + hmainid);
+
+ //鍒犻櫎鍚庢帶鍒�=========================================
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_AfterDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_AfterDelCtrl");
+ if (ds2 == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
+ oCN.Commit();
//鍐欏叆鏃ュ織
ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oBill.omodel.HMouldNo + ",鍚嶇О锛�" + oBill.omodel.HName, ClsPub.CurUserName);
//鏇存柊涓婄骇涓� 鏈骇
@@ -2860,6 +3061,26 @@
}
if (IsAudit == 0) //瀹℃牳鎻愪氦
{
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Sc_MouldStockBill_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'", "h_p_Sc_MouldStockBill_BeforeCheckCtrl");
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
//瀹℃牳鎻愪氦
if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -2877,9 +3098,50 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+ //瀹℃牳鍚庢帶鍒�=========================================
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_Sc_MouldStockBill_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'", "h_p_Sc_MouldStockBill_AfterCheckCtrl");
+
+ if (ds2 == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
}
if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Sc_MouldStockBill_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'", "h_p_Sc_MouldStockBill_BeforeUnCheckCtrl");
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
//鍙嶅鏍告彁浜bandonCheck
if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -2897,6 +3159,29 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+ //鍙嶅鏍稿悗鎺у埗=========================================
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_Sc_MouldStockBill_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'", "h_p_Sc_MouldStockBill_AfterUnCheckCtrl");
+ if (ds2 == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
}
return objJsonResult;
}
@@ -2911,6 +3196,154 @@
}
#endregion
+ #region 妯″叿妗堝叧闂�/鍙嶅叧闂姛鑳�
+ [Route("Gy_Mould/CloseGy_Mould")]
+ [HttpGet]
+ public object CloseGy_Mould(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_MouldFile_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ DAL.ClsGy_MouldFile oBill = new DAL.ClsGy_MouldFile();
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ if (!oBill.CloseBill(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ if (!oBill.CancelClose(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 妯″叿妗f浣滃簾/鍙嶄綔搴熷姛鑳�
+ [Route("Gy_Mould/DeleteGy_Mould")]
+ [HttpGet]
+ public object DeleteGy_Mould(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_MouldFile_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DAL.ClsGy_MouldFile oBill = new DAL.ClsGy_MouldFile();
+ ClsPub.CurUserName = user;
+
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ if (!oBill.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ if (!oBill.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region [妯″叿妗f鎵归噺鐢熸垚]
[Route("Gy_Mould/SaveBatchGen_MouldFile")]
[HttpGet]
--
Gitblit v1.9.1