From ba195aa9d27aa00bebd81fb795f5bf6bf74ecc9f Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 08 八月 2025 16:37:14 +0800 Subject: [PATCH] 出战汇报取消生产资源控制 --- WebAPI/Controllers/条码管理/WEBSController.cs | 129 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 112 insertions(+), 17 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 1d36d6b..3f6dcb5 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -1708,6 +1708,101 @@ #endregion + #region 鏍峰搧閿�鍞嚭搴撶紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅 + + /// <summary> + /// 缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭� + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetKf_PonderationBillMain_TempList_New_Json_YPSellOut")] + [HttpGet] + public object GetKf_PonderationBillMain_TempList_New_Json_YPSellOut(string HBillType, string HMaker, Int64 HStockOrgID) + { + try + { + ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut"); + + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鍗曟嵁缂撳瓨鍒楄〃淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇鍗曟嵁缂撳瓨鍒楄〃淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏍峰搧閿�鍞嚭搴撶紦瀛樺垪琛ㄧ晫闈紝杩斿洖宸蹭笂浼犲垪琛ㄤ俊鎭� + [Route("WEBSController/GetKf_ICStockBillList_Json_YPSellOut")] + [HttpGet] + public object GetKf_ICStockBillList_Json_YPSellOut(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID, string sWhere) + { + try + { + ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New_YPSellOut '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere + "'", "h_p_Kf_ICStockBillQueryList_New_YPSellOut"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ヨ涓嶅埌璇ュ崟鎹褰曪紒"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇宸蹭笂浼犲崟鎹俊鎭け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #region 缂撳瓨鍒楄〃 缂栬緫鍔熻兘璋冪敤 @@ -3070,25 +3165,23 @@ if (oWebs.set_SaveSellOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) { - if(lsmain[0].HIsTaxRate == 1) + oCn.BeginTran(); + try { - try - { - oCn.BeginTran(); - string sql_reWriteTaxData = "exec h_p_Kf_SellOutBill_withOutSourceBill_ReWriteTax " + lsmain[0].HInterID; - oCn.RunProc(sql_reWriteTaxData); - oCn.Commit(); - } - catch (Exception e3) - { - oCn.RollBack(); - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "閿�鍞嚭搴撳崟涓婁紶鎴愬姛锛侊紒绋庣巼璁$畻澶辫触锛侊紒" + e3.ToString(); - objJsonResult.data = null; - return objJsonResult; - } + string sql_reWriteTaxData = "exec h_p_Kf_SellOutBill_withOutSourceBill_ReWriteTax " + lsmain[0].HInterID + "," + lsmain[0].HIsTaxRate + "," + lsmain[0].HIsTaxRate_upper; + oCn.RunProc(sql_reWriteTaxData); + oCn.Commit(); } + catch (Exception e3) + { + oCn.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閿�鍞嚭搴撳崟涓婁紶鎴愬姛锛侊紒绋庣巼璁$畻澶辫触锛侊紒" + e3.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� @@ -3224,6 +3317,8 @@ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) { objJsonResult.code = "0"; -- Gitblit v1.9.1