From 32a10c272b7cd543a7172a6ebc222e6f8c8b0334 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 20 二月 2025 15:24:23 +0800 Subject: [PATCH] 森楷自动包装线同步金蝶入库申请单,如果没有审核,则在扫物料条码时自动审核;排产匹配产品器具清单,产线器具清单,器具占用时间存入数据库 --- WebAPI/Controllers/Kf_ICStockBillMainController.cs | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/Kf_ICStockBillMainController.cs b/WebAPI/Controllers/Kf_ICStockBillMainController.cs index 6d2e33c..c09cec1 100644 --- a/WebAPI/Controllers/Kf_ICStockBillMainController.cs +++ b/WebAPI/Controllers/Kf_ICStockBillMainController.cs @@ -156,7 +156,35 @@ else { string HCheckDate = DateTime.Now.Date.ToString(); + oCN.BeginTran(); oCN.RunProc(" Update Kf_ICStockBillMain set HChecker='" + CurUserName + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='1247' and HInterID=" + HInterID); + //瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 澧炲姞搴撳瓨 + ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','1'", "h_KF_UPDateICinventory"); + + //=========================瀹℃牳鍙嶅鏍稿悗璐熷簱瀛樻帶鍒� + DataSet ds2 = oCN.RunProcReturn("Exec h_p_KF_ICinventoryStockCtrl '" + oBill.omodel.HInterID + "', '" + oBill.omodel.HBillType + "'", "h_p_KF_ICinventoryStockCtrl"); + if (ds2 == null) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + "搴撳瓨鏇存柊鍚庢帶鍒跺垽鏂け璐�"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + oCN.RollBack(); + string sReturn = "搴撳瓨鏇存柊澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + sReturn; + objJsonResult.data = null; + return objJsonResult; + } + //============================ + + oCN.Commit(); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "瀹℃牳鎴愬姛锛�"; @@ -177,7 +205,35 @@ else { string HCheckDate = DateTime.Now.Date.ToString(); + oCN.BeginTran(); oCN.RunProc(" Update Kf_ICStockBillMain set HChecker=' ',HCheckDate=null,HBillStatus=1 Where HBillType='1247' and HInterID=" + HInterID); + //瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 鍑忓皯搴撳瓨 + ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','2'", "h_KF_UPDateICinventory"); + + //=========================瀹℃牳鍙嶅鏍稿悗璐熷簱瀛樻帶鍒� + DataSet ds2 = oCN.RunProcReturn("Exec h_p_KF_ICinventoryStockCtrl '" + oBill.omodel.HInterID + "', '" + oBill.omodel.HBillType + "'", "h_p_KF_ICinventoryStockCtrl"); + if (ds2 == null) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + "搴撳瓨鏇存柊鍚庢帶鍒跺垽鏂け璐�"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + oCN.RollBack(); + string sReturn = "搴撳瓨鏇存柊澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + sReturn; + objJsonResult.data = null; + return objJsonResult; + } + //============================ + + oCN.Commit(); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒"; -- Gitblit v1.9.1