From 848de7e5b159ae546f63d6e1f7d0b01e63aaf4b9 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期四, 25 十一月 2021 09:09:24 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/生产管理/设备管理/ClsSb_EquipMaintainPlanBill.cs |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
index f800b42..fa9375f 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
@@ -127,22 +127,25 @@
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
                 ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"'" +
                 ") ");
-                //鎻掑叆閰嶄欢瀛愯〃
-                foreach (Model.ClsSb_EquipMaintainPlanBillSub oSub in DetailColl)
+                if (DetailColl != null)
                 {
-                    oCn.RunProc("Insert into Sb_EquipMaintainPlanBillSub " +
-                      " (HInterID,HEntryID," +
-                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
-                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
-                      "HQty,HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust," +
-                      "HManagerID" +
-                      ") 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.HQty.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HQtyMust.ToString() +
-                        "," + oSub.HManagerID.ToString() + 
-                      ") ");
+                    //鎻掑叆閰嶄欢瀛愯〃
+                    foreach (Model.ClsSb_EquipMaintainPlanBillSub oSub in DetailColl)
+                    {
+                        oCn.RunProc("Insert into Sb_EquipMaintainPlanBillSub " +
+                          " (HInterID,HEntryID," +
+                          "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                          "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                          "HQty,HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust," +
+                          "HManagerID" +
+                          ") 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.HQty.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HQtyMust.ToString() +
+                            "," + oSub.HManagerID.ToString() +
+                          ") ");
+                    }
                 }
                 //鎻掑叆淇濆吇椤瑰瓙琛�
                 foreach (Model.ClsSc_EquipMaintainPlanBillSub_Item Item in DetailCol)

--
Gitblit v1.9.1