From 7bf9e584d675d250165439a32c52530db271ee99 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 12 九月 2025 08:33:43 +0800
Subject: [PATCH] 1

---
 WebAPI/DLL/ClsSc_MESStopRestoreWorkBill.cs |   66 ++++++--------------------------
 1 files changed, 13 insertions(+), 53 deletions(-)

diff --git a/WebAPI/DLL/ClsSc_MESStopRestoreWorkBill.cs b/WebAPI/DLL/ClsSc_MESStopRestoreWorkBill.cs
index b618884..8e3013f 100644
--- a/WebAPI/DLL/ClsSc_MESStopRestoreWorkBill.cs
+++ b/WebAPI/DLL/ClsSc_MESStopRestoreWorkBill.cs
@@ -234,33 +234,14 @@
                     //  "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                     //  ") ");
                 }
-                //foreach (Model.ClsSc_MESStopRestoreWorkBillSub_Item oSub2 in DetailColl1)
-                //{
-                //    oCn.RunProc("Insert into Sc_MESStopWorkBillSub_Item " +
-                //      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
-                //      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
-                //      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                //      ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" +
 
-                //      ") values("
-                //      + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" +
-                //      ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() +
-                //      "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() +
-                //      "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() +
-                //      ") ");
-                //}
-                //
-                //foreach (Model.ClsSc_MESStopRestoreWorkBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_Sc_MESStopWorkBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(omodel.HInterID, omodel.HICMOInterID, omodel.HICMOEntryID, omodel.HICMOBillNo, 2, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -340,34 +321,13 @@
                     //  "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                     //  ") ");
                 }
-                //foreach (Model.ClsSc_MESStopRestoreWorkBillSub_Item oSub2 in DetailColl1)
-                //{
-                //    oCn.RunProc("Insert into Sc_MESStopWorkBillSub_Item " +
-                //      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
-                //      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
-                //      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                //      ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" +
 
-                //      ") values("
-                //      + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" +
-                //      ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() +
-                //      "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() +
-                //      "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() +
-                //      ") ");
-                //}
-                //
-                //foreach (Model.ClsSc_MESStopRestoreWorkBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_Sc_MESStopWorkBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
-                //
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(omodel.HInterID, omodel.HICMOInterID, omodel.HICMOEntryID, omodel.HICMOBillNo, 1, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
 
                 // 淇濆瓨鍚庡鐞�
                 sReturn = omodel.HInterID.ToString(); ;

--
Gitblit v1.9.1