From 6c6386f7dbbf7cccf55a62fe727ba56502535b59 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期一, 29 三月 2021 16:57:26 +0800 Subject: [PATCH] 新增一个模治具控制器 控制器里列表调用API方法 --- WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs | 494 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 491 insertions(+), 3 deletions(-) diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs index dda65af..e0e865e 100644 --- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs +++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs @@ -21,7 +21,7 @@ /// <returns></returns> /// <summary> - /// 涓婁笅鏋跺崟鍒楄〃 + /// 妫�鍏风淮淇伐鍗曞垪琛� /// </summary> /// <returns></returns> [Route("Sc_CheckToolsRepair/GetCheckToolsRepairWorkBillList")] @@ -62,16 +62,504 @@ #region sql璇彞 - //涓婃灦褰掕繕鍗曞垪琛� public static DataSet Sc_CheckToolsRepairWorkBillList_s(string sWhere) { return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairWorkBillList ", "h_v_Sc_CheckToolsRepairWorkBillList"); } + + /// <summary> + /// 妫�鍏风偣妫�璁″垝琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_CheckToolsDotCheckPlan/GetCheckToolsDotCheckPlanBillList")] + [HttpGet] + public object GetCheckToolsDotCheckPlanBillList(string sWhere) + { + try + { + + ds = Sc_CheckToolsDotCheckPlanBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_CheckToolsDotCheckPlanBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsDotCheckPlanBillList ", "h_v_Sc_CheckToolsDotCheckPlanBillList"); + } + #endregion + + /// <summary> + /// 妫�鍏蜂繚鍏昏褰曡〃鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Sc_CheckToolsMaintainBill/GetCheckToolsMaintainBillList")] + [HttpGet] + public object GetCheckToolsMaintainBillList(string sWhere) + { + try + { + + ds = Sc_CheckToolsMaintainBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_CheckToolsMaintainBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsMaintainBillList ", "h_v_Sc_CheckToolsMaintainBillList"); + } + #endregion + + /// <summary> + /// 妯″叿淇濆吇璁板綍琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldMaintainBill/GetMouldMaintainBillList")] + [HttpGet] + public object GetMouldMaintainBillList(string sWhere) + { + try + { + + ds = Sc_MouldMaintainBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldMaintainBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainBillList ", "h_v_Sc_MouldMaintainBillList"); + } + #endregion + + + + /// <summary> + /// 妯″叿鐐规璁″垝琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList")] + [HttpGet] + public object GetMouldDotCheckPlanBillList(string sWhere) + { + try + { + + ds = Sc_MouldDotCheckPlanBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldDotCheckPlanBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList ", "h_v_Sc_MouldDotCheckPlanBillList"); + } + #endregion + + /// <summary> + /// 妯″叿鐐规璁板綍琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillList")] + [HttpGet] + public object GetMouldDotCheckBillList(string sWhere) + { + try + { + + ds = Sc_MouldDotCheckBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldDotCheckBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList ", "h_v_Sc_MouldDotCheckBillList"); + } + #endregion + + + /// <summary> + /// 妫�鍏蜂繚鍏昏鍒掕〃鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Sc_CheckToolsMaintainPlanBill/GetCheckToolsMaintainPlanBillList")] + [HttpGet] + public object GetCheckToolsMaintainPlanBillList(string sWhere) + { + try + { + + ds = Sc_CheckToolsMaintainPlanBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_CheckToolsMaintainPlanBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsMaintainPlanBillList ", "h_v_Sc_CheckToolsMaintainPlanBillList"); + } + #endregion + + + /// <summary> + /// 妯″叿淇濆吇璁″垝琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")] + [HttpGet] + public object GetMouldMaintainPlanBillList(string sWhere) + { + try + { + + ds = Sc_MouldMaintainPlanBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldMaintainPlanBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList ", "h_v_Sc_MouldMaintainPlanBillList"); + } + #endregion + + + /// <summary> + /// 妯″叿鏁呴殰鐧昏琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldConkBookBill/GetMouldConkBookBillList")] + [HttpGet] + public object GetMouldConkBookBillList(string sWhere) + { + try + { + + ds = Sc_MouldConkBookBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldConkBookBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList ", "h_v_Sc_MouldConkBookBillList"); + } + #endregion + + + + /// <summary> + /// 妯″叿鏁呴殰鐧昏琛ㄥ垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList")] + [HttpGet] + public object GetMouldRepairCheckBillList(string sWhere) + { + try + { + + ds = Sc_MouldRepairCheckBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_MouldRepairCheckBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList ", "h_v_Sc_MouldRepairCheckBillList"); + } + #endregion + + /// <summary> + /// 妫�鍏风淮淇獙鏀跺崟鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Sc_CheckToolsRepairCheckBill/GetCheckToolsRepairCheckBillList")] + [HttpGet] + public object GetCheckToolsRepairCheckBillList(string sWhere) + { + try + { + + ds = Sc_CheckToolsRepairCheckBillList_s(sWhere); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region sql璇彞 + + + public static DataSet Sc_CheckToolsRepairCheckBillList_s(string sWhere) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairCheckBillList ", "h_v_Sc_CheckToolsRepairCheckBillList"); + } + #endregion + + //娴嬭瘯涓撶敤鎺ュ彛 [Route("LookingFor/Test")] [HttpGet] - public object Test(string HbillNo)//h_p_Xs_SellOutFindSP + public object Test(string HbillNo)//Sc_CheckToolsRepair/GetCheckToolsRepairWorkBillList { DataSet ds; ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP"); -- Gitblit v1.9.1