From 7f3034113076f4a599ac2c6e1d14b7ddd0f57788 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 22 十二月 2022 16:38:27 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs |   49 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 44 insertions(+), 5 deletions(-)

diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
index f81c082..266ffc0 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
@@ -9,6 +9,7 @@
     {
         public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain();
         public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>();
+        public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>();
 
         public ClsSc_MouldMaintainPlanBill()
         {
@@ -56,7 +57,7 @@
                 //",HGroupID=" + omodel.HGroupID.ToString() +
                 //",HWHID=" + omodel.HWHID.ToString() +
                 //",HSCWHID=" + omodel.HSCWHID.ToString() +
-
+                 ",HEquipDotCheckRuleInterID='" + omodel.HEquipDotCheckRuleInterID + "'" +
                 ",HCycleUnit='" + omodel.HCycleUnit + "'" +
                 ",HCheckCycle=" + omodel.HCheckCycle.ToString() +
                 ",HBeginDate='" + omodel.HBeginDate + "'" +
@@ -69,8 +70,10 @@
                 DeleteRelation(ref sReturn, lngBillKey);
                 //鍒犻櫎瀛愯〃
                 DeleteBillSub(lngBillKey);
-                //鎻掑叆瀛愯〃
+                oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey);
+                
                 omodel.HInterID = lngBillKey;
+                //鎻掑叆瀛愯〃閰嶄欢淇℃伅
                 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " +
@@ -84,6 +87,24 @@
                      ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      ") ");
+                }
+
+                //鎻掑叆淇濆吇椤瑰瓙琛�
+                foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol)
+                {
+                    oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" +
+                          " (HInterID,HEntryID,HMaintainItemID" +
+                          ",HMaintainPart,HClaim" +
+                          ",HManagerID" +
+                          ",HCloseMan,HCloseType,HRemark" +
+                          ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" +
+                          ") values("
+                          + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.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.HMaintainItem.ToString() +
+                          ") ");
                 }
                 //
                 //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
@@ -122,14 +143,14 @@
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + 
                 ",HYear,HPeriod,HRemark" +
                 ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
-                ",HInnerBillNo,HExplanation" +
+                ",HInnerBillNo,HExplanation,HEquipDotCheckRuleInterID" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                 ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
-                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" +
+                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "','" + omodel.HEquipDotCheckRuleInterID + "'" +
                 ") ");
-                //鎻掑叆瀛愯〃
+                //鎻掑叆瀛愯〃閰嶄欢淇℃伅
                 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " +
@@ -144,6 +165,24 @@
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       ") ");
                 }
+
+                //鎻掑叆淇濆吇椤瑰瓙琛�
+                foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol)
+                {
+                    oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" +
+                          " (HInterID,HEntryID,HMaintainItemID" +
+                          ",HMaintainPart,HClaim" +
+                          ",HManagerID" +
+                          ",HCloseMan,HCloseType,HRemark" +
+                          ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" +
+                          ") values("
+                          + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.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.HMaintainItem.ToString() +
+                          ") ");
+                }
                 //
                 //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
                 //{

--
Gitblit v1.9.1