From 5e3df1c7ce50b55cec07041abd0aa455b4ccb4cf Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 25 十二月 2023 15:00:34 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 109 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 84 insertions(+), 25 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 501562b..16ac943 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -313,7 +313,7 @@
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
- if (oBill.omodel.HInterID == 0)
+ if (refSav == "Add")
{
// bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
@@ -783,32 +783,26 @@
{
try
{
- if (sWhere == null || sWhere.Equals(""))
+ List<object> columnNameList = new List<object>();
+
+ string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
{
- ds = oCN.RunProcReturn("select * from h_v_Sc_AssemblyBillList " + sWhere, "h_v_Sc_AssemblyBillList");
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- else
- {
- string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList");
- }
- 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;
- }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
}
catch (Exception e)
{
@@ -1109,5 +1103,70 @@
}
#endregion
+ #region 鐢熶骇姹囨姤鍗曡幏鍙栨簮鍗曚骇閲忔眹鎶ュ崟涓存椂琛ㄤ俊鎭�
+ /// <summary>
+ /// 鐢熶骇姹囨姤鍗曡幏鍙栨簮鍗曚骇閲忔眹鎶ュ崟涓存椂琛ㄤ俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_ICMOReportBill/GetProdReportBillList")]
+ [HttpGet]
+ public object GetProdReportBillList(string HInterID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浜ч噺姹囨姤鍗曞唴鐮佷负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+
+ string sql = "exec h_p_Sc_ICMOBillWorkQtyStatus_TmpList '" + HInterID + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_ICMOBillWorkQtyStatus_TmpList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1