From a996569bc040489ce3d89a9254c53c77f105ac4a Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 14 九月 2023 13:57:18 +0800
Subject: [PATCH] 生产领料单及列表

---
 WebAPI/DLL/ClsKf_MateOutBill.cs |  279 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 265 insertions(+), 14 deletions(-)

diff --git a/WebAPI/DLL/ClsKf_MateOutBill.cs b/WebAPI/DLL/ClsKf_MateOutBill.cs
index 8deba8f..4a1f4a4 100644
--- a/WebAPI/DLL/ClsKf_MateOutBill.cs
+++ b/WebAPI/DLL/ClsKf_MateOutBill.cs
@@ -39,8 +39,8 @@
             {
                 //
                 oCn.BeginTran();
-                //鏇存柊涓昏〃
-                oCn.RunProc("UpDate Kf_ICStockBillMain set  " +
+
+                string mainSql = "UpDate Kf_ICStockBillMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
                 ",HDate='" + omodel.HDate + "'" +
                 ",HYear='" + omodel.HYear.ToString() + "'" +
@@ -60,16 +60,75 @@
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                 ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
-                " where HInterID=" + lngBillKey.ToString());
+                " where HInterID=" + lngBillKey.ToString();
+
+
+                //鍒ゆ柇浣跨敤瀹㈡埛锛屾牴鎹鎴疯繘琛屼釜鎬у寲璋冩暣
+                Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+                string sErrMsg = "";
+                oSystemParameter.ShowBill(ref sErrMsg);
+                if (oSystemParameter.omodel.WMS_CampanyName == "")          //涔斾竴瀹㈡埛
+                { 
+                    mainSql = "UpDate Kf_ICStockBillMain set " +
+                        " HBillNo='" + omodel.HBillNo + 
+                        "',HDate='" + omodel.HDate + 
+                        "',HYear='" + omodel.HYear.ToString() + 
+                        "',HPeriod='" + omodel.HPeriod.ToString() + 
+                        "',HRemark='" + omodel.HRemark + 
+                        "',HUpDater='" + DBUtility.ClsPub.CurUserName + 
+                        "',HUpDateDate=getdate()" +
+                        //========================================
+                        ",HSupID=" + omodel.HSupID.ToString() +
+                        ",HWHID=" + omodel.HWHID.ToString() +
+                        ",HSCWHID=" + omodel.HSCWHID.ToString() +
+                        ",HEmpID=" + omodel.HEmpID.ToString() +
+                        ",HManagerID=" + omodel.HManagerID.ToString() +
+                        ",HSecManagerID=" + omodel.HSecManagerID.ToString() +
+                        ",HKeeperID=" + omodel.HKeeperID.ToString() +
+                        ",HDeptID=" + omodel.HDeptID.ToString() +
+                        ",HExplanation='" + omodel.HExplanation + 
+                        "',HInnerBillNo='" + omodel.HInnerBillNo + 
+                        "',HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+
+                        ",HICMOInterID=" + omodel.HICMOInterID +
+                        ",HICMOEntryID=" + omodel.HICMOEntryID +
+                        ",HICMOBillNo='" + omodel.HICMOBillNo +
+                        "',HProcExchInterID=" + omodel.HProcExchInterID +
+                        ",HProcExchEntryID=" + omodel.HProcExchEntryID +
+                        ",HProcExchBillNo='" + omodel.HProcExchBillNo + 
+                        "',HMaterID=" + omodel.HMaterID +
+                        ",HMaterName='" + omodel.HMaterName +
+                        "',HVerNo='" + omodel.HVerNo +
+                        "',HModel='" + omodel.HModel +
+                        "',HModel2='" + omodel.HModel2 +
+                        "',HPieceQty='" + omodel.HPieceQty +
+                        "',HCusID=" + omodel.HCusID +
+                        ",HWeight=" + omodel.HWeight +
+                        ",HLong=" + omodel.HLong +
+                        ",HSingleWeight=" + omodel.HSingleWeigth +
+                        ",HMaterSumWeight=" + omodel.HMaterSumWeight +
+                        ",HMaterEmpID=" + omodel.HMaterEmpID +
+                        ",HMachineSpeed=" + omodel.HMachineSpeed +
+                        ",HWaterRush=" + omodel.HWaterRush +
+                        ",HWaterQty=" + omodel.HWaterQty +
+                        ",HWaterRate=" + omodel.HWaterRate +
+                        " where HInterID=" + lngBillKey.ToString();
+                }
+                //鏇存柊涓昏〃
+                oCn.RunProc(mainSql);
+
+
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
                 //鍒犻櫎瀛愯〃
                 DeleteBillSub(lngBillKey);
+
+
                 //鎻掑叆瀛愯〃
                 omodel.HInterID = lngBillKey;
                 foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl)
                 {
-                    oCn.RunProc("Insert into Kf_ICStockBillSub " +
+                    string subSql = "Insert into Kf_ICStockBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
@@ -83,7 +142,52 @@
                       "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
-                      ") ");
+                      ") ";
+
+                    if (oSystemParameter.omodel.WMS_CampanyName == "")          //涔斾竴瀹㈡埛
+                    {
+                        subSql = "Insert into Kf_ICStockBillSub" +
+                            "(HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+                            ",HRate,HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo)" +
+                            " values(" +
+                            omodel.HInterID.ToString() +
+                            "," + oSub.HEntryID.ToString() +
+                            ",'" + oSub.HCloseMan +
+                            "','" + oSub.HEntryCloseDate.ToShortDateString() +
+                            "'," + 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.HMaterID.ToString() +
+                            "," + oSub.HPropertyID.ToString() +
+                            "," + oSub.HSecUnitID.ToString() +
+                            "," + oSub.HSecUnitRate.ToString() +
+                            "," + oSub.HUnitID.ToString() +
+                            "," + oSub.HQtyMust.ToString() +
+                            "," + oSub.HRate.ToString() +
+                            "," + oSub.HQty.ToString() +
+                            "," + oSub.HPrice.ToString() +
+                            "," + oSub.HMoney.ToString() +
+                            "," + oSub.HWHID.ToString() +
+                            "," + oSub.HSCWHID.ToString() +
+                            "," + oSub.HSPID.ToString() +
+                            "," + oSub.HSCSPID.ToString() +
+                            "," + oSub.HSPGroupID.ToString() +
+                            ",'" + oSub.HBatchNo +
+                            "'," + oSub.HPOOrderInterID.ToString() +
+                            "," + oSub.HPOOrderEntryID.ToString() +
+                            ",'" + oSub.HPOOrderBillNo +
+                            "'," + oSub.HSeOrderInterID.ToString() +
+                            "," + oSub.HSeOrderEntryID.ToString() +
+                            ",'" + oSub.HSeOrderBillNo +
+                            "') ";
+                    }
+
+                    oCn.RunProc(subSql);
                 }
                 //
                 //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl)
