From 06873e80a52500b79cb71139a76b7c627dbe401a Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 13 三月 2026 13:40:53 +0800
Subject: [PATCH] 修复模具下模单保存。调整华舟派工生产单据顺序
---
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 9631de6..5dc7d1b 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -7409,7 +7409,6 @@
}
if (bResult)
{
-
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -8232,14 +8231,29 @@
{
try
{
+ List<object> columnNameList = new List<object>();
- string sql = "select * from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc";
+ string sql = $@"select HSendMan 鍥炲浜�, HDescription 鍥炲鍐呭, HDate 鍥炲鏃堕棿,
+ case HSendStatus
+ when 1 then '鏅��'
+ when 10 then '楠岃瘉閫氳繃'
+ when 9 then '缁撴'
+ end as 绫诲瀷
+ ,* from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc";
ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillSub");
+
+ 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)
@@ -8679,10 +8693,23 @@
{
try
{
+ string sql = "";
List<object> columnNameList = new List<object>();
- string sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HDatePlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
+ if (!string.IsNullOrEmpty(HSourceBill) && HSourceBill.Substring(0, 6) == "GXCZHB")
+ {
+ HSourceBill = HSourceBill.Split('-')[0];
+ //鍗庤垷鍋氭湯浠跺彂璧峰畨鐏殑鏃跺�� 浼犺繃鏉ョ殑鏄嚭绔欏崟鐨勫崟鎹彿
+ sql = @"select a.HProcExchInterID 娴佽浆鍗′富鍐呯爜,a.HProcExchEntryID 娴佽浆鍗″瓙鍐呯爜,a.HProcExchBillNo 娴佽浆鍗″彿,a.HSourceID,b.HName 鐢熶骇璧勬簮, c.HNumber 鐗╂枡浠g爜, c.HName 鐗╂枡鍚嶇О, c.HModel 瑙勬牸鍨嬪彿, a.HPlanQty 璁″垝鏁伴噺
+ from Sc_StationOutBillMain a left join Gy_Source b on a.HSourceID = b.HItemID left join Gy_Material c on a.HMaterID = c.HItemID where a.HBillNo = '" + HSourceBill + "'";
+ }
+ else
+ {
+ //鎶ュ伐鍙颁紶杩囨潵鐨勬槸娴佽浆鍗$殑
+ sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HDatePlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
"left join Gy_Material b on a.HMaterID=b.HItemID left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "' and a.HICMOStatus=1";
+ }
+
ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
if (ds.Tables[0].Rows.Count == 0)
{
--
Gitblit v1.9.1