From 96475c2fd6a0f8b11c24f06ca65d9d8955302b26 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 27 十月 2025 08:12:18 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 645 +++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 452 insertions(+), 193 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index f0da787..077a950 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -474,62 +474,7 @@
}
- /// <summary>
- /// 妯″叿鐐规璁板綍琛ㄥ垎椤靛垪琛�
- /// </summary>
- /// <returns></returns>
- [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillListPage")]
- [HttpGet]
- public object GetMouldDotCheckBillListPage(string sWhere, string user, int page, int size)
- {
- try
- {
- List<object> columnNameList = new List<object>();
- if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckBillList " + page + "," + size + ",''", "h_p_Sc_MouldDotCheckBillList");
- }
- else
- {
- sWhere = sWhere.Replace("'", "''");
- ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldDotCheckBillList");
- }
-
- //娣诲姞鍒楀悕
- 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鍒楀璞$殑鍒楀悕
- }
-
-
- objJsonResult.code = CodeConstant.SUCCEED;
- objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- objJsonResult.list = columnNameList;
- return objJsonResult;
- }
- catch (Exception ex)
- {
- objJsonResult.code = CodeConstant.FAIL;
- objJsonResult.count = CountConstant.FAIL;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
+
#region sql璇彞
@@ -589,127 +534,6 @@
#endregion
- /// <summary>
- /// 妯″叿淇濆吇璁″垝琛ㄥ垪琛�
- /// </summary>
- /// <returns></returns>
- [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")]
- [HttpGet]
- public object GetMouldMaintainPlanBillList(string sWhere,string user)
- {
- try
- {
- List<object> columnNameList = new List<object>();
- if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- ds = Sc_MouldMaintainPlanBillList_s(sWhere);
-
- //娣诲姞鍒楀悕
- 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.Tables[0];
- 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;
- }
- }
-
- #region sql璇彞
-
-
- public static DataSet Sc_MouldMaintainPlanBillList_s(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldMaintainPlanBillList");
- }
- #endregion
-
- #region 妯″叿淇濆吇璁″垝鍒嗛〉鍒楄〃
- [Route("Sc_MouldMaintainPlanBill/page")]
- [HttpGet]
- public object Sc_MouldMaintainPlanBillPage(string sWhere, string user, int page, int size)
- {
- DataSet ds;
- try
- {
- List<object> columnNameList = new List<object>();
- //鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- sWhere = sWhere.Replace("'", "''");
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainPlanBillList_Query " + page + "," + size + ",''", "h_p_Sc_MouldMaintainPlanBillList_Query");
- }
- else
- {
- ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainPlanBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldMaintainPlanBillList_Query");
- }
-
- //娣诲姞鍒楀悕
- 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鍒楀璞$殑鍒楀悕
- }
-
- objJsonResult.code = CodeConstant.SUCCEED;
- objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.list = columnNameList;
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- catch (Exception e)
- {
- objJsonResult.code = CodeConstant.FAIL;
- objJsonResult.count = CountConstant.FAIL;
- objJsonResult.Message = "Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
- #endregion
/// <summary>
/// 妯″叿鏁呴殰鐧昏琛ㄥ垪琛�
@@ -930,6 +754,95 @@
}
}
#endregion
+
+
+ #region 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃
+
+ /// <summary>
+ /// 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MouldRepairInBillList/Get_Sc_MouldLifeUsePicReport_list")]
+ [HttpGet]
+ public object Get_Sc_MouldLifeUsePicReport_list(string sWhere)
+ {
+ try
+ {
+
+ Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+ string HBeginDate = dic["HBeginDate"].ToString();//寮�濮嬫棩鏈�
+ string HEndDate = dic["HEndDate"].ToString();//缁撴潫鏃ユ湡
+ string HMouldNo = dic["HMouldNo"].ToString();//妯″叿缂栫爜
+ string HName = dic["HName"].ToString();//妯″叿鍚嶇О
+
+ ds = oCN.RunProcReturn("exec h_P_Sc_MouldLifeUsePicReport '" + HBeginDate + "'," + HEndDate + ",'" + HMouldNo + "','" + HName + "'", "h_P_Sc_MouldLifeUsePicReport");
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ //}
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鑾峰彇妯″叿瀵垮懡
+ [Route("Sc_MouldRepairInBillList/Get_HMouldLifeUsePic")]
+ [HttpGet]
+ public object Get_HMouldLifeUsePic(string HItemID)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFile_Life where HInterID="+ HItemID, "h_v_Gy_MouldFile_Life");
+
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
@@ -2194,6 +2107,65 @@
}
#endregion
+ #region 鏍峰搧閿�鍞嚭搴撳崟鍒楄〃-鍒嗛〉
+ /// <summary>
+ /// 閿�鍞嚭搴撳崟鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_SellOutBill/GetSellOutBillList_byPage_YP")]
+ [HttpGet]
+ public object GetSellOutBillList_byPage_YP(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>(); //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBill_YP_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ sWhere = sWhere.Replace("'", "''");
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_IF_SellOutBillList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_IF_SellOutBillList");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_IF_SellOutBillList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_IF_SellOutBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ 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;
+ }
+ }
+ #endregion
+
/// <summary>
///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘
/// </summary>
@@ -2594,7 +2566,7 @@
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by hmainid desc", "h_v_Kf_OtherOutBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by 鍒跺崟鏃ユ湡 desc", "h_v_Kf_OtherOutBillList");
}
else
{
@@ -4045,7 +4017,7 @@
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by hmainid desc", "h_v_Kf_OtherInBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by 鍒跺崟鏃ユ湡 desc", "h_v_Kf_OtherInBillList");
}
else
{
@@ -6761,7 +6733,118 @@
#endregion
+
+
#region 妯″叿淇濆吇璁″垝鍗�
+
+ #region 妯″叿淇濆吇璁″垝琛ㄥ垪琛�
+ [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")]
+ [HttpGet]
+ public object GetMouldMaintainPlanBillList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = Sc_MouldMaintainPlanBillList_s(sWhere);
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ 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 where 1=1 " + sWhere + " order by hmainid desc", "h_v_Sc_MouldMaintainPlanBillList");
+ }
+ #endregion
+ #endregion
+
+ #region 妯″叿淇濆吇璁″垝鍒嗛〉鍒楄〃
+ [Route("Sc_MouldMaintainPlanBill/page")]
+ [HttpGet]
+ public object Sc_MouldMaintainPlanBillPage(string sWhere, string user, int page, int size)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ sWhere = sWhere.Replace("'", "''");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainPlanBillList_Query " + page + "," + size + ",''", "h_p_Sc_MouldMaintainPlanBillList_Query");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainPlanBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldMaintainPlanBillList_Query");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#region 妯″叿淇濆吇璁″垝鍗� 淇濆瓨/缂栬緫
/// <summary>
@@ -6812,7 +6895,7 @@
//oItem.HInterID =0;
//oItem.HBillNo = "";
- oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
//oItem.HMakeDate = "";
@@ -6967,6 +7050,7 @@
}
}
#endregion
+
#region[妯″叿淇濆吇璁″垝鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
[Route("Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListCheckDetai")]
[HttpGet]
@@ -6981,6 +7065,7 @@
return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
}
#endregion
+
#region[妯″叿淇濆吇璁″垝鍗曠紪杈戞椂鑾峰彇琛ㄩ鏁版嵁]
[Route("Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListProjectDetai")]
[HttpGet]
@@ -8089,6 +8174,61 @@
#region 妯″叿鐐规璁板綍琛�
+ #region 妯″叿鐐规璁板綍琛ㄥ垎椤靛垪琛�
+ [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillListPage")]
+ [HttpGet]
+ public object GetMouldDotCheckBillListPage(string sWhere, string user, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckBillList " + page + "," + size + ",''", "h_p_Sc_MouldDotCheckBillList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldDotCheckBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 妯″叿鐐规璁板綍琛� 淇濆瓨/缂栬緫
/// <summary>
/// 淇濆瓨妯″叿缁翠慨鍗�
@@ -8259,7 +8399,6 @@
}
#endregion
-
#region[妯″叿鐐规璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
[Route("Sc_MouldDotCheckBill/Sc_MouldDotCheckBillListCheckDetai")]
[HttpGet]
@@ -8274,6 +8413,7 @@
return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
}
#endregion
+
#region[妯″叿鐐规璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄩ鏁版嵁]
[Route("Sc_MouldDotCheckBill/Sc_MouldDotCheckBillListProjectDetai")]
[HttpGet]
@@ -8313,6 +8453,7 @@
return objJsonResult;
}
#endregion
+
#region[妯″叿鐐规璁板綍琛ㄩ�夋嫨鐐规璁″垝甯﹀嚭琛ㄦ牸鏁版嵁]
[Route("Sc_MouldDotCheckBill/Sc_MouldDotCheckSubBillListByPlan")]
[HttpGet]
@@ -8339,6 +8480,7 @@
return objJsonResult;
}
#endregion
+
#region [妯″叿鐐规璁板綍琛ㄥ垹闄ゅ姛鑳絔
/// <summary>
/// 妯″叿鐐规璁板綍鍒犻櫎鍔熻兘
@@ -8616,7 +8758,7 @@
}
#endregion
- #region 鍣ㄥ叿鐐规璁″垝鍗� 鍏抽棴/鍙嶅叧闂�
+ #region 鍣ㄥ叿鐐规璁板綍鍗� 鍏抽棴/鍙嶅叧闂�
/// <summary>
/// </summary>
/// <param name="HInterID">鍗曟嵁ID</param>
@@ -8804,6 +8946,43 @@
objJsonResult.data = null;
return objJsonResult;
}
+ }
+ #endregion
+
+ #region[妯″叿鐐规璁板綍琛ㄧ偣鍑讳富琛ㄦ煡鐪嬪瓙琛ㄤ俊鎭痌
+ [Route("Sc_MouldDotCheckBill/Sc_MouldDotCheckBillList_sub")]
+ [HttpGet]
+ public object Sc_MouldDotCheckBillList_sub(string HInterID)
+ {
+
+ DataSet ds;
+ List<object> list = new List<object>();
+ string Swhere = "";
+ try
+ {
+ if (HInterID != "" || HInterID != null)
+ {
+ Swhere = " and hmainid='" + HInterID + "'";
+ }
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鐐规椤圭洰鏁版嵁
+ string sql = "select 鐐规椤圭洰浠g爜 HDotCheckItemNumber, 鐐规椤圭洰 HDotCheckItem,鐐规鏂规硶鍚嶇О HDotCheckItemMethodName,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,鐐规缁撴灉 HDotCheckResult,瀛愬娉�2 HRemark from h_v_Sc_MouldDotCheckBill_Edit where 1 = 1 " + Swhere + "";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckBill_Edit");
+
+ list.Add(ds.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
}
#endregion
@@ -13178,8 +13357,8 @@
return objJsonResult;
}
- sWhere = sWhere.Replace("'", "''");
- if (sWhere == null || sWhere.Equals(""))
+ sWhere = sWhere?.Replace("'", "''") ?? "";
+ if (string.IsNullOrEmpty(sWhere))
{
ds = oCn.RunProcReturn("exec h_p_Sc_MouldLifeChangeBillList_Query " + page + "," + size + ",''", "h_p_Sc_MouldLifeChangeBillList_Query");
}
@@ -13188,19 +13367,45 @@
ds = oCn.RunProcReturn("exec h_p_Sc_MouldLifeChangeBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldLifeChangeBillList_Query");
}
- //娣诲姞鍒楀悕
- foreach (DataColumn col in ds.Tables[0].Columns)
+ // 娣诲姞绌哄�兼鏌�
+ if (ds == null || ds.Tables.Count == 0)
{
- Type dataType = col.DataType;
- string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
- columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鎴愬姛锛屼絾鏃犳暟鎹紒";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ // 妫�鏌ョ涓�涓〃
+ if (ds.Tables[0] != null)
+ {
+ //娣诲姞鍒楀悕
+ 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));
+ }
+ }
+
+ // 妫�鏌ョ浜屼釜琛ㄥ拰琛屾暟鎹�
+ int totalCount = 0;
+ if (ds.Tables.Count > 1 && ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
+ {
+ var countRow = ds.Tables[1].Rows[0]["count"];
+ if (countRow != null && countRow != DBNull.Value)
+ {
+ totalCount = int.Parse(countRow.ToString());
+ }
}
objJsonResult.code = CodeConstant.SUCCEED;
- objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.count = totalCount;
+ objJsonResult.Message = "Success锛�";
objJsonResult.list = columnNameList;
- objJsonResult.data = ds.Tables[0];
+ objJsonResult.data = ds.Tables[0] ?? new DataTable(); // 纭繚涓嶄负null
return objJsonResult;
}
catch (Exception e)
@@ -14728,6 +14933,60 @@
}
}
#endregion
-
+
+ #region[app鏍规嵁妯″叿 淇濆吇瑙勭▼鎴栫偣妫�瑙勭▼鑷姩鑾峰彇瀛愯〃淇℃伅]
+ [Route("Sc_MouldMaintainRuleBill/GetMouldRuleSubList-Detail")]
+ [HttpGet]
+ public object GetMouldMaintainRuleSubList(string HInterID,string HBillType)
+ {
+
+ DataSet ds, ds1;
+ List<object> list = new List<object>();
+ string Swhere = "";
+ try
+ {
+ if (HInterID != "" || HInterID != null)
+ {
+ Swhere = " and HInterID='" + HInterID + "'";
+ }
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //淇濆吇璁板綍璋冪敤
+ if (HBillType== "3819")
+ {
+ //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
+ string sql = "select HMaintainItemID,HManagerID,HMaintainItem,HMaintainPart,HClaim,HRemark,'true' HMaintainResult from Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
+ ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainRuleBillSub_Item");
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ string sql1 = "select HMaterID, HUnitID, HQty, HQtyMust, HRemark from Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + "";
+ ds1 = oCN.RunProcReturn(sql1, "Sc_MouldMaintainRuleBillSub");
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ }
+ //鐐规璁板綍璋冪敤
+ else if (HBillType== "3821")
+ {
+ //鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
+ string sql = "select HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID,HDotCheckItemClassID,HDotCheckItemMethodID,HRemark from Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + "";
+ ds = oCN.RunProcReturn(sql, "Sc_MouldDotCheckRuleBillSub");
+ list.Add(ds.Tables[0]);
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1