From 41a1dfc3a2b29c79585f5cb6e7d79cfcdfd044a9 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 24 十月 2024 14:43:50 +0800
Subject: [PATCH] 1

---
 DAL/车间管理/ClsSc_ProcessExchangeBill.cs |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
index 0bc28d5..fec84bb 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
@@ -201,7 +201,7 @@
                       ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," +
                       "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" +
                       ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" +
-                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HRelationQty_OutBad,HSNCtrl" +
+                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HRelationQty_OutBad,HSNCtrl,HRoutingBillMainID,HRoutingBillEntryID" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" +
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
@@ -220,6 +220,7 @@
                       "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) +
                       "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" +
                       ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderEntryID) + "','" + DBUtility.ClsPub.isInt(oSub.HRelationQty_OutBad) + "'," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
+                      "," + oSub.HRoutingBillMainID + "," + oSub.HRoutingBillEntryID +
                       ") ");
                     oCn.RunProc(sql1);
                 }
@@ -346,7 +347,22 @@
                 {
                     omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 }
-               
+
+                //妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
+                DataSet ds_repeat;
+                while (true)
+                {
+                    ds_repeat = oCn.RunProcReturn("select * from Sc_ProcessExchangeBillMain where HInterID = " + omodel.HInterID, "Sc_ProcessExchangeBillMain");
+                    if (ds_repeat != null && ds_repeat.Tables[0].Rows.Count > 0)
+                    {
+                        omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
 
                 //淇濆瓨鍓嶆帶鍒�=========================================
@@ -423,7 +439,7 @@
                       ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," +
                       "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" +
                       ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" +
-                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HSNCtrl" +
+                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HSNCtrl,HRoutingBillMainID,HRoutingBillEntryID" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" +
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
@@ -441,7 +457,8 @@
                       ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() +
                       "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) +
                       "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" +
-                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull( omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "'," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
+                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull( omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "'," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + "," + oSub.HRoutingBillMainID
+                      + "," + oSub.HRoutingBillEntryID +
                       ") ");
                     sErr = sErr + sql1 + "2;";
                     oCn.RunProc(sql1);

--
Gitblit v1.9.1