From c1d6b7611901d7d3be81d6adda6f0b22bccda042 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期一, 19 七月 2021 15:38:37 +0800
Subject: [PATCH] 20210719v1

---
 WebAPI/DLL/ClsSc_MESStopWorkBill.cs |   62 ++++++-------------------------
 1 files changed, 12 insertions(+), 50 deletions(-)

diff --git a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
index 68ea31e..9e06f75 100644
--- a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
+++ b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
@@ -7,9 +7,9 @@
 {
     public  class ClsSc_MESStopWorkBill:DBUtility.ClsXt_BaseBill
     {
-        public Model.ClsSc_MESStopWorkBillMain omodel = new Model.ClsSc_MESStopWorkBillMain();
-        public List<Model.ClsSc_MESStopWorkBillSub> DetailColl = new List<Model.ClsSc_MESStopWorkBillSub>();
-        //public List<Model.ClsSc_MESStopWorkBillSub_Item> DetailColl1 = new List<Model.ClsSc_MESStopWorkBillSub_Item>();
+        public Models.ClsSc_MESStopWorkBillMain omodel = new Models.ClsSc_MESStopWorkBillMain();
+        public List<Models.ClsSc_MESStopWorkBillSub> DetailColl = new List<Models.ClsSc_MESStopWorkBillSub>();
+        //public List<Models.ClsSc_MESStopWorkBillSub_Item> DetailColl1 = new List<Models.ClsSc_MESStopWorkBillSub_Item>();
         public ClsSc_MESStopWorkBill()
         {
             base.MvarItemKeySub = "Sc_MESStopWorkBillSub";
@@ -95,7 +95,7 @@
                 DeleteBillSub(lngBillKey);
                 //鎻掑叆瀛愯〃
                 omodel.HInterID = lngBillKey;
-                foreach (Model.ClsSc_MESStopWorkBillSub oSub in DetailColl)
+                foreach (Models.ClsSc_MESStopWorkBillSub oSub in DetailColl)
                 {
                     //oCn.RunProc("Insert into Sc_MESStopWorkBillSub " +
                     //  " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
@@ -161,60 +161,22 @@
                 oCn.RunProc("Insert Into Sc_MESStopWorkBillMain " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                 ",HYear,HPeriod,HRemark" +
-                ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" +
+                ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" +
                 ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStopBeginWorkTime,HStopEndWorkTime,HSourceID" +
                 ",HGroupID,HDeptID,HEmpID,HStopReason,HReportType,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" +
+                ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" +
+                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
-                "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HProcPlanInterID.ToString() + "," + omodel.HProcPlanEntryID.ToString() + ",'" + omodel.HProcPlanBillNo + "'," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
+                "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOEntryID + "','" + omodel.HICMOBillNo + "'," + omodel.HProcPlanInterID.ToString() + "," + omodel.HProcPlanEntryID.ToString() + ",'" + omodel.HProcPlanBillNo + "'," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                 ",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate(),'" + omodel.HStopEndWorkTime.ToShortDateString() + "'," + omodel.HSourceID.ToString() +
                 "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HStopReason + "','" + omodel.HReportType + "','" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" +
+                "," + omodel.HSourceInterID_Main.ToString() + "," + omodel.HSourceEntryID_Main.ToString() + "," + omodel.HSourceBillNo_Main.ToString() + ",'" + omodel.HSourceBillType_Main + "'" +
+                "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + "," + omodel.HMainSourceBillNo.ToString() + ",'" + omodel.HMainSourceBillType + "'" +
                 ") ");
                 //鎻掑叆瀛愯〃
-                foreach (Model.ClsSc_MESStopWorkBillSub oSub in DetailColl)
-                {
-                    //oCn.RunProc("Insert into Sc_MESStopWorkBillSub " +
-                    //  " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
-                    //  ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
-                    //  ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                    //  ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim,HManagerID" +
-
-                    //  ") values("
-                    //  + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
-                    //  ",getdate()," + 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.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
-                    //  ") ");
-                }
-                //foreach (Model.ClsSc_MESStopWorkBillSub_Item oSub2 in DetailColl1)
-                //{
-                //    oCn.RunProc("Insert into Sc_MESStopWorkBillSub_Item " +
-                //      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
-                //      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
-                //      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
-                //      ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" +
-
-                //      ") values("
-                //      + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" +
-                //      ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() +
-                //      "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() +
-                //      "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() +
-                //      ") ");
-                //}
-                //
-                //foreach (Model.ClsSc_MESStopWorkBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_Sc_MESStopWorkBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
-                //
+               
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -304,7 +266,7 @@
                 DetailColl.Clear();//娓呯┖
                 for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                 {
-                    Model.ClsSc_MESStopWorkBillSub oSub = new Model.ClsSc_MESStopWorkBillSub();
+                    Models.ClsSc_MESStopWorkBillSub oSub = new Models.ClsSc_MESStopWorkBillSub();
                     // 鍥哄畾璧嬪��===============================================
                     //oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
                     //oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);

--
Gitblit v1.9.1