From 81456046161696d3e1e31a8d9eb428f3b7a3442f Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期四, 22 九月 2022 10:44:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 104 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
index b076c66..00f955e 100644
--- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -78,6 +78,106 @@
}
}
+ [Route("Cg_POOrderBill/list3")]
+ [HttpGet]
+ public object list3(string sWhere, string user)
+ {
+ try
+ {
+ List<string> optionList = new List<string>();
+ string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 ";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
+ if (ds != null)
+ {
+ foreach (DataColumn item in ds.Tables[0].Columns)
+ {
+ optionList.Add(@"{ field: 'hmainid', title: '"+ item.ToString() + "', sort: true, hide: false }");
+ }
+ string option = string.Join(",",optionList);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = optionList.ToArray();
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒濆鍖栬〃鏍煎け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ 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;
+ }
+ }
+
+ [Route("Cg_POOrderBill/list2")]
+ [HttpGet]
+ public object list2(string sWhere, string user)
+ {
+ try
+ {
+ List<OptionListModel> optionList = new List<OptionListModel>();
+ string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 ";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
+ if (ds != null)
+ {
+ foreach (DataColumn item in ds.Tables[0].Columns)
+ {
+ optionList.Add(new OptionListModel
+ {
+ field = item.ToString(),
+ title = item.ToString(),
+ sort = true,
+ hide = false,
+ });
+ }
+ string option = string.Join(",", optionList);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = optionList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒濆鍖栬〃鏍煎け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ 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銆�
@@ -201,13 +301,13 @@
/// </summary>
[Route("Cg_POOrderBill/Resynchronize")]
[HttpGet]
- public object Resynchronize(string HBillNo,string HBillType)
+ public object Resynchronize(string HBillNo, string HBillType)
{
try
{
oCN.BeginTran();
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','"+ HBillType + "'", "h_p_WMS_ERPSourceBillToLocal");
+ DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ERPSourceBillToLocal");
if (DS == null)
{
objJsonResult.code = "0";
@@ -325,7 +425,7 @@
else
fidList.Add(dr["FID"].ToString() + dr["HINTERID"].ToString());
- DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = "+dr["HINTERID"].ToString());
+ DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = " + dr["HINTERID"].ToString());
JObject model = new JObject();
model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //鍗曟嵁绫诲瀷
@@ -561,4 +661,5 @@
//
}
+
}
\ No newline at end of file
--
Gitblit v1.9.1