From 634bfacdb0ddf2415faebeab41d60be25ff697b2 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 30 十二月 2024 10:40:23 +0800 Subject: [PATCH] 系统配置:增加字段 字段附加字段 --- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 119 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index fa524c1..1b5a2a6 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -8667,6 +8667,68 @@ #endregion + #region 妯″叿閫�搴撳崟鍒楄〃 鏌ヨ-鍒嗛〉 + /// <summary> + /// 杩斿洖搴旀敹鍗曞垪琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_MouldProdBackBill/list_byPage")] + [HttpGet] + public object getSc_MouldProdBackBill_byPage(string sWhere, string user, string Organization, int page, int size) + { + try + { + Log.LogInfo("鎴愬姛锛�"); //璁板綍鎻愪氦鏁版嵁 + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + Log.LogInfo("鏈夋潈闄�"); + LogService.Write(sWhere + ";" + Organization); + + string sql = ""; + if (sWhere == null || sWhere.Equals("")) + { + sWhere = " and 搴撳瓨缁勭粐='" + Organization + "'"; + sWhere = sWhere.Replace("'", "''"); + sql = "exec h_p_Sc_MouldProdBackBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'"; + Log.LogInfo(sql); + ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_p_Sc_MouldProdBackBillList_Query"); + } + else + { + sWhere += " and 搴撳瓨缁勭粐='" + Organization + "'"; + sWhere = sWhere.Replace("'", "''"); + sql = "exec h_p_Sc_MouldProdBackBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'"; + Log.LogInfo(sql); + ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_p_Sc_MouldProdBackBillList_Query"); + } + + objJsonResult.code = "1"; + objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region[妯″叿閫�搴撳崟缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝 [Route("Sc_MouldProdBackBill/Sc_MouldProdBackBillListCheckDetai")] [HttpGet] @@ -9274,6 +9336,63 @@ #endregion + #region 妯″叿棰嗙敤鍗曞垪琛� 鏌ヨ-鍒嗛〉 + /// <summary> + /// 杩斿洖搴旀敹鍗曞垪琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_MouldProdOutBill/list_byPage")] + [HttpGet] + public object getSc_MouldProdOutBill_byPage(string sWhere, string user, string Organization, int page, int size) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = ""; + if (sWhere == null || sWhere.Equals("")) + { + sWhere = " and 搴撳瓨缁勭粐='" + Organization + "'"; + sWhere = sWhere.Replace("'", "''"); + sql = "exec h_p_Sc_MouldProdOutHouseBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'"; + Log.LogInfo(sql); + ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldProdOutHouseBillList_Query"); + } + else + { + sWhere += " and 搴撳瓨缁勭粐='" + Organization + "'"; + sWhere = sWhere.Replace("'", "''"); + sql = "exec h_p_Sc_MouldProdOutHouseBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'"; + Log.LogInfo(sql); + ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldProdOutHouseBillList_Query"); + } + + objJsonResult.code = "1"; + objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region[妯″叿棰嗙敤鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁] [Route("Sc_MouldProdOutBill/Sc_MouldProdOutBillListCheckDetai")] [HttpGet] -- Gitblit v1.9.1