@@ -115,7 +219,7 @@
             {
                 //寰楀埌mainid
                 omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
-                omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                //omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
                 {
@@ -127,22 +231,86 @@
                 }
                 //
                 oCn.BeginTran();
-                //涓昏〃
-                oCn.RunProc("Insert Into Kf_ICStockBillMain   " +
+
+                string mainSql = "Insert Into Kf_ICStockBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                 ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                 ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                 ") " +
-                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
                 ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
-                ") ");
+                ") ";
+
+
+                //鍒ゆ柇浣跨敤瀹㈡埛锛屾牴鎹鎴疯繘琛屼釜鎬у寲璋冩暣
+                Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+                string sErrMsg = "";
+                oSystemParameter.ShowBill(ref sErrMsg);
+                if (oSystemParameter.omodel.WMS_CampanyName == "")          //涔斾竴瀹㈡埛
+                {
+                    mainSql = "Insert Into Kf_ICStockBillMain" +
+                        "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HMaker,HMakeDate,HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID,HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+                        ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HMaterID,HMaterName,HVerNo,HModel,HModel2,HPieceQty,HCusID,HWeight,HLong,HSingleWeight,HMaterSumWeight,HMaterEmpID" +
+                        ",HMachineSpeed,HWaterRush,HWaterQty,HWaterRate) " +
+                        " values(" +
+                        "'" + this.BillType +
+                        "','" + this.HBillSubType +
+                        "'," + omodel.HInterID.ToString() +
+                        ",'" + omodel.HBillNo +
+                        "','" + omodel.HDate +
+                        "'," + omodel.HYear.ToString() +
+                        "," + omodel.HPeriod.ToString() +
+                        ",'" + omodel.HRemark +
+                        "'," + omodel.HProcExchInterID +
+                        ",'" + omodel.HProcExchBillNo +
+                        "','" + "3772" +
+                        "','" + DBUtility.ClsPub.CurUserName +
+                        "',getdate()" +
+                        "," + omodel.HSupID.ToString() +
+                        "," + omodel.HWHID.ToString() +
+                        "," + omodel.HSCWHID.ToString() +
+                        "," + omodel.HEmpID.ToString() +
+                        "," + omodel.HManagerID.ToString() +
+                        "," + omodel.HSecManagerID.ToString() +
+                        ", " + omodel.HKeeperID.ToString() +
+                        "," + omodel.HDeptID.ToString() +
+                        ",'" + omodel.HExplanation +
+                        "','" + omodel.HInnerBillNo +
+                        "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+                        "," + omodel.HICMOInterID +
+                        "," + omodel.HICMOEntryID +
+                        ",'" + omodel.HICMOBillNo +
+                        "'," + omodel.HProcExchInterID +
+                        "," + omodel.HProcExchEntryID +
+                        ",'" + omodel.HProcExchBillNo +
+                        "'," + omodel.HMaterID +
+                        ",'" + omodel.HMaterName +
+                        "','" + omodel.HVerNo +
+                        "','" + omodel.HModel +
+                        "','" + omodel.HModel2 +
+                        "','" + omodel.HPieceQty +
+                        "'," + omodel.HCusID +
+                        "," + omodel.HWeight +
+                        "," + omodel.HLong +
+                        "," + omodel.HSingleWeigth +
+                        "," + omodel.HMaterSumWeight +
+                        "," + omodel.HMaterEmpID +
+                        "," + omodel.HMachineSpeed +
+                        "," + omodel.HWaterRush +
+                        "," + omodel.HWaterQty +
+                        "," + omodel.HWaterRate +
+                        ")";
+                }
+
+                //涓昏〃
+                oCn.RunProc(mainSql);
                 //鎻掑叆瀛愯〃
                 foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl)
                 {
-                    oCn.RunProc("Insert into Kf_ICStockBillSub " +
+                    string subSql = "Insert into Kf_ICStockBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
@@ -156,7 +324,51 @@
                       "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
-                      ") ");
+                      ") ";
+
+                    if (oSystemParameter.omodel.WMS_CampanyName == "")              //涔斾竴瀹㈡埛
+                    {
+                        subSql = "Insert into Kf_ICStockBillSub" +
+                            "(HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+                            ",HRate,HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo)" +
+                            " values(" + 
+                            omodel.HInterID.ToString() + 
+                            "," + oSub.HEntryID.ToString() + 
+                            ",'" + oSub.HCloseMan + 
+                            "','" + oSub.HEntryCloseDate.ToShortDateString() + 
+                            "'," + 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.HMaterID.ToString() + 
+                            "," + oSub.HPropertyID.ToString() + 
+                            "," + oSub.HSecUnitID.ToString() + 
+                            "," + oSub.HSecUnitRate.ToString() + 
+                            "," + oSub.HUnitID.ToString() + 
+                            "," + oSub.HQtyMust.ToString() + 
+                            "," + oSub.HRate.ToString() +
+                            "," + oSub.HQty.ToString() + 
+                            "," + oSub.HPrice.ToString() + 
+                            "," + oSub.HMoney.ToString() + 
+                            "," + oSub.HWHID.ToString() + 
+                            "," + oSub.HSCWHID.ToString() + 
+                            "," + oSub.HSPID.ToString() + 
+                            "," + oSub.HSCSPID.ToString() + 
+                            "," + oSub.HSPGroupID.ToString() + 
+                            ",'" + oSub.HBatchNo + 
+                            "'," + oSub.HPOOrderInterID.ToString() + 
+                            "," + oSub.HPOOrderEntryID.ToString() + 
+                            ",'" + oSub.HPOOrderBillNo + 
+                            "'," + oSub.HSeOrderInterID.ToString() + 
+                            "," + oSub.HSeOrderEntryID.ToString() + 
+                            ",'" + oSub.HSeOrderBillNo + 
+                            "') ";
+                    }
+                        oCn.RunProc(subSql);
                 }
                 //
                 //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl)
