From 337a4bd804496933d04a446d3ce3e9f3f9083ccc Mon Sep 17 00:00:00 2001 From: 杨乐 <yang.le.192@qq.com> Date: 星期三, 12 一月 2022 16:50:09 +0800 Subject: [PATCH] 器具维修派工单 编辑 --- WebAPI/Controllers/POStockInBillController.cs | 134 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs index 31c4efd..437a105 100644 --- a/WebAPI/Controllers/POStockInBillController.cs +++ b/WebAPI/Controllers/POStockInBillController.cs @@ -268,6 +268,80 @@ return objJsonResult; } } + + + + /// <summary> + /// 鍐欏叆涓存椂琛� 鎵簮鍗曠殑鏂规硶 + /// </summary> + /// <param name="HSourceBillNo"></param> + /// <returns></returns> + [Route("ICMOReportBill/set_SaveICMOReportBill")] + [HttpGet] + public object set_SaveICMOReportBill(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo) + { + try + { + // DataSet ds = new DataSet(); + // WebServer webserver = new WebServer(); + string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "'"; + //鏍规嵁婧愬崟绫诲瀷鏉ヨ皟鐢ㄤ笉鍚岀殑WEBS鏂规硶 new + if (HSourceBillType == "3710") + { + ds = webserver.GetSc_ICMOBillList(sWhere + " "); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍,婧愬崟绫诲瀷鏈夐敊璇紒"; + objJsonResult.data = null; + return objJsonResult; ; + } + // + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + HSourceBillType; + objJsonResult.data = null; + return objJsonResult; + //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); + } + else + { + HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]); + HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]); + if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + } + catch (Exception ex) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + /// <summary> /// 杩斿洖鍑哄叆搴撴潯鐮佷复鏃惰〃 /// </summary> @@ -606,6 +680,66 @@ } } + + /// <summary> + /// 鐢熶骇姹囨姤鍗�/鎻愪氦/鐩存帴璋僿ebservice + /// </summary> + /// <returns></returns> + [Route("ICMOReportBill/set_SaveICMOReportBill_Json")] + [HttpPost] + public object set_SaveICMOReportBill_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + try + { + List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getICMOReportBillMainByJson(msg1); + lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); + lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); + string sSourceBillType = lsmain[0].HBillType; + + WebAPI.WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1201";//鍥哄畾鍊� + websLsmain.HDate = lsmain[0].HDate; + websLsmain.HDeptID = lsmain[0].HDeptID; + websLsmain.HEmpID = 0; + websLsmain.HBillerID = lsmain[0].HBillerID; + websLsmain.HRemark = ""; + websLsmain.HMainSourceBillType = lsmain[0].HBillType; + + + if (webserver.set_SaveICMOReportBill_Json(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛佸崟鎹彿涓猴細"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "涓婁紶澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + [Route("POStockInBill/GetSpName_Json")] [HttpGet] public object GetSpName_Json(long HSpID, long HWHID, long HStockOrgID, ref string sErrMsg) -- Gitblit v1.9.1