From 8ad03fa67d07ef53a14f1238b978128f473a5d3f Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 12 五月 2023 11:27:46 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/Sc_ProcessMangementController.cs | 99 ++++++++++++++++++++++++++++--------------------- 1 files changed, 57 insertions(+), 42 deletions(-) diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs index c0181c0..56f29a2 100644 --- a/WebAPI/Controllers/Sc_ProcessMangementController.cs +++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs @@ -694,6 +694,21 @@ return objJsonResult; } + //鍒ゆ柇閲戣澏浜戠敓浜ф眹鎶ュ崟 鏁伴噺 鏄惁 澶т簬 鏈亾鍑虹珯鏁伴噺 + ds= oCN.RunProcReturn($@"select sum(FFinishQty)-(select HQty from Sc_StationOutBillMain where HBillNo='{BillNo}') +from AIS20220308151944..T_PRD_MORPT rpt3 +left join AIS20220308151944..T_PRD_MORPTENTRY rpt2 on rpt3.FID = rpt2.FID +where F_bsv_Text=(select HProcExchBillNo from Sc_StationOutBillMain where HBillNo='{BillNo}')", "SumCount"); + + if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0) { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏浜戞眹鎶ユ暟閲忓皬浜庢湰鍦板嚭绔欐暟閲�!"; + objJsonResult.data = null; + return objJsonResult; + } + + JObject model = new JObject(); model.Add("FBillType", new JObject() { ["FNumber"] = "SCRKD01_SYS" }); //鍗曟嵁绫诲瀷 model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡 @@ -900,7 +915,7 @@ //DataRow dr = ds.Tables[0].Rows[0]; //鍒ゆ柇鏈鎶ュ簾鎬绘暟閲忔槸鍚︿负0 - var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; + var DTable = oCN.RunProcReturn("select isnull(sum(HWasterQty),0) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0) { @@ -1400,49 +1415,49 @@ - /// <summary> - /// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟 - /// </summary> - /// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param> - /// <returns></returns> - [Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")] - [HttpGet] - public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber, - double HCheckQty, double HRightQty, double HBadQty, - string HCheckResult, string HSupNumber, - string HUseResult, Int64 HSeQ, Int64 HSourceInterID, - Int64 HSourceEntryID, string HSourceBillNo, string user, - Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID, - Int64 HMaterID, string HSourceBillType, Int64 HSLInterID, - Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg) - { - WebS2.WebService1 oWebs1 = new WebS2.WebService1(); + ///// <summary> + ///// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟 + ///// </summary> + ///// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param> + ///// <returns></returns> + //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")] + //[HttpGet] + //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber, + // double HCheckQty, double HRightQty, double HBadQty, + // string HCheckResult, string HSupNumber, + // string HUseResult, Int64 HSeQ, Int64 HSourceInterID, + // Int64 HSourceEntryID, string HSourceBillNo, string user, + // Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID, + // Int64 HMaterID, string HSourceBillType, Int64 HSLInterID, + // Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg) + //{ + // WebS.WebService1 oWebs1 = new WebS.WebService1(); - //oWebs1.Url = "http://localhost:9099/WebService1.asmx"; - //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/"); - if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty - , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID - , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID - , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID - , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID - , ref sErrMsg)) - { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�"; - objJsonResult.data = sErrMsg; - return objJsonResult; - } - } + // //oWebs1.Url = "http://localhost:9099/WebService1.asmx"; + // //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/"); + // if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty + // , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID + // , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID + // , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID + // , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID + // , ref sErrMsg)) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 1; + // objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�"; + // objJsonResult.data = null; + // return objJsonResult; + // } + // else + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�"; + // objJsonResult.data = sErrMsg; + // return objJsonResult; + // } + //} #endregion -- Gitblit v1.9.1