From cf46a6e4beb7e83af331a28065c96077fa2f1e15 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 11 十二月 2024 09:47:08 +0800
Subject: [PATCH] 完善出厂检验单,人员履历查询增加一个物料参数

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

diff --git a/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
index 0007191..13a6745 100644
--- a/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
@@ -42,7 +42,7 @@
                 //
                 oCn.BeginTran();
                 //鏇存柊涓昏〃
-                oCn.RunProc("UpDate Sb_EquipMaintainPlanBillMain set  " +
+                oCn.RunProc("UpDate Sb_EquipMaintainRuleBillMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
                 ",HDate='" + omodel.HDate + "'" +
                 ",HYear='" + omodel.HYear.ToString() + "'" +
@@ -55,6 +55,9 @@
                 ",HCheckCycle=" + omodel.HCheckCycle.ToString() +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+                ",HMaintainLevID=" + omodel.HMaintainLevID +
+                ",HSafeDays=" + omodel.HSafeDays +
+                ",HErrWarDays=" + omodel.HErrWarDays +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -83,7 +86,7 @@
                 //鎻掑叆閰嶄欢瀛愯〃
                 foreach (Models.ClsSb_EquipMaintainRuleBillSub oSub in DetailColl_Mater)
                 {
-                    oCn.RunProc("Insert into Sb_EquipMaintainRuleBillSub " +
+                    string sql = "Insert into Sb_EquipMaintainRuleBillSub " +
                       " (HInterID,HEntryID," +
                       "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
                       "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
@@ -92,8 +95,9 @@
                       + 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.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
-                      ") ");
+                      "," + oSub.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + ",0" +
+                      ") ";
+                    oCn.RunProc(sql);
                 }
                 sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
@@ -119,12 +123,12 @@
                 oCn.RunProc("Insert Into Sb_EquipMaintainRuleBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                 ",HYear,HPeriod,HRemark" +
-                ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo" +
+                ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID,HSafeDays,HErrWarDays" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + 
-                "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +
-                "') ");
+                "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HSafeDays +", " + omodel.HErrWarDays +
+                ") ");
 
                 //鎻掑叆淇濆吇椤瑰瓙琛�
                 foreach (Models.ClsSb_EquipMaintainRuleBillSub_Item Item in DetailColl_Pay)

--
Gitblit v1.9.1