yangle
2025-01-03 95e6a23bc5a604184657a0baaee180ea55c41f5f
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs
@@ -198,7 +198,7 @@
             
                ds = oCN.RunProcReturn(@"select   b.HProcNo,b.HProcID,a.HMaterID,a.HQty,a.HInterID,HEntryID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
                ds = oCN.RunProcReturn(@"select   b.HProcNo,b.HProcID,a.HMaterID,a.HQty,a.HInterID,HEntryID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,b.HCenterID  from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
inner join Sc_ProcessExchangeBillSub b WITH(NOLOCK) on a.HInterID=b.HInterID
left join Gy_Process p WITH(NOLOCK) on  b.HProcID=p.HItemID 
where a.HBillNo='" + HProcExchBillNo + "'  and p.HNumber='" + HProcNumber + "'", "Sc_ProcessExchangeBillMain");
@@ -250,7 +250,7 @@
                double HPrice = 0;
                double HMoney = 0;
                double HBadCount = 0;//不良数量
                long HCenterID = 0;//工作中心ID
                long HCenterID = long.Parse(ds.Tables[0].Rows[0]["HCenterID"].ToString());//工作中心ID
                string HProcNo = ds.Tables[0].Rows[0]["HProcNo"].ToString();//流水号
                string HOrderProcNO = "";//订单跟踪号
                string HSourceNameList = "";//设备清单
@@ -929,11 +929,12 @@
                string HProcExchEntryID = "0";
                string HProcExchBillNo = "";
                long HMaterID = 0;
                long HProcID = 0;
                long HUnitID = 0;
                long HICMOInterID = 0;
                long HICMOEntryID = 0;
                string HICMOBillNo = "";
                ds = oCN.RunProcReturn(@"select  HMaterID,HUnitID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,HBillNo,a.HInterID,b.HEntryID,a.HBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
                ds = oCN.RunProcReturn(@"select b.HProcID, HMaterID,HUnitID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,HBillNo,a.HInterID,b.HEntryID,a.HBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
inner join Sc_ProcessExchangeBillSub b  WITH(NOLOCK) on a.HInterID=b.HInterID
left join Gy_Process p WITH(NOLOCK) on b.HProcID=p.HItemID
where HBillNo=(select HSourceBillNo from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + dic["HBarCode"].ToString() + "') and p.HNumber='" + dic["HProcNumber"].ToString() + "'  ", "Sc_ProcessExchangeBillMain");
@@ -947,6 +948,7 @@
                    HProcExchInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                    HProcExchEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString();
                    HProcExchBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    HProcID = int.Parse(ds.Tables[0].Rows[0]["HProcID"].ToString());
                }
@@ -985,11 +987,11 @@
(HInterID,HENTRYID,HBillNo_bak,HEmpID,HBarCode,HBadReasonID,HAddr,HMaker,HMakeDate
,HMaterID,HUnitID,HRemark,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HReportType
,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney
,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo)
,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HProcID)
values({HInterID},1,'{HBillNo}',{HEmpID},'{HBarCode}',0,'','{HMaker}','{HMakeDate}'
,{HMaterID},{ HUnitID},'',{HSourceID},{ HICMOInterID},{ HICMOEntryID},'{HICMOBillNo}',0
,0,0,'','',0,0
,0,'{HResult}',{ HProcExchInterID},{ HProcExchEntryID},'{ HProcExchBillNo}')");
,0,'{HResult}',{ HProcExchInterID},{ HProcExchEntryID},'{ HProcExchBillNo}'," + HProcID + ")");
                return true;
            }