From fd977523df94afb2fd807db0145ec231e449bade Mon Sep 17 00:00:00 2001 From: zgq <519541279@qq.com> Date: 星期五, 26 三月 2021 13:32:40 +0800 Subject: [PATCH] nothing --- WebAPI/Controllers/CJGL/Cj_NoPassProcController.cs | 77 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_NoPassProcController.cs b/WebAPI/Controllers/CJGL/Cj_NoPassProcController.cs new file mode 100644 index 0000000..07cd804 --- /dev/null +++ b/WebAPI/Controllers/CJGL/Cj_NoPassProcController.cs @@ -0,0 +1,77 @@ +锘縰sing Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using System.Web.Mvc; +using WebAPI.Models; +using HttpGetAttribute = System.Web.Http.HttpGetAttribute; + +namespace WebAPI.Controllers +{ + //涓嶈壇鍝丆ontroller + public class Cj_NoPassProcController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + + /// <summary> + /// 杩斿洖涓嶈壇鍝佸垪琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cj_NoPassProc/list")] + [HttpGet] + public object list(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_QC_NoPassProdCheckBillList " + sWhere, "h_v_QC_NoPassProdCheckBillList"); + } + else + { + string sql1 = "select * from h_v_QC_NoPassProdCheckBillList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdCheckBillList"); + } + 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; + } + } + + + + // + } +} \ No newline at end of file -- Gitblit v1.9.1