From daa95fd4d96d0bc7ceb0308005c78f4bfd0fd005 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 06 二月 2026 14:37:33 +0800
Subject: [PATCH] 1

---
 WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
index 48342c9..2868055 100644
--- a/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
@@ -78,13 +78,13 @@
                           ",HManagerID" +
                           ",HCloseMan,HCloseType,HRemark" +
                           ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                          ") values("
+                          ",HStdMaintainResult) values("
                           + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() + ",'" + Item.HMaintainItem.ToString() + "'" +
                           ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
                           "," + Item.HManagerID.ToString() +
                           ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
                           "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +
-                          ") ");
+                          $", '{Item.HStdMaintainResult.ToString()}') ");
                 }
                 //鎻掑叆閰嶄欢瀛愯〃
                 foreach (Models.ClsSb_EquipMaintainRuleBillSub oSub in DetailColl_Mater)
@@ -137,6 +137,13 @@
                 omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
+                DataSet _ds = oCn.RunProcReturn("select HInterID from Sb_EquipMaintainRuleBillMain where HBillNo = N'" + omodel.HBillNo + "'", "Sb_EquipMaintainRuleBillMain");
+                if(_ds.Tables[0].Rows.Count > 0) 
+                {
+                    sReturn = "鍗曟嵁鍙烽噸澶嶏紒";
+                    oCn.RollBack();
+                    return false;
+                } 
                 //涓昏〃
                 oCn.RunProc("Insert Into Sb_EquipMaintainRuleBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
@@ -157,13 +164,13 @@
                           ",HManagerID" +
                           ",HCloseMan,HCloseType,HRemark" +
                           ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                          ") values("
+                          $", HStdMaintainResult) values("
                           + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() + ",'" + Item.HMaintainItem.ToString() + "'" +
                           ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
                           "," + Item.HManagerID.ToString() +
                           ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
                           "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +
-                          ") ");
+                          $", '{Item.HStdMaintainResult.ToString()}') ");
                 }
                 //鎻掑叆閰嶄欢瀛愯〃
                 foreach (Models.ClsSb_EquipMaintainRuleBillSub oSub in DetailColl_Mater)

--
Gitblit v1.9.1