From cee055eb7cdecf5d995cc65d379494e471bde9c8 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 02 四月 2025 10:06:03 +0800
Subject: [PATCH] 合并
---
WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs | 424 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 420 insertions(+), 4 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
index 572840a..0406334 100644
--- a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
@@ -78,6 +78,43 @@
}
#endregion
+ #region 鍣ㄥ叿缁翠慨娲惧伐鍗� 缂栬緫鏌ヨ
+ [Route("Sc_MouldRepairSendWorkBill/Sc_MouldRepairSendWorkBill_Edit")]
+ [HttpGet]
+ public object Sc_MouldRepairSendWorkBill_Edit(string linterid, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MouldRepairSendWorkBill_Edit where 1=1 and hmainid=" + linterid + "order by hmainid desc ", "h_v_Sc_MouldRepairSendWorkBill_Edit");
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ 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_MouldRepairSendWorkBill/GetMouldRepairSendWorkBillListPage")]
[HttpGet]
@@ -185,6 +222,16 @@
if (OperationType == 1)//鏂板
{
+ //淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldRepairSendWorkBill(omodel.HInterID, omodel.HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//涓昏〃
oCN.RunProc("Insert Into Sc_MouldRepairSendWorkBill " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -205,6 +252,16 @@
}
else if (OperationType == 3)
{
+ //淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldRepairSendWorkBill(omodel.HInterID, omodel.HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//淇敼
oCN.RunProc("UpDate Sc_MouldRepairSendWorkBill set " +
" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
@@ -212,7 +269,7 @@
",HYear='" + omodel.HYear.ToString() + "'" +
",HPeriod='" + omodel.HPeriod.ToString() + "'" +
",HRemark='" + omodel.HRemark + "'" +
- ",HUpDater='" + omodel.HUpDater + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
",HUpDateDate=getdate()" +
//========================================
",HMouldID=" + omodel.HMouldID.ToString() +
@@ -242,7 +299,7 @@
oCN.RunProc("delete from Sc_MouldRepairSendWorkBillSub where HInterID='" + omodel.HInterID.ToString() + "'");
}
//淇濆瓨瀛愯〃
- objJsonResult = AddBillSub(msg3);
+ objJsonResult = AddBillSub(msg3, OperationType);
if (objJsonResult.code == "0")
{
objJsonResult.code = "0";
@@ -268,7 +325,7 @@
}
}
- public json AddBillSub(string msg3)
+ public json AddBillSub(string msg3,Int64 OperationType)
{
DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSb_MouldRepairWorkBillSub>>(msg3);
int i = 1;
@@ -286,6 +343,32 @@
") ");
i++;
}
+ if (OperationType == 1)//鏂板
+ {
+ //淇濆瓨鍚庢帶鍒�
+ objJsonResult = AfterSave_MouldRepairSendWorkBill(omodel.HInterID, omodel.HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //淇濆瓨鍚庢帶鍒�
+ objJsonResult = AfterSave_MouldRepairSendWorkBill(omodel.HInterID, omodel.HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -293,6 +376,70 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+ #region 鍣ㄥ叿缁翠慨娲惧伐鍗� 淇濆瓨鍓嶃�佷繚瀛樺悗鎺у埗
+
+ //淇濆瓨鍓嶆帶鍒�
+ public json BeforeSave_MouldRepairSendWorkBill(Int64 HInterID, string HBillNo, Int64 OperationType)
+ {
+ DataSet BeforeSave = oCN.RunProcReturn("Exec h_p_Sc_MouldRepairSendWorkBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "',''," + OperationType.ToString(), "h_p_Sc_MouldRepairSendWorkBill_BeforeSaveCtrl");
+ if (BeforeSave == null || BeforeSave.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(BeforeSave.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0; //澶辫触锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1; //鎴愬姛锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //淇濆瓨鍚庢帶鍒�
+ public json AfterSave_MouldRepairSendWorkBill(Int64 HInterID, string HBillNo, Int64 OperationType)
+ {
+ DataSet AfterSave = oCN.RunProcReturn("Exec h_p_Sc_MouldRepairSendWorkBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldRepairSendWorkBill_AfterSaveCtrl");
+ if (AfterSave == null || AfterSave.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(AfterSave.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0; //澶辫触锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1; //鎴愬姛锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
#endregion
@@ -323,7 +470,31 @@
return objJsonResult;
}
- if (oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Sc_MouldRepairSendWorkBill_BeforeDelCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sc_MouldRepairSendWorkBill_BeforeDelCtrl");
+ 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]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ bool IsDete = oBill.DeleteBill(HInterID, oBill.omodel.HBillNo, "h_p_Sc_MouldRepairSendWorkBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ if (IsDete)
{
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -333,6 +504,7 @@
}
else
{
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎澶辫触";
@@ -443,9 +615,35 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+ DataSet ds2;
//瀹℃牳鎻愪氦
if (IsAudit == 0)
{
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Sc_MouldRepairSendWorkBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + CurUserName + "'";
+ ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldRepairSendWorkBill_BeforeCheckCtrl");
+ if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds2.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
if (CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
{
objJsonResult.code = "1";
@@ -467,6 +665,28 @@
//鍙嶅鏍告彁浜�
if (IsAudit == 1)
{
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_Sc_MouldRepairSendWorkBill_BeforeUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + CurUserName + "'";
+ ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldRepairSendWorkBill_BeforeUnCheckCtrl");
+ if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds2.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
if (AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
{
objJsonResult.code = "1";
@@ -504,6 +724,34 @@
string HChecker = DBUtility.ClsPub.CurUserName;//鐢ㄦ埛鍚�
oCN.BeginTran();//鎵撳紑浜嬪姟
oCN.RunProc("update Sc_MouldRepairSendWorkBill set HChecker='" + HChecker + "',HCheckDate='" + DateTime.Now + "',HBillStatus=2 where HInterID='" + lngBillKey + "'");
+
+ //瀹℃牳鍚庢帶鍒�=========================================
+ DataSet ds2;
+ string sql1 = "exec h_p_Sc_MouldRepairSendWorkBill_AfterCheckCtrl " + lngBillKey + ",'','" + HChecker + "'";
+ ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldRepairSendWorkBill_AfterCheckCtrl");
+ if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ sReturn = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ return false;
+ }
+
+ if (ds2.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.data = null;
+ oCN.RollBack();
+ sReturn = "瀹℃牳澶辫触!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString();
+ return false;
+ }
+ //==================================================================================
+
oCN.Commit();//鍏抽棴浜嬪姟
sReturn = "瀹℃牳鍗曟嵁鎴愬姛!";
return true;
@@ -522,6 +770,33 @@
string HChecker = DBUtility.ClsPub.CurUserName;//鐢ㄦ埛鍚�
oCN.BeginTran();//鎵撳紑浜嬪姟
oCN.RunProc("update Sc_MouldRepairSendWorkBill set HChecker='',HCheckDate=null,HBillStatus=1 where HInterID='" + lngBillKey + "'");
+
+ //鍙嶅鏍稿悗鎺у埗=========================================
+ DataSet ds2;
+ string sql1 = "exec h_p_Sc_MouldRepairSendWorkBill_AfterUnCheckCtrl " + lngBillKey + ",'','" + HChecker + "'";
+ ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldRepairSendWorkBill_AfterUnCheckCtrl");
+ if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鍙嶅鏍稿悗鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ sReturn = "瀹℃牳澶辫触!鍘熷洜:鍙嶅鏍稿悗鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ return false;
+ }
+
+ if (ds2.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.data = null;
+ oCN.RollBack();
+ sReturn = "瀹℃牳澶辫触!鍘熷洜:" + ds2.Tables[0].Rows[0]["HRemark"].ToString();
+ return false;
+ }
+ //==================================================================================
oCN.Commit();//鍏抽棴浜嬪姟
sReturn = "鍙嶅鏍稿崟鎹垚鍔�!";
return true;
@@ -533,5 +808,146 @@
}
}
#endregion
+
+ #region 鍣ㄥ叿缁翠慨娲惧伐鍗� 鍏抽棴/鍙嶅叧闂�
+ /// <summary>
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">鍏抽棴(0),鍙嶅叧闂�(1)</param>
+ /// <param name="CurUserName">鍏抽棴浜�</param>
+ /// <returns></returns>
+ [Route("Sc_MouldRepairSendWorkBill/CloseSc_MouldRepairSendWorkBill")]
+ [HttpGet]
+ public object CloseSc_MouldRepairSendWorkBill(int HInterID, int IsAudit, string CurUserName)
+ {
+ string ModRightNameCheck = "Sc_MouldRepairSendWorkBill_Close";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ try
+ {
+ //妫�鏌ユ潈闄�
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsSc_ICMOBill oBill = new DAL.ClsSc_ICMOBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+ oBill.MvarItemKey = "Sc_MouldRepairSendWorkBill";
+
+
+ //杩涜闇�瑕佽繘琛岀殑鍏抽棴/鍙嶅叧闂搷浣�
+ if (IsAudit == 0) //鍏抽棴鎻愪氦
+ {
+ string sql = "";
+ //鍏抽棴鍓嶆帶鍒�===============================================Begin===================================================================
+ sql = "exec h_p_Sc_MouldRepairSendWorkBill_BeforeCloseCtrl " + HInterID + ",' ','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldRepairSendWorkBill_BeforeCloseCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:鍏抽棴鍓嶅墠鍒ゆ柇澶辫触锛屾棤杩斿洖淇℃伅锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍏抽棴鍓嶆帶鍒�===============================================End===================================================================
+
+ //鍏抽棴鎻愪氦
+ if (oBill.CloseBill(lngBillKey, "", "h_p_Sc_MouldRepairSendWorkBill_AfterCloseCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅叧闂彁浜�
+ {
+ string sql = "";
+ //鍙嶅叧闂墠鎺у埗===============================================Begin===================================================================
+ sql = "exec h_p_Sc_MouldRepairSendWorkBill_BeforeUnCloseCtrl " + HInterID + ",'','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldRepairSendWorkBill_BeforeUnCloseCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:鍙嶅叧闂墠鍓嶅垽鏂け璐ワ紝鏃犺繑鍥炰俊鎭紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅叧闂墠鎺у埗===============================================End===================================================================
+
+ //鍙嶅叧闂彁浜�
+ if (oBill.CancelClose(lngBillKey,"", "h_p_Sc_MouldRepairSendWorkBill_AfterUnCloseCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触鎴栬�呭弽鍏抽棴澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1