From 39a43039bbb6491f33783fb675a111c61e749891 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 11 七月 2024 12:52:03 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 108 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 79 insertions(+), 29 deletions(-)
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
index caba032..d17c116 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
@@ -68,6 +68,56 @@
}
#endregion
+ #region 鍣ㄥ叿鐐规瑙勭▼鍗曞垪琛�
+ [Route("Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleListPDA")]
+ [HttpGet]
+ public object Sc_MouldDotCheckRuleListPDA(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+ //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckRuleBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sql = "select * from h_v_Sc_MouldDotCheckRuleListByMould where 1 = 1" + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleListByMould");
+
+ //娣诲姞鍒楀悕
+ 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;
+ }
+ }
+ #endregion
+
#region 鍣ㄥ叿鐐规瑙勭▼ 淇濆瓨/缂栬緫
/// <summary>
/// 淇濆瓨妯″叿缁翠慨鍗�
@@ -83,8 +133,7 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
- string msg4 = sArray[2].ToString();
- string msg5 = sArray[3].ToString();
+ string msg5 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
@@ -147,35 +196,35 @@
item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
item.HRelationQty = 0; //鍏宠仈鏁伴噺
- oBill.DetailCol.Add(item);
+ oBill.DetailColl.Add(item);
}
- //閰嶄欢椤硅〃浣撴暟鎹�
- //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
- msg4 = msg4.Substring(1, msg4.Length - 2);
- msg4 = msg4.Replace("\\", "");
- msg4 = msg4.Replace("\n", ""); //\n
- //msg2 = msg2.Replace("'", "鈥�");
- List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>();
- ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckRuleBillSub_Item(msg4);
- int j = 0;
- foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oItemSub in ls1)
- {
+ ////閰嶄欢椤硅〃浣撴暟鎹�
+ ////鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ //msg4 = msg4.Substring(1, msg4.Length - 2);
+ //msg4 = msg4.Replace("\\", "");
+ //msg4 = msg4.Replace("\n", ""); //\n
+ // //msg2 = msg2.Replace("'", "鈥�");
+ //List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>();
+ //ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckRuleBillSub_Item(msg4);
+ //int j = 0;
+ //foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oItemSub in ls1)
+ //{
- j++;
- oItemSub.HEntryID = j;
- //oItemSub.HCloseMan = ""; //琛屽叧闂�
- oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
- oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ // j++;
+ // oItemSub.HEntryID = j;
+ // //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ // oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ // oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
- oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
- oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ // oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ // oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
- oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
- oBill.DetailColl.Add(oItemSub);
- }
+ // oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ // oBill.DetailColl.Add(oItemSub);
+ //}
//淇濆瓨
@@ -255,18 +304,19 @@
}
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- string sql = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckItemNumber,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + "";
+ string sql = "select * from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillSub");
- //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
- string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark,鏍囧噯鐢ㄩ噺 HQtyMust from h_v_Sc_MouldDotCheckRuleBillSub_Item where 1 = 1 " + Swhere + "";
- ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldDotCheckRuleBillSub_Item");
+ ////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ //string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark,鏍囧噯鐢ㄩ噺 HQtyMust from h_v_Sc_MouldDotCheckRuleBillSub_Item where 1 = 1 " + Swhere + "";
+ //ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldDotCheckRuleBillSub_Item");
list.Add(ds.Tables[0]);
- list.Add(ds1.Tables[0]);
+ //list.Add(ds1.Tables[0]);
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
objJsonResult.list = list;
+ objJsonResult.data = ds.Tables[0];
}
catch (Exception e)
{
--
Gitblit v1.9.1