From 2bdb683c8725fcbb7ea2e6d73a37f3d7a3b55573 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 09 六月 2021 18:56:05 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-API --- WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 146 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 146 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 48f6407..4578cc0 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -67,6 +67,152 @@ } + /// <summary> + /// 杩斿洖妯″叿鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_Mould/list1")] + [HttpGet] + public object list1(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere, "h_v_Gy_MouldFileList"); + } + else + { + string sql1 = "select * from h_v_Gy_MouldFileList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList"); + } + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + 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; + } + } + + + + /// <summary> + /// 杩斿洖妫�鍏锋。妗堝垪琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_CheckToolsFileMainList/list2")] + [HttpGet] + public object list2(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Gy_CheckToolsFileMainList " + sWhere, "h_v_Gy_CheckToolsFileMainList"); + } + else + { + string sql1 = "select * from h_v_Gy_CheckToolsFileMainList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Gy_CheckToolsFileMainList"); + } + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + 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; + } + } + + /// <summary> + /// 杩斿洖鏉$爜妗f鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_BarCodeBillList/GetBarCodeBillList")] + [HttpGet] + public object GetBarCodeBillList(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList " + sWhere, "h_v_IF_BarCodeBillList"); + } + else + { + string sql1 = "select * from h_v_IF_BarCodeBillList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); + } + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + 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; + } + } + // } -- Gitblit v1.9.1