From 2568dccd86ae777f49dcf9c23e5ddd5a55bc2795 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 06 十一月 2024 12:10:36 +0800
Subject: [PATCH] 森楷其他入库模块扫条码同步入库申请单
---
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index bd0d21b..9fe6dab 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -323,6 +323,27 @@
}
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_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("Insert into Gy_EquipFileBillMain " +
" (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
@@ -334,6 +355,29 @@
"','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
objJsonResult = AddBillSub(msg3, msg4, HInterID, hbillno, 1);
+
+ //淇濆瓨鍚庢帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_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.data = null;
return objJsonResult;
@@ -513,7 +557,7 @@
oCN.RunProc("delete from Gy_EquipFileBillSub_DotCheckRule where HInterID = " + HInterID );
}
int i = 0;
- //淇濆瓨淇濆吇瑙勬牸
+ //淇濆瓨淇濆吇瑙勭▼
foreach (ClsGy_EquipFileBillSub_MaintainRule oSub in MaintainRuleColl)
{
i++;
@@ -521,9 +565,9 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "绗�" + i + "琛�,淇濆吇瑙勬牸涓嶈兘涓虹┖";
+ objJsonResult.Message = "绗�" + i + "琛�,淇濆吇瑙勭▼涓嶈兘涓虹┖";
objJsonResult.data = null;
- throw new Exception("淇濆吇瑙勬牸涓嶈兘涓虹┖");
+ throw new Exception("淇濆吇瑙勭▼涓嶈兘涓虹┖");
}
DataSet Cs;
Int64 NewHEntryID = 1;
@@ -589,7 +633,7 @@
//淇敼涓婄骇涓洪潪鏈骇浠g爜
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨瀛愯〃鎴愬姛锛�";
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
//objJsonResult.data = null;
return objJsonResult;
}
--
Gitblit v1.9.1