@@ -233,8 +445,41 @@
                 omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
                 omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
                 omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]);
-                //
-                
+
+
+                //鍒ゆ柇浣跨敤瀹㈡埛锛屾牴鎹鎴疯繘琛屼釜鎬у寲璋冩暣
+                Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+                string sErrMsg = "";
+                oSystemParameter.ShowBill(ref sErrMsg);
+                if (oSystemParameter.omodel.WMS_CampanyName == "")              //涔斾竴瀹㈡埛
+                {
+                    omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]);
+                    omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]);
+                    omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]);
+                    omodel.HProcExchInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchInterID"]);
+                    omodel.HProcExchEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchEntryID"]);
+                    omodel.HProcExchBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcExchBillNo"]);
+                    omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]);
+                    omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]);
+                    omodel.HVerNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HVerNo"]);
+                    omodel.HModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HModel"]);
+                    omodel.HModel2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HModel2"]);
+                    omodel.HPieceQty = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPieceQty"]);
+                    omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
+                    omodel.HWeight = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWeight"]);
+                    omodel.HLong = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HLong"]);
+                    omodel.HSingleWeigth = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSingleWeight"]);
+                    omodel.HMaterSumWeight = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HMaterSumWeight"]);
+                    omodel.HMaterEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterEmpID"]);
+
+                    omodel.HMachineSpeed = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HMachineSpeed"]);
+                    omodel.HWaterRush = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWaterRush"]);
+                    omodel.HWaterQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWaterQty"]);
+                    omodel.HWaterRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HWaterRate"]);
+                }
+
+                    //
+
                 //寰幆
                 DataSet DsSub ;
                 DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub");
@@ -277,6 +522,12 @@
                     oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
                     oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
                     oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]);
+
+                    if (oSystemParameter.omodel.WMS_CampanyName == "")              //涔斾竴瀹㈡埛
+                    {
+                        oSub.HRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[0]["HRate"]);
+                    }
+
                     DetailColl.Add(oSub);
                 }
                 sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";

--
Gitblit v1.9.1