From 695d9c4cda618bae357d6f70a068b604dac4fdd3 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期三, 23 十一月 2022 10:17:45 +0800 Subject: [PATCH] 合并 --- WebAPI/Controllers/POStockInBillController.cs | 51 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 30 insertions(+), 21 deletions(-) diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs index 135fc92..57446e2 100644 --- a/WebAPI/Controllers/POStockInBillController.cs +++ b/WebAPI/Controllers/POStockInBillController.cs @@ -82,6 +82,8 @@ { try { + + var sJXCode = POStockInBillController.JX_Json(sCode, HOWNERID); //if (sRedBlue == true) //{ // HBillType = "1239"; @@ -90,7 +92,7 @@ WebS.WebService1 oWebs = new WebS.WebService1(); WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); string sExpressNumber = ""; - WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); + WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); if (WebSoBar == null) { @@ -173,10 +175,12 @@ [Route("kf_PoStockInBill/JX_Json")] [HttpGet] - public Object JX_Json(string sBarCodeNew, Int64 HOrgID) + public static string JX_Json(string sBarCodeNew, Int64 HOrgID) { try { + //鍔犱簡 鐢熶骇鏃ユ湡 鏈夋晥鏈熻嚦 淇濊川鏈熸爣蹇� + string[] sArray = sBarCodeNew.Split('@'); string HMaterNumber = ""; HMaterNumber = sArray[0]; @@ -184,6 +188,10 @@ HQty = ClsPub.isInt(sArray[4]); string HBarchNo = ""; HBarchNo = sArray[6]; + + DateTime HSCRQ = ClsPub.isDate(sArray[3]); + DateTime HYXQZ = ClsPub.isDate(sArray[5]); + Int64 HMaterID = 0; @@ -202,40 +210,41 @@ string HTM = ""; HTM = HOrgNumber + HMaterID + HBarchNo; string ModName = "85"; - HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo); + var HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo); + Int64 HSupID = 0; oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + - ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + + ",HCusID,HCusType,HEndDate,HProduceDate,HExpiryDate,HWorkLineName,HBarCodeDate " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " + - ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HExpirationDateFlag " + ") values (" + "'" + HTM + "','鎵规鏉$爜'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() + ",'" + HBarchNo + "'," + HSupID.ToString() + ",0,'" + ClsPub.CurUserName + "',getdate(),0," + HQty.ToString() + ", 0,0,'','',0" + ", 0,'',0,0,0,''" - + ",0,'','','',getdate()" + + ",0,'',''," + HSCRQ.ToShortDateString() + "," + HYXQZ.ToShortDateString() + ",'',getdate()" + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",''," + HInterID.ToString() + ",1" + ",0,0,0" - + ",'" + HMaterName + "','" + HMaterModel + "','',0,'','')"); + + ",'" + HMaterName + "','" + HMaterModel + "','',0,'','',1)"); string sExpressNumber = ""; - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; - objJsonResult.data = HTM; - return objJsonResult; + //objJsonResult.code = "0"; + //objJsonResult.count = 1; + //objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + //objJsonResult.data = ; + return HTM; } catch (Exception e) { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = e.Message + ";" + e.StackTrace; - objJsonResult.data = null; - return objJsonResult; + //objJsonResult.code = "0"; + //objJsonResult.count = 1; + //objJsonResult.Message = e.Message + ";" + e.StackTrace; + //objJsonResult.data = null; + return e.Message + ";" + e.StackTrace; } } @@ -1113,7 +1122,6 @@ } - #region 鍒拌揣纭 [Route("POStockInBillList/Get_ReciveBill")] [HttpGet] @@ -1160,7 +1168,7 @@ DataSet Ds; string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);//瀹㈡埛鍚嶇О if (FCusName.Contains("瀹夌憺")) - Ds= oCn.RunProcReturn("exec h_p_GetPOInStockByBarCode'" + HBarCode + "'", "h_p_GetPOInStockByBarCode"); + Ds = oCn.RunProcReturn("exec h_p_GetPOInStockByBarCode'" + HBarCode + "'", "h_p_GetPOInStockByBarCode"); else Ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_Add_POInStockCheck2 '" + HBarCode + "'", "h_p_KF_PonderationBillMain_Temp_Add_POInStockCheck2"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) @@ -1274,7 +1282,7 @@ JOIN {0}..T_PUR_POORDERFIN E ON C.FID =E.FID LEFT JOIN {0}..T_BD_CURRENCY EC ON E. FSETTLECURRID =EC.FCURRENCYID WHERE b.hinterid in ({1}) and M.HERPInterID = 0 -", kdTbaleName, HInterID); +", kdTbaleName, hinterID); DataTable dt = oCn.RunProcReturn(sql, "sltz").Tables[0]; List<string> fidList = new List<string>(); if (dt.Rows.Count > 0) @@ -1463,6 +1471,7 @@ { Ids = FID, }; + //LogService.Write(json); //鎻愪氦 var _result = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); var _saveObj = JObject.Parse(_result); @@ -1526,7 +1535,7 @@ string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);//瀹㈡埛鍚嶇О string sql = string.Empty; if (FCusName.Contains("瀹夌憺")) - sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'"; + sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='绠卞彿鍐呮潯鐮�'"; else sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); -- Gitblit v1.9.1