From 5203832a2163943f6858a6f3ed66727b3ac6a037 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期二, 01 十一月 2022 10:26:06 +0800 Subject: [PATCH] 投产计划报表 修改 --- WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs | 48 ++++++++++++++++++----- WebAPI/Controllers/CJGL/ProductionPlanReportController.cs | 4 + WebAPI/Controllers/SCGL/Sc_ComplementGoodBill_ZXBZController.cs | 10 ++-- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs index 4703549..8585599 100644 --- a/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs +++ b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs @@ -30,6 +30,8 @@ public string F_BSV_WYID; public string HBillNo; public string HMaterNumber; + public int IsTrue; + public int HState; } [Route("ProductionPlanReport/ProductionPlanReportList")] [HttpGet] @@ -41,7 +43,7 @@ ProductionPlanReport com = JsonConvert.DeserializeObject<ProductionPlanReport>(sWhere.ToString()); ds = oCN.RunProcReturn($"exec h_p_Cj_ProductionPlanReportList {com.HOrgID},'{com.HBeginDate}','{com.HEndDate}'" + - $",'{com.HICMOBillNo}',{com.HWorkShopID},'{com.F_BSV_WYID}','{com.HMaterNumber}','{com.HBillNo}'", "h_p_Cj_ProductionPlanReportList"); + $",'{com.HICMOBillNo}',{com.HWorkShopID},'{com.F_BSV_WYID}','{com.HMaterNumber}','{com.HBillNo}',{com.IsTrue},'{com.HState}'", "h_p_Cj_ProductionPlanReportList"); objJsonResult.code = "1"; objJsonResult.count = 1; diff --git a/WebAPI/Controllers/SCGL/Sc_ComplementGoodBill_ZXBZController.cs b/WebAPI/Controllers/SCGL/Sc_ComplementGoodBill_ZXBZController.cs index 397030a..8f57b98 100644 --- a/WebAPI/Controllers/SCGL/Sc_ComplementGoodBill_ZXBZController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ComplementGoodBill_ZXBZController.cs @@ -176,7 +176,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "搴撳瓨鏁伴噺涓�0,鏃犳硶鍙枡!"; + objJsonResult.Message = $"绗瑊(i + 1)}琛屽簱瀛樻暟閲忎负0,鏃犳硶鍙枡!"; objJsonResult.data = null; return objJsonResult; } @@ -185,7 +185,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "搴撳瓨鏁伴噺灏忎簬鍙枡鏁伴噺,鏃犳硶鍙枡!"; + objJsonResult.Message = $"绗瑊(i+1)}琛岃皟鍑轰粨搴撳彲鐢ㄥ簱瀛樻暟閲忓皬浜庡彨鏂欐暟閲�,鏃犳硶鍙枡!"; objJsonResult.data = null; return objJsonResult; } @@ -194,7 +194,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "璇烽�夋嫨璋冨叆浠撳簱!"; + objJsonResult.Message = $"绗瑊(i + 1)}琛岃閫夋嫨璋冨叆浠撳簱!"; objJsonResult.data = null; return objJsonResult; } @@ -203,7 +203,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "璇烽�夋嫨璋冨嚭浠撳簱!"; + objJsonResult.Message = $"绗瑊(i + 1)}琛岃閫夋嫨璋冨嚭浠撳簱!"; objJsonResult.data = null; return objJsonResult; } @@ -212,7 +212,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "璋冨嚭浠撳簱鍜岃皟鍏ヤ粨搴撲笉鑳戒竴鏍�!"; + objJsonResult.Message = $"绗瑊(i + 1)}琛岃皟鍑轰粨搴撳拰璋冨叆浠撳簱涓嶈兘涓�鏍�!"; objJsonResult.data = null; return objJsonResult; } diff --git a/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs b/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs index b87a339..2676353 100644 --- a/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs @@ -376,8 +376,6 @@ ds = oCN.RunProcReturn("exec JIT_SendGoodsBillSynChronizAtion '" + HBillNo + "'", "JIT_SendGoodsBillSynChronizAtion"); if (ds.Tables[0].Rows.Count != 0) { - - foreach (DataRow dr in ds.Tables[0].Rows) { JObject model = new JObject(); @@ -434,15 +432,7 @@ return objJsonResult; } var result = InvokeHelper.Save("STK_TransferDirect", jsonRoot.ToString()); - if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE") - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = null; - objJsonResult.data = null; - return objJsonResult; - } - else + if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") { oCN.RollBack(); objJsonResult.code = "0"; @@ -451,6 +441,42 @@ objJsonResult.data = null; return objJsonResult; } + + var json = new + { + Numbers = HBillNo, + }; + //鎻愪氦 + var _result = InvokeHelper.Submit("STK_TransferDirect", JsonConvert.SerializeObject(json)); + var _saveObj = JObject.Parse(_result); + if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") + { + LogService.Write("鏀舵枡閫氱煡鍗曟彁浜ゅけ璐sonRoot:" + jsonRoot.ToString()); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟彁浜ゅけ璐�" + _result; + objJsonResult.data = null; + return objJsonResult; + + } + //瀹℃牳 + _result = InvokeHelper.Audit("STK_TransferDirect", JsonConvert.SerializeObject(json)); + _saveObj = JObject.Parse(_result); + if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") + { + LogService.Write("鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot:" + jsonRoot.ToString()); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + _result; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鎿嶄綔鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; } } else -- Gitblit v1.9.1