From 3fa3fae54836dff578a6f5cae34fe0925fe741b0 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 04 二月 2026 10:22:28 +0800
Subject: [PATCH] 1

---
 WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs |   45 +++++++++++++++++++++++++++++++--------------
 1 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
index 658339a..6fa4673 100644
--- a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
@@ -75,6 +75,10 @@
                 ",HPlanTimes=" + omodel.HPlanTimes.ToString() +
                 ",HDeptID=" + omodel.HDeptID.ToString() +
                 ",HExplanation='" + omodel.HExplanation + "'" +
+                ",HRepairCategory='" + omodel.HRepairCategory + "'" +
+                ",HUrgenLevel='" + omodel.HUrgenLevel + "'" +
+                ",HRepairer='" + omodel.HRepairer + "'" +
+                ",HIsCapacityImpact='" + omodel.HIsCapacityImpact + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                 ",HRepairContent='" + omodel.HRepairContent + "'" +
                 ",HMainSourceBillType='"+ omodel.HMainSourceBillType+"'"+
@@ -194,16 +198,19 @@
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                 ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" +
                 ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate,HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
+                ",HRepairCategory,HUrgenLevel,HRepairer,HIsCapacityImpact" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
                 ", " + omodel.HEquipID.ToString() + "," + omodel.HRepairID.ToString() + "," + omodel.HPlanTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HTimes.ToString() +
                 ", " + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HRepairBeginDate + "','" + omodel.HRepairEndDate + "','" + omodel.HRepairContent + "','" + omodel.HCycleUnit + "','" +
                  omodel.HMainSourceBillType+"',"+ omodel.HMainSourceInterID.ToString()+","+ omodel.HMainSourceEntryID.ToString() +
-                ") ");
+                ",'"+ omodel.HRepairCategory + "','" + omodel.HUrgenLevel + "','" + omodel.HRepairer + "','" + omodel.HIsCapacityImpact + "') ");
                 //鎻掑叆瀛愯〃
+                
                 foreach (Models.ClsSb_EquipRepairWorkBillSub oSub in DetailColl)
                 {
+                    
                     string sql1 = string.Format(@"Insert into Sb_EquipRepairWorkBillSub " +
                        " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                        ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
@@ -211,22 +218,27 @@
                        ") values("
                        + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                        "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
-                      "," + oSub.HRepairID.ToString() + ",'" + oSub.HManagerID.ToString() + "','" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() +
+                      "," + oSub.HRepairID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() +
                        ")");
-                    oCn.RunProc("Insert into Sb_EquipRepairWorkBillSub " +
-                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
-                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                       ",HRepairID,HManagerID,HRepairExplanation,HEmpID" +
-                       ") values("
-                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
-                      "," + oSub.HRepairID.ToString() + ",'"+ oSub.HManagerID.ToString() + "','" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() +
-                       ") ");
+                    //oCn.RunProc("Insert into Sb_EquipRepairWorkBillSub " +
+                    //   " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                    //   ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                    //   ",HRepairID,HManagerID,HRepairExplanation,HEmpID" +
+                    //   ") values("
+                    //   + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                    //   "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                    //  "," + oSub.HRepairID.ToString() + ",'" + oSub.HManagerID.ToString() + "','" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() +
+                    //   ") ");
+                    oCn.RunProc(sql1);
+
                 }
+
+
 
                 foreach (Model.ClsSb_EquipRepairWorkBillSub_Mater oSub in DetailColl_Mater)
                 {
-                    oCn.RunProc("Insert into Sb_EquipRepairWorkBillSub_Mater " +
+                
+                    string sql = String.Format(@"Insert into Sb_EquipRepairWorkBillSub_Mater " +
                       " (HInterID,HEntryID," +
                       "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
                       "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
@@ -236,8 +248,13 @@
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
-                      "," + oSub.HManagerID.ToString() + ") ");
+                      "," + oSub.HManagerID.ToString() + ")");
+                    oCn.RunProc(sql);
+                 
+                
+                
                 }
+
                 //
                 //foreach (Model.ClsSb_EquipRepairWorkBillSub oSub in DetailColl)
                 //{
@@ -253,7 +270,7 @@
                 //
 
                 //=========================淇濆瓨鍚庢帶鍒�  
-                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl");
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + $"',1", "h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl");
                 if (ds2 == null)
                 {
                     sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";

--
Gitblit v1.9.1