From 85c65fb1370c15be6094b378dd42f96ea012996a Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 09 三月 2023 15:05:24 +0800
Subject: [PATCH] 1

---
 WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll                 |    0 
 WebAPI/Properties/Settings.settings                            |    3 
 WebAPI/Web References/WebS/WebService1.wsdl                    |    4 
 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user    |  255 +-
 Model/Model.csproj                                             |    2 
 WebAPI/Web References/WebS2/Reference.map                      |    7 
 WebAPI/Controllers/ProductInController.cs                      |  217 ++
 Model/车间管理/ClsSc_ProcExchRecordBackBillMain.cs                 |   32 
 DAL/基础资料/公用基础资料/ClsGy_MaterType_Ctl.cs                         |   10 
 WebAPI/Controllers/MateOutController.cs                        |   23 
 WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs |  432 ++++++
 WebAPI/Controllers/OtherOutBillController.cs                   |  123 +
 WebAPI/Web.config                                              |   10 
 Model/基础资料/基础资料/ClsGy_MaterType_Model.cs                       |   11 
 WebAPI/Web References/WebS2/Reference.cs                       |  412 +++++
 WebAPI/DLL/Newtonsoft.Json.rar                                 |    0 
 WebAPI/Properties/Settings.Designer.cs                         |   10 
 LMES/bin/x86/Debug.zip                                         |    0 
 WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs   |    2 
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs         |   66 
 WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs     |  360 +++++
 WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs    |    1 
 WebAPI/Web References/WebS/Reference.map                       |    4 
 WebAPI/Controllers/POStockInBillController.cs                  |  879 +++++++++---
 WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs         |    3 
 WebAPI/Web References/WebS/WebService1.disco                   |    6 
 Model/车间管理/ClsSc_ProcExchRecordBackBillSub.cs                  |   37 
 WebAPI/ListModels.cs                                           |   18 
 WebAPI/Controllers/SellOutController.cs                        |   29 
 DAL/DAL.csproj                                                 |    1 
 WebAPI/Web References/WebS2/WebService1.wsdl                   |  179 ++
 DAL/车间管理/ClsSc_ProcExchRecordBackBill.cs                       |  136 +
 WebAPI/Controllers/Sc_ProcessMangementController.cs            |  535 ++++---
 WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs       |  264 +++
 WebAPI/WebAPI.csproj                                           |   35 
 WebAPI/Web References/WebS2/WebService1.disco                  |    6 
 36 files changed, 3,360 insertions(+), 752 deletions(-)

diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 30c945a..366af25 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -622,6 +622,7 @@
     <Compile Include="璐ㄦ绠$悊\ClsQC_POStockInCheckBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_ProcessCheckBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_ProdReportCheckBill.cs" />
+    <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchRecordBackBill.cs" />
     <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchWorkBackBill.cs" />
     <Compile Include="杞﹂棿绠$悊\ClsSc_CutMaterProcExchBill.cs" />
     <Compile Include="杞﹂棿绠$悊\ClsSc_MaterBackBill.cs" />
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Ctl.cs"
index 18c2abe..bad0eca 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Ctl.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Ctl.cs"
@@ -20,9 +20,9 @@
                 oCn.BeginTran();
                 oCn.RunProc("Insert into " + MvarItemKey + " " +
                     " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
-                    ",HLevel,HEndFlag,HStopflag,HRemark) " +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeEmp,HMakeTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID,HUseFlag) " +
                     " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
-                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','"+ oModel.HMakeEmp.ToString() + "',getdate(),'" + (oModel.HStopflag==true? oModel.HMakeEmp.ToString():"") + "','"+ (oModel.HStopflag == true ? DateTime.Now.ToString() : "") + "',"+ oModel.HUSEORGID + "," + oModel.HCREATEORGID + ",'"+ oModel.HUseFlag + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                 oCn.Commit();
@@ -49,6 +49,12 @@
                     ",HLevel=" + oModel.HLevel.ToString() +
                     ",HParentID=" + oModel.HParentID.ToString() +
                     ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HModifyEmp='" + oModel.HMakeEmp.ToString() + "'" +
+                    ",HModifyTime= getdate()" +
+                    ",HStopEmp='" + (oModel.HStopflag == true ? oModel.HMakeEmp : "") + "'" +
+                    ",HStopTime='" + (oModel.HStopflag == true ? DateTime.Now.ToString() : "") + "'" +
+                    ",HUSEORGID=" + oModel.HUSEORGID +
+                    ",HUseFlag='" + oModel.HUseFlag + "'" +
                     ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
                     ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼瀛愰」鐩唬鐮�
diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBill.cs"
new file mode 100644
index 0000000..7c15c08
--- /dev/null
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBill.cs"
@@ -0,0 +1,136 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsSc_ProcExchRecordBackBill : DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsSc_ProcExchRecordBackBillMain omodel = new Model.ClsSc_ProcExchRecordBackBillMain();
+        public List<Model.ClsSc_ProcExchRecordBackBillSub> DetailColl = new List<Model.ClsSc_ProcExchRecordBackBillSub>();
+
+        public ClsSc_ProcExchRecordBackBill()
+        {
+            base.MvarItemKeySub = "Sc_ProcExchRecordBackBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey= "Sc_ProcExchRecordBackBillMain";
+            base.MvarReportTitle= "宸ュ簭杩斿伐璁板綍鍗�";
+            base.BillType = "3797";
+            base.HBillSubType = "3797";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsSc_ProcExchRecordBackBill()
+        {
+            DetailColl = null;
+        }
+       
+        #endregion   鑷畾涔夋柟娉�
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate Sc_ProcExchRecordBackBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                //",HDate='" + omodel.HDate + "'" +
+                //",HYear='" + omodel.HYear.ToString() + "'" +
+                //",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + omodel.HMaker + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HInnerBillNo='" + omodel.HInnerBillNo.ToString() +"'"+
+                ",HEmpID=" + omodel.HEmpID.ToString() +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsSc_ProcExchRecordBackBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sc_ProcExchRecordBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" +
+                        ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+                        ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" +
+                        ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" +
+                        ", HQty)values(" +
+                        $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', GETDATE(), {(oSub.HCloseType == true ? 1 : 0)}" +
+                        $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID.ToString()},{oSub.HSourceEntryID.ToString()}, '{oSub.HSourceBillNo.ToString()}', '{oSub.HSourceBillType.ToString()}'" +
+                        $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" +
+                        $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag == true ? 1 : 0)}" +
+                        $", {oSub.HQty.ToString()}) ");
+                }
+
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //寰楀埌mainid
+                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("insert Into Sc_ProcExchRecordBackBillMain(HBillType, HBillSubType, HInterID, HBillNo, HDate,HBillStatus" +
+                    ", HMaker, HMakeDate, HYear, HPeriod, HRemark" +
+                    ", HICMOInterID, HICMOBillNo, HICMOEntryID, HProcExchInterID, HProcExchEntryID" +
+                    ", HProcExchBillNo, HProcExchBegNO, HProcExchEndNO, HProcBegID, HProcEndID" +
+                    ", HMaterID, HUnitID, HEmpID, HPlanQty, HQty" +
+                    ", HExplanation, HInnerBillNo, HWorkShopID, HOrderProcNo, HPRDORGID) values(" +
+                    $"'{omodel.HBillType}','{omodel.HBillSubType}',{omodel.HInterID},'{omodel.HBillNo}','{omodel.HDate}',1" +
+                    $",'{omodel.HMaker}','{omodel.HMakeDate}',{omodel.HYear},{omodel.HPeriod},'{omodel.HRemark}'" +
+                    $",{omodel.HICMOInterID},'{omodel.HICMOBillNo}',{omodel.HICMOEntryID},{omodel.HProcExchInterID},{omodel.HProcExchEntryID}" +
+                    $",'{omodel.HProcExchBillNo}',{omodel.HProcExchBegNO},{omodel.HProcExchEndNO},{omodel.HProcBegID},{omodel.HProcEndID}" +
+                    $",{omodel.HMaterID},{omodel.HUnitID},{omodel.HEmpID},{omodel.HPlanQty},{omodel.HQty}" +
+                    $",'{omodel.HExplanation}','{omodel.HInnerBillNo}',{omodel.HWorkShopID},'{omodel.HOrderProcNo}',{omodel.HPRDORGID})");
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsSc_ProcExchRecordBackBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sc_ProcExchRecordBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" +
+                        ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
+                        ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" +
+                        ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" +
+                        ", HQty)values(" +
+                        $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', GETDATE(), {(oSub.HCloseType== true ? 1:0)}" +
+                        $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID.ToString()},{oSub.HSourceEntryID.ToString()}, '{oSub.HSourceBillNo.ToString()}', '{oSub.HSourceBillType.ToString()}'" +
+                        $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" +
+                        $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag== true?1:0)}" +
+                        $", {oSub.HQty.ToString()}) ");
+                }
+               
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+             
+    }
+
+}
diff --git a/LMES/bin/x86/Debug.zip b/LMES/bin/x86/Debug.zip
new file mode 100644
index 0000000..9375961
--- /dev/null
+++ b/LMES/bin/x86/Debug.zip
Binary files differ
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 2c07905..def7f4d 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -580,6 +580,8 @@
     <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldStockBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillSub.cs" />
+    <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchRecordBackBillMain.cs" />
+    <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchRecordBackBillSub.cs" />
     <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchWorkBackBillSub.cs" />
     <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchWorkBackBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBillMain.cs" />
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Model.cs"
index 86a992f..9e2bb93 100644
--- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Model.cs"
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MaterType_Model.cs"
@@ -7,6 +7,15 @@
 {
     public class ClsGy_MaterType_Model : DBUtility.ClsGy_Base_Model
     {
-
+        public long HUSEORGID { get; set; }
+        public long HCREATEORGID { get; set; }
+        public string HMakeEmp { get; set; }
+        public DateTime HMakeTime { get; set; }
+        public string HCheckEmp { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public string HModifyEmp { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public string HStopEmp { get; set; }
+        public DateTime HStopTime { get; set; }
     }
 }
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillMain.cs"
new file mode 100644
index 0000000..238087a
--- /dev/null
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillMain.cs"
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSc_ProcExchRecordBackBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HPrintQty { get; set; }  //打印次数
+        public Int64 HICMOInterID { get; set; }
+        public Int64 HICMOEntryID { get; set; }
+        public Int64 HProcExchInterID { get; set; }
+        public Int64 HProcExchEntryID { get; set; }
+        public Int64 HProcExchBegNO { get; set; }
+        public Int64 HProcExchEndNO { get; set; }
+        public Int64 HProcBegID { get; set; }
+        public Int64 HProcEndID { get; set; }
+        public Int64 HMaterID { get; set; }
+        public Int64 HUnitID { get; set; }
+        public Int64 HEmpID { get; set; }
+        public Int64 HWorkShopID { get; set; }
+        public Int64 HPRDORGID { get; set; }
+        public string HICMOBillNo { get; set; } 
+        public string HProcExchBillNo { get; set; } 
+        public string HExplanation { get; set; } 
+        public string HBatchNo { get; set; } 
+        public string HOrderProcNo { get; set; } 
+        public string HInnerBillNo { get; set; } 
+        public double HPlanQty { get; set; } 
+        public double HQty { get; set; } 
+    }
+}
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillSub.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillSub.cs"
new file mode 100644
index 0000000..9d24f1c
--- /dev/null
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcExchRecordBackBillSub.cs"
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSc_ProcExchRecordBackBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+        public string HBillNo_bak;        //单据号(备份,以免内码丢失,找不到对应主表)
+        public Int64 HItemSubID; //自增列(GUID)
+        public Int64 HProcNo { get; set; }
+        public Int64 HProcID { get; set; }
+        public Int64 HCenterID { get; set; }
+        public Int64 HSupID { get; set; }
+        public Int64 HDeptID { get; set; }
+        public Int64 HICMOInterID { get; set; }
+        public Int64 HSeOrderInterID { get; set; }
+        public Int64 HSeOrderEntryID { get; set; }
+        public Int64 HICMOEntryID { get; set; }
+        public Int64 HWWOrderInterID { get; set; }
+        public Int64 HWWOrderEntryID { get; set; }
+        public bool HSupFlag { get; set; }
+        public string HWorkRemark { get; set; }
+        public string HMouldNo { get; set; }
+        public string HWWOrderBillNo { get; set; }
+        public string HProcWorkNum { get; set; }
+        public string HICMOBillNo { get; set; }
+        public string HSeOrderBillNo { get; set; }
+        public string HTimeUnit { get; set; }
+        public string HProcType { get; set; }
+        public double HQty { get; set; }
+        public double HPlanWorkTimes { get; set; }
+        public double HStdWorkTime { get; set; }
+        public DateTime HPlanBeginDate { get; set; }
+        public DateTime HPlanEndDate { get; set; }
+    }
+}
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index e0d73c1..9412611 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -1220,6 +1220,72 @@
         }
         #endregion
 
+        #region 鏍规嵁鍗曟嵁鍙� 鍚屾鎶ラ敊鍒犻櫎鍑虹珯鍗�
+        [Route("Cj_StationOutBill/DelStationOutBill")]
+        [HttpGet]
+        public object DelStationOutBill(string HInterID)
+        {
+            try
+            {
+                DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
+
+                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+                DataTable DTable;
+                int num = 0;
+                //鍒ゆ柇鍏ュ簱鏄惁鍚屾
+                 DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where HInterID='" + HInterID + "' and  HRelationQty=0", "Sc_StationOutBillMain").Tables[0];
+                if (DTable.Rows.Count != 0)
+                {
+                    num++;
+                }
+                //鍒ゆ柇鏈鎶ュ簾鏄惁鍚屾
+                DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where  HProcExchInterID='" + DTable.Rows[0]["HProcExchInterID"].ToString() + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
+                if (DTable.Rows.Count != 0)
+                {
+                    num++;
+                }
+
+                if (num == 2)
+                {
+                    if (!oBill.DeleteBill(long.Parse(HInterID), 0, 0, ref DBUtility.ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鏃犻』鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+               
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "寮傚父锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 缂栬緫鍓嶅垽鏂�
         [Route("Cj_StationOutBill/set_ShowBillJudge")]
         [HttpGet]
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs
new file mode 100644
index 0000000..75fefaa
--- /dev/null
+++ b/WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs
@@ -0,0 +1,432 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.CJGL
+{
+    public class Sc_ProcExchRecordBackBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 宸ュ簭杩斿伐璁板綍鍗曞垪琛�
+        [Route("Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillList")]
+        [HttpGet]
+        public object Sc_ProcExchRecordBackBillList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sql1 = "select * from h_v_Sc_ProcExchRecordBackBillList where 1 = 1  ";
+                string sql = sql1 + sWhere + " order by hmainid desc";
+                ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcExchRecordBackBillList");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鏌ヨ宸ュ簭娴佽浆鍗℃暟鎹� 鏌ヨ 褰撳墠 鍜� 涓嬩竴鏉℃暟鎹�
+        [Route("Sc_ProcExchRecordBackBill/GetProcessExchangeBillSub")]
+        [HttpGet]
+        public object GetProcessExchangeBillSub_cf(string sWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
+                ds = oCN.RunProcReturn(sql + sWhere+ " order by 娴佹按鍙� ", "h_v_Sc_ProcessExchangeBillQuerySub");
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+            }
+            return objJsonResult;
+        }
+        #endregion
+
+        #region 宸ュ簭杩斿伐璁板綍鍗�  鏂板/缂栬緫
+        /// <summary>
+        /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillAddBill")]
+        [HttpPost]
+        public object Sc_ProcExchRecordBackBillAddBill([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();//涓昏〃
+            string msg3 = sArray[1].ToString();//瀛愯〃
+            int msg5 = int.Parse(sArray[2].ToString());//绫诲瀷
+            string msg6 = sArray[3].ToString();//鐢ㄦ埛
+
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Edit", 1, false, msg6))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //涓昏〃
+                DAL.ClsSc_ProcExchRecordBackBill oBill = new DAL.ClsSc_ProcExchRecordBackBill();
+                List<Model.ClsSc_ProcExchRecordBackBillMain> lsmain = new List<Model.ClsSc_ProcExchRecordBackBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_ClsSc_ProcExchRecordBackBillMain(msg2);
+                foreach (Model.ClsSc_ProcExchRecordBackBillMain oItem in lsmain)
+                {
+                    oItem.HBillType = "3797";
+                    oItem.HBillSubType = "3797";
+                    oItem.HBillStatus = 1;
+                    oItem.HMaker = msg6;
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+
+                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (oItem.HChecker != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佸崟鎹凡瀹℃牳锛屾棤娉曚繚瀛橈紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oBill.omodel = oItem;
+                }
+
+                //琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                msg3 = msg3.Substring(1, msg3.Length - 2);
+                msg3 = msg3.Replace("\\", "");
+                msg3 = msg3.Replace("\n", "");  //\n
+                List<Model.ClsSc_ProcExchRecordBackBillSub> ls = new List<Model.ClsSc_ProcExchRecordBackBillSub>();
+                ls = oListModels.getObjectByJson_ClsSc_ProcExchRecordBackBillSub(msg3);
+                int i = 0;
+                foreach (Model.ClsSc_ProcExchRecordBackBillSub oItemSub in ls)
+                {
+
+                    i++;
+                    oItemSub.HEntryID = i;
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
+                    oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
+                    oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
+                    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
+                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;     //澶囦唤鍗曟嵁鍙�
+                    oItemSub.HCloseMan = "";
+                    oItemSub.HSourceBillNo = "";
+                    oItemSub.HSourceBillType = "";
+                    oBill.DetailColl.Add(oItemSub);
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (msg5 == 1)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 宸ュ簭杩斿伐璁板綍鍗� 鍒犻櫎
+        /// <summary>
+        /// 宸ュ簭杩斿伐璁板綍鍗�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_ProcExchRecordBackBill/DelProcExchWorkBackBill")]
+        [HttpGet]
+        public object DelProcExchWorkBackBill(string HInterID, string user)
+        {
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Drop", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            DAL.ClsSc_ProcExchRecordBackBill oBill = new DAL.ClsSc_ProcExchRecordBackBill();
+            ds = oCN.RunProcReturn("select * from Sc_ProcExchRecordBackBillMain where HInterID=" + lngBillKey, "Sc_ProcExchRecordBackBillMain");
+
+            if (ds.Tables[0].Rows.Count > 0)
+            {
+
+                if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+
+                if (IsDete)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宸ュ簭杩斿伐璁板綍鍗� 瀹℃牳/鍙嶅鏍�
+        [Route("Sc_ProcExchRecordBackBill/set_CheckBill")]
+        [HttpGet]
+        public object set_CheckBill(int HInterID, int num, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (HInterID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁ID涓�0锛屼笉鑳藉鏍革紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DataSet Ds = oCN.RunProcReturn("Select * from Sc_ProcExchRecordBackBillMain Where HInterID=" + HInterID, "Sc_ProcExchRecordBackBillMain");
+                if (Ds.Tables[0].Rows.Count > 0)
+                {
+                    if (num == 1)
+                    {
+                        //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+                        if (Ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                    }
+
+                    if (num == 2)
+                    {
+                        if (Ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!璇峰厛瀹℃牳!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                    }
+                    //瀹℃牳
+                    if (Cj_StationInBillCheckBill(HInterID, num, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛!";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁鏈壘鍒�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        //瀹℃牳
+        public bool Cj_StationInBillCheckBill(Int64 HInterID, int num, string CurUserName, ref string sReturn)
+        {
+            try
+            {
+                oCN.BeginTran();
+                if (num == 1)
+                {
+                    oCN.RunProc(" Update Sc_ProcExchRecordBackBillMain set HChecker='" + CurUserName + "',HBillStatus=2,HCheckDate=getdate() Where HInterID=" + HInterID.ToString());
+                }
+
+                if (num == 2)
+                {
+                    oCN.RunProc(" Update Sc_ProcExchRecordBackBillMain set HChecker='',HBillStatus=1,HCheckDate=null Where HInterID=" + HInterID.ToString());
+                }
+
+                oCN.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCN.RollBack();
+                return false; ;
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs
index 1bc43f2..75b1bec 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs
@@ -77,7 +77,7 @@
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
-                ds = oCN.RunProcReturn(sql + sWhere, "h_v_Sc_ProcessExchangeBillQuerySub");
+                ds = oCN.RunProcReturn(sql + sWhere + " order by 娴佹按鍙� ", "h_v_Sc_ProcessExchangeBillQuerySub");
                 objJsonResult.code = "0";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 9eb7c33..899f3c7 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -466,7 +466,6 @@
                     oBill.DetailColl.Clear();
                     if (!bResult)
                     {
-                        oCN.RollBack();
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
                         objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index 0b3be7d..75a4d57 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -49,7 +49,8 @@
         public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        // private DataBaseServices objDataBaseServices = new DataBaseServices();
         private json objJsonResult = new json();
-       // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+        // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
         public static string GetSession(string sMsg)
         {
             try
@@ -652,9 +653,23 @@
         [HttpGet]
         public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
         {
+           
             try
             {
-                var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
+                string sErrMsg = "";
+                string sJXCode = "";
+                if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+                {
+                    sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
+                    SourceFlag = true;
+                }
+                else
+                {
+                    sJXCode = sCode;
+                }
+
+
+                //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
                 string sExpressNumber = "";
                 WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
 
@@ -866,8 +881,8 @@
                     objJsonResult.data = new
                     {
                         list = ds.Tables[0]
-                        //,
-                        //list2 = ds.Tables[5]
+                        ,
+                        list2 = ds.Tables[5]
                     };
                     return objJsonResult;
                 }
diff --git a/WebAPI/Controllers/OtherOutBillController.cs b/WebAPI/Controllers/OtherOutBillController.cs
index a6483f8..743c487 100644
--- a/WebAPI/Controllers/OtherOutBillController.cs
+++ b/WebAPI/Controllers/OtherOutBillController.cs
@@ -48,6 +48,7 @@
         private JsonResult objJsonResult = new JsonResult();
         public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
         SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
         // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
         public static string GetSession(string sMsg)
         {
@@ -68,52 +69,96 @@
         /// <returns></returns>
         [Route("OtherOutBill/get_CheckTypeByBarCode_Out_Json")]
         [HttpGet]
-        public Object get_CheckTypeByBarCode_Out_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
+        //public Object get_CheckTypeByBarCode_Out_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
+        //{
+        //    //oBar = webserver.get_CheckTypeByBarCode_Out(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
+        //    //if (oBar == null)
+        //    //{
+        //    //    objJsonResult.code = "0";
+        //    //    objJsonResult.count = 0;
+        //    //    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //    //    objJsonResult.data = null;
+        //    //    return objJsonResult;
+        //    //}
+        //    //else
+        //    //{
+        //    //    objJsonResult.code = "0";
+        //    //    objJsonResult.count = 1;
+        //    //    objJsonResult.Message = "鎵爜鎴愬姛锛�";
+        //    //    //objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //    //    objJsonResult.data = oBar;
+        //    //    return objJsonResult;
+        //    //}
+
+
+        //    string sErrMsg = "";
+        //    string sJXCode = "";
+        //    if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+        //    {
+        //        sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
+        //        SourceFlag = true;
+        //    }
+        //    else
+        //    {
+        //        sJXCode = sCode;
+        //    }
+
+
+
+        //    WebS.WebService1 oWebs = new WebS.WebService1();
+        //    WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+        //    string sExpressNumber = "";
+        //    //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
+        //    SourceFlag = true;
+        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+        //    WebSoBar = oWebs.get_CheckTypeByBarCode_New(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
+        //    if (WebSoBar == null)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //    else
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 1;
+        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //        objJsonResult.data = WebSoBar;
+        //        return objJsonResult;
+        //    }
+        //}
+
+
+
+
+        public object get_CheckTypeByBarCode_Out_Json(string sCode, long sInterID, string sBillNo, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
         {
-            //oBar = webserver.get_CheckTypeByBarCode_Out(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
-            //if (oBar == null)
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
-            //else
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 1;
-            //    objJsonResult.Message = "鎵爜鎴愬姛锛�";
-            //    //objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-            //    objJsonResult.data = oBar;
-            //    return objJsonResult;
-            //}
-
-
             WebS.WebService1 oWebs = new WebS.WebService1();
-            WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
-            string sExpressNumber = "";
-            var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
-            SourceFlag = true;
-            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
-            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
-            WebSoBar = oWebs.get_CheckTypeByBarCode_New(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
-            if (WebSoBar == null)
+            WebAPI.WebS.ClsKf_ICStockBill_WMS clsKf_ICStockBill_WMS = new WebAPI.WebS.ClsKf_ICStockBill_WMS();
+            string hexpressNumber = "";
+            clsKf_ICStockBill_WMS = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, this.HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
+            bool flag = clsKf_ICStockBill_WMS == null;
+            object result;
+            if (flag)
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                objJsonResult.data = null;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 0;
+                this.objJsonResult.Message = ClsPub.sErrInfo;
+                this.objJsonResult.data = null;
+                result = this.objJsonResult;
             }
             else
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                objJsonResult.data = WebSoBar;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 1;
+                this.objJsonResult.Message = ClsPub.sErrInfo;
+                this.objJsonResult.data = clsKf_ICStockBill_WMS;
+                result = this.objJsonResult;
             }
+            return result;
         }
 
         /// <summary>
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 324bca1..0d614ab 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -78,49 +78,101 @@
         /// <returns></returns>
         [Route("POStockInBill/get_CheckTypeByBarCode_Json")]
         [HttpGet]
-        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
+        //public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
+        //{
+        //    try
+        //    {
+        //        string sErrMsg = "";
+        //        string sJXCode = "";
+        //        if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+        //        {
+        //            sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
+        //            SourceFlag = true;
+        //        }
+        //        else
+        //        {
+        //            sJXCode = sCode;
+        //        }
+
+
+
+        //        //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker);
+        //        //if (sRedBlue == true)
+        //        //{
+        //        //    HBillType = "1239";
+        //        //}
+        //        //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
+        //        WebS.WebService1 oWebs = new WebS.WebService1();
+        //        WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+        //        string sExpressNumber = "";
+        //        WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+        //        //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+        //        if (WebSoBar == null)
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 1;
+        //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //            objJsonResult.data = WebSoBar;
+        //            return objJsonResult;
+        //        }
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 1;
+        //        objJsonResult.Message = e.Message + ";" + e.StackTrace;
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+
+        //}
+
+
+        public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string sBillNo, string sBillType, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
         {
+            object result;
             try
             {
-                var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker);
-                //if (sRedBlue == true)
-                //{
-                //    HBillType = "1239";
-                //}
-                //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
                 WebS.WebService1 oWebs = new WebS.WebService1();
                 WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
-                string sExpressNumber = "";
-                WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
-                //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
-                if (WebSoBar == null)
+                string hexpressNumber = "";
+                WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, this.HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
+                bool flag = WebSoBar == null;
+                if (flag)
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    this.objJsonResult.code = "0";
+                    this.objJsonResult.count = 0;
+                    this.objJsonResult.Message = ClsPub.sErrInfo;
+                    this.objJsonResult.data = null;
+                    result = this.objJsonResult;
                 }
                 else
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = WebSoBar;
-                    return objJsonResult;
+                    this.objJsonResult.code = "0";
+                    this.objJsonResult.count = 1;
+                    this.objJsonResult.Message = ClsPub.sErrInfo;
+                    this.objJsonResult.data = WebSoBar;
+                    result = this.objJsonResult;
                 }
             }
-            catch (Exception e)
+            catch (Exception ex)
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = e.Message + ";" + e.StackTrace;
-                objJsonResult.data = null;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 1;
+                this.objJsonResult.Message = ex.Message + ";" + ex.StackTrace;
+                this.objJsonResult.data = null;
+                result = this.objJsonResult;
             }
-
+            return result;
         }
-
 
 
 
@@ -939,13 +991,13 @@
                         bool flag3 = dataSet5.Tables[0].Rows.Count > 0;
                         if (!flag3)
                         {
-                            //POStockInBillController postockInBillController = new POStockInBillController();
-                            //postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo);
+                            POStockInBillController postockInBillController = new POStockInBillController();
+                            postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo);
 
-                            WEBSController webscontroller4 = new WEBSController();
-                            object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo);
+                            //WEBSController webscontroller4 = new WEBSController();
+                            //object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo);
 
-                           
+
 
                         }
                     }
@@ -1632,7 +1684,8 @@
                     '@'
                         });
                         string str14 = array3[0];
-                        long num61 = (long)ClsPub.isInt(array3[4]);
+                        //long num61 = (long)ClsPub.isInt(array3[4]);
+                        Double num61 = ClsPub.isDoule(array3[4]);
                         string text46 = array3[6];
                         DateTime dateTime13 = ClsPub.isDate(array3[3]);
                         DateTime dateTime14 = ClsPub.isDate(array3[5]);
@@ -3051,7 +3104,7 @@
                         }
                     }
                 }
-                result = text;
+                 result = text;
             }
             catch (Exception ex)
             {
@@ -3916,6 +3969,70 @@
         }
 
 
+        //[Route("POStockInBill/set_SavePOStockInBill_Json")]
+        //[HttpPost]
+        //public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
+        //{
+        //    string text = oMain["oMain"].ToString();
+        //    string jsonString = text.ToString();
+        //    object result;
+        //    try
+        //    {
+        //        List<ClsKf_POStockInBillMain> list = new List<ClsKf_POStockInBillMain>();
+        //        ListModels listModels = new ListModels();
+        //        list = listModels.getPOStockInBillMainByJson(jsonString);
+        //        list[0].HYear = ClsPub.isLong(DateTime.Now.Year);
+        //        list[0].HDate = ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+        //        string hbillType = list[0].HBillType;
+        //        WebAPI.WebS.ClsKf_POStockInBillMain clsKf_POStockInBillMain = new WebAPI.WebS.ClsKf_POStockInBillMain();
+        //        clsKf_POStockInBillMain.HInterID = list[0].HInterID;
+        //        clsKf_POStockInBillMain.HBillNo = list[0].HBillNo;
+        //        clsKf_POStockInBillMain.HBillType = "1201";
+        //        clsKf_POStockInBillMain.HDate = list[0].HDate;
+        //        clsKf_POStockInBillMain.HDeptID = list[0].HDeptID;
+        //        clsKf_POStockInBillMain.HWHID = list[0].HWHID;
+        //        clsKf_POStockInBillMain.HSCWHID = 0L;
+        //        clsKf_POStockInBillMain.HSupID = list[0].HSupID;
+        //        clsKf_POStockInBillMain.HKeeperID = list[0].HKeeperID;
+        //        clsKf_POStockInBillMain.HSecManagerID = list[0].HSecManagerID;
+        //        clsKf_POStockInBillMain.HEmpID = 0L;
+        //        clsKf_POStockInBillMain.HManagerID = 0L;
+        //        clsKf_POStockInBillMain.HBillerID = list[0].HBillerID;
+        //        clsKf_POStockInBillMain.HRemark = "";
+        //        clsKf_POStockInBillMain.HInnerBillNo = "";
+        //        clsKf_POStockInBillMain.HRedBlueFlag = false;
+        //        clsKf_POStockInBillMain.HMainSourceBillType = list[0].HBillType;
+        //        clsKf_POStockInBillMain.HExplanation = list[0].HExplanation;
+        //        bool flag = this.webserver.set_SavePOStockInBill_New(clsKf_POStockInBillMain, hbillType, ref ClsPub.sErrInfo);
+        //        if (flag)
+        //        {
+        //            this.objJsonResult.code = "0";
+        //            this.objJsonResult.count = 1;
+        //            this.objJsonResult.Message = "鎴愬姛锛佸崟鎹彿涓猴細";
+        //            this.objJsonResult.data = null;
+        //            result = this.objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            this.objJsonResult.code = "0";
+        //            this.objJsonResult.count = 0;
+        //            this.objJsonResult.Message = "涓婁紶澶辫触锛�" + ClsPub.sErrInfo;
+        //            this.objJsonResult.data = null;
+        //            result = this.objJsonResult;
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 0;
+        //        this.objJsonResult.Message = "涓婁紶澶辫触锛�" + ex.ToString();
+        //        this.objJsonResult.data = null;
+        //        result = this.objJsonResult;
+        //    }
+        //    return result;
+        //}
+
+
         /// <summary>
         /// 鐢熶骇姹囨姤鍗�/鎻愪氦/鐩存帴璋僿ebservice
         /// </summary>
@@ -4158,6 +4275,333 @@
 
         [Route("POStockInBillList/AuditPOInStockBillPost_AR")]
         [HttpPost]
+        //public object AuditPOInStockBillPost_AR([FromBody] JObject msg)
+        //{
+        //    object result;
+        //    try
+        //    {
+        //        string text = msg["msg"].ToString();
+        //        text = text.Replace("\\", "");
+        //        text = text.Replace("\n", "");
+        //        List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text);
+        //        DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill();
+        //        string hinterID = list[0].HInterID;
+        //        string text2 = list[0].FID;
+        //        string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo);
+        //        string singleSystemParameter2 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_ErpAduit", ref ClsPub.sExeReturnInfo);
+        //        string singleSystemParameter3 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_BarCodeCtl", ref ClsPub.sExeReturnInfo);
+        //        string configKey = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName");
+        //        string empty = string.Empty;
+        //        this.oCn.BeginTran();
+        //        this.oCn.Commit();
+        //        bool flag = singleSystemParameter.Contains("瀹夌憺");
+        //        if (flag)
+        //        {
+        //            DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast");
+        //            DataRow dataRow = dataSet.Tables[0].Rows[0];
+        //            bool flag2 = dataSet.Tables[0].Rows.Count <= 0;
+        //            if (flag2)
+        //            {
+        //                this.objJsonResult.code = "0";
+        //                this.objJsonResult.count = 0;
+        //                this.objJsonResult.Message = "鏈壘鍒板搴旂殑鍗曟嵁";
+        //                this.objJsonResult.data = null;
+        //                return this.objJsonResult;
+        //            }
+        //            bool flag3 = dataSet.Tables[0].Rows.Count >= 0;
+        //            if (flag3)
+        //            {
+        //                JObject jobject = new JObject();
+        //                string value = "SLD01_SYS";
+        //                string value2 = "CG";
+        //                bool flag4 = dataRow["FTYPENAME"].ToString().Contains("濮斿");
+        //                if (flag4)
+        //                {
+        //                    value = "SLD03_SYS";
+        //                    value2 = "WW";
+        //                }
+        //                bool flag5 = dataRow["FTYPENAME"].ToString().Contains("璧勪骇");
+        //                if (flag5)
+        //                {
+        //                    value = "SLD04_SYS";
+        //                    value2 = "ZCCG";
+        //                }
+        //                JObject jobject2 = jobject;
+        //                string propertyName = "FBILLTYPEID";
+        //                JObject jobject3 = new JObject();
+        //                jobject3["Fnumber"] = value;
+        //                jobject2.Add(propertyName, jobject3);
+        //                jobject.Add("FBusinessType", value2);
+        //                jobject.Add("FBILLNO", dataRow["HBillNo"].ToString());
+        //                jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd"));
+        //                JObject jobject4 = jobject;
+        //                string propertyName2 = "FStockOrgId";
+        //                JObject jobject5 = new JObject();
+        //                jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString();
+        //                jobject4.Add(propertyName2, jobject5);
+        //                JObject jobject6 = jobject;
+        //                string propertyName3 = "FPurOrgId";
+        //                JObject jobject7 = new JObject();
+        //                jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
+        //                jobject6.Add(propertyName3, jobject7);
+        //                JObject jobject8 = jobject;
+        //                string propertyName4 = "FSupplierId";
+        //                JObject jobject9 = new JObject();
+        //                jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
+        //                jobject8.Add(propertyName4, jobject9);
+        //                JObject jobject10 = jobject;
+        //                string propertyName5 = "FPURCHASERID";
+        //                JObject jobject11 = new JObject();
+        //                jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString();
+        //                jobject10.Add(propertyName5, jobject11);
+        //                jobject.Add("FOwnerTypeIdHead", "BD_Supplier");
+        //                JObject jobject12 = jobject;
+        //                string propertyName6 = "FOwnerIdHead";
+        //                JObject jobject13 = new JObject();
+        //                jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
+        //                jobject12.Add(propertyName6, jobject13);
+        //                jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() });
+        //                JArray jarray = new JArray();
+        //                foreach (object obj in dataSet.Tables[0].Rows)
+        //                {
+        //                    DataRow dataRow2 = (DataRow)obj;
+        //                    JObject jobject14 = new JObject();
+        //                    JObject jobject15 = jobject14;
+        //                    string propertyName7 = "FMaterialId";
+        //                    JObject jobject16 = new JObject();
+        //                    jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
+        //                    jobject15.Add(propertyName7, jobject16);
+        //                    JObject jobject17 = jobject14;
+        //                    string propertyName8 = "FUnitID";
+        //                    JObject jobject18 = new JObject();
+        //                    jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
+        //                    jobject17.Add(propertyName8, jobject18);
+        //                    jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
+        //                    JObject jobject19 = jobject14;
+        //                    string propertyName9 = "FPriceUnitId";
+        //                    JObject jobject20 = new JObject();
+        //                    jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
+        //                    jobject19.Add(propertyName9, jobject20);
+        //                    JObject jobject21 = jobject14;
+        //                    string propertyName10 = "FStockUnitID";
+        //                    JObject jobject22 = new JObject();
+        //                    jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
+        //                    jobject21.Add(propertyName10, jobject22);
+        //                    JObject jobject23 = jobject14;
+        //                    string propertyName11 = "FStockID";
+        //                    JObject jobject24 = new JObject();
+        //                    jobject24["Fnumber"] = "BJCK-SH.01.005";
+        //                    jobject23.Add(propertyName11, jobject24);
+        //                    jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
+        //                    jobject14.Add("FOwnerTypeId", "BD_OwnerOrg");
+        //                    JObject jobject25 = jobject14;
+        //                    string propertyName12 = "FOwnerID";
+        //                    JObject jobject26 = new JObject();
+        //                    jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
+        //                    jobject25.Add(propertyName12, jobject26);
+        //                    jobject14.Add("FSrcId", dataRow2["FID"].ToString());
+        //                    jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder");
+        //                    jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
+        //                    jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
+        //                    jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
+        //                    jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
+        //                    jobject14.Add("FPrice", dataRow2["FPRICE"].ToString());
+        //                    jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
+        //                    jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
+        //                    JObject jobject27 = jobject14;
+        //                    string propertyName13 = "FLOT";
+        //                    JObject jobject28 = new JObject();
+        //                    jobject28["Fnumber"] = dataRow2["hbatchno"].ToString();
+        //                    jobject27.Add(propertyName13, jobject28);
+        //                    jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
+        //                    jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
+        //                    jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
+        //                    jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
+        //                    //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString());
+        //                    jobject14.Add("FDetailEntity_Link", new JArray
+        //                    {
+        //                        new JObject
+        //                        {
+        //                            {
+        //                                "FDetailEntity_Link_FRULEID",
+        //                                "PUR_PurchaseOrder-PUR_ReceiveBill"
+        //                            },
+        //                            {
+        //                                "FDetailEntity_Link_FSTableName",
+        //                                "t_PUR_POOrderEntry"
+        //                            },
+        //                            {
+        //                                "FDetailEntity_Link_FSBillId",
+        //                                dataRow2["FID"].ToString()
+        //                            },
+        //                            {
+        //                                "FDetailEntity_Link_FSId",
+        //                                dataRow2["FEntryID"].ToString()
+        //                            }
+        //                        }
+        //                    });
+        //                    jarray.Add(jobject14);
+        //                }
+        //                jobject.Add("FDetailEntity", jarray);
+        //                JObject jobject29 = new JObject();
+        //                JObject jobject30 = jobject29;
+        //                string propertyName14 = "FSettleOrgId";
+        //                JObject jobject31 = new JObject();
+        //                jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
+        //                jobject30.Add(propertyName14, jobject31);
+        //                JObject jobject32 = jobject29;
+        //                string propertyName15 = "FSettleCurrId";
+        //                JObject jobject33 = new JObject();
+        //                jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
+        //                jobject32.Add(propertyName15, jobject33);
+        //                jobject29.Add("FPricePoint", 0);
+        //                jobject.Add("FinanceEntity ", jobject29);
+        //                JObject jobject34 = new JObject();
+        //                jobject34["Creator"] = "";
+        //                jobject34["NeedUpDateFields"] = new JArray();
+        //                jobject34["NeedReturnFields"] = new JArray();
+        //                jobject34["IsDeleteEntry"] = "false";
+        //                jobject34["SubSystemId"] = "";
+        //                jobject34["IsVerifyBaseDataField"] = "false";
+        //                jobject34["Model"] = jobject;
+        //                JObject jobject35 = jobject34;
+        //                string text3 = InvokeHelper.Login();
+        //                int num = JObject.Parse(text3)["LoginResultType"].Value<int>();
+        //                bool flag6 = num == 0;
+        //                if (flag6)
+        //                {
+        //                    this.objJsonResult.code = "0";
+        //                    this.objJsonResult.count = 0;
+        //                    this.objJsonResult.Message = text3;
+        //                    this.objJsonResult.data = null;
+        //                    return this.objJsonResult;
+        //                }
+        //                string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString());
+        //                bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
+        //                if (!flag7)
+        //                {
+        //                    this.objJsonResult.code = "0";
+        //                    this.objJsonResult.count = 0;
+        //                    this.objJsonResult.Message = text4;
+        //                    this.objJsonResult.data = null;
+        //                    return this.objJsonResult;
+        //                }
+        //                string text5 = JObject.Parse(text4)["Result"]["Number"].ToString();
+        //                text2 = JObject.Parse(text4)["Result"]["Id"].ToString();
+        //            }
+        //            else
+        //            {
+        //                LogService.Write("鏀舵枡閫氱煡鍗曞鏍告棤鏁版嵁锛�" + empty, "Vlog", true);
+        //            }
+        //        }
+        //        else
+        //        {
+        //            JObject jobject36 = new JObject();
+        //            jobject36.Add("Creator", "");
+        //            jobject36.Add("NeedUpDateFields", new JArray());
+        //            jobject36.Add("NeedReturnFields", new JArray());
+        //            jobject36.Add("IsDeleteEntry", "false");
+        //            jobject36.Add("SubSystemId", "");
+        //            jobject36.Add("IsVerifyBaseDataField", "");
+        //            JObject jobject37 = new JObject();
+        //            jobject37.Add("FID", text2);
+        //            JArray jarray2 = new JArray();
+        //            foreach (ReciveBill_FastModel reciveBill_FastModel in list)
+        //            {
+        //                bool flag8 = reciveBill_FastModel.HSQty == 0m;
+        //                if (!flag8)
+        //                {
+        //                    jarray2.Add(new JObject
+        //                    {
+        //                        {
+        //                            "FEntryID",
+        //                            reciveBill_FastModel.FEntryID
+        //                        },
+        //                        {
+        //                            "FActReceiveQty ",
+        //                            reciveBill_FastModel.HSQty
+        //                        }
+        //                    });
+        //                }
+        //            }
+        //            jobject37.Add("FDetailEntity", jarray2);
+        //            jobject36.Add("Model", jobject37);
+        //            string text6 = InvokeHelper.Login();
+        //            int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>();
+        //            bool flag9 = num2 <= 0;
+        //            if (flag9)
+        //            {
+        //                this.objJsonResult.code = "0";
+        //                this.objJsonResult.count = 0;
+        //                this.objJsonResult.Message = text6;
+        //                this.objJsonResult.data = null;
+        //                return this.objJsonResult;
+        //            }
+        //            string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString());
+        //            bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+        //            if (flag10)
+        //            {
+        //                LogService.Write("鏀舵枡閫氱煡鍗曚慨鏀瑰け璐sonRoot:" + jobject36.ToString(), "Vlog", true);
+        //                this.objJsonResult.code = "0";
+        //                this.objJsonResult.count = 0;
+        //                this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟洿鏂板け璐�" + text7;
+        //                this.objJsonResult.data = null;
+        //                return this.objJsonResult;
+        //            }
+        //        }
+        //        var f__AnonymousType = new
+        //        {
+        //            Ids = text2
+        //        };
+        //        string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
+        //        JObject jobject38 = JObject.Parse(text8);
+        //        bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+        //        if (flag11)
+        //        {
+        //            LogService.Write("鏀舵枡閫氱煡鍗曟彁浜ゅけ璐sonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
+        //            this.objJsonResult.code = "0";
+        //            this.objJsonResult.count = 0;
+        //            this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟彁浜ゅけ璐�" + text8;
+        //            this.objJsonResult.data = null;
+        //            result = this.objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
+        //            jobject38 = JObject.Parse(text8);
+        //            bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+        //            if (flag12)
+        //            {
+        //                LogService.Write("鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
+        //                this.objJsonResult.code = "0";
+        //                this.objJsonResult.count = 0;
+        //                this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + text8;
+        //                this.objJsonResult.data = null;
+        //                result = this.objJsonResult;
+        //            }
+        //            else
+        //            {
+        //                this.objJsonResult.code = "1";
+        //                this.objJsonResult.count = 1;
+        //                this.objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+        //                this.objJsonResult.data = null;
+        //                result = this.objJsonResult;
+        //            }
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 0;
+        //        this.objJsonResult.Message = "寮傚父锛�" + ex.ToString();
+        //        this.objJsonResult.data = null;
+        //        result = this.objJsonResult;
+        //    }
+        //    return result;
+        //}
+
+
+
         public object AuditPOInStockBillPost_AR([FromBody] JObject msg)
         {
             object result;
@@ -4167,7 +4611,7 @@
                 text = text.Replace("\\", "");
                 text = text.Replace("\n", "");
                 List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text);
-                DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill();
+                ClsCg_POInStockBill clsCg_POInStockBill = new ClsCg_POInStockBill();
                 string hinterID = list[0].HInterID;
                 string text2 = list[0].FID;
                 string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo);
@@ -4178,12 +4622,16 @@
                 this.oCn.BeginTran();
                 this.oCn.Commit();
                 bool flag = singleSystemParameter.Contains("瀹夌憺");
-                if (flag)
+                bool flag2 = flag;
+                bool flag3 = flag2;
+                if (flag3)
                 {
                     DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast");
                     DataRow dataRow = dataSet.Tables[0].Rows[0];
-                    bool flag2 = dataSet.Tables[0].Rows.Count <= 0;
-                    if (flag2)
+                    bool flag4 = dataSet.Tables[0].Rows.Count <= 0;
+                    bool flag5 = flag4;
+                    bool flag6 = flag5;
+                    if (flag6)
                     {
                         this.objJsonResult.code = "0";
                         this.objJsonResult.count = 0;
@@ -4191,186 +4639,188 @@
                         this.objJsonResult.data = null;
                         return this.objJsonResult;
                     }
-                    bool flag3 = dataSet.Tables[0].Rows.Count >= 0;
-                    if (flag3)
+                    bool flag7 = dataSet.Tables[0].Rows.Count >= 0;
+                    bool flag8 = flag7;
+                    bool flag9 = flag8;
+                    if (flag9)
                     {
                         JObject jobject = new JObject();
-                        string value = "SLD01_SYS";
-                        string value2 = "CG";
-                        bool flag4 = dataRow["FTYPENAME"].ToString().Contains("濮斿");
-                        if (flag4)
+                        string text3 = "SLD01_SYS";
+                        string text4 = "CG";
+                        bool flag10 = dataRow["FTYPENAME"].ToString().Contains("濮斿");
+                        bool flag11 = flag10;
+                        bool flag12 = flag11;
+                        if (flag12)
                         {
-                            value = "SLD03_SYS";
-                            value2 = "WW";
+                            text3 = "SLD03_SYS";
+                            text4 = "WW";
                         }
-                        bool flag5 = dataRow["FTYPENAME"].ToString().Contains("璧勪骇");
-                        if (flag5)
+                        bool flag13 = dataRow["FTYPENAME"].ToString().Contains("璧勪骇");
+                        bool flag14 = flag13;
+                        bool flag15 = flag14;
+                        if (flag15)
                         {
-                            value = "SLD04_SYS";
-                            value2 = "ZCCG";
+                            text3 = "SLD04_SYS";
+                            text4 = "ZCCG";
                         }
                         JObject jobject2 = jobject;
-                        string propertyName = "FBILLTYPEID";
+                        string text5 = "FBILLTYPEID";
                         JObject jobject3 = new JObject();
-                        jobject3["Fnumber"] = value;
-                        jobject2.Add(propertyName, jobject3);
-                        jobject.Add("FBusinessType", value2);
+                        jobject3["Fnumber"] = text3;
+                        jobject2.Add(text5, jobject3);
+                        jobject.Add("FBusinessType", text4);
                         jobject.Add("FBILLNO", dataRow["HBillNo"].ToString());
                         jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd"));
                         JObject jobject4 = jobject;
-                        string propertyName2 = "FStockOrgId";
+                        string text6 = "FStockOrgId";
                         JObject jobject5 = new JObject();
                         jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString();
-                        jobject4.Add(propertyName2, jobject5);
+                        jobject4.Add(text6, jobject5);
                         JObject jobject6 = jobject;
-                        string propertyName3 = "FPurOrgId";
+                        string text7 = "FPurOrgId";
                         JObject jobject7 = new JObject();
                         jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
-                        jobject6.Add(propertyName3, jobject7);
+                        jobject6.Add(text7, jobject7);
                         JObject jobject8 = jobject;
-                        string propertyName4 = "FSupplierId";
+                        string text8 = "FSupplierId";
                         JObject jobject9 = new JObject();
                         jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
-                        jobject8.Add(propertyName4, jobject9);
+                        jobject8.Add(text8, jobject9);
                         JObject jobject10 = jobject;
-                        string propertyName5 = "FPURCHASERID";
+                        string text9 = "FPURCHASERID";
                         JObject jobject11 = new JObject();
                         jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString();
-                        jobject10.Add(propertyName5, jobject11);
+                        jobject10.Add(text9, jobject11);
                         jobject.Add("FOwnerTypeIdHead", "BD_Supplier");
                         JObject jobject12 = jobject;
-                        string propertyName6 = "FOwnerIdHead";
+                        string text10 = "FOwnerIdHead";
                         JObject jobject13 = new JObject();
                         jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
-                        jobject12.Add(propertyName6, jobject13);
-                        jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() });
+                        jobject12.Add(text10, jobject13);
+                        JObject jobject14 = jobject;
+                        string text11 = "F_RYMA_Assistant";
+                        JObject jobject15 = new JObject();
+                        jobject15["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString();
+                        jobject14.Add(text11, jobject15);
                         JArray jarray = new JArray();
                         foreach (object obj in dataSet.Tables[0].Rows)
                         {
                             DataRow dataRow2 = (DataRow)obj;
-                            JObject jobject14 = new JObject();
-                            JObject jobject15 = jobject14;
-                            string propertyName7 = "FMaterialId";
                             JObject jobject16 = new JObject();
-                            jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
-                            jobject15.Add(propertyName7, jobject16);
-                            JObject jobject17 = jobject14;
-                            string propertyName8 = "FUnitID";
+                            JObject jobject17 = jobject16;
+                            string text12 = "FMaterialId";
                             JObject jobject18 = new JObject();
-                            jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
-                            jobject17.Add(propertyName8, jobject18);
-                            jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
-                            JObject jobject19 = jobject14;
-                            string propertyName9 = "FPriceUnitId";
+                            jobject18["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
+                            jobject17.Add(text12, jobject18);
+                            JObject jobject19 = jobject16;
+                            string text13 = "FUnitID";
                             JObject jobject20 = new JObject();
                             jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
-                            jobject19.Add(propertyName9, jobject20);
-                            JObject jobject21 = jobject14;
-                            string propertyName10 = "FStockUnitID";
+                            jobject19.Add(text13, jobject20);
+                            jobject16.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
+                            JObject jobject21 = jobject16;
+                            string text14 = "FPriceUnitId";
                             JObject jobject22 = new JObject();
                             jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
-                            jobject21.Add(propertyName10, jobject22);
-                            JObject jobject23 = jobject14;
-                            string propertyName11 = "FStockID";
+                            jobject21.Add(text14, jobject22);
+                            JObject jobject23 = jobject16;
+                            string text15 = "FStockUnitID";
                             JObject jobject24 = new JObject();
-                            jobject24["Fnumber"] = "BJCK-SH.01.005";
-                            jobject23.Add(propertyName11, jobject24);
-                            jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
-                            jobject14.Add("FOwnerTypeId", "BD_OwnerOrg");
-                            JObject jobject25 = jobject14;
-                            string propertyName12 = "FOwnerID";
+                            jobject24["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
+                            jobject23.Add(text15, jobject24);
+                            JObject jobject25 = jobject16;
+                            string text16 = "FStockID";
                             JObject jobject26 = new JObject();
-                            jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
-                            jobject25.Add(propertyName12, jobject26);
-                            jobject14.Add("FSrcId", dataRow2["FID"].ToString());
-                            jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder");
-                            jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
-                            jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
-                            jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
-                            jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
-                            jobject14.Add("FPrice", dataRow2["FPRICE"].ToString());
-                            jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
-                            jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
-                            JObject jobject27 = jobject14;
-                            string propertyName13 = "FLOT";
+                            jobject26["Fnumber"] = "BJCK-SH.01.005";
+                            jobject25.Add(text16, jobject26);
+                            jobject16.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
+                            jobject16.Add("FOwnerTypeId", "BD_OwnerOrg");
+                            JObject jobject27 = jobject16;
+                            string text17 = "FOwnerID";
                             JObject jobject28 = new JObject();
-                            jobject28["Fnumber"] = dataRow2["hbatchno"].ToString();
-                            jobject27.Add(propertyName13, jobject28);
-                            jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
-                            jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
-                            jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
-                            jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
-                            //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString());
-                            jobject14.Add("FDetailEntity_Link", new JArray
-                            {
-                                new JObject
-                                {
-                                    {
-                                        "FDetailEntity_Link_FRULEID",
-                                        "PUR_PurchaseOrder-PUR_ReceiveBill"
-                                    },
-                                    {
-                                        "FDetailEntity_Link_FSTableName",
-                                        "t_PUR_POOrderEntry"
-                                    },
-                                    {
-                                        "FDetailEntity_Link_FSBillId",
-                                        dataRow2["FID"].ToString()
-                                    },
-                                    {
-                                        "FDetailEntity_Link_FSId",
-                                        dataRow2["FEntryID"].ToString()
-                                    }
-                                }
-                            });
-                            jarray.Add(jobject14);
+                            jobject28["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
+                            jobject27.Add(text17, jobject28);
+                            jobject16.Add("FSrcId", dataRow2["FID"].ToString());
+                            jobject16.Add("FSRCFORMID", "PUR_PurchaseOrder");
+                            jobject16.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
+                            jobject16.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
+                            jobject16.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
+                            jobject16.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
+                            jobject16.Add("FPrice", dataRow2["FPRICE"].ToString());
+                            jobject16.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
+                            jobject16.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
+                            JObject jobject29 = jobject16;
+                            string text18 = "FLOT";
+                            JObject jobject30 = new JObject();
+                            jobject30["Fnumber"] = dataRow2["hbatchno"].ToString();
+                            jobject29.Add(text18, jobject30);
+                            jobject16.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
+                            jobject16.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
+                            jobject16.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
+                            jobject16.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
+                            jobject16.Add("F_UJDY_Qty", dataRow2["HQTY"].ToString());
+                            JObject jobject31 = jobject16;
+                            string text19 = "FDetailEntity_Link";
+                            JArray jarray2 = new JArray();
+                            JObject jobject32 = new JObject();
+                            jobject32.Add("FDetailEntity_Link_FRULEID", "PUR_PurchaseOrder-PUR_ReceiveBill");
+                            jobject32.Add("FDetailEntity_Link_FSTableName", "t_PUR_POOrderEntry");
+                            jobject32.Add("FDetailEntity_Link_FSBillId", dataRow2["FID"].ToString());
+                            jobject32.Add("FDetailEntity_Link_FSId", dataRow2["FEntryID"].ToString());
+                            jarray2.Add(jobject32);
+                            jobject31.Add(text19, jarray2);
+                            jarray.Add(jobject16);
                         }
                         jobject.Add("FDetailEntity", jarray);
-                        JObject jobject29 = new JObject();
-                        JObject jobject30 = jobject29;
-                        string propertyName14 = "FSettleOrgId";
-                        JObject jobject31 = new JObject();
-                        jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
-                        jobject30.Add(propertyName14, jobject31);
-                        JObject jobject32 = jobject29;
-                        string propertyName15 = "FSettleCurrId";
                         JObject jobject33 = new JObject();
-                        jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
-                        jobject32.Add(propertyName15, jobject33);
-                        jobject29.Add("FPricePoint", 0);
-                        jobject.Add("FinanceEntity ", jobject29);
-                        JObject jobject34 = new JObject();
-                        jobject34["Creator"] = "";
-                        jobject34["NeedUpDateFields"] = new JArray();
-                        jobject34["NeedReturnFields"] = new JArray();
-                        jobject34["IsDeleteEntry"] = "false";
-                        jobject34["SubSystemId"] = "";
-                        jobject34["IsVerifyBaseDataField"] = "false";
-                        jobject34["Model"] = jobject;
-                        JObject jobject35 = jobject34;
-                        string text3 = InvokeHelper.Login();
-                        int num = JObject.Parse(text3)["LoginResultType"].Value<int>();
-                        bool flag6 = num == 0;
-                        if (flag6)
+                        JObject jobject34 = jobject33;
+                        string text20 = "FSettleOrgId";
+                        JObject jobject35 = new JObject();
+                        jobject35["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
+                        jobject34.Add(text20, jobject35);
+                        JObject jobject36 = jobject33;
+                        string text21 = "FSettleCurrId";
+                        JObject jobject37 = new JObject();
+                        jobject37["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
+                        jobject36.Add(text21, jobject37);
+                        jobject33.Add("FPricePoint", 0);
+                        jobject.Add("FinanceEntity ", jobject33);
+                        JObject jobject38 = new JObject();
+                        jobject38["Creator"] = "";
+                        jobject38["NeedUpDateFields"] = new JArray();
+                        jobject38["NeedReturnFields"] = new JArray();
+                        jobject38["IsDeleteEntry"] = "false";
+                        jobject38["SubSystemId"] = "";
+                        jobject38["IsVerifyBaseDataField"] = "false";
+                        jobject38["Model"] = jobject;
+                        JObject jobject39 = jobject38;
+                        string text22 = InvokeHelper.Login();
+                        int num = Extensions.Value<int>(JObject.Parse(text22)["LoginResultType"]);
+                        bool flag16 = num == 0;
+                        bool flag17 = flag16;
+                        bool flag18 = flag17;
+                        if (flag18)
                         {
                             this.objJsonResult.code = "0";
                             this.objJsonResult.count = 0;
-                            this.objJsonResult.Message = text3;
+                            this.objJsonResult.Message = text22;
                             this.objJsonResult.data = null;
                             return this.objJsonResult;
                         }
-                        string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString());
-                        bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
-                        if (!flag7)
+                        string text23 = InvokeHelper.Save("PUR_ReceiveBill", jobject39.ToString());
+                        bool flag19 = JObject.Parse(text23)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
+                        bool flag20 = !flag19;
+                        bool flag21 = flag20;
+                        if (flag21)
                         {
                             this.objJsonResult.code = "0";
                             this.objJsonResult.count = 0;
-                            this.objJsonResult.Message = text4;
+                            this.objJsonResult.Message = text23;
                             this.objJsonResult.data = null;
                             return this.objJsonResult;
                         }
-                        string text5 = JObject.Parse(text4)["Result"]["Number"].ToString();
-                        text2 = JObject.Parse(text4)["Result"]["Id"].ToString();
+                        string text24 = JObject.Parse(text23)["Result"]["Number"].ToString();
+                        text2 = JObject.Parse(text23)["Result"]["Id"].ToString();
                     }
                     else
                     {
@@ -4379,55 +4829,55 @@
                 }
                 else
                 {
-                    JObject jobject36 = new JObject();
-                    jobject36.Add("Creator", "");
-                    jobject36.Add("NeedUpDateFields", new JArray());
-                    jobject36.Add("NeedReturnFields", new JArray());
-                    jobject36.Add("IsDeleteEntry", "false");
-                    jobject36.Add("SubSystemId", "");
-                    jobject36.Add("IsVerifyBaseDataField", "");
-                    JObject jobject37 = new JObject();
-                    jobject37.Add("FID", text2);
-                    JArray jarray2 = new JArray();
+                    JObject jobject40 = new JObject();
+                    jobject40.Add("Creator", "");
+                    jobject40.Add("NeedUpDateFields", new JArray());
+                    jobject40.Add("NeedReturnFields", new JArray());
+                    jobject40.Add("IsDeleteEntry", "false");
+                    jobject40.Add("SubSystemId", "");
+                    jobject40.Add("IsVerifyBaseDataField", "");
+                    JObject jobject41 = new JObject();
+                    jobject41.Add("FID", text2);
+                    JArray jarray3 = new JArray();
                     foreach (ReciveBill_FastModel reciveBill_FastModel in list)
                     {
-                        bool flag8 = reciveBill_FastModel.HSQty == 0m;
-                        if (!flag8)
+                        bool flag22 = reciveBill_FastModel.HSQty == 0m;
+                        bool flag23 = !flag22;
+                        bool flag24 = flag23;
+                        if (flag24)
                         {
-                            jarray2.Add(new JObject
-                            {
-                                {
-                                    "FEntryID",
-                                    reciveBill_FastModel.FEntryID
-                                },
-                                {
-                                    "FActReceiveQty ",
-                                    reciveBill_FastModel.HSQty
-                                }
-                            });
+                            JArray jarray4 = jarray3;
+                            JObject jobject42 = new JObject();
+                            jobject42.Add("FEntryID", reciveBill_FastModel.FEntryID);
+                            jobject42.Add("FActReceiveQty ", reciveBill_FastModel.HSQty);
+                            jarray4.Add(jobject42);
                         }
                     }
-                    jobject37.Add("FDetailEntity", jarray2);
-                    jobject36.Add("Model", jobject37);
-                    string text6 = InvokeHelper.Login();
-                    int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>();
-                    bool flag9 = num2 <= 0;
-                    if (flag9)
+                    jobject41.Add("FDetailEntity", jarray3);
+                    jobject40.Add("Model", jobject41);
+                    string text25 = InvokeHelper.Login();
+                    int num2 = Extensions.Value<int>(JObject.Parse(text25)["LoginResultType"]);
+                    bool flag25 = num2 <= 0;
+                    bool flag26 = flag25;
+                    bool flag27 = flag26;
+                    if (flag27)
                     {
                         this.objJsonResult.code = "0";
                         this.objJsonResult.count = 0;
-                        this.objJsonResult.Message = text6;
+                        this.objJsonResult.Message = text25;
                         this.objJsonResult.data = null;
                         return this.objJsonResult;
                     }
-                    string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString());
-                    bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
-                    if (flag10)
+                    string text26 = InvokeHelper.Save("PUR_ReceiveBill", jobject40.ToString());
+                    bool flag28 = JObject.Parse(text26)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+                    bool flag29 = flag28;
+                    bool flag30 = flag29;
+                    if (flag30)
                     {
-                        LogService.Write("鏀舵枡閫氱煡鍗曚慨鏀瑰け璐sonRoot:" + jobject36.ToString(), "Vlog", true);
+                        LogService.Write("鏀舵枡閫氱煡鍗曚慨鏀瑰け璐sonRoot:" + jobject40.ToString(), "Vlog", true);
                         this.objJsonResult.code = "0";
                         this.objJsonResult.count = 0;
-                        this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟洿鏂板け璐�" + text7;
+                        this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟洿鏂板け璐�" + text26;
                         this.objJsonResult.data = null;
                         return this.objJsonResult;
                     }
@@ -4436,29 +4886,33 @@
                 {
                     Ids = text2
                 };
-                string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
-                JObject jobject38 = JObject.Parse(text8);
-                bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
-                if (flag11)
+                string text27 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
+                JObject jobject43 = JObject.Parse(text27);
+                bool flag31 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+                bool flag32 = flag31;
+                bool flag33 = flag32;
+                if (flag33)
                 {
                     LogService.Write("鏀舵枡閫氱煡鍗曟彁浜ゅけ璐sonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
                     this.objJsonResult.code = "0";
                     this.objJsonResult.count = 0;
-                    this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟彁浜ゅけ璐�" + text8;
+                    this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟彁浜ゅけ璐�" + text27;
                     this.objJsonResult.data = null;
                     result = this.objJsonResult;
                 }
                 else
                 {
-                    text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
-                    jobject38 = JObject.Parse(text8);
-                    bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
-                    if (flag12)
+                    text27 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
+                    jobject43 = JObject.Parse(text27);
+                    bool flag34 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
+                    bool flag35 = flag34;
+                    bool flag36 = flag35;
+                    if (flag36)
                     {
                         LogService.Write("鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
                         this.objJsonResult.code = "0";
                         this.objJsonResult.count = 0;
-                        this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + text8;
+                        this.objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + text27;
                         this.objJsonResult.data = null;
                         result = this.objJsonResult;
                     }
@@ -4482,7 +4936,6 @@
             }
             return result;
         }
-
 
 
         #region PDA鍏朵粬鍑哄簱
@@ -4572,7 +5025,7 @@
                         '@'
                     });
                     string text = array[0];
-                    long num = ClsPub.isLong(array[4]);
+                    Double num = ClsPub.isDoule(array[4]);
                     string text2 = array[6];
                     DateTime dateTime = ClsPub.isDate(array[3]);
                     DateTime dateTime2 = ClsPub.isDate(array[5]);
diff --git a/WebAPI/Controllers/ProductInController.cs b/WebAPI/Controllers/ProductInController.cs
index d59654b..4a98976 100644
--- a/WebAPI/Controllers/ProductInController.cs
+++ b/WebAPI/Controllers/ProductInController.cs
@@ -327,31 +327,58 @@
         /// <returns></returns>
         [Route("OtherOutBill_Check_New/get_InfoByBarCode_Source_Json")]
         [HttpGet]
-        public Object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string HBillType,string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Int64 sQty, Int64 HOWNERID)
+        //public Object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string HBillType,string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Int64 sQty, Int64 HOWNERID)
+        //{
+        //    WebS.WebService1 oWebs = new WebS.WebService1();
+        //    WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+        //    string sExpressNumber = "";
+
+        //    var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
+        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+        //    WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, sInterID, HBillType, sBillNo, sMaker,  WhID,  SPID,  sQty,  HOWNERID, ref DBUtility.ClsPub.sErrInfo);
+        //    if (WebSoBar == null)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //    else
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 1;
+        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //        objJsonResult.data = WebSoBar;
+        //        return objJsonResult;
+        //    }
+        //}
+
+        public object get_InfoByBarCode_Source_Json(string sCode, long sInterID, string HBillType, string sBillNo, string sMaker, long WhID, long SPID, long sQty, long HOWNERID)
         {
             WebS.WebService1 oWebs = new WebS.WebService1();
             WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
             string sExpressNumber = "";
-
-            var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
-            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
-            WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, sInterID, HBillType, sBillNo, sMaker,  WhID,  SPID,  sQty,  HOWNERID, ref DBUtility.ClsPub.sErrInfo);
-            if (WebSoBar == null)
+            WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, (double)sQty, HOWNERID, ref ClsPub.sErrInfo);
+            bool flag = WebSoBar == null;
+            object result;
+            if (flag)
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                objJsonResult.data = null;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 0;
+                this.objJsonResult.Message = ClsPub.sErrInfo;
+                this.objJsonResult.data = null;
+                result = this.objJsonResult;
             }
             else
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                objJsonResult.data = WebSoBar;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 1;
+                this.objJsonResult.Message = ClsPub.sErrInfo;
+                this.objJsonResult.data = WebSoBar;
+                result = this.objJsonResult;
             }
+            return result;
         }
 
 
@@ -1137,67 +1164,123 @@
         [HttpPost]
         public object set_SaveProductInBill_Json([FromBody]JObject oMain)
         {
-            var _value = oMain["oMain"].ToString();
-            string msg1 = _value.ToString();
-            //List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
-            //ListModels oListModels = new ListModels();
-            //lsmain = oListModels.getProductInBillMainByJson(msg1);
-            //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-            //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
-            //string sSourceBillType = lsmain[0].HBillType;
-            //BLL.ClsKf_ProductInBill bll = new BLL.ClsKf_ProductInBill();
-            //return bll.set_SaveProductInBill_New(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo);
-            
+            //var _value = oMain["oMain"].ToString();
+            //string msg1 = _value.ToString();
+            ////List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
+            ////ListModels oListModels = new ListModels();
+            ////lsmain = oListModels.getProductInBillMainByJson(msg1);
+            ////lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+            ////lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+            ////string sSourceBillType = lsmain[0].HBillType;
+            ////BLL.ClsKf_ProductInBill bll = new BLL.ClsKf_ProductInBill();
+            ////return bll.set_SaveProductInBill_New(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo);
+
+            //try
+            //{
+            //    List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
+            //    ListModels oListModels = new ListModels();
+            //    lsmain = oListModels.getProductInBillMainByJson(msg1);
+            //    //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+            //    //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+            //    string sSourceBillType = lsmain[0].HBillType;
+
+            //    WebAPI.WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain();
+
+            //    websLsmain.HInterID = lsmain[0].HInterID;
+            //    websLsmain.HDate = lsmain[0].HDate;
+            //    websLsmain.HBillNo = lsmain[0].HBillNo;
+            //    websLsmain.HDeptID = lsmain[0].HDeptID;
+            //    websLsmain.HEmpID = lsmain[0].HEmpID;
+            //    websLsmain.HKeeperID= lsmain[0].HKeeperID;
+            //    websLsmain.HRemark = lsmain[0].HRemark;
+            //    websLsmain.HMaker = lsmain[0].HMaker;
+            //    websLsmain.HWHID = lsmain[0].HWHID;
+            //    websLsmain.HSupID = lsmain[0].HSupID;
+            //    websLsmain.HExplanation = lsmain[0].HExplanation;
+            //    websLsmain.HBillType = "1202";//鍥哄畾鍊�
+
+
+            //    if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
+            //    {
+            //        objJsonResult.code = "0";
+            //        objJsonResult.count = 1;
+            //        objJsonResult.Message = "鐢熸垚浜у搧鍏ュ簱鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�";
+            //        objJsonResult.data = null;
+            //        return objJsonResult;
+            //    }
+            //    else
+            //    {
+            //        objJsonResult.code = "0";
+            //        objJsonResult.count = 0;
+            //        objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
+            //        objJsonResult.data = null;
+            //        return objJsonResult;
+            //    }
+            //}
+            //catch (Exception e)
+            //{
+            //    objJsonResult.code = "0";
+            //    objJsonResult.count = 0;
+            //    objJsonResult.Message = "涓婁紶澶辫触锛�" + e.ToString();
+            //    objJsonResult.data = null;
+            //    return objJsonResult;
+            //}
+
+
+
+
+
+            string text = oMain["oMain"].ToString();
+            string jsonString = text.ToString();
+            object result;
             try
             {
-                List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
-                ListModels oListModels = new ListModels();
-                lsmain = oListModels.getProductInBillMainByJson(msg1);
-                //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-                //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
-                string sSourceBillType = lsmain[0].HBillType;
-
-                WebAPI.WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain();
-
-                websLsmain.HInterID = lsmain[0].HInterID;
-                websLsmain.HDate = lsmain[0].HDate;
-                websLsmain.HBillNo = lsmain[0].HBillNo;
-                websLsmain.HDeptID = lsmain[0].HDeptID;
-                websLsmain.HEmpID = lsmain[0].HEmpID;
-                websLsmain.HKeeperID= lsmain[0].HKeeperID;
-                websLsmain.HRemark = lsmain[0].HRemark;
-                websLsmain.HMaker = lsmain[0].HMaker;
-                websLsmain.HWHID = lsmain[0].HWHID;
-                websLsmain.HSupID = lsmain[0].HSupID;
-                websLsmain.HExplanation = lsmain[0].HExplanation;
-                websLsmain.HBillType = "1202";//鍥哄畾鍊�
-
-
-                if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
+                List<ClsKf_ProductInBillMain> list = new List<ClsKf_ProductInBillMain>();
+                ListModels listModels = new ListModels();
+                list = listModels.getProductInBillMainByJson(jsonString);
+                list[0].HYear = ClsPub.isLong(DateTime.Now.Year);
+                list[0].HDate = ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+                string hbillType = list[0].HBillType;
+                WebAPI.WebS.ClsKf_ProductInBillMain clsKf_ProductInBillMain = new WebAPI.WebS.ClsKf_ProductInBillMain();
+                clsKf_ProductInBillMain.HInterID = list[0].HInterID;
+                clsKf_ProductInBillMain.HDate = list[0].HDate;
+                clsKf_ProductInBillMain.HBillNo = list[0].HBillNo;
+                clsKf_ProductInBillMain.HDeptID = list[0].HDeptID;
+                clsKf_ProductInBillMain.HEmpID = list[0].HEmpID;
+                clsKf_ProductInBillMain.HKeeperID = list[0].HKeeperID;
+                clsKf_ProductInBillMain.HRemark = list[0].HRemark;
+                clsKf_ProductInBillMain.HMaker = list[0].HMaker;
+                clsKf_ProductInBillMain.HWHID = list[0].HWHID;
+                clsKf_ProductInBillMain.HSupID = list[0].HSupID;
+                clsKf_ProductInBillMain.HExplanation = list[0].HExplanation;
+                clsKf_ProductInBillMain.HBillType = "1202";
+                bool flag = this.webserver.set_SaveProductInBill_New(clsKf_ProductInBillMain, hbillType, ref ClsPub.sErrInfo);
+                if (flag)
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鐢熸垚浜у搧鍏ュ簱鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    this.objJsonResult.code = "0";
+                    this.objJsonResult.count = 1;
+                    this.objJsonResult.Message = "鐢熸垚浜у搧鍏ュ簱鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�";
+                    this.objJsonResult.data = null;
+                    result = this.objJsonResult;
                 }
                 else
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    this.objJsonResult.code = "0";
+                    this.objJsonResult.count = 0;
+                    this.objJsonResult.Message = "涓婁紶澶辫触锛�" + ClsPub.sErrInfo;
+                    this.objJsonResult.data = null;
+                    result = this.objJsonResult;
                 }
             }
-            catch (Exception e)
+            catch (Exception ex)
             {
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "涓婁紶澶辫触锛�" + e.ToString();
-                objJsonResult.data = null;
-                return objJsonResult;
+                this.objJsonResult.code = "0";
+                this.objJsonResult.count = 0;
+                this.objJsonResult.Message = "涓婁紶澶辫触锛�" + ex.ToString();
+                this.objJsonResult.data = null;
+                result = this.objJsonResult;
             }
+            return result;
         }
 
         /// <summary>
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index a9b75c1..c0181c0 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -276,7 +276,6 @@
         //        model.Add("FBillType", new JObject() { ["Fnumber"] = "SCHBD01_SYS" }); //鍗曟嵁绫诲瀷鐢熶骇姹囨姤鈥淪CHBD02_SYS鈥� 鍏ュ簱姹囨姤SCHBD01_SYS
         //        model.Add("FPrdOrgId", new JObject() { ["Fnumber"] = dr1["FPrdOrgNUMBER"].ToString() }); //鐢熶骇缁勭粐1
         //        model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡1
-        //        model.Add("FHZYMESFLAG", "鏄�");//  鏄惁涓篗ES鍚屾
         //        model.Add("FBillNo", BillNo);
 
         //        JArray Fentity = new JArray();
@@ -304,19 +303,15 @@
         //            FentityModel.Add("FFailQty", item["涓嶈壇鏁伴噺"].ToString());//涓嶅悎鏍兼暟閲�
         //            FentityModel.Add("FStockInOrgId ", new JObject() { ["Fnumber"] = OrganizationNUM });// 鍏ュ簱缁勭粐 
         //            FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = dr1["FStockNUM"].ToString() }); // 浠撳簱 
-        //            FentityModel.Add("FMOID", dr1["FMOID"].ToString());//  
         //            FentityModel.Add("FMOBILLNO", dr1["FMOBILLNO"].ToString());//  
         //            FentityModel.Add("FMOENTRYID", dr1["FMOENTRYID"].ToString());//  
-        //            FentityModel.Add("FMOENTRYSEQ", dr1["FMOENTRYSEQ"].ToString());//  
         //            FentityModel.Add("FOwnerTypeId", dr1["FOWNERTYPEID"].ToString()); //璐т富绫诲瀷锛欶OwnerTypeId(蹇呭~椤�)
         //            FentityModel.Add("FOwnerId", new JObject() { ["Fnumber"] = dr1["FOwnerNumber"].ToString() }); //璐т富锛欶OwnerId(蹇呭~椤�)
-        //            FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr1["FBOMNUM"].ToString() }); //BOM鐗堟湰锛欶BomId(蹇呭~椤�)
+        //            FentityModel.Add("FBomId", new JObject() { ["F    number"] = dr1["FBOMNUM"].ToString() }); //BOM鐗堟湰锛欶BomId(蹇呭~椤�)
         //            FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// 鎴愭湰鏉冮噸
         //            FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// 鍊掑啿棰嗘枡
         //            FentityModel.Add("FMOMAINENTRYID", dr1["FMOENTRYID"].ToString());//
-        //            FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //鍖呰鏍囪瘑
         //            FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //鎵瑰彿
-        //            FentityModel.Add("F_bsv_Text", dr1["宸ュ簭娴佽浆鍗″彿"].ToString()); //娴佽浆鍗″彿
         //            JArray Fentity2 = new JArray();
         //            JObject FentityModel2 = new JObject();
         //            FentityModel2.Add("FEntity_Link_FFlowId", "f6e6eec3-5267-4f02-8593-b633da508a72");
@@ -329,9 +324,6 @@
         //            FentityModel2.Add("FEntity_Link_FBaseQuaQtyOld", item["鍚堟牸鏁伴噺"].ToString());
         //            FentityModel2.Add("FEntity_Link_FBaseQuaQty", item["鍚堟牸鏁伴噺"].ToString());
         //            Fentity2.Add(FentityModel2);
-        //            FentityModel.Add("FEntity_Link", Fentity2);
-        //            FentityModel.Add("FBFLowId", new JObject() { ["FID"] = "f6e6eec3-5267-4f02-8593-b633da508a72" }); //
-        //            Fentity.Add(FentityModel);
         //        }
         //        model.Add("FEntity", Fentity); //鏄庣粏淇℃伅                       
         //        JObject jsonRoot = new JObject()
@@ -632,6 +624,19 @@
                 ////鏍规嵁宸ュ簭姹囨姤鍗曚富ID鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曠殑鏁版嵁
                 //DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
                 //DataRow dr = ds.Tables[0].Rows[0];
+
+                //鍒ゆ柇鍏ュ簱鐨勫悎鏍兼暟閲忔槸鍚︿负0
+                var DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where HBillNo='"+ BillNo + "' ", "Sc_StationOutBillMain").Tables[0];
+
+                if (double.Parse(DTable.Rows[0]["HQty"].ToString()) == 0)
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 2;
+                    objJsonResult.Message = "鍚堟牸鏁伴噺涓�0,涓嶉渶瑕佸叆搴擄紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 //淇濆瓨
                 oCN.BeginTran();
                 //鐢熶骇姹囨姤鍗曚富琛�
@@ -680,7 +685,7 @@
                 //DataSet ds1 = oCN.RunProcReturn("select * from  h_v_TOERPProcduct_LastProc where HLastProc = '鏄�' and  hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc");
                 DataSet ds1 = oCN.RunProcReturn("exec h_p_TOERPProcduct_LastProc '" + BillNo + "'", "h_p_TOERPProcduct_LastProc");
                 DataRow dr1 = ds1.Tables[0].Rows[0];
-                if (ds1.Tables[0].Rows.Count <= 0)
+                if (double.Parse(dr1[0].ToString()) <= 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -893,6 +898,20 @@
                 ////鏍规嵁宸ュ簭姹囨姤鍗曚富ID鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曠殑鏁版嵁
                 //DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
                 //DataRow dr = ds.Tables[0].Rows[0];
+
+                //鍒ゆ柇鏈鎶ュ簾鎬绘暟閲忔槸鍚︿负0
+                var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from  Sc_StationOutBillMain where  HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
+
+                if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0)
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 2;
+                    objJsonResult.Message = "鎶ュ簾鏁伴噺涓�0,涓嶉渶瑕佸叆搴擄紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
                 //淇濆瓨
                 oCN.BeginTran();
                 //鐢熶骇姹囨姤鍗曚富琛�
@@ -1128,6 +1147,259 @@
         }
 
 
+        ///// <summary>
+        ///// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
+        ///// </summary>
+        ///// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param>
+        ///// <returns></returns>
+        //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
+        //[HttpGet]
+        //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber, 
+        //    double HCheckQty, double HRightQty, double HBadQty,
+        //    string HCheckResult, string HSupNumber,
+        //    string HUseResult, Int64 HSeQ, Int64 HSourceInterID, 
+        //    Int64 HSourceEntryID, string HSourceBillNo, string user,
+        //    Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID, 
+        //    Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
+        //    Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
+        //{
+        //    try
+        //    {
+        //        //鑾峰彇鐢熶骇姹囨姤鍗曟渶澶nterID鍜屽崟鎹彿
+        //        //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
+        //        //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
+
+        //        DataSet ds1 = oCN.RunProcReturn("select   * from MES_AccessoriesList  where  HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
+        //        string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
+        //        string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
+
+
+
+        //        string path = HFilePath;
+        //        FileInfo fi = new FileInfo(path);
+        //        long len = fi.Length;
+        //        byte[] buffer = new byte[len];
+        //        FileStream fs = new FileStream(path, FileMode.Open);
+        //        fs.Read(buffer, 0, (int)len);
+        //        //鏂囦欢IO娴�
+        //        string a = Convert.ToBase64String(buffer);
+
+
+        //        //淇濆瓨
+        //        oCN.BeginTran();
+        //        //鐢熶骇姹囨姤鍗曚富琛�
+        //        oCN.RunProc("Insert Into QC_POStockInCheckBillMain   " +
+        //        "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
+        //        ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
+        //        ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
+        //        ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
+        //        ") " +
+        //        " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
+        //        ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
+        //        ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
+        //        ",'" + HCheckResult.ToString() + "','', '','',''" +
+        //        ") ");
+        //        //鐢熶骇姹囨姤鍗曞瓙琛�
+        //        oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
+        //              " (HInterID,HEntryID,HCloseMan,HCloseType" +
+        //              ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+        //              ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
+        //              "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
+        //              ") values("
+        //              + HInterID.ToString() + ",1,'',''" +
+        //              ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
+        //              ",0,0,0,0,''" +
+        //              ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
+        //              ") ");
+        //        //鍚屾閲戣澏
+        //        //璁块棶閲戣澏
+        //        var loginRet = InvokeHelper.Login();
+        //        var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+        //        if (isSuccess == 0)
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = "鎿嶄綔澶辫触,閲戣澏璐﹀彿鐧诲綍寮傚父銆�" + loginRet;
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+
+
+        //        JObject model = new JObject();
+        //        model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //鍗曟嵁绫诲瀷 鏉ユ枡妫�楠屽崟JYD001_SYS
+        //        model.Add("FBusinessType", "1"); //涓氬姟绫诲瀷
+        //        model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡
+        //        model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //璐ㄦ缁勭粐
+        //        model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //鏉ユ簮缁勭粐
+        //        model.Add("FISSYNCED", "false");//  鏄惁宸插悓姝�
+        //        model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  鎶ユ鏃ユ湡
+        //        model.Add("FBillNo", HBillNo);
+
+        //        JArray Fentity = new JArray();
+        //            JObject FentityModel = new JObject();
+        //            FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  鐗╂枡鍐呯爜 
+        //            FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//璁¢噺鍗曚綅鍐呯爜
+        //            FentityModel.Add("FInspectQty", HCheckQty.ToString());//  妫�楠屾暟閲� 
+        //            FentityModel.Add("FQualifiedQty", HRightQty.ToString());//  鍚堟牸鏁伴噺 
+        //            FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());//  涓嶅悎鏍兼暟閲�
+        //            FentityModel.Add("FInspectResult", HCheckResult.ToString());//  妫�楠岀粨鏋�
+        //            FentityModel.Add("FQCStatus", "1");//  璐ㄦ鐘舵�� 
+        //            FentityModel.Add("FIsRelated", false);//  涓嶈壇鍝佸叧鑱旀爣蹇�
+        //            FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  婧愬崟绫诲瀷
+        //            FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//鍩烘湰鍗曚綅
+        //            FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//鍩烘湰鍗曚綅妫�楠屾暟閲�
+        //            FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  渚涘簲鍟�
+        //            //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // 浠撳簱
+        //            FentityModel.Add("FInspectTimes","1"); // 妫�楠屾鏁� 
+        //            FentityModel.Add("FTimeUnit","24");//鏃堕棿鍗曚綅
+        //            FentityModel.Add("FSAMPLEDAMAGEBEARER","2");//鏍锋湰鐮村潖鎵挎媴鏂�
+        //            FentityModel.Add("FISFIRSTINSPECT", false);//棣栨
+        //            FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//鍩烘湰鍗曚綅鍚堟牸鏁�
+        //        FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//鍩烘湰鍗曚綅鎺ユ敹鏁�
+        //        FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//甯佸埆
+        //            FentityModel.Add("FIsSplitRow ", false);// 鏄惁鎷嗗垎琛�
+
+        //            JArray Fentity2 = new JArray();
+        //            JObject FentityModel2 = new JObject();
+        //            FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  鐗╂枡鍐呯爜 
+        //            FentityModel2.Add("FPolicyStatus", "1");  //鐘舵��
+        //            FentityModel2.Add("FPolicyQty", HRightQty.ToString());    //鏁伴噺
+        //            FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //鍩烘湰鍗曚綅鏁伴噺
+        //            FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //浣跨敤鍐崇瓥
+        //            FentityModel2.Add("FIsCheck", false);   //鏄惁鎶芥
+        //            FentityModel2.Add("FIsDefectProcess", false);  //涓嶈壇澶勭悊
+        //            FentityModel2.Add("FCanSale", false);   //鍙攢鍞�
+        //            FentityModel2.Add("FIsMRBReview", false);   //MRP璇勫
+        //            FentityModel2.Add("FIsReturn", true);   //鍒ら��
+        //            FentityModel2.Add("FIsRelatedDefect", false);   //涓嶈壇鍝佸叧鑱旀爣蹇�
+        //            Fentity2.Add(FentityModel2);
+        //            FentityModel.Add("FPolicyDetail", Fentity2);
+
+
+
+        //        JArray Fentity3 = new JArray();
+        //        JObject FentityModel3 = new JObject();
+        //        FentityModel3.Add("FDetailID", "0");//  
+        //        FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill");   //婧愬崟绫诲瀷
+        //        FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString());    //鏀舵枡閫氱煡鍗曞崟鍙�
+        //        FentityModel3.Add("FSrcInterId", HSLInterID.ToString());      //鏀舵枡閫氱煡鍗曚富ID
+        //        FentityModel3.Add("FSrcEntryId",HSLEntryID.ToString());    //鏀舵枡閫氱煡鍗曞瓙ID
+        //        FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString());    //婧愬崟琛屽彿
+        //        FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" });  //  璁㈠崟绫诲瀷
+        //        FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString());   //璁㈠崟鍗曞彿
+        //        FentityModel3.Add("FOrderId", HSourceInterID.ToString());      //璁㈠崟涓籌D
+        //        FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString());  //璁㈠崟瀛怚D
+        //        FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString());  //璁㈠崟琛屽彿
+        //        Fentity3.Add(FentityModel3);
+        //        FentityModel.Add("FReferDetail", Fentity3);
+
+
+        //        JArray Fentity4 = new JArray();
+        //        JObject FentityModel4 = new JObject();
+        //        FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect");   //鍗曟嵁杞崲瑙勫垯
+        //        FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY");    //鏀舵枡閫氱煡鍗曞瓙琛�
+        //        FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString());      //鏀舵枡閫氱煡鍗曚富鍐呯爜
+        //        FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString());    //鏀舵枡閫氱煡鍗曞瓙鍐呯爜
+        //        FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString());    //
+        //        FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString());    //
+        //        FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString());    //
+        //        FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString());    //
+        //        Fentity4.Add(FentityModel4);
+        //        FentityModel.Add("FEntity_Link", Fentity4);
+
+
+
+        //        Fentity.Add(FentityModel);
+        //        model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
+        //        JObject jsonRoot = new JObject()
+        //        {
+        //            ["Creator"] = "",
+        //            ["NeedUpDateFields"] = new JArray(),
+        //            ["NeedReturnFields"] = new JArray(),
+        //            ["IsDeleteEntry"] = "false",
+        //            ["SubSystemId"] = "",
+        //            ["IsVerifyBaseDataField"] = "false",
+        //            //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
+        //            ["Model"] = model
+        //        };
+
+        //        string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
+        //        //鍒ゆ柇淇濆瓨鏄惁鎴愬姛
+        //        if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+        //        {
+        //            LogService.Write("鏉ユ枡妫�楠屽崟淇濆瓨閿欒jsonRoot:" + jsonRoot);
+        //            oCN.RollBack();
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍚屾閲戣澏浜戝け璐ワ紒鍗曞彿:{HBillNo.ToString()}" + jsonRoot;
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //        //鎻愪氦瀹℃牳
+        //        string result1 = string.Empty;
+        //        string result2 = string.Empty;
+        //        var fID = JObject.Parse(result)["Result"]["Id"].ToString();
+        //        var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
+        //        var json = new
+        //        {
+        //            Ids = fID,
+        //        };
+
+        //        K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
+
+
+
+        //        result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
+        //        result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
+        //        if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+        //        {
+
+
+
+        //            oCN.RollBack();
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍙凤細{fBillNo}锛屾彁浜ゅけ璐�" + result;
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            string jsonStr = "{" +
+        //               " \"FileName\":\"" + HFileName + "\"," +
+        //                   " \"FormId\":\"QM_InspectBill\"," +
+        //                   " \"IsLast\":\"true\"," +
+        //                   " \"InterId\":\"" + HInterID + "\"," +
+        //                   " \"BillNO\":\"" + HBillNo + "\"," +
+        //                   " \"AliasFileName\":\"test\"," +
+        //                   " \"SendByte\":\"" + a + "\"," +
+        //               "}";
+
+        //            var ret = client.AttachmentUpload(jsonStr);
+        //        }
+
+        //        oCN.Commit();
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 1;
+        //        objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+        //        objJsonResult.data = 1;
+        //        return objJsonResult;
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        oCN.RollBack();
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "Exception锛�" + e.ToString();
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //}
+        //#endregion
+
+
+
+
         /// <summary>
         /// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
         /// </summary>
@@ -1135,240 +1407,39 @@
         /// <returns></returns>
         [Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
         [HttpGet]
-        public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber, 
+        public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
             double HCheckQty, double HRightQty, double HBadQty,
-            string HCheckResult, string HSupNumber, string HWHNumber,
-            string HUseResult, Int64 HSeQ, Int64 HSourceInterID, 
+            string HCheckResult, string HSupNumber,
+            string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
             Int64 HSourceEntryID, string HSourceBillNo, string user,
-            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID, 
+            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
             Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
-            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
+            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
         {
-            try
+            WebS2.WebService1 oWebs1 = new WebS2.WebService1();
+
+
+            //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
+            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
+            if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
+                , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
+                , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
+                , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
+                , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
+                , ref sErrMsg))
             {
-                //鑾峰彇鐢熶骇姹囨姤鍗曟渶澶nterID鍜屽崟鎹彿
-                //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
-                //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
-
-                DataSet ds1 = oCN.RunProcReturn("select   * from MES_AccessoriesList  where  HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
-                string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
-                string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
-
-
-
-                string path = HFilePath;
-                FileInfo fi = new FileInfo(path);
-                long len = fi.Length;
-                byte[] buffer = new byte[len];
-                FileStream fs = new FileStream(path, FileMode.Open);
-                fs.Read(buffer, 0, (int)len);
-                //鏂囦欢IO娴�
-                string a = Convert.ToBase64String(buffer);
-
-
-                //淇濆瓨
-                oCN.BeginTran();
-                //鐢熶骇姹囨姤鍗曚富琛�
-                oCN.RunProc("Insert Into QC_POStockInCheckBillMain   " +
-                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
-                ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
-                ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
-                ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
-                ") " +
-                " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
-                ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
-                ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
-                ",'" + HCheckResult.ToString() + "','', '','',''" +
-                ") ");
-                //鐢熶骇姹囨姤鍗曞瓙琛�
-                oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
-                      " (HInterID,HEntryID,HCloseMan,HCloseType" +
-                      ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
-                      ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
-                      "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
-                      ") values("
-                      + HInterID.ToString() + ",1,'',''" +
-                      ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
-                      ",0,0,0,0,''" +
-                      ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
-                      ") ");
-                //鍚屾閲戣澏
-                //璁块棶閲戣澏
-                var loginRet = InvokeHelper.Login();
-                var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
-                if (isSuccess == 0)
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鎿嶄綔澶辫触,閲戣澏璐﹀彿鐧诲綍寮傚父銆�" + loginRet;
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                
-
-                JObject model = new JObject();
-                model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //鍗曟嵁绫诲瀷 鏉ユ枡妫�楠屽崟JYD001_SYS
-                model.Add("FBusinessType", "1"); //涓氬姟绫诲瀷
-                model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡
-                model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //鏉ユ簮缁勭粐
-                model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //璐ㄦ缁勭粐
-                model.Add("FISSYNCED", "false");//  鏄惁宸插悓姝�
-                model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  鎶ユ鏃ユ湡
-                model.Add("FBillNo", HBillNo);
-
-                JArray Fentity = new JArray();
-                    JObject FentityModel = new JObject();
-                    FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  鐗╂枡鍐呯爜 
-                    FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//璁¢噺鍗曚綅鍐呯爜
-                    FentityModel.Add("FInspectQty", HCheckQty.ToString());//  妫�楠屾暟閲� 
-                    FentityModel.Add("FQualifiedQty", HRightQty.ToString());//  鍚堟牸鏁伴噺 
-                    FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());//  涓嶅悎鏍兼暟閲�
-                    FentityModel.Add("FInspectResult", HCheckResult.ToString());//  妫�楠岀粨鏋�
-                    FentityModel.Add("FQCStatus", "1");//  璐ㄦ鐘舵�� 
-                    FentityModel.Add("FIsRelated", false);//  涓嶈壇鍝佸叧鑱旀爣蹇�
-                    FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  婧愬崟绫诲瀷
-                    FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//鍩烘湰鍗曚綅
-                    FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//鍩烘湰鍗曚綅妫�楠屾暟閲�
-                    FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  渚涘簲鍟�
-                    //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // 浠撳簱
-                    FentityModel.Add("FInspectTimes","1"); // 妫�楠屾鏁� 
-                    FentityModel.Add("FTimeUnit","24");//鏃堕棿鍗曚綅
-                    FentityModel.Add("FSAMPLEDAMAGEBEARER","2");//鏍锋湰鐮村潖鎵挎媴鏂�
-                    FentityModel.Add("FISFIRSTINSPECT", false);//棣栨
-                    FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//鍩烘湰鍗曚綅鍚堟牸鏁�
-                FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//鍩烘湰鍗曚綅鎺ユ敹鏁�
-                FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//甯佸埆
-                    FentityModel.Add("FIsSplitRow ", false);// 鏄惁鎷嗗垎琛�
-
-                    JArray Fentity2 = new JArray();
-                    JObject FentityModel2 = new JObject();
-                    FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  鐗╂枡鍐呯爜 
-                    FentityModel2.Add("FPolicyStatus", "1");  //鐘舵��
-                    FentityModel2.Add("FPolicyQty", HRightQty.ToString());    //鏁伴噺
-                    FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //鍩烘湰鍗曚綅鏁伴噺
-                    FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //浣跨敤鍐崇瓥
-                    FentityModel2.Add("FIsCheck", false);   //鏄惁鎶芥
-                    FentityModel2.Add("FIsDefectProcess", false);  //涓嶈壇澶勭悊
-                    FentityModel2.Add("FCanSale", false);   //鍙攢鍞�
-                    FentityModel2.Add("FIsMRBReview", false);   //MRP璇勫
-                    FentityModel2.Add("FIsReturn", true);   //鍒ら��
-                    FentityModel2.Add("FIsRelatedDefect", false);   //涓嶈壇鍝佸叧鑱旀爣蹇�
-                    Fentity2.Add(FentityModel2);
-                    FentityModel.Add("FPolicyDetail", Fentity2);
-
-
-
-                JArray Fentity3 = new JArray();
-                JObject FentityModel3 = new JObject();
-                FentityModel3.Add("FDetailID", "0");//  
-                FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill");   //婧愬崟绫诲瀷
-                FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString());    //鏀舵枡閫氱煡鍗曞崟鍙�
-                FentityModel3.Add("FSrcInterId", HSLInterID.ToString());      //鏀舵枡閫氱煡鍗曚富ID
-                FentityModel3.Add("FSrcEntryId",HSLEntryID.ToString());    //鏀舵枡閫氱煡鍗曞瓙ID
-                FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString());    //婧愬崟琛屽彿
-                FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" });  //  璁㈠崟绫诲瀷
-                FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString());   //璁㈠崟鍗曞彿
-                FentityModel3.Add("FOrderId", HSourceInterID.ToString());      //璁㈠崟涓籌D
-                FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString());  //璁㈠崟瀛怚D
-                FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString());  //璁㈠崟琛屽彿
-                Fentity3.Add(FentityModel3);
-                FentityModel.Add("FReferDetail", Fentity3);
-
-
-                JArray Fentity4 = new JArray();
-                JObject FentityModel4 = new JObject();
-                FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect");   //鍗曟嵁杞崲瑙勫垯
-                FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY");    //鏀舵枡閫氱煡鍗曞瓙琛�
-                FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString());      //鏀舵枡閫氱煡鍗曚富鍐呯爜
-                FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString());    //鏀舵枡閫氱煡鍗曞瓙鍐呯爜
-                FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString());    //
-                FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString());    //
-                FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString());    //
-                FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString());    //
-                Fentity4.Add(FentityModel4);
-                FentityModel.Add("FEntity_Link", Fentity4);
-
-
-
-                Fentity.Add(FentityModel);
-                model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
-                JObject jsonRoot = new JObject()
-                {
-                    ["Creator"] = "",
-                    ["NeedUpDateFields"] = new JArray(),
-                    ["NeedReturnFields"] = new JArray(),
-                    ["IsDeleteEntry"] = "false",
-                    ["SubSystemId"] = "",
-                    ["IsVerifyBaseDataField"] = "false",
-                    //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
-                    ["Model"] = model
-                };
-
-                string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
-                //鍒ゆ柇淇濆瓨鏄惁鎴愬姛
-                if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
-                {
-                    LogService.Write("鏉ユ枡妫�楠屽崟淇濆瓨閿欒jsonRoot:" + jsonRoot);
-                    oCN.RollBack();
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍚屾閲戣澏浜戝け璐ワ紒鍗曞彿:{HBillNo.ToString()}" + jsonRoot;
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                //鎻愪氦瀹℃牳
-                string result1 = string.Empty;
-                string result2 = string.Empty;
-                var fID = JObject.Parse(result)["Result"]["Id"].ToString();
-                var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
-                var json = new
-                {
-                    Ids = fID,
-                };
-
-                K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
-
-
-
-                result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
-                result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
-                if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
-                {
-                    string jsonStr = "{" +
-                        " \"FileName\":\"" + HFileName + "\"," +
-                            " \"FormId\":\"QM_InspectBill\"," +
-                            " \"IsLast\":\"true\"," +
-                            " \"InterId\":\"" + HInterID + "\"," +
-                            " \"BillNO\":\"" + HBillNo + "\"," +
-                            " \"AliasFileName\":\"test\"," +
-                            " \"SendByte\":\"" + a + "\"," +
-                        "}";
-
-                    var ret = client.AttachmentUpload(jsonStr);
-
-
-                    oCN.RollBack();
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍙凤細{fBillNo}锛屾彁浜ゅけ璐�" + result;
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-
-                oCN.Commit();
                 objJsonResult.code = "0";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
-                objJsonResult.data = 1;
+                objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�";
+                objJsonResult.data = null;
                 return objJsonResult;
             }
-            catch (Exception e)
+            else
             {
-                oCN.RollBack();
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "Exception锛�" + e.ToString();
-                objJsonResult.data = null;
+                objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�";
+                objJsonResult.data = sErrMsg;
                 return objJsonResult;
             }
         }
diff --git a/WebAPI/Controllers/SellOutController.cs b/WebAPI/Controllers/SellOutController.cs
index edb20e3..0cbc00b 100644
--- a/WebAPI/Controllers/SellOutController.cs
+++ b/WebAPI/Controllers/SellOutController.cs
@@ -377,7 +377,7 @@
         //閿�鍞嚭搴�/鎵潯鐮�/鐩存帴璋僿ebservice
         [Route("SellOut/get_CheckTypeByBarCode_Json")]
         [HttpGet]
-        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID,string HScanStyle)
+        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
         {
             //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
             string sExpressNumber = "";
@@ -399,6 +399,33 @@
                 return objJsonResult;
             }
         }
+
+        //public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string HBillType, string sBillNo, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
+        //{
+        //    string hexpressNumber = "";
+        //    this.WebSoBar = this.oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
+        //    bool flag = this.WebSoBar == null;
+        //    object result;
+        //    if (flag)
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 0;
+        //        this.objJsonResult.Message = ClsPub.sErrInfo;
+        //        this.objJsonResult.data = null;
+        //        result = this.objJsonResult;
+        //    }
+        //    else
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 1;
+        //        this.objJsonResult.Message = ClsPub.sErrInfo;
+        //        this.objJsonResult.data = this.oBar;
+        //        result = this.objJsonResult;
+        //    }
+        //    return result;
+        //}
+
+
         /// <summary>
         /// 杩斿洖鍑哄叆搴撴潯鐮佷复鏃惰〃     
         /// </summary>
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
new file mode 100644
index 0000000..1cca132
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
@@ -0,0 +1,360 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_MaterTypeBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 鐗╂枡鍒嗙被鍒楄〃
+        [Route("Gy_MaterType/Gy_MaterTypeList")]
+        [HttpGet]
+        public object Gy_MaterTypeList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                string sql1 = string.Format(@"select * from h_v_IF_MaterType where 浣跨敤缁勭粐='" + Organization + "'");
+
+                ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_IF_MaterType");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鐗╂枡鍒嗙被 淇濆瓨/缂栬緫
+        [Route("Gy_MaterType/SaveGy_MaterType")]
+        [HttpPost]
+        public object SaveGy_MaterType([FromBody] JObject msg)
+        {
+            DataSet ds;
+            var _value = msg["msg"].ToString();
+            string msg3 = _value.ToString();
+            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg1 = sArray[0].ToString();//鏁版嵁
+            string msg2 = sArray[1].ToString();//鐢ㄦ埛
+            string msg_HUSEORGID = sArray[2].ToString();//缁勭粐
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            try
+            {
+                DAL.ClsGy_MaterType_Ctl oBill = new DAL.ClsGy_MaterType_Ctl();
+                List<Model.ClsGy_MaterType_Model> lsmain = new List<Model.ClsGy_MaterType_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                msg1 = "[" + msg1 + "]";
+                lsmain = JsonConvert.DeserializeObject<List<Model.ClsGy_MaterType_Model>>(msg1);
+                foreach (Model.ClsGy_MaterType_Model oItem in lsmain)
+                {
+                    if (oItem.HNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (oItem.HName.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_MaterType where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_MaterType");
+
+                    if (ds.Tables[0].Rows.Count > 0)
+                    {
+                        if (oItem.HItemID == 0 || (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString() && oItem.HItemID != 0))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                   
+
+                    //寰楀埌鐭唬鐮�
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oItem.HCREATEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HMakeEmp = msg2;
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+                    oBill.oModel = oItem;
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (oBill.oModel.HItemID == 0)
+                {
+                    bResult = oBill.AddNew();
+                }
+                else
+                {
+                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
+        #region 鐗╂枡鍒嗙被  鍒犻櫎
+        [Route("Gy_MaterType/DeleteMaterType")]
+        [HttpGet]
+        public object DeleteMaterType(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_MaterType_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (string.IsNullOrWhiteSpace(HItemID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HItemID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+                ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HItemID, "Gy_MaterType");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+                var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
+                if (HStopflag)
+                {
+                    oCN.RollBack();//鍥炴粴浜嬪姟
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏁版嵁宸茬鐢ㄦ棤娉曞啀娆″垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.RunProc("delete from Gy_MaterType where HItemID=" + HItemID);
+                oCN.Commit();//鎻愪氦浜嬪姟
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鐗╂枡鍒嗙被瀹℃牳銆佸弽瀹℃牳
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_MaterType/AuditGy_MaterType")]
+        [HttpGet]
+        public object AuditGy_MaterType(int HInterID, int IsAudit, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType");
+                if (ds.Tables[0].Rows.Count>0)
+                {
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                {
+                    oCN.RunProc("update Gy_MaterType set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "瀹℃牳鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                {
+                    oCN.RunProc("update Gy_MaterType set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs"
index a07c887..70d50bf 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs"
@@ -189,59 +189,23 @@
             try
             {
                 List<object> columnNameList = new List<object>();
-                //ds = oCN.RunProcReturn("select " +
-                //    "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) 宸ュ簭宸ヤ环璧勬枡浠g爜,a.HDeptID,b.HName HDeptName" +
-                //    ",a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" +
-                //    ",a.HProcID HProcIDCol,d.HNumber HProcNumberCol,d.HName HProcNameCol" +
-                //    ",a.HSourceID HSourceIDCol,e.HNumber HSourceNumberCol,e.HName HSourceNameCol" +
-                //    ",a.HPrice HPriceCol,a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" +
-                //    ",case when a.HCostFlag<>0 then 'true'else 'false'end HCostFlagCol" +
-                //    ",case when a.HFlowFlag<>0 then 'true'else 'false'end HFlowFlagCol" +
-                //    ",case when a.HPayFlag<>0 then 'true'else 'false'end HPayFlagCol,a.HRemark HRemarkCol " +
-                //    " from Gy_ProcPrice a " +
-                //    " left join Gy_Department b on a.HDeptID = b.HItemID " +
-                //    " left join Gy_Material c on a.HMaterID = c.HItemID " +
-                //    " left join Gy_Process d on a.HProcID = d.HItemID " +
-                //    " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice");
-                ds = oCN.RunProcReturn("select " +
-                   "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) 宸ュ簭宸ヤ环璧勬枡浠g爜,a.HDeptID,b.HName 閮ㄩ棬" +
-                   ",a.HMaterID HMaterIDCol,c.HNumber 鐗╂枡浠g爜,c.HName 鐗╂枡鍚嶇О,c.HModel 瑙勬牸鍨嬪彿" +
-                   ",a.HProcID HProcIDCol,d.HNumber 宸ュ簭浠g爜,d.HName 宸ュ簭鍚嶇О" +
-                   ",a.HSourceID HSourceIDCol,e.HNumber 璧勬簮浠g爜,e.HName 璧勬簮鍚嶇О" +
-                   ",a.HPrice 鍗曚环,a.HBeginDate 寮�濮嬫棩鏈�,a.HEndDate 缁撴潫鏃ユ湡" +
-                   ",case when a.HCostFlag<>0 then 'true'else 'false'end 鎴愭湰蹇呴��" +
-                   ",case when a.HFlowFlag<>0 then 'true'else 'false'end 娴佽浆榛樿" +
-                   ",case when a.HPayFlag<>0 then 'true'else 'false'end 宸ヨ祫榛樿,a.HRemark 澶囨敞 " +
-                   " from Gy_ProcPrice a " +
-                   " left join Gy_Department b on a.HDeptID = b.HItemID " +
-                   " left join Gy_Material c on a.HMaterID = c.HItemID " +
-                   " left join Gy_Process d on a.HProcID = d.HItemID " +
-                   " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice");
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垪琛ㄤ俊鎭紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                else
-                {
-                    //娣诲姞鍒楀悕
-                    foreach (DataColumn col in ds.Tables[0].Columns)
-                    {
-                        Type dataType = col.DataType;
-                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
-                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
-                    }
 
-                    objJsonResult.code = "1";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "Sucess锛�";
-                    objJsonResult.data = ds.Tables[0];
-                    objJsonResult.list = columnNameList;
-                    return objJsonResult;
+                ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where HItemID = " + HItemID, "h_v_Gy_ProcPriceList");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
                 }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
             }
             catch (Exception e)
             {
@@ -253,5 +217,203 @@
             }
         }
         #endregion
+
+        #region 宸ュ簭宸ヤ环 鍒犻櫎
+        [Route("Gy_ProcPrice/DelProcPrice")]
+        [HttpGet]
+        public object DelProcPrice(int HInterID, string User)
+        {
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcPriceList_Delete", 1, false, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DAL.ClsGy_ProcPrice_Ctl BillNew = new DAL.ClsGy_ProcPrice_Ctl();
+                var sReturn = "";
+                if (BillNew.ShowBill(HInterID, ref sReturn))
+                {
+                    foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
+                    {
+                        if (oSub.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "褰撳墠鍗曟嵁涓嶈兘鍒犻櫎锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+
+
+                    bool flag = false;
+                    oCN.BeginTran();//寮�鍚簨鍔�
+
+                    flag= BillNew.DeleteByID(HInterID);
+
+                    oCN.Commit();//缁撴潫浜嬪姟
+
+                    if (flag)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                }
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "褰撳墠鍗曟嵁涓嶅瓨鍦�,鏃犳硶鍒犻櫎锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();//鍥炴粴浜嬪姟
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region [宸ュ簭宸ヤ环瀹℃牳銆佸弽瀹℃牳]
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_ProcPrice/AuditGy_ProcPrice")]
+        [HttpGet]
+        public object AuditGy_ProcPrice(int HInterID, int IsAudit, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcPriceList_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                DBUtility.ClsPub.CurUserName = CurUserName;
+                DAL.ClsGy_ProcPrice_Ctl BillNew = new DAL.ClsGy_ProcPrice_Ctl();
+                var sReturn = "";
+                if (BillNew.ShowBill(HInterID, ref sReturn))
+                {
+                    foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
+                    {
+                        if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                        {
+                            if (oSub.HChecker.Trim() != "")
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                        if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                        {
+                            if (oSub.HChecker.Trim() == "")
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
+                {
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        //瀹℃牳鎻愪氦
+                        if (BillNew.CheckBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "瀹℃牳鎴愬姛";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        //鍙嶅鏍告彁浜bandonCheck
+                        if (BillNew.AbandonCheck(HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
index 9c0b28c..3ac7d95 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
@@ -143,6 +143,9 @@
                     return objJsonResult;
                 }
 
+                //淇敼瀛楁 HSTOCKINORGID
+                oCN.RunProc("update Sc_ICMOBillSub set HSTOCKINORGID=" + HPRDORGID + " where HInterID=" + HInterID);
+
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = null;
diff --git a/WebAPI/DLL/Newtonsoft.Json.rar b/WebAPI/DLL/Newtonsoft.Json.rar
new file mode 100644
index 0000000..fa77229
--- /dev/null
+++ b/WebAPI/DLL/Newtonsoft.Json.rar
Binary files differ
diff --git a/WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll b/WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll
new file mode 100644
index 0000000..0a91cd7
--- /dev/null
+++ b/WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll
Binary files differ
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 9054a8d..ae5c17a 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -1520,6 +1520,24 @@
             return list;
         }
 
+        ///宸ュ簭杩斿伐璁板綍鍗� 涓昏〃
+        ///ClsSc_ProcExchRecordBackBillMain
+        public List<Model.ClsSc_ProcExchRecordBackBillMain> getObjectByJson_ClsSc_ProcExchRecordBackBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSc_ProcExchRecordBackBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ProcExchRecordBackBillMain>>(jsonString);
+            return list;
+        }
+
+        ///宸ュ簭杩斿伐璁板綍鍗� 瀛愯〃
+        ///ClsSc_ProcExchRecordBackBillSub
+        public List<Model.ClsSc_ProcExchRecordBackBillSub> getObjectByJson_ClsSc_ProcExchRecordBackBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSc_ProcExchRecordBackBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ProcExchRecordBackBillSub>>(jsonString);
+            return list;
+        }
+
         ///宸ュ簭娲惧伐鍗� 涓昏〃
         ///ClsSc_ProcExchWorkBackBillMain
         public List<Model.ClsSc_ProcessSendWorkMain> getObjectByJson_ClsSc_ProcessSendWorkMain(string jsonString)
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index 108d0d8..6a36202 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -9,79 +9,79 @@
   </PropertyGroup>
   <ItemGroup>
     <File Include="apiapp.json">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="bin/Antlr3.Runtime.dll">
-      <publishTime>02/22/2013 08:43:40</publishTime>
+      <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/Antlr3.Runtime.pdb">
-      <publishTime>02/22/2013 08:43:40</publishTime>
+      <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
       <publishTime>11/09/2022 16:02:08</publishTime>
       <publishTime>11/02/2022 22:03:01</publishTime>
-      <publishTime>01/10/2023 16:52:41</publishTime>
+      <publishTime>03/03/2023 13:34:09</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
       <publishTime>11/09/2022 16:02:08</publishTime>
       <publishTime>11/02/2022 22:03:01</publishTime>
-      <publishTime>01/10/2023 16:52:41</publishTime>
+      <publishTime>03/03/2023 13:34:09</publishTime>
     </File>
     <File Include="bin/BouncyCastle.Crypto.dll">
-      <publishTime>12/17/2020 21:32:28</publishTime>
+      <publishTime>12/18/2020 05:32:28</publishTime>
     </File>
     <File Include="bin/DAL.dll">
       <publishTime>11/09/2022 16:02:06</publishTime>
       <publishTime>11/02/2022 22:02:58</publishTime>
-      <publishTime>01/10/2023 16:52:37</publishTime>
+      <publishTime>03/03/2023 13:34:07</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
       <publishTime>11/09/2022 16:02:06</publishTime>
       <publishTime>11/02/2022 22:02:58</publishTime>
-      <publishTime>01/10/2023 16:52:37</publishTime>
+      <publishTime>03/03/2023 13:34:07</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
-      <publishTime>07/22/2016 14:52:40</publishTime>
+      <publishTime>07/22/2016 22:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
       <publishTime>11/02/2022 22:02:56</publishTime>
       <publishTime>11/15/2022 13:55:23</publishTime>
-      <publishTime>01/10/2023 16:52:27</publishTime>
+      <publishTime>03/03/2023 13:34:05</publishTime>
     </File>
     <File Include="bin/DBUtility.pdb">
       <publishTime>11/09/2022 16:01:58</publishTime>
       <publishTime>11/02/2022 22:02:56</publishTime>
-      <publishTime>01/10/2023 16:52:27</publishTime>
+      <publishTime>03/03/2023 13:34:05</publishTime>
     </File>
     <File Include="bin/Grpc.Core.Api.dll">
-      <publishTime>03/22/2022 05:17:26</publishTime>
+      <publishTime>03/22/2022 13:17:26</publishTime>
     </File>
     <File Include="bin/Grpc.Core.Api.pdb">
-      <publishTime>03/18/2022 23:39:42</publishTime>
+      <publishTime>03/19/2022 07:39:42</publishTime>
     </File>
     <File Include="bin/Grpc.Core.dll">
-      <publishTime>03/22/2022 05:17:20</publishTime>
+      <publishTime>03/22/2022 13:17:20</publishTime>
     </File>
     <File Include="bin/Grpc.Core.pdb">
-      <publishTime>03/18/2022 23:39:48</publishTime>
+      <publishTime>03/19/2022 07:39:48</publishTime>
     </File>
     <File Include="bin/grpc_csharp_ext.x64.dll">
-      <publishTime>03/22/2022 05:17:22</publishTime>
+      <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="bin/grpc_csharp_ext.x86.dll">
-      <publishTime>03/22/2022 05:17:22</publishTime>
+      <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="bin/ICSharpCode.SharpZipLib.dll">
-      <publishTime>05/08/2021 17:08:30</publishTime>
+      <publishTime>05/09/2021 01:08:30</publishTime>
     </File>
     <File Include="bin/ICSharpCode.SharpZipLib.pdb">
-      <publishTime>05/08/2021 17:08:30</publishTime>
+      <publishTime>05/09/2021 01:08:30</publishTime>
     </File>
     <File Include="bin/Interop.gregn6Lib.dll">
       <publishTime>08/25/2021 10:28:25</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>08/19/2021 09:43:58</publishTime>
+      <publishTime>02/07/2023 09:16:49</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
       <publishTime>09/20/2018 19:23:20</publishTime>
@@ -90,99 +90,99 @@
       <publishTime>09/20/2018 19:28:34</publishTime>
     </File>
     <File Include="bin/libgrpc_csharp_ext.x64.dylib">
-      <publishTime>03/18/2022 23:38:44</publishTime>
+      <publishTime>03/19/2022 07:38:44</publishTime>
     </File>
     <File Include="bin/libgrpc_csharp_ext.x64.so">
-      <publishTime>03/18/2022 23:38:42</publishTime>
+      <publishTime>03/19/2022 07:38:42</publishTime>
     </File>
     <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
-      <publishTime>03/18/2015 17:02:50</publishTime>
+      <publishTime>03/19/2015 01:02:50</publishTime>
     </File>
     <File Include="bin/Microsoft.CSharp.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/Microsoft.Web.Infrastructure.dll">
-      <publishTime>07/25/2012 11:48:56</publishTime>
+      <publishTime>07/25/2012 19:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
       <publishTime>11/09/2022 16:02:01</publishTime>
       <publishTime>11/02/2022 22:02:56</publishTime>
-      <publishTime>01/10/2023 16:52:28</publishTime>
+      <publishTime>03/03/2023 13:34:06</publishTime>
     </File>
     <File Include="bin/Model.pdb">
       <publishTime>11/09/2022 16:02:01</publishTime>
       <publishTime>11/02/2022 22:02:56</publishTime>
-      <publishTime>01/10/2023 16:52:28</publishTime>
+      <publishTime>03/03/2023 13:34:06</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="bin/Newtonsoft.Json.dll">
-      <publishTime>08/03/2014 20:33:56</publishTime>
+      <publishTime>08/04/2014 04:33:56</publishTime>
     </File>
     <File Include="bin/NPOI.dll">
-      <publishTime>10/23/2021 01:07:54</publishTime>
+      <publishTime>10/23/2021 09:07:54</publishTime>
     </File>
     <File Include="bin/NPOI.OOXML.dll">
-      <publishTime>10/23/2021 01:07:56</publishTime>
-    </File>
-    <File Include="bin/NPOI.OOXML.pdb">
       <publishTime>10/23/2021 09:07:56</publishTime>
     </File>
+    <File Include="bin/NPOI.OOXML.pdb">
+      <publishTime>10/23/2021 17:07:56</publishTime>
+    </File>
     <File Include="bin/NPOI.OpenXml4Net.dll">
-      <publishTime>10/23/2021 01:07:54</publishTime>
+      <publishTime>10/23/2021 09:07:54</publishTime>
     </File>
     <File Include="bin/NPOI.OpenXml4Net.pdb">
-      <publishTime>10/23/2021 09:07:54</publishTime>
+      <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/NPOI.OpenXmlFormats.dll">
-      <publishTime>10/23/2021 01:07:54</publishTime>
+      <publishTime>10/23/2021 09:07:54</publishTime>
     </File>
     <File Include="bin/NPOI.OpenXmlFormats.pdb">
-      <publishTime>10/23/2021 09:07:54</publishTime>
+      <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/NPOI.pdb">
-      <publishTime>10/23/2021 09:07:54</publishTime>
+      <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
       <publishTime>11/09/2022 16:01:56</publishTime>
       <publishTime>11/02/2022 22:02:54</publishTime>
-      <publishTime>01/10/2023 16:52:16</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/Pub_Class.pdb">
       <publishTime>11/09/2022 16:01:56</publishTime>
       <publishTime>11/02/2022 22:02:54</publishTime>
-      <publishTime>01/10/2023 16:52:16</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/Pub_Control.dll">
       <publishTime>11/09/2022 16:01:57</publishTime>
       <publishTime>11/02/2022 22:02:55</publishTime>
-      <publishTime>01/10/2023 16:52:17</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/Pub_Control.pdb">
       <publishTime>11/09/2022 16:01:57</publishTime>
       <publishTime>11/02/2022 22:02:55</publishTime>
-      <publishTime>01/10/2023 16:52:17</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/RestSharp.dll">
       <publishTime>08/30/2012 22:22:50</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
-      <publishTime>01/10/2023 16:52:26</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/SQLHelper.pdb">
       <publishTime>11/09/2022 16:01:57</publishTime>
       <publishTime>11/02/2022 22:02:55</publishTime>
-      <publishTime>01/10/2023 16:52:26</publishTime>
+      <publishTime>03/03/2023 13:34:04</publishTime>
     </File>
     <File Include="bin/stdole.dll">
       <publishTime>05/09/2021 13:35:37</publishTime>
     </File>
     <File Include="bin/Swashbuckle.Core.dll">
-      <publishTime>02/15/2015 17:57:08</publishTime>
+      <publishTime>02/16/2015 01:57:08</publishTime>
     </File>
     <File Include="bin/System.Buffers.dll">
-      <publishTime>07/19/2017 10:01:28</publishTime>
+      <publishTime>07/19/2017 18:01:28</publishTime>
     </File>
     <File Include="bin/System.ComponentModel.DataAnnotations.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
@@ -206,19 +206,19 @@
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/System.IdentityModel.Tokens.Jwt.dll">
-      <publishTime>08/19/2014 10:03:34</publishTime>
+      <publishTime>08/19/2014 18:03:34</publishTime>
     </File>
     <File Include="bin/System.Memory.dll">
-      <publishTime>04/17/2019 16:24:34</publishTime>
+      <publishTime>04/18/2019 00:24:34</publishTime>
     </File>
     <File Include="bin/System.Net.Http.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/System.Net.Http.Formatting.dll">
-      <publishTime>11/28/2018 13:00:36</publishTime>
+      <publishTime>11/28/2018 21:00:36</publishTime>
     </File>
     <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll">
-      <publishTime>09/18/2018 19:38:10</publishTime>
+      <publishTime>09/19/2018 03:38:10</publishTime>
     </File>
     <File Include="bin/System.Runtime.Serialization.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
@@ -227,7 +227,7 @@
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/System.Web.Cors.dll">
-      <publishTime>11/28/2018 12:58:44</publishTime>
+      <publishTime>11/28/2018 20:58:44</publishTime>
     </File>
     <File Include="bin/System.Web.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
@@ -242,37 +242,37 @@
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/System.Web.Helpers.dll">
-      <publishTime>01/28/2015 04:04:30</publishTime>
+      <publishTime>01/28/2015 12:04:30</publishTime>
     </File>
     <File Include="bin/System.Web.Http.Cors.dll">
-      <publishTime>11/28/2018 13:01:26</publishTime>
+      <publishTime>11/28/2018 21:01:26</publishTime>
     </File>
     <File Include="bin/System.Web.Http.dll">
-      <publishTime>11/28/2018 13:01:00</publishTime>
+      <publishTime>11/28/2018 21:01:00</publishTime>
     </File>
     <File Include="bin/System.Web.Http.WebHost.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="bin/System.Web.Mvc.dll">
-      <publishTime>01/28/2015 04:02:18</publishTime>
+      <publishTime>01/28/2015 12:02:18</publishTime>
     </File>
     <File Include="bin/System.Web.Optimization.dll">
-      <publishTime>02/11/2014 15:26:04</publishTime>
+      <publishTime>02/11/2014 23:26:04</publishTime>
     </File>
     <File Include="bin/System.Web.Razor.dll">
-      <publishTime>01/28/2015 04:02:32</publishTime>
+      <publishTime>01/28/2015 12:02:32</publishTime>
     </File>
     <File Include="bin/System.Web.Services.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/System.Web.WebPages.Deployment.dll">
-      <publishTime>01/28/2015 04:04:30</publishTime>
+      <publishTime>01/28/2015 12:04:30</publishTime>
     </File>
     <File Include="bin/System.Web.WebPages.dll">
-      <publishTime>01/28/2015 04:04:30</publishTime>
+      <publishTime>01/28/2015 12:04:30</publishTime>
     </File>
     <File Include="bin/System.Web.WebPages.Razor.dll">
-      <publishTime>01/28/2015 04:04:30</publishTime>
+      <publishTime>01/28/2015 12:04:30</publishTime>
     </File>
     <File Include="bin/System.Xml.dll">
       <publishTime>09/26/2012 03:16:08</publishTime>
@@ -281,12 +281,12 @@
       <publishTime>09/26/2012 03:16:08</publishTime>
     </File>
     <File Include="bin/WebActivatorEx.dll">
-      <publishTime>11/24/2014 11:18:48</publishTime>
+      <publishTime>11/24/2014 19:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
       <publishTime>11/14/2022 11:23:59</publishTime>
       <publishTime>11/02/2022 22:03:04</publishTime>
-      <publishTime>01/10/2023 16:53:00</publishTime>
+      <publishTime>03/03/2023 13:34:12</publishTime>
     </File>
     <File Include="bin/WebAPI.dll.config">
       <publishTime>12/15/2021 17:59:43</publishTime>
@@ -294,196 +294,196 @@
     <File Include="bin/WebAPI.pdb">
       <publishTime>11/14/2022 11:23:59</publishTime>
       <publishTime>11/02/2022 22:03:04</publishTime>
-      <publishTime>01/10/2023 16:53:00</publishTime>
+      <publishTime>03/03/2023 13:34:12</publishTime>
     </File>
     <File Include="bin/WebGrease.dll">
-      <publishTime>07/17/2013 17:03:52</publishTime>
+      <publishTime>07/18/2013 01:03:52</publishTime>
     </File>
     <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
-      <publishTime>11/29/2018 13:26:02</publishTime>
+      <publishTime>11/29/2018 21:26:02</publishTime>
     </File>
     <File Include="bin/zh-Hans/System.Web.Http.resources.dll">
-      <publishTime>11/29/2018 13:26:30</publishTime>
+      <publishTime>11/29/2018 21:26:30</publishTime>
     </File>
     <File Include="Config/kdapi.config">
-      <publishTime>08/19/2022 08:17:39</publishTime>
+      <publishTime>08/16/2022 22:31:46</publishTime>
     </File>
     <File Include="Content/bootstrap.css">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Content/bootstrap.min.css">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Content/Site.css">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/BLL.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/DAL.dll">
-      <publishTime>11/01/2021 09:26:33</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/DBUtility.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>02/07/2023 09:16:49</publishTime>
     </File>
     <File Include="DLL/Model.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/Newtonsoft.Json.Net35.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/Pub_Class.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/Pub_Control.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="DLL/SQLHelper.dll">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.eot">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.svg">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.ttf">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.woff">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Global.asax">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="grpc_csharp_ext.x64.dll">
-      <publishTime>03/22/2022 05:17:22</publishTime>
+      <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="grpc_csharp_ext.x86.dll">
-      <publishTime>03/22/2022 05:17:22</publishTime>
+      <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="Index.html">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="libgrpc_csharp_ext.x64.dylib">
-      <publishTime>03/18/2022 23:38:44</publishTime>
+      <publishTime>03/19/2022 07:38:44</publishTime>
     </File>
     <File Include="libgrpc_csharp_ext.x64.so">
-      <publishTime>03/18/2022 23:38:42</publishTime>
+      <publishTime>03/19/2022 07:38:42</publishTime>
     </File>
     <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="packages.config">
-      <publishTime>11/29/2022 10:36:46</publishTime>
+      <publishTime>11/29/2022 08:58:24</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.min.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.map">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.min.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Scripts/modernizr-2.6.2.js">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Shared/Error.cshtml">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/Shared/_Layout.cshtml">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/web.config">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Views/_ViewStart.cshtml">
-      <publishTime>08/19/2021 09:44:01</publishTime>
+      <publishTime>03/15/2022 10:06:42</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
-      <publishTime>01/10/2023 11:14:47</publishTime>
+      <publishTime>02/26/2023 19:50:05</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
-      <publishTime>01/10/2023 11:14:46</publishTime>
+      <publishTime>02/26/2023 19:50:04</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
-      <publishTime>01/10/2023 11:14:48</publishTime>
+      <publishTime>02/26/2023 19:50:05</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
-      <publishTime>01/10/2023 11:14:47</publishTime>
+      <publishTime>02/26/2023 19:50:05</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
-      <publishTime>01/10/2023 11:14:47</publishTime>
+      <publishTime>02/26/2023 19:50:05</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
-      <publishTime>01/10/2023 11:14:46</publishTime>
+      <publishTime>02/26/2023 19:50:04</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
-      <publishTime>01/10/2023 11:14:48</publishTime>
+      <publishTime>02/26/2023 19:50:06</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
-      <publishTime>01/10/2023 11:14:51</publishTime>
+      <publishTime>02/26/2023 19:50:04</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
-      <publishTime>01/10/2023 11:14:50</publishTime>
+      <publishTime>02/26/2023 19:50:07</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
-      <publishTime>01/10/2023 11:14:48</publishTime>
+      <publishTime>02/26/2023 19:50:06</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
-      <publishTime>01/10/2023 11:14:50</publishTime>
+      <publishTime>02/26/2023 19:50:07</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
-      <publishTime>01/10/2023 11:14:49</publishTime>
+      <publishTime>02/26/2023 19:50:06</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
-      <publishTime>01/10/2023 11:14:48</publishTime>
+      <publishTime>02/26/2023 19:50:06</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
-      <publishTime>01/10/2023 11:14:50</publishTime>
+      <publishTime>02/26/2023 19:50:08</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
-      <publishTime>01/10/2023 11:14:49</publishTime>
+      <publishTime>02/26/2023 19:50:07</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
-      <publishTime>01/10/2023 11:14:50</publishTime>
+      <publishTime>02/26/2023 19:50:07</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
-      <publishTime>01/10/2023 11:14:49</publishTime>
+      <publishTime>02/26/2023 19:50:06</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
-      <publishTime>01/10/2023 11:14:46</publishTime>
+      <publishTime>02/26/2023 19:50:08</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
-      <publishTime>01/10/2023 11:14:51</publishTime>
+      <publishTime>02/26/2023 19:50:08</publishTime>
     </File>
     <File Include="Web References/WebS/Reference.cs">
       <publishTime>12/20/2021 13:19:56</publishTime>
     </File>
     <File Include="Web References/WebS/Reference.map">
-      <publishTime>01/10/2023 11:14:41</publishTime>
+      <publishTime>02/26/2023 19:50:00</publishTime>
     </File>
     <File Include="Web References/WebS/WebService1.disco">
       <publishTime>12/20/2021 13:19:56</publishTime>
@@ -491,10 +491,13 @@
     <File Include="Web References/WebS/WebService1.wsdl">
       <publishTime>12/20/2021 13:19:56</publishTime>
     </File>
+    <File Include="Web References/WebS2/Reference.map">
+      <publishTime>02/26/2023 19:52:25</publishTime>
+    </File>
     <File Include="Web.config">
       <publishTime>11/14/2022 11:24:08</publishTime>
       <publishTime>11/02/2022 22:03:20</publishTime>
-      <publishTime>01/10/2023 16:53:09</publishTime>
+      <publishTime>03/03/2023 13:34:25</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/Properties/Settings.Designer.cs b/WebAPI/Properties/Settings.Designer.cs
index c8fd941..91f1e59 100644
--- a/WebAPI/Properties/Settings.Designer.cs
+++ b/WebAPI/Properties/Settings.Designer.cs
@@ -32,5 +32,15 @@
                 return ((string)(this["WebAPI_WebS_WebService1"]));
             }
         }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
+        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:9099/WebService1.asmx")]
+        public string WebAPI_WebS2_WebService1 {
+            get {
+                return ((string)(this["WebAPI_WebS2_WebService1"]));
+            }
+        }
     }
 }
diff --git a/WebAPI/Properties/Settings.settings b/WebAPI/Properties/Settings.settings
index d37166d..f252e7b 100644
--- a/WebAPI/Properties/Settings.settings
+++ b/WebAPI/Properties/Settings.settings
@@ -5,5 +5,8 @@
     <Setting Name="WebAPI_WebS_WebService1" Type="(Web Service URL)" Scope="Application">
       <Value Profile="(Default)">http://localhost:8098/WebService1.asmx</Value>
     </Setting>
+    <Setting Name="WebAPI_WebS2_WebService1" Type="(Web Service URL)" Scope="Application">
+      <Value Profile="(Default)">http://localhost:9099/WebService1.asmx</Value>
+    </Setting>
   </Settings>
 </SettingsFile>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS/Reference.map b/WebAPI/Web References/WebS/Reference.map
index 952b627..493bd8a 100644
--- a/WebAPI/Web References/WebS/Reference.map
+++ b/WebAPI/Web References/WebS/Reference.map
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Results>
-    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:8098/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
-    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:8098/WebService1.asmx?disco" filename="WebService1.disco" />
+    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://47.96.97.237/WEBS-WMS/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
+    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://47.96.97.237/WEBS-WMS/WebService1.asmx?disco" filename="WebService1.disco" />
   </Results>
 </DiscoveryClientResultsFile>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS/WebService1.disco b/WebAPI/Web References/WebS/WebService1.disco
index 9475a15..3150354 100644
--- a/WebAPI/Web References/WebS/WebService1.disco
+++ b/WebAPI/Web References/WebS/WebService1.disco
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
-  <contractRef ref="http://localhost:8098/WebService1.asmx?wsdl" docRef="http://localhost:8098/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
-  <soap address="http://localhost:8098/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
-  <soap address="http://localhost:8098/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+  <contractRef ref="http://47.96.97.237/WEBS-WMS/WebService1.asmx?wsdl" docRef="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+  <soap address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+  <soap address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
 </discovery>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS/WebService1.wsdl b/WebAPI/Web References/WebS/WebService1.wsdl
index c27315e..4717c43 100644
--- a/WebAPI/Web References/WebS/WebService1.wsdl
+++ b/WebAPI/Web References/WebS/WebService1.wsdl
@@ -27803,10 +27803,10 @@
   </wsdl:binding>
   <wsdl:service name="WebService1">
     <wsdl:port name="WebService1Soap" binding="tns:WebService1Soap">
-      <soap:address location="http://localhost:8098/WebService1.asmx" />
+      <soap:address location="http://47.96.97.237/WEBS-WMS/WebService1.asmx" />
     </wsdl:port>
     <wsdl:port name="WebService1Soap12" binding="tns:WebService1Soap12">
-      <soap12:address location="http://localhost:8098/WebService1.asmx" />
+      <soap12:address location="http://47.96.97.237/WEBS-WMS/WebService1.asmx" />
     </wsdl:port>
   </wsdl:service>
 </wsdl:definitions>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS2/Reference.cs b/WebAPI/Web References/WebS2/Reference.cs
new file mode 100644
index 0000000..4a77f53
--- /dev/null
+++ b/WebAPI/Web References/WebS2/Reference.cs
@@ -0,0 +1,412 @@
+锘�//------------------------------------------------------------------------------
+// <auto-generated>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//     杩愯鏃剁増鏈�:4.0.30319.42000
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋�
+//     閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便��
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+// 
+// 姝ゆ簮浠g爜鏄敱 Microsoft.VSDesigner 4.0.30319.42000 鐗堣嚜鍔ㄧ敓鎴愩��
+// 
+#pragma warning disable 1591
+
+namespace WebAPI.WebS2 {
+    using System;
+    using System.Web.Services;
+    using System.Diagnostics;
+    using System.Web.Services.Protocols;
+    using System.Xml.Serialization;
+    using System.ComponentModel;
+    using System.Data;
+    
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Web.Services.WebServiceBindingAttribute(Name="WebService1Soap", Namespace="http://tempuri.org/")]
+    public partial class WebService1 : System.Web.Services.Protocols.SoapHttpClientProtocol {
+        
+        private System.Threading.SendOrPostCallback HelloWorldOperationCompleted;
+        
+        private System.Threading.SendOrPostCallback get_SaveCLOUDUseNameandPsdOperationCompleted;
+        
+        private System.Threading.SendOrPostCallback set_SaveQcStockInCheckBill_NewOperationCompleted;
+        
+        private bool useDefaultCredentialsSetExplicitly;
+        
+        /// <remarks/>
+        public WebService1() {
+            this.Url = global::WebAPI.Properties.Settings.Default.WebAPI_WebS2_WebService1;
+            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
+                this.UseDefaultCredentials = true;
+                this.useDefaultCredentialsSetExplicitly = false;
+            }
+            else {
+                this.useDefaultCredentialsSetExplicitly = true;
+            }
+        }
+        
+        public new string Url {
+            get {
+                return base.Url;
+            }
+            set {
+                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
+                            && (this.useDefaultCredentialsSetExplicitly == false)) 
+                            && (this.IsLocalFileSystemWebService(value) == false))) {
+                    base.UseDefaultCredentials = false;
+                }
+                base.Url = value;
+            }
+        }
+        
+        public new bool UseDefaultCredentials {
+            get {
+                return base.UseDefaultCredentials;
+            }
+            set {
+                base.UseDefaultCredentials = value;
+                this.useDefaultCredentialsSetExplicitly = true;
+            }
+        }
+        
+        /// <remarks/>
+        public event HelloWorldCompletedEventHandler HelloWorldCompleted;
+        
+        /// <remarks/>
+        public event get_SaveCLOUDUseNameandPsdCompletedEventHandler get_SaveCLOUDUseNameandPsdCompleted;
+        
+        /// <remarks/>
+        public event set_SaveQcStockInCheckBill_NewCompletedEventHandler set_SaveQcStockInCheckBill_NewCompleted;
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public string HelloWorld() {
+            object[] results = this.Invoke("HelloWorld", new object[0]);
+            return ((string)(results[0]));
+        }
+        
+        /// <remarks/>
+        public void HelloWorldAsync() {
+            this.HelloWorldAsync(null);
+        }
+        
+        /// <remarks/>
+        public void HelloWorldAsync(object userState) {
+            if ((this.HelloWorldOperationCompleted == null)) {
+                this.HelloWorldOperationCompleted = new System.Threading.SendOrPostCallback(this.OnHelloWorldOperationCompleted);
+            }
+            this.InvokeAsync("HelloWorld", new object[0], this.HelloWorldOperationCompleted, userState);
+        }
+        
+        private void OnHelloWorldOperationCompleted(object arg) {
+            if ((this.HelloWorldCompleted != null)) {
+                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+                this.HelloWorldCompleted(this, new HelloWorldCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+            }
+        }
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/get_SaveCLOUDUseNameandPsd", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public System.Data.DataSet get_SaveCLOUDUseNameandPsd(long HInterID) {
+            object[] results = this.Invoke("get_SaveCLOUDUseNameandPsd", new object[] {
+                        HInterID});
+            return ((System.Data.DataSet)(results[0]));
+        }
+        
+        /// <remarks/>
+        public void get_SaveCLOUDUseNameandPsdAsync(long HInterID) {
+            this.get_SaveCLOUDUseNameandPsdAsync(HInterID, null);
+        }
+        
+        /// <remarks/>
+        public void get_SaveCLOUDUseNameandPsdAsync(long HInterID, object userState) {
+            if ((this.get_SaveCLOUDUseNameandPsdOperationCompleted == null)) {
+                this.get_SaveCLOUDUseNameandPsdOperationCompleted = new System.Threading.SendOrPostCallback(this.Onget_SaveCLOUDUseNameandPsdOperationCompleted);
+            }
+            this.InvokeAsync("get_SaveCLOUDUseNameandPsd", new object[] {
+                        HInterID}, this.get_SaveCLOUDUseNameandPsdOperationCompleted, userState);
+        }
+        
+        private void Onget_SaveCLOUDUseNameandPsdOperationCompleted(object arg) {
+            if ((this.get_SaveCLOUDUseNameandPsdCompleted != null)) {
+                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+                this.get_SaveCLOUDUseNameandPsdCompleted(this, new get_SaveCLOUDUseNameandPsdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+            }
+        }
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/set_SaveQcStockInCheckBill_New", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public bool set_SaveQcStockInCheckBill_New(
+                    string HZJOrgNumber, 
+                    string HMaterNumber, 
+                    string HUnitNumber, 
+                    double HCheckQty, 
+                    double HRightQty, 
+                    double HBadQty, 
+                    string HCheckResult, 
+                    string HSupNumber, 
+                    string HUseResult, 
+                    long HSeQ, 
+                    long HSourceInterID, 
+                    long HSourceEntryID, 
+                    string HSourceBillNo, 
+                    string user, 
+                    long HWHID, 
+                    long HSPID, 
+                    long HSupID, 
+                    long HKeeperID, 
+                    long HMaterID, 
+                    string HSourceBillType, 
+                    long HSLInterID, 
+                    long HSLEntryID, 
+                    string HSLBillNo, 
+                    long HSLSeQ, 
+                    string HBillNo, 
+                    long HInterID, 
+                    ref string sErrMsg) {
+            object[] results = this.Invoke("set_SaveQcStockInCheckBill_New", new object[] {
+                        HZJOrgNumber,
+                        HMaterNumber,
+                        HUnitNumber,
+                        HCheckQty,
+                        HRightQty,
+                        HBadQty,
+                        HCheckResult,
+                        HSupNumber,
+                        HUseResult,
+                        HSeQ,
+                        HSourceInterID,
+                        HSourceEntryID,
+                        HSourceBillNo,
+                        user,
+                        HWHID,
+                        HSPID,
+                        HSupID,
+                        HKeeperID,
+                        HMaterID,
+                        HSourceBillType,
+                        HSLInterID,
+                        HSLEntryID,
+                        HSLBillNo,
+                        HSLSeQ,
+                        HBillNo,
+                        HInterID,
+                        sErrMsg});
+            sErrMsg = ((string)(results[1]));
+            return ((bool)(results[0]));
+        }
+        
+        /// <remarks/>
+        public void set_SaveQcStockInCheckBill_NewAsync(
+                    string HZJOrgNumber, 
+                    string HMaterNumber, 
+                    string HUnitNumber, 
+                    double HCheckQty, 
+                    double HRightQty, 
+                    double HBadQty, 
+                    string HCheckResult, 
+                    string HSupNumber, 
+                    string HUseResult, 
+                    long HSeQ, 
+                    long HSourceInterID, 
+                    long HSourceEntryID, 
+                    string HSourceBillNo, 
+                    string user, 
+                    long HWHID, 
+                    long HSPID, 
+                    long HSupID, 
+                    long HKeeperID, 
+                    long HMaterID, 
+                    string HSourceBillType, 
+                    long HSLInterID, 
+                    long HSLEntryID, 
+                    string HSLBillNo, 
+                    long HSLSeQ, 
+                    string HBillNo, 
+                    long HInterID, 
+                    string sErrMsg) {
+            this.set_SaveQcStockInCheckBill_NewAsync(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty, HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID, HSourceEntryID, HSourceBillNo, user, HWHID, HSPID, HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID, HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID, sErrMsg, null);
+        }
+        
+        /// <remarks/>
+        public void set_SaveQcStockInCheckBill_NewAsync(
+                    string HZJOrgNumber, 
+                    string HMaterNumber, 
+                    string HUnitNumber, 
+                    double HCheckQty, 
+                    double HRightQty, 
+                    double HBadQty, 
+                    string HCheckResult, 
+                    string HSupNumber, 
+                    string HUseResult, 
+                    long HSeQ, 
+                    long HSourceInterID, 
+                    long HSourceEntryID, 
+                    string HSourceBillNo, 
+                    string user, 
+                    long HWHID, 
+                    long HSPID, 
+                    long HSupID, 
+                    long HKeeperID, 
+                    long HMaterID, 
+                    string HSourceBillType, 
+                    long HSLInterID, 
+                    long HSLEntryID, 
+                    string HSLBillNo, 
+                    long HSLSeQ, 
+                    string HBillNo, 
+                    long HInterID, 
+                    string sErrMsg, 
+                    object userState) {
+            if ((this.set_SaveQcStockInCheckBill_NewOperationCompleted == null)) {
+                this.set_SaveQcStockInCheckBill_NewOperationCompleted = new System.Threading.SendOrPostCallback(this.Onset_SaveQcStockInCheckBill_NewOperationCompleted);
+            }
+            this.InvokeAsync("set_SaveQcStockInCheckBill_New", new object[] {
+                        HZJOrgNumber,
+                        HMaterNumber,
+                        HUnitNumber,
+                        HCheckQty,
+                        HRightQty,
+                        HBadQty,
+                        HCheckResult,
+                        HSupNumber,
+                        HUseResult,
+                        HSeQ,
+                        HSourceInterID,
+                        HSourceEntryID,
+                        HSourceBillNo,
+                        user,
+                        HWHID,
+                        HSPID,
+                        HSupID,
+                        HKeeperID,
+                        HMaterID,
+                        HSourceBillType,
+                        HSLInterID,
+                        HSLEntryID,
+                        HSLBillNo,
+                        HSLSeQ,
+                        HBillNo,
+                        HInterID,
+                        sErrMsg}, this.set_SaveQcStockInCheckBill_NewOperationCompleted, userState);
+        }
+        
+        private void Onset_SaveQcStockInCheckBill_NewOperationCompleted(object arg) {
+            if ((this.set_SaveQcStockInCheckBill_NewCompleted != null)) {
+                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+                this.set_SaveQcStockInCheckBill_NewCompleted(this, new set_SaveQcStockInCheckBill_NewCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+            }
+        }
+        
+        /// <remarks/>
+        public new void CancelAsync(object userState) {
+            base.CancelAsync(userState);
+        }
+        
+        private bool IsLocalFileSystemWebService(string url) {
+            if (((url == null) 
+                        || (url == string.Empty))) {
+                return false;
+            }
+            System.Uri wsUri = new System.Uri(url);
+            if (((wsUri.Port >= 1024) 
+                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
+                return true;
+            }
+            return false;
+        }
+    }
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    public delegate void HelloWorldCompletedEventHandler(object sender, HelloWorldCompletedEventArgs e);
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    public partial class HelloWorldCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+        
+        private object[] results;
+        
+        internal HelloWorldCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+                base(exception, cancelled, userState) {
+            this.results = results;
+        }
+        
+        /// <remarks/>
+        public string Result {
+            get {
+                this.RaiseExceptionIfNecessary();
+                return ((string)(this.results[0]));
+            }
+        }
+    }
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    public delegate void get_SaveCLOUDUseNameandPsdCompletedEventHandler(object sender, get_SaveCLOUDUseNameandPsdCompletedEventArgs e);
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    public partial class get_SaveCLOUDUseNameandPsdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+        
+        private object[] results;
+        
+        internal get_SaveCLOUDUseNameandPsdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+                base(exception, cancelled, userState) {
+            this.results = results;
+        }
+        
+        /// <remarks/>
+        public System.Data.DataSet Result {
+            get {
+                this.RaiseExceptionIfNecessary();
+                return ((System.Data.DataSet)(this.results[0]));
+            }
+        }
+    }
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    public delegate void set_SaveQcStockInCheckBill_NewCompletedEventHandler(object sender, set_SaveQcStockInCheckBill_NewCompletedEventArgs e);
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    public partial class set_SaveQcStockInCheckBill_NewCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+        
+        private object[] results;
+        
+        internal set_SaveQcStockInCheckBill_NewCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
+                base(exception, cancelled, userState) {
+            this.results = results;
+        }
+        
+        /// <remarks/>
+        public bool Result {
+            get {
+                this.RaiseExceptionIfNecessary();
+                return ((bool)(this.results[0]));
+            }
+        }
+        
+        /// <remarks/>
+        public string sErrMsg {
+            get {
+                this.RaiseExceptionIfNecessary();
+                return ((string)(this.results[1]));
+            }
+        }
+    }
+}
+
+#pragma warning restore 1591
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS2/Reference.map b/WebAPI/Web References/WebS2/Reference.map
new file mode 100644
index 0000000..bf8f74d
--- /dev/null
+++ b/WebAPI/Web References/WebS2/Reference.map
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <Results>
+    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:9099/WebService1.asmx?disco" filename="WebService1.disco" />
+    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:9099/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
+  </Results>
+</DiscoveryClientResultsFile>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS2/WebService1.disco b/WebAPI/Web References/WebS2/WebService1.disco
new file mode 100644
index 0000000..6a0bea5
--- /dev/null
+++ b/WebAPI/Web References/WebS2/WebService1.disco
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
+  <contractRef ref="http://localhost:9099/WebService1.asmx?wsdl" docRef="http://localhost:9099/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+  <soap address="http://localhost:9099/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+  <soap address="http://localhost:9099/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+</discovery>
\ No newline at end of file
diff --git a/WebAPI/Web References/WebS2/WebService1.wsdl b/WebAPI/Web References/WebS2/WebService1.wsdl
new file mode 100644
index 0000000..62f60d7
--- /dev/null
+++ b/WebAPI/Web References/WebS2/WebService1.wsdl
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
+      <s:element name="HelloWorld">
+        <s:complexType />
+      </s:element>
+      <s:element name="HelloWorldResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="get_SaveCLOUDUseNameandPsd">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="get_SaveCLOUDUseNameandPsdResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="get_SaveCLOUDUseNameandPsdResult">
+              <s:complexType>
+                <s:sequence>
+                  <s:element ref="s:schema" />
+                  <s:any />
+                </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="set_SaveQcStockInCheckBill_New">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="HZJOrgNumber" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="HMaterNumber" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="HUnitNumber" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HCheckQty" type="s:double" />
+            <s:element minOccurs="1" maxOccurs="1" name="HRightQty" type="s:double" />
+            <s:element minOccurs="1" maxOccurs="1" name="HBadQty" type="s:double" />
+            <s:element minOccurs="0" maxOccurs="1" name="HCheckResult" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="HSupNumber" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="HUseResult" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSeQ" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSourceInterID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSourceEntryID" type="s:long" />
+            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HWHID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSPID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSupID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HKeeperID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HMaterID" type="s:long" />
+            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillType" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSLInterID" type="s:long" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSLEntryID" type="s:long" />
+            <s:element minOccurs="0" maxOccurs="1" name="HSLBillNo" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HSLSeQ" type="s:long" />
+            <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
+            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="set_SaveQcStockInCheckBill_NewResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="1" maxOccurs="1" name="set_SaveQcStockInCheckBill_NewResult" type="s:boolean" />
+            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="HelloWorldSoapIn">
+    <wsdl:part name="parameters" element="tns:HelloWorld" />
+  </wsdl:message>
+  <wsdl:message name="HelloWorldSoapOut">
+    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
+  </wsdl:message>
+  <wsdl:message name="get_SaveCLOUDUseNameandPsdSoapIn">
+    <wsdl:part name="parameters" element="tns:get_SaveCLOUDUseNameandPsd" />
+  </wsdl:message>
+  <wsdl:message name="get_SaveCLOUDUseNameandPsdSoapOut">
+    <wsdl:part name="parameters" element="tns:get_SaveCLOUDUseNameandPsdResponse" />
+  </wsdl:message>
+  <wsdl:message name="set_SaveQcStockInCheckBill_NewSoapIn">
+    <wsdl:part name="parameters" element="tns:set_SaveQcStockInCheckBill_New" />
+  </wsdl:message>
+  <wsdl:message name="set_SaveQcStockInCheckBill_NewSoapOut">
+    <wsdl:part name="parameters" element="tns:set_SaveQcStockInCheckBill_NewResponse" />
+  </wsdl:message>
+  <wsdl:portType name="WebService1Soap">
+    <wsdl:operation name="HelloWorld">
+      <wsdl:input message="tns:HelloWorldSoapIn" />
+      <wsdl:output message="tns:HelloWorldSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
+      <wsdl:input message="tns:get_SaveCLOUDUseNameandPsdSoapIn" />
+      <wsdl:output message="tns:get_SaveCLOUDUseNameandPsdSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
+      <wsdl:input message="tns:set_SaveQcStockInCheckBill_NewSoapIn" />
+      <wsdl:output message="tns:set_SaveQcStockInCheckBill_NewSoapOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="WebService1Soap" type="tns:WebService1Soap">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="HelloWorld">
+      <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
+      <soap:operation soapAction="http://tempuri.org/get_SaveCLOUDUseNameandPsd" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
+      <soap:operation soapAction="http://tempuri.org/set_SaveQcStockInCheckBill_New" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="WebService1Soap12" type="tns:WebService1Soap">
+    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="HelloWorld">
+      <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
+      <soap12:operation soapAction="http://tempuri.org/get_SaveCLOUDUseNameandPsd" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
+      <soap12:operation soapAction="http://tempuri.org/set_SaveQcStockInCheckBill_New" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="WebService1">
+    <wsdl:port name="WebService1Soap" binding="tns:WebService1Soap">
+      <soap:address location="http://localhost:9099/WebService1.asmx" />
+    </wsdl:port>
+    <wsdl:port name="WebService1Soap12" binding="tns:WebService1Soap12">
+      <soap12:address location="http://localhost:9099/WebService1.asmx" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 1934def..a88b60e 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -28,8 +28,9 @@
 	  <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    鍗氭棩绉戞妧-->
 	  <!--<add key="sUrl" value="http://192.168.0.214/WEBS-WMS/WebService1.asmx"/>    鐟炰笌绁�-->
 	  <!--<add key="sUrl" value="http://60.191.27.141:8090/WEBS-WMS/WebService1.asmx"/>    妫シ-->
-	  <add key="sUrl" value="http://localhost:8098/WebService1.asmx"/>  
+	  <add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>  
 	  <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/>     瀹夌憺鏈嶅姟鍣�-->
+	  <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>    娴嬭瘯鏈嶅姟鍣�-->
 	  <add key="webpages:Version" value="3.0.0.0" />
     <add key="webpages:Enabled" value="false" />
     <add key="ClientValidationEnabled" value="true" />
@@ -96,7 +97,7 @@
       </basicHttpBinding>
     </bindings>
     <client>
-      <endpoint address="http://localhost:8098/WebService1.asmx" binding="basicHttpBinding"
+      <endpoint address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
         bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap"
         name="WebService1Soap" />
     </client>
@@ -105,7 +106,10 @@
   <applicationSettings>
     <WebAPI.Properties.Settings>
       <setting name="WebAPI_WebS_WebService1" serializeAs="String">
-        <value>http://localhost:8098/WebService1.asmx</value>
+        <value>http://47.96.97.237/WEBS-WMS/WebService1.asmx</value>
+      </setting>
+      <setting name="WebAPI_WebS2_WebService1" serializeAs="String">
+        <value>http://localhost:9099/WebService1.asmx</value>
       </setting>
     </WebAPI.Properties.Settings>
   </applicationSettings>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 84fd031..ac244ed 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -81,6 +81,7 @@
       <Private>True</Private>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
       <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="NPOI, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
@@ -255,6 +256,11 @@
     <Content Include="Views\Scripts\jquery.validate.unobtrusive.js" />
     <Content Include="Views\Scripts\jquery.validate.unobtrusive.min.js" />
     <Content Include="Views\Scripts\modernizr-2.6.2.js" />
+    <Content Include="Web References\WebS2\Reference.map">
+      <Generator>MSDiscoCodeGenerator</Generator>
+      <LastGenOutput>Reference.cs</LastGenOutput>
+    </Content>
+    <None Include="Web References\WebS2\WebService1.disco" />
     <Content Include="Web References\WebS\ClsCLD_Customer_Model.datasource">
       <DependentUpon>Reference.map</DependentUpon>
     </Content>
@@ -312,10 +318,11 @@
     <Content Include="Web References\WebS\ClsKf_ICStockBill_WMS.datasource">
       <DependentUpon>Reference.map</DependentUpon>
     </Content>
-    <Content Include="Web References\WebS\Reference.map">
+    <None Include="Web References\WebS\Reference.map">
       <Generator>MSDiscoCodeGenerator</Generator>
       <LastGenOutput>Reference.cs</LastGenOutput>
-    </Content>
+    </None>
+    <None Include="Web References\WebS2\WebService1.wsdl" />
     <None Include="Web References\WebS\WebService1.disco" />
     <Content Include="Web.config">
       <SubType>Designer</SubType>
@@ -395,6 +402,7 @@
     <Compile Include="Controllers\CJGL\Cj_StationOutBillController.cs" />
     <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" />
     <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" />
+    <Compile Include="Controllers\CJGL\Sc_ProcExchRecordBackBillController.cs" />
     <Compile Include="Controllers\CJGL\Sc_ProcessSendWorkController.cs" />
     <Compile Include="Controllers\CJGL\Sc_ProcExchWorkBackBillController.cs" />
     <Compile Include="Controllers\CJGL\Sc_WorkBillAutoSortBillMainController.cs" />
@@ -471,6 +479,7 @@
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DutyBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_EquipStatusController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MatePriceSupController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MaterTypeBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MouldStatusController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_OperatorController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" />
@@ -876,6 +885,11 @@
     <Compile Include="Models\JsonResult.cs" />
     <Compile Include="Models\Pensen.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Web References\WebS2\Reference.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Reference.map</DependentUpon>
+    </Compile>
     <Compile Include="Web References\WebS\Reference.cs">
       <AutoGen>True</AutoGen>
       <DesignTime>True</DesignTime>
@@ -929,6 +943,7 @@
     <Folder Include="Views\Gy_ICBomBill\" />
     <Folder Include="Views\Gy_MateMould\" />
     <Folder Include="Views\Gy_MatePriceSup\" />
+    <Folder Include="Views\Gy_MaterTypeBill\" />
     <Folder Include="Views\Gy_MouldStatus\" />
     <Folder Include="Views\Gy_Operator\" />
     <Folder Include="Views\Gy_PackType\" />
@@ -983,6 +998,7 @@
     <Folder Include="Views\Sc_MouldScrapRequestBill\" />
     <Folder Include="Views\Sc_MouldStatusChangeBill\" />
     <Folder Include="Views\Sc_ProcessExchangeIssueBill\" />
+    <Folder Include="Views\Sc_ProcExchRecordBackBill\" />
     <Folder Include="Views\Sc_ProcessSendWork\" />
     <Folder Include="Views\Sc_WorkBillAutoSortBillMain\" />
     <Folder Include="Views\Sc_WorkBillSortBill\" />
@@ -1035,10 +1051,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <WebReferenceUrl Include="http://localhost:8098/WebService1.asmx">
+    <WebReferenceUrl Include="http://47.96.97.237/WEBS-WMS/WebService1.asmx">
       <UrlBehavior>Dynamic</UrlBehavior>
       <RelPath>Web References\WebS\</RelPath>
-      <UpdateFromURL>http://localhost:8098/WebService1.asmx</UpdateFromURL>
+      <UpdateFromURL>http://47.96.97.237/WEBS-WMS/WebService1.asmx</UpdateFromURL>
       <ServiceLocationURL>
       </ServiceLocationURL>
       <CachedDynamicPropName>
@@ -1046,6 +1062,17 @@
       <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
       <CachedSettingsPropName>WebAPI_WebS_WebService1</CachedSettingsPropName>
     </WebReferenceUrl>
+    <WebReferenceUrl Include="http://localhost:9099/WebService1.asmx">
+      <UrlBehavior>Dynamic</UrlBehavior>
+      <RelPath>Web References\WebS2\</RelPath>
+      <UpdateFromURL>http://localhost:9099/WebService1.asmx</UpdateFromURL>
+      <ServiceLocationURL>
+      </ServiceLocationURL>
+      <CachedDynamicPropName>
+      </CachedDynamicPropName>
+      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
+      <CachedSettingsPropName>WebAPI_WebS2_WebService1</CachedSettingsPropName>
+    </WebReferenceUrl>
   </ItemGroup>
   <PropertyGroup>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

--
Gitblit v1.9.1