From 9385f2a2e4e2b6578f4b9e1cc139db977c2467ee Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期六, 25 十二月 2021 20:05:38 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs | 15 +++ WebAPI/Controllers/工资管理/Gy_ClassTimePrjSubController.cs | 80 ++++--------------- WebAPI/Controllers/MoveStockBillController.cs | 2 WebAPI/WebServer.cs | 9 ++ WebAPI/Controllers/WebAPIController.cs | 42 ++++++++++ WorkM/流转卡管理/MES_StationOutBill.cs | 2 WebAPI/Controllers/ProductInController.cs | 71 +++++++++++++++++ WebAPI/Models/基础资料/Gy_ClassTimePrjSub.cs | 3 WebAPI/WebAPI.csproj | 2 9 files changed, 160 insertions(+), 66 deletions(-) diff --git a/DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs b/DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs index 204ff44..3a02151 100644 --- a/DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs +++ b/DAL/WMS/ClsKF_PonderationBillMain_Temp_View.cs @@ -75,6 +75,21 @@ #endregion + //缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭� + public DataSet GetKf_PonderationBillMain_TempList_New(string sHBillType, string sHMaker, Int64 sHOWNERID) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New '" + sHBillType + "','" + sHMaker + "'," + sHOWNERID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New"); + if (Ds == null || Ds.Tables[0].Rows.Count == 0) + { + return null; + } + else + { + return Ds; + } + } + public DataSet GetKf_ICStockBillList(string sHBillType, string sHMaker, Int64 sHOWNERID) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); diff --git a/WebAPI/Controllers/MoveStockBillController.cs b/WebAPI/Controllers/MoveStockBillController.cs index 03e7443..dae3db8 100644 --- a/WebAPI/Controllers/MoveStockBillController.cs +++ b/WebAPI/Controllers/MoveStockBillController.cs @@ -440,7 +440,7 @@ websLsmain.HSupID = 0; //websLsmain.HGroupID = lsmain[0].HGroupID; - if (webserver.set_SaveMoveStockBill(websLsmain, "-1", ref DBUtility.ClsPub.sErrInfo)) + if (webserver.set_SaveMoveStockBill(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; diff --git a/WebAPI/Controllers/ProductInController.cs b/WebAPI/Controllers/ProductInController.cs index fc04bad..44f87b5 100644 --- a/WebAPI/Controllers/ProductInController.cs +++ b/WebAPI/Controllers/ProductInController.cs @@ -59,6 +59,37 @@ return ""; } } + + /// <summary> + /// 浜у搧鍏ュ簱缂撳瓨鍒楄〃缂栬緫鍓嶅垽鏂崟鎹槸鍚﹀凡涓婁紶 鐩存帴璋僕ebService + /// </summary> + /// <returns></returns> + //[Route("ProductIn/ProductInTempList_Modify")] + //[HttpGet] + //public Object ProductInTempList_Modify(Int64 sInterID,string sBillNo, string sBillType) + //{ + + // //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); + // WebS.WebService1 oWebs = new WebS.WebService1(); + // if (oWebs.TempList_Modify(sInterID, sBillNo, sBillType, ref sErrMsg)) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + // objJsonResult.data = null; + // return objJsonResult; + // } + // else + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 1; + // objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + // objJsonResult.data = null; + // return objJsonResult; + // } + //} + + /// <summary> /// 浜у搧鍏ュ簱/鎵潯鐮�/鐩存帴璋冪敤webservice /// </summary> @@ -165,6 +196,46 @@ } } + ///// <summary> + ///// 浜у搧鍏ュ簱缂撳瓨鍒楄〃鍒锋柊淇℃伅 + ///// </summary> + ///// <returns></returns> + //[Route("ProductIn/DisBillEntryList_Json1")] + //[HttpGet] + //public object DisBillEntryList_Json1(string HBillType,string sHMaker, Int64 HOrgID) + //{ + // try + // { + // ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); + // if (ds == null || ds.Tables[0].Rows.Count <= 0) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + // objJsonResult.data = null; + // return objJsonResult; + // //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); + // } + // else + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 1; + // objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + // objJsonResult.data = ds.Tables[0]; + // return objJsonResult; + // } + // } + // catch (Exception e) + // { + + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + // objJsonResult.data = null; + // return objJsonResult; + // } + //} + /// <summary> diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index c4dec73..bab1e9c 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -2497,6 +2497,48 @@ } #endregion + + /// <summary> + /// 浜у搧鍏ュ簱缂撳瓨鍒楄〃鍒锋柊淇℃伅 + /// </summary> + /// <returns></returns> + [Route("Web/chanpinruk")] + [HttpGet] + public object chanpinruk(string HBillType, string sHMaker, Int64 HOrgID) + { + try + { + ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + + } } diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" index 428bbbb..c3d376f 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_ClassTimePrjSubController.cs" @@ -77,7 +77,7 @@ try { - ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjSubList where HitemID=" + HInterID, "h_v_Gy_ClassTimePrjSubList"); + ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjSubList where HInterID=" + HInterID, "h_v_Gy_ClassTimePrjSubList"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -131,31 +131,31 @@ List<Gy_ClassTimePrjSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_ClassTimePrjSub>>(msg2); long HInterID = list[0].HInterID; - long HItemID = list[0].HItemID; + long HEntryID = list[0].HEntryID; + string HYear = list[0].HYear; + decimal HPeriod = list[0].HPeriod; + string HSumWorkTimes = list[0].HSumWorkTimes; + decimal HSumMoney = list[0].HSumMoney; + string HRate = list[0].HRate; + decimal HOldRate = list[0].HOldRate; + string HNumber = list[0].HNumber; string HName = list[0].HName; - long hparentid = list[0].hparentid; string HMaker = list[0].HMaker; - string HSumWorkTimes = list[0].HSumWorkTimes; - string HRate = list[0].HRate; - decimal HSumMoney = list[0].HSumMoney; - string HYear = list[0].HYear; - decimal HPeriod = list[0].HSumMoney; - decimal HOldRate = list[0].HOldRate; + //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� - if (HItemID == 0) + if (HInterID == 0) { oCN.BeginTran(); oCN.RunProc("Insert into Gy_ClassTimePrjSub" + - " (HInterID,HMaker,HMakeDate,HSumWorkTimes" + + " (HEntryID,HMaker,HMakeDate,HSumWorkTimes" + ",HRate,HSumMoney,HYear,HPeriod" + ",HOldRate) " + - " Values(" + HInterID + ",'" + HMaker + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'," + HSumWorkTimes.ToString() + + " Values(" + HEntryID + ",'" + HMaker + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'," + HSumWorkTimes.ToString() + "," + HRate + "," + HSumMoney.ToString() + "," + HYear.ToString() + "," + HPeriod.ToString() + "," + HOldRate.ToString() + ")", ref DBUtility.ClsPub.sExeReturnInfo); //淇敼涓婄骇涓洪潪鏈骇浠g爜 - oCN.RunProc("Update Gy_ClassTimePrjSub set HStopflag=0 where HInterID=" + hparentid, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); } else { @@ -163,21 +163,17 @@ oCN.BeginTran(); //涓昏〃 oCN.RunProc("Update Gy_ClassTimePrjSub set " + - " HNumber='" + HNumber + "'" + - ",HName='" + HName + "'" + - ",HMaker='" + HMaker + "'" + - ",hparentid=" + hparentid.ToString() + + "HMaker='" + HMaker + "'" + ",HSumWorkTimes=" + HSumWorkTimes.ToString() + ",HSumMoney=" + HSumMoney.ToString() + ",HYear=" + HYear.ToString() + ",HPeriod=" + HPeriod.ToString() + ",HOldRate=" + HOldRate.ToString() + - ",HRate= '" + HRate + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); + ",HEntryID=" + HEntryID.ToString() + + ",HRate= '" + HRate + "' Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo); //淇敼瀛愰」鐩唬鐮� //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //灏嗕笂绾� 涓洪潪鏈骇 - oCN.RunProc("Update Gy_ClassTimePrjSub set HStopflag=0 where HInterID=" + hparentid, ref DBUtility.ClsPub.sExeReturnInfo); - // oCN.Commit(); } objJsonResult.code = "0"; @@ -215,54 +211,16 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "HItemID涓虹┖锛�"; + objJsonResult.Message = "HInterID涓虹┖锛�"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//寮�濮嬩簨鍔� - ds = oCN.RunProcReturn("select * from Gy_ClassTimePrjSub where HItemID=" + HItemID, "Gy_ClassTimePrjSub"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒"; - objJsonResult.data = null; - return objJsonResult; ; - } - //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); - //if (HStopflag) - //{ - // oCN.RollBack();//鍥炴粴浜嬪姟 - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏁版嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} - ds1 = oCN.RunProcReturn("Select HItemID from Gy_ClassTimePrjSub Where HParentID='" + HItemID + "'", "Gy_ClassTimePrjSub"); - if (ds1.Tables[0].Rows.Count != 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒"; - objJsonResult.data = null; - return objJsonResult; - } - string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); - if (HUseFlag == "宸蹭娇鐢�") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒"; - objJsonResult.data = null; - return objJsonResult; - } - - oCN.RunProc("delete from Gy_ClassTimePrjSub where HItemID=" + HItemID); + oCN.RunProc("delete from Gy_ClassTimePrjSub where HInterID=" + HItemID); oCN.Commit();//鎻愪氦浜嬪姟 objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�"; + objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�"; objJsonResult.data = null; return objJsonResult; ; diff --git "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjSub.cs" "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjSub.cs" index 3aef35c..ff1d762 100644 --- "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjSub.cs" +++ "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjSub.cs" @@ -8,11 +8,10 @@ public class Gy_ClassTimePrjSub { public long HInterID { get; set; } - public long HItemID { get; set; } + public long HEntryID { get; set; } public string HName { get; set; } public string HNumber { get; set; } - public long hparentid { get; set; } public string HYear { get; set; } public decimal HPeriod { get; set; } public decimal HSumMoney { get; set; } diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 0a35cfc..f84ccdb 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -32,7 +32,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Prefer32Bit>false</Prefer32Bit> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs index b44ef78..3785002 100644 --- a/WebAPI/WebServer.cs +++ b/WebAPI/WebServer.cs @@ -4429,6 +4429,14 @@ //杩斿洖缂撳瓨鍒楄〃淇℃伅 鍚屾璧勬枡 + public DataSet GetKf_PonderationBillMain_TempList_New(string sHBillType, string sHMaker, Int64 sHOWNERID) + { + DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); + return dal.GetKf_PonderationBillMain_TempList_New(sHBillType, sHMaker, sHOWNERID); + } + + + //杩斿洖缂撳瓨鍒楄〃淇℃伅 鍚屾璧勬枡 public DataSet GetKf_PonderationBillMain_TempList(string sHBillType, string sWhere) { DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); @@ -4437,6 +4445,7 @@ + /// <summary> /// 鐢熸垚澶栬喘鍏ュ簱鍗� /// </summary> diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" index c699816..b51259a 100644 --- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" +++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" @@ -591,7 +591,7 @@ MessageBox.Show("宸ヤ綔涓績娌℃湁閫夋嫨锛�", "鎻愮ず"); return false; } - if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) <= 0) + if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) + DBUtility.ClsPub.isDoule(txtHBadCount.Text) <= 0) { MessageBox.Show("鏁伴噺涓嶈兘涓�0锛�", "鎻愮ず"); return false; -- Gitblit v1.9.1