From b4e78e5b10fd9777e44a9114aad3502edfd43037 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 29 十一月 2022 17:19:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API into master
---
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 2 +-
DAL/基础资料/其他基础资料/ClsGy_MateMould_Ctl.cs | 39 ++++++++++++++++++++++-----------------
WebAPI/Controllers/LMESController.cs | 2 +-
WebAPI/Controllers/Gy_MateMouldController.cs | 6 +++---
4 files changed, 27 insertions(+), 22 deletions(-)
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MateMould_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MateMould_Ctl.cs"
index b3c8574..7118b63 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MateMould_Ctl.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MateMould_Ctl.cs"
@@ -59,26 +59,28 @@
{
oCn.BeginTran();
- DataSet Ds;
- Int64 HInterID = 1;
- Ds = oCn.RunProcReturn("select MAX(HInterID) HInterID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
- if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()) != 0)
- {
- HInterID = ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
- HInterID += 1;
- }
-
- DataSet Cs;
- Int64 HEntryID = 1;
- Cs = oCn.RunProcReturn("select MAX(HEntryID) HEntryID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
- if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
- {
- HEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
- HEntryID += 1;
- }
+
//鎻掑叆琛�
foreach (Model.ClsGy_MateMould_Model oSub in DetailColl)
{
+ DataSet Ds;
+ Int64 HInterID = 1;
+ Ds = oCn.RunProcReturn("select MAX(HInterID) HInterID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
+ if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()) != 0)
+ {
+ HInterID = ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
+ HInterID += 1;
+ }
+
+ DataSet Cs;
+ Int64 HEntryID = 1;
+ Cs = oCn.RunProcReturn("select MAX(HEntryID) HEntryID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
+ if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+ {
+ HEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+ HEntryID += 1;
+ }
+
oCn.RunProc("Insert into Gy_MateMouldInfo " +
" (HInterID,HEntryID,HMaterID,HRelationID,HUnitID" +
",HBeginDate,HEndDate" +
@@ -114,6 +116,9 @@
// ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
oCn.RunProc("Update Gy_MateMouldInfo set " +
"HRemark='" + oSub.HRemark + "'" +
+ ",HMaterID='" + oSub.HMaterID + "'" +
+ ",HRelationID='" + oSub.HRelationID + "'" +
+ ",HUnitID='" + oSub.HUnitID + "'" +
//",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
//",HUseFlag=" + Convert.ToString(HUseFlag ? 1 : 0) +
//",HMakeTime= getdate()" +
diff --git a/WebAPI/Controllers/Gy_MateMouldController.cs b/WebAPI/Controllers/Gy_MateMouldController.cs
index 4d2fc06..d92ce2b 100644
--- a/WebAPI/Controllers/Gy_MateMouldController.cs
+++ b/WebAPI/Controllers/Gy_MateMouldController.cs
@@ -183,7 +183,7 @@
}
else
{
- bResult = BillNew.ModifyByID(DBUtility.ClsPub.isLong(mainList[0].HItemID));
+ bResult = BillNew.ModifyByID(DBUtility.ClsPub.isLong(subList[0].HItemID));
}
//鎻愮ず
if (bResult == true)
@@ -234,8 +234,8 @@
// " left join Gy_Material c on a.HMaterID = c.HItemID " +
// " left join Gy_Unit d on a.HUnitID = d.HItemID where a.HItemID = " + HItemID, "Gy_MateMouldInfo");
ds = oCN.RunProcReturn("select " +
- "a.HItemID,a.妯″叿浜у搧瀵瑰簲琛ㄤ唬鐮�,a.HUnitID,b.HName 妯″叿鍚嶇О" +
- ",b.HNumber 妯″叿浠g爜,a.HMaterID HMaterIDCol,c.HNumber 鐗╂枡浠g爜,c.HName 鐗╂枡鍚嶇О,c.HModel 瑙勬牸鍨嬪彿" +
+ "a.HItemID,a.妯″叿浜у搧瀵瑰簲琛ㄤ唬鐮�,a.HUnitID,b.hitemid HMouldIDCol,b.HNumber 妯″叿浠g爜" +
+ ",b.HName 妯″叿鍚嶇О,a.HMaterID HMaterIDCol,c.HNumber 鐗╂枡浠g爜,c.HName 鐗╂枡鍚嶇О,c.HModel 瑙勬牸鍨嬪彿" +
",a.HRelationID HRelationIDCol,d.HNumber 鍗曚綅浠g爜,d.HName 鍗曚綅鍚嶇О" +
",a.HUnitID HUnitIDCol" +
",a.寮�濮嬫棩鏈�,a.缁撴潫鏃ユ湡" +
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index b30201c..212335f 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -125,6 +125,7 @@
string sql = "select * from h_v_Sc_ProcessExchangeBillQuerySub where hmainid = ";
string sql1 = sql + sWhere;
ds = oCN.RunProcReturn(sql1 + " order by cast(宸ュ簭鍙� as int)", "h_v_Sc_ProcessExchangeBillQuerySub");
+ return GetObjectJson(ds);
}
catch (Exception e)
{
@@ -134,7 +135,6 @@
objJsonResult.data = null;
return objJsonResult;
}
- return GetObjectJson(ds);
}
#region 宸ュ簭娴佽浆鍗★紙涓嬭揪锛�
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 826c8ef..9507daf 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -32,7 +32,7 @@
try
{
- ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where HitemID=" + HInterID, "h_v_IF_SeOrderBillList");
+ ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where hmainid =" + HInterID, "h_v_IF_SeOrderBillList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
--
Gitblit v1.9.1