From a71373599d6bddfcf3a65a288be80cbf2b1f9e30 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期日, 04 十二月 2022 21:34:53 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 Model/基础资料/基础资料/ClsGy_SupplierContact_Model.cs                        |   20 
 Model/Model.csproj                                                    |    8 
 Model/基础资料/基础资料/ClsGy_RecCondition_Model.cs                           |   20 
 DAL/基础资料/公用基础资料/ClsGy_COMMONCONTACT_Ctl.cs                            |  103 +
 Model/生产管理/ClsSc_PPBomBillMain.cs                                     |   58 
 Model/生产管理/ClsSc_PPBomBillSub.cs                                      |   76 +
 Model/采购管理/ClsCg_POOrderBillSub.cs                                    |   15 
 WebAPI/Controllers/基础资料/基础资料/Gy_TaxRateBillController.cs              |  346 ++++
 WebAPI/Controllers/基础资料/基础资料/Gy_COMMONCONTACTBillController.cs        |  346 ++++
 DAL/基础资料/公用基础资料/ClsGy_TaxRate_Ctl.cs                                  |  104 +
 DAL/基础资料/公用基础资料/ClsGy_RecCondition_Ctl.cs                             |  103 +
 WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs                 |  424 ++++-
 DAL/基础资料/公用基础资料/ClsGy_PaymentCondition_Ctl.cs                         |  103 +
 Model/采购管理/ClsCg_POInStockBillMain.cs                                 |   35 
 WebAPI/Controllers/基础资料/基础资料/Gy_RecConditionBillController.cs         |  346 ++++
 DAL/基础资料/公用基础资料/ClsGy_StockStatus_Ctl.cs                              |  103 +
 Model/采购管理/ClsCg_POInStockBillSub.cs                                  |   53 
 WebAPI/Controllers/WebAPIController.cs                                |   56 
 WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs                   |  319 ++++
 Model/采购管理/ClsCg_POOrderBillMain.cs                                   |   21 
 Model/基础资料/基础资料/ClsGy_StockStatus_Model.cs                            |   20 
 Model/基础资料/基础资料/ClsGy_TaxRate_Model.cs                                |   21 
 WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs                     |  331 ++++
 WebAPI/Controllers/基础资料/基础资料/Gy_StockStatusBillController.cs          |  346 ++++
 WebAPI/Controllers/基础资料/基础资料/Gy_SupplierContactBillController.cs      |  346 ++++
 WebAPI/ListModels.cs                                                  |   72 +
 Model/基础资料/基础资料/ClsGy_COMMONCONTACT_Model.cs                          |   20 
 DAL/DAL.csproj                                                        |    6 
 Model/基础资料/基础资料/ClsGy_PaymentCondition_Model.cs                       |   20 
 WebAPI/WebAPI.csproj                                                  |   12 
 WebAPI/Controllers/基础资料/基础资料/Gy_PaymentConditionListBillController.cs |  345 ++++
 DAL/基础资料/公用基础资料/ClsGy_SupplierContact_Ctl.cs                          |  103 +
 32 files changed, 4,166 insertions(+), 135 deletions(-)

diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index e544794..3ef8b22 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -84,8 +84,14 @@
     <Compile Include="浜轰簨绠$悊\ClsHR_EmpUpChangeBill.cs" />
     <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\ClsGy_BarCodeBill_ChaiMa.cs" />
     <Compile Include="鍩虹璧勬枡\InterFace鍩虹璧勬枡\ClsIF_ORGANIZATIONS_View.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_TaxRate_Ctl.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_RecCondition_Ctl.cs" />
     <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_FactoryDayOff_Ctl.cs" />
     <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_FactoryDayOff_View.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_COMMONCONTACT_Ctl.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PaymentCondition_Ctl.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_SupplierContact_Ctl.cs" />
+    <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_StockStatus_Ctl.cs" />
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MateMould_Ctl.cs" />
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_QCCheckProject_View.cs" />
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_StdWorkTimes_Ctl.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_COMMONCONTACT_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_COMMONCONTACT_Ctl.cs"
new file mode 100644
index 0000000..2e92c0a
--- /dev/null
+++ "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_COMMONCONTACT_Ctl.cs"
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_COMMONCONTACT_Ctl : DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_COMMONCONTACT_Model oModel = new Model.ClsGy_COMMONCONTACT_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_COMMONCONTACT(HNumber,HName ,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}','{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_COMMONCONTACT_Ctl()
+        {
+            MvarItemKey = "Gy_COMMONCONTACT";
+            MvarReportTitle = "鏀惰揣鏂硅仈绯讳汉";
+            oModel = new Model.ClsGy_COMMONCONTACT_Model();
+        } 
+    }
+}
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_PaymentCondition_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_PaymentCondition_Ctl.cs"
new file mode 100644
index 0000000..8866781
--- /dev/null
+++ "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_PaymentCondition_Ctl.cs"
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_PaymentCondition_Ctl:DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_PaymentCondition_Model oModel = new Model.ClsGy_PaymentCondition_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_PaymentCondition(HNumber,HName ,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}','{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_PaymentCondition_Ctl()
+        {
+            MvarItemKey = "Gy_PaymentCondition";
+            MvarReportTitle = "浠樻鏉′欢";
+            oModel = new Model.ClsGy_PaymentCondition_Model();
+        } 
+    }
+}
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_RecCondition_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_RecCondition_Ctl.cs"
new file mode 100644
index 0000000..74f7c42
--- /dev/null
+++ "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_RecCondition_Ctl.cs"
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_RecCondition_Ctl : DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_RecCondition_Model oModel = new Model.ClsGy_RecCondition_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_RecCondition(HNumber,HName ,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}','{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_RecCondition_Ctl()
+        {
+            MvarItemKey = "Gy_RecCondition";
+            MvarReportTitle = "鏀舵鏉′欢";
+            oModel = new Model.ClsGy_RecCondition_Model();
+        } 
+    }
+}
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_StockStatus_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_StockStatus_Ctl.cs"
new file mode 100644
index 0000000..e7c41d3
--- /dev/null
+++ "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_StockStatus_Ctl.cs"
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_StockStatus_Ctl:DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_StockStatus_Model oModel = new Model.ClsGy_StockStatus_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_StockStatus(HNumber,HName ,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}','{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_StockStatus_Ctl()
+        {
+            MvarItemKey = "Gy_StockStatus";
+            MvarReportTitle = "搴撳瓨鐘舵��";
+            oModel = new Model.ClsGy_StockStatus_Model();
+        } 
+    }
+}
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_SupplierContact_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_SupplierContact_Ctl.cs"
new file mode 100644
index 0000000..c27a8de
--- /dev/null
+++ "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_SupplierContact_Ctl.cs"
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_SupplierContact_Ctl:DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_SupplierContact_Model oModel = new Model.ClsGy_SupplierContact_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_SupplierContact(HNumber,HName ,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}','{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_SupplierContact_Ctl()
+        {
+            MvarItemKey = "Gy_SupplierContact";
+            MvarReportTitle = "渚涜揣鏂硅仈绯讳汉";
+            oModel = new Model.ClsGy_SupplierContact_Model();
+        } 
+    }
+}
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_TaxRate_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_TaxRate_Ctl.cs"
new file mode 100644
index 0000000..0e4e6ad
--- /dev/null
+++ "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_TaxRate_Ctl.cs"
@@ -0,0 +1,104 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsGy_TaxRate_Ctl:DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_TaxRate_Model oModel = new Model.ClsGy_TaxRate_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc($@"insert into Gy_TaxRate(HNumber,HName ,HTaxRate,HShortNumber  ,HParentID ,HLevel 
+                                ,HEndFlag  ,HStopflag  ,HRemark ,HHelpCode ,HUseFlag
+                                 ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp 
+                                 ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+                                values('{oModel.HNumber}','{oModel.HName}',{oModel.HTaxRate},'{oModel.HShortNumber}',{oModel.HParentID},{oModel.HLevel}
+                                ,{(oModel.HEndFlag==true?1:0)},{(oModel.HStopflag == true ? 1:0)},'{oModel.HRemark}','{oModel.HHelpCode}','{oModel.HUseFlag}'
+                                ,GETDATE(),'{oModel.HMakeEmp}','','',''
+                                ,'','','',{oModel.HUSEORGID},{oModel.HCREATEORGID})"
+                                , ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                     ",HTaxRate='" + oModel.HTaxRate + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HParentID=" + oModel.HParentID.ToString() +
+                    ",HLevel=" + oModel.HLevel.ToString() +
+                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                     ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                      ",HModifyTime   =getdate()" +
+                  " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); 
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_TaxRate_Ctl()
+        {
+            MvarItemKey = "Gy_TaxRate";
+            MvarReportTitle = "绋庣巼";
+            oModel = new Model.ClsGy_TaxRate_Model();
+        } 
+    }
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 97c0ef9..0b380f5 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -324,6 +324,8 @@
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Carbook_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CareFor_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CheckToolsType_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxRate_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PaymentCondition_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Company_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ConveyComp_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ConveyType_Model.cs" />
@@ -352,6 +354,10 @@
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Logo_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MainMaterial_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Market_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_COMMONCONTACT_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RecCondition_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_SupplierContact_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_StockStatus_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MaterType_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MouldFileMain.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MouldFileSub.cs" />
@@ -432,6 +438,8 @@
     <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\ClsSc_MateWasterRequestBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\ClsSc_MateWasterRequestBillSub.cs" />
+    <Compile Include="鐢熶骇绠$悊\ClsSc_PPBomBillMain.cs" />
+    <Compile Include="鐢熶骇绠$悊\ClsSc_PPBomBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockChangeBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockChangeBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockCheckBillMain.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_COMMONCONTACT_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_COMMONCONTACT_Model.cs"
new file mode 100644
index 0000000..d06ee9a
--- /dev/null
+++ "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_COMMONCONTACT_Model.cs"
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_COMMONCONTACT_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+    }
+}
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_PaymentCondition_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_PaymentCondition_Model.cs"
new file mode 100644
index 0000000..7ed42b3
--- /dev/null
+++ "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_PaymentCondition_Model.cs"
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_PaymentCondition_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+    }
+}
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_RecCondition_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_RecCondition_Model.cs"
new file mode 100644
index 0000000..ee8d299
--- /dev/null
+++ "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_RecCondition_Model.cs"
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_RecCondition_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+    }
+}
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_StockStatus_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_StockStatus_Model.cs"
new file mode 100644
index 0000000..3727fd8
--- /dev/null
+++ "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_StockStatus_Model.cs"
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_StockStatus_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+    }
+}
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_SupplierContact_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_SupplierContact_Model.cs"
new file mode 100644
index 0000000..092dd26
--- /dev/null
+++ "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_SupplierContact_Model.cs"
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_SupplierContact_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+    }
+}
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_TaxRate_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_TaxRate_Model.cs"
new file mode 100644
index 0000000..9f4b97c
--- /dev/null
+++ "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_TaxRate_Model.cs"
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_TaxRate_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime { get; set; }
+        public DateTime HCheckTime { get; set; }
+        public DateTime HModifyTime { get; set; }
+        public DateTime HStopTime { get; set; }
+        public string HMakeEmp { get; set; }
+        public string HCheckEmp { get; set; }
+        public string HModifyEmp { get; set; }
+        public string HStopEmp { get; set; }
+        public int HUSEORGID { get; set; }
+        public int HCREATEORGID { get; set; }
+        public decimal HTaxRate { get; set; }
+    }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillMain.cs"
new file mode 100644
index 0000000..a89bf0e
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillMain.cs"
@@ -0,0 +1,58 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Model.鐢熶骇绠$悊
+{
+    public class ClsSc_PPBomBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+        public string HBillNo;     //鍗曟嵁鍙�
+        public Int64 HMaterID;  //鐗╂枡
+        public Int64 HUnitID;  //璁¢噺鍗曚綅
+        public Int64 HDeptID;    //閮ㄩ棬
+        public DateTime HDate;  //鏃ユ湡
+        public double HQty;  //鏁伴噺
+        public string HRemark;   //澶囨敞
+
+
+        public Int64 HYear;
+        public Int64 HPeriod;
+        public string HBillType; // 鍗曟嵁绫诲瀷
+        public string HBillSubType; // 瀛愮被鍨�
+        public Int64 HInterID; 
+        public Int64 HBillStatus;        //鍗曟嵁鐘舵��
+        public Int64 HCheckItemNextID;  //寰呭鏍搁」鐩紙榛樿鍊� 0锛�    鐣岄潰涓婁笉闇�瑕佹樉绀�
+        public Int64 HCheckFlowID;  //瀹℃壒娴侊紙榛樿鍊� 0锛�  鐣岄潰涓婁笉闇�瑕佹樉绀�
+        public string HBacker; //閫�鍥炰汉  锛堥粯璁や负''锛�
+        public string HBackDate;  //閫�鍥炴棩鏈� 锛堝厑璁窷ULL锛�
+        public string HChecker;   //瀹℃牳浜� 锛堥粯璁や负''锛�
+        public string HCheckDate;          //瀹℃牳鏃ユ湡 锛堝厑璁窷ULL锛�
+        public string HMaker;          //鍒跺崟浜�
+        public string HMakeDate;             //鍒跺崟鏃ユ湡
+        public string HUpDater;                 //淇敼浜� 锛堥粯璁や负''锛�
+        public string HUpDateDate;         //淇敼鏃ユ湡 锛堝厑璁窷ULL锛�
+        public string HCloseMan;          //鍏抽棴浜� 锛堥粯璁や负''锛�
+        public string HCloseDate;         //鍏抽棴鏃ユ湡 锛堝厑璁窷ULL锛�
+        public Int64 HCloseType;           //鍏抽棴绫诲瀷   锛堥粯璁や负0锛�
+        public string HDeleteMan;           //浣滃簾浜� 锛堥粯璁や负''锛�
+        public string HDeleteDate;           //浣滃簾鏃ユ湡 锛堝厑璁窷ULL锛�
+        public Int64 HICMOInterID;  //鐢熶骇璁㈠崟鍐呯爜
+        public Int64 HCheckItemNowID;      //褰撳墠瀹℃牳椤圭洰锛堥粯璁ゅ�� 0锛�        鐣岄潰涓婁笉闇�瑕佹樉绀�
+        public Int64 HSeOrderInterID;  //閿�鍞鍗曞唴鐮�
+        public Int64 HSeOrderEntryID;  //閿�鍞鍗曞瓙鍐呯爜
+        public string HSeOrderBillNo;  //閿�鍞鍗曞彿
+        public string HType; // 绫诲瀷(鍙兘鏄� 濮斿鍜岀敓浜�)
+        public Int64 HSeOrderEntrySEQ;  //閿�鍞鍗曡鍙�
+        public Int64 HICMOEntrySEQ;  //鐢熶骇璁㈠崟琛屽彿
+        public string HREQSRC;   //闇�姹傛潵婧�
+
+        public Int64 HICMOEntryID;
+        public Int64 HPRDORGID;
+        public Int64 HENTRUSTORGID;
+        public Int64 HPARENTOWNERID;
+        public string HPARENTOWNERTYPEID;
+        public Int64 HERPInterID;
+        public string HERPBillType;
+    }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillSub.cs"
new file mode 100644
index 0000000..34ee220
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_PPBomBillSub.cs"
@@ -0,0 +1,76 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Model.鐢熶骇绠$悊
+{
+    public class ClsSc_PPBomBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+        public Int64 HMaterID;    //鐗╂枡ID
+        public string HMaterNumber; //
+        public Int64 HUnitID;    //鍗曚綅ID
+        public string HUnitNumber; //
+        public Int64 HWHID;  //浠撳簱
+        public Int64 HSPID;  //浠撲綅
+        public Int64 HBASEUNITID; //鍩烘湰璁¢噺鍗曚綅,
+        public double HQty;  //鏁伴噺
+        public string HRemark;            //澶囨敞
+
+
+        public Int64 HQtyMust; //搴斿彂鏁伴噺
+        public double HNumerator;  //鍒嗗瓙
+        public double HDenominator;  //鍒嗘瘝
+        public double HQtyScrap;  //鎹熻�楃巼
+        public DateTime HSendDate;  //鍙戞枡鏃ユ湡
+        public Int64 HBomInterID; //BOM
+        public Int64 HProcID;      //宸ュ簭鍐呯爜
+        public Int64 HKeyMaterID_Line;  //鍏抽敭浠剁粦瀹氭爣璁�
+        public Int64 HKeyMaterID_InStock;     //鍏抽敭浠跺叆搴撴爣璁�
+        public Int64 HKeyMaterID_Ready;  //鍏抽敭浠堕綈濂楁爣璁�
+        public Int64 HICMOInterID;   //浠诲姟鍗旾D
+        public string HICMOBillNo;  //浠诲姟鍗曞彿
+        public string HSeOrderBillNo;  //(閿�鍞鍗曞彿)
+        public Int64 HSeOrderInterID;    //(閿�鍞鍗曚富鍐呯爜)
+        public Int64 HSeOrderEntryID;     //(閿�鍞鍗曞瓙鍐呯爜)
+        public Int64 HChangeTimes;         //鍙樻洿娆℃暟
+        public Int64 HProcessID; //浣滀笟,
+        public Int64 HICMOENTRYSEQ;//鐢熶骇璁㈠崟琛屽彿,
+        public Int64 HICMOEntryID;//鐢熶骇璁㈠崟瀛愬唴鐮�
+        public string HPROJECTNO;  //椤圭洰缂栧彿,
+        public Int64 HOPERID;//閲戣澏宸ュ簭,
+        public Int64 HSEQ;//琛屽彿,
+        public Int64 HSTOCKSTATUSID; //搴撳瓨鐘舵��,
+        public Int64 HLOT; //鎵规鍐呯爜,
+        public Int64 HOPTQUEUE;//宸ュ簭搴忓垪,
+        public Int64 HRESERVETYPE;//棰勭暀绫诲瀷,
+        public double HSelPickedQty; //棰嗘枡閫夊崟鏁伴噺,
+        public double HSELPRCDRETURNQTY;  //閫�鏂欓�夊崟鏁伴噺,
+        public Int64 HInterID;
+        public Int64 HEntryID;
+        public string HCloseMan; //琛屽叧闂�(榛樿涓�'')
+        public DateTime HEntryCloseDate;    //琛屽叧闂�(榛樿涓�'')
+        public Int64 HCloseType; //鍏抽棴绫诲瀷(榛樿涓�0)
+        public Int64 HSourceInterID;     //婧愬崟ID
+        public Int64 HSourceEntryID; //婧愬崟瀛怚D
+        public string HSourceBillNo; //婧愬崟鍗曞彿
+        public string HSourceBillType; //婧愬崟绫诲瀷
+        public double HRelationQty;     //鍏宠仈鏁伴噺
+        public double HRelationMoney; //鍏宠仈閲戦
+
+        public Int64 HCHILDSUPPLYORGID;
+        public Int64 HSUPPLYORGID;
+        public Int64 HENTRUSTPICKORGID;
+        public Int64 HSRCTRANSORGID;
+        public Int64 HGROUPBYOWNERID;
+        public Int64 HOWNERID;
+        public Int64 HAuxPropID;
+        public Int64 HERPInterID;
+        public Int64 HERPEntryID;
+        public double HMoveStockQty;
+        public double HBackRelationQty;
+        public string HOWNERTYPEID;
+        public string HBatchNO;
+        public string HMTONo;
+    }
+}
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillMain.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillMain.cs"
index 6b4e07f..9fd23bd 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillMain.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillMain.cs"
@@ -16,5 +16,40 @@
         public Int64 HDeptID;//     int     			--部门	(Gy_Employee)
         public string HExplanation;//  varchar(200)     		--摘要 
         public string HInnerBillNo;//  varchar(50)     		--内部单据号
+
+
+        public Int64 HInterID;
+        public Int64 HYear;
+        public Int64 HPeriod;
+        public string HBillType;
+        public string HBillSubType;
+        public DateTime HDate;
+        public string HBillNo;
+        public Int64 HBillStatus;
+        public string HRemark;
+        public string HMaker;
+        public string HMakeDate;
+        public string HChecker;
+        public string HCheckDate;
+        public string HOWNERTYPEID;
+        public Int64 HOWNERID;
+        public Int64 HERPInterID;
+        public string HERPBillType;
+        public Int64 HPURCHASEORGID;
+        public Int64 HSTOCKORGID;
+        public Int64 HREQUIREORGID;
+        public Int64 HSTOCKGROUPID;
+        public string HSENDBILLNO;
+        public string HLADBILLNO;
+        public Int64 HPURDEPTID;
+        public Int64 HPURGROUPID;
+        public Int64 HSUPPLYID;
+        public Int64 HSETTLEID;
+        public Int64 HCHARGEID;
+        public string HBUSINESSTYPE;
+        public string HSUPPLYADDRESS;
+        public Int64 HCORRESPONDORGID;
+        public Int64 HPROVIDERCONTACTID;
+
     }
 }
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillSub.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillSub.cs"
index 26fe4c5..f16bd74 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillSub.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POInStockBillSub.cs"
@@ -22,5 +22,58 @@
         public Int64 HPOOrderInterID;//
         public Int64 HPOOrderEntryID;//
         public string HPOOrderBillNo;//
+        public Int64 HSecUnitID;// 辅助单位
+
+        public Int64 HInterID;
+        public Int64 HEntryID;
+        public Int64 HSPID;
+        public Int64 HSourceInterID;
+        public Int64 HSourceEntryID;
+        public string HSourceBillNo;
+        public Int64 HAuxPropID;
+        public string HBatchNO;
+        public string HMTONo;
+        public string HPlanMode;
+        public Int64 HERPInterID;
+        public Int64 HERPEntryID;
+        public double HRelationQty;
+        public Int64 HGiveAwayFlag;
+        public double HReceiveQty;
+        public Int64 HSEQ;
+        public string HPRODUCEDATE;
+        public string HEXPIRYDATE;
+        public string HSUPPLYLOT;
+        public string HREQTRACENO;
+        public Int64 HBOMID;
+        public Int64 HSTOCKUNITID;
+        public Int64 HBASEUNITID;
+        public Int64 HSTOCKSTATUSID;
+        public string HKEEPERTYPEID;
+        public string HPROJECTNO;
+        public string HGIVEAWAY;
+        public string HCHECKINCOMING;
+        public string HDISCOUNTRATE;
+        public double HPRICECOEFFICIENT;
+        public Int64 HPRICEUNITID;
+        public Int64 HPRICELISTENTRY;
+        public double HSAMPLEDAMAGEQTY;
+        public double HSAMPLEDAMAGEBASEQTY;
+        public Int64 HPAYORGID;
+        public Int64 HSETTLEORGID;
+        public Int64 HSETTLECURRID;
+        public Int64 HSETTLEMODEID;
+        public Int64 HEXCHANGETYPEID;
+        public double HEXCHANGERATE;
+        public Int64 HPAYCONDITONID;
+        public Int64 HLOCALCURRID;
+        public Int64 HISINCLUDEDTAX;
+        public Int64 HISPRICEEXCLUDETAX;
+        public Int64 HTAXRATEID;
+        public double HCOSTPERCENT;
+        public double HCOSTAMOUNT;
+        public Int64 HVAT;
+        public Int64 HSELLERWITHHOLDING;
+        public Int64 HBUYERWITHHOLDING;
+
     }
 }
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
index 5cee8c3..19c3d92 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
@@ -17,6 +17,25 @@
         public Int64 HDeptID;//     int     			--部门	(Gy_Employee)
         public string HExplanation;//  varchar(200)     		--摘要 
         public string HInnerBillNo;//  varchar(50)     		--内部单据号
-        public DateTime HSSDate;
+        public DateTime HSSDate;   //结算日期
+        public string HRemark;     //备注
+
+
+        public Int64 HInterID;
+        public Int64 HYear;
+        public Int64 HPeriod;
+        public string HBillType;
+        public string HBillSubType;
+        public DateTime HDate;
+        public string HBillNo;
+        public Int64 HBillStatus;
+        public string HChecker;
+        public string HCheckDate;
+        public string HMaker;
+        public string HMakeDate;
+        public Int64 HERPInterID;
+        public string HERPBillType;
+        public Int64 HPURCHASEORGID;
+
     }
 }
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillSub.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillSub.cs"
index 853fb4d..ad0ee62 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillSub.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillSub.cs"
@@ -30,5 +30,20 @@
         public string HSourceInterID;
         public string HSourceEntryID;
         public string HSourceQty;
+
+
+        public Int64 HInterID;
+        public Int64 HEntryID;
+        public string HSourceBillNo;
+        public string HSourceBillType;
+        public double HRelationQty;
+        public double HBackRelationQty;
+        public Int64 HPropertyID;
+        public string HBatChNo;
+        public Int64 HAuxPropID;
+        public string HMTONo;
+        public Int64 HERPInterID;
+        public Int64 HERPEntryID;
+
     }
 }
diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index a8cf93a..bc0ad82 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing Model;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
@@ -118,134 +119,7 @@
                 return objJsonResult;
             }
         }
-        /// <summary>
-        /// 淇濆瓨鎸夐挳
-        ///鍙傛暟锛歴tring sql銆�
-        ///杩斿洖鍊硷細object銆�
-        /// </summary>
-        [Route("Cg_POInStockBill/ModifyByID")]
-        [HttpPost]
-        public object ModifyByID([FromBody] JObject oMain)
-        {
-            try
-            {
-                DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl();
-                DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View();
-
-                var _value = oMain["oMain"].ToString();
-                string msg1 = _value.ToString();
-                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
-                string msg2 = sArray[0].ToString();
-                //string msg3 = sArray[1].ToString();
-                //string msg4 = sArray[2].ToString();
-                //string msg5 = sArray[3].ToString();
-                //鍙嶅簭鍒楀寲
-                msg2 = "[" + msg2.ToString() + "]";
-                List<Warehouse> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Warehouse>>(msg2);
-
-                long HItemID = list[0].HItemID;
-                string HNumber = list[0].HNumber;
-                string HName = list[0].HName;
-                string HHelpCode = list[0].HHelpCode;
-                string HShortNumber = list[0].HShortNumber;
-                long HParentID = list[0].HParentID;
-                long HLevel = list[0].HLevel;
-                bool HEndFlag = list[0].HEndFlag;
-                bool HStopflag = list[0].HStopflag;
-                string HRemark = list[0].HRemark;
-                string HBarCode = list[0].HBarCode;
-                long HEmpID = list[0].HEmpID;
-                string HAddress = list[0].HAddress;
-                string HPhone = list[0].HPhone;
-                long HUSEORGID = list[0].HUSEORGID;
-                string HUpDater = list[0].HUpDater;
-
-                ////鍒ゆ柇鏉冮檺
-                //if (!ClsPub.Security_Log(msg5, 1, false, msg4))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
-
-                //if (!DBUtility.ClsPub.AllowNumber(HNumber))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
-
-                //if (oDept.HavSameNumber(HItemID, HNumber))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "浠g爜閲嶅锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
-                //淇濆瓨
-                //淇濆瓨瀹屾瘯鍚庡鐞�
-                if (HItemID == 0)
-                {
-                    oCN.BeginTran();
-                    oCN.RunProc("Insert into Gy_Warehouse  " +
-                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
-                        ",HLevel,HEndFlag,HStopflag,HRemark,HEmpID,HAddress,HPhone,HUSEORGID) " +
-                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
-                        "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HEmpID.ToString() + ",'" + HAddress + "','" + HPhone + "','" + HUSEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo);
-                    //淇敼涓婄骇涓洪潪鏈骇浠g爜
-                    oCN.RunProc("Update Gy_Warehouse set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
-                    oCN.Commit();
-                }
-                else
-                {
-                    //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
-                    oCN.BeginTran();
-                    //涓昏〃
-                    oCN.RunProc("Update Gy_Warehouse set " +
-                        " HNumber='" + HNumber + "'" +
-                        ",HName='" + HName + "'" +
-                        ",HShortNumber='" + HShortNumber + "'" +
-                        ",HHelpCode='" + HHelpCode + "'" +
-                        ",HLevel=" + HLevel.ToString() +
-                        ",HParentID=" + HParentID.ToString() +
-                        ",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) +
-                        ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
-                        ",HEmpID=" + HEmpID.ToString() +
-                        ",HAddress='" + HAddress + "'" +
-                        ",HPhone='" + HPhone + "'" +
-                        ",HUSEORGID='" + HUSEORGID + "'" +
-                        ",HUpdater='" + HUpDater + "'" +
-                        ",HUpdateDate= getdate()" +
-                        ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
-                    //淇敼瀛愰」鐩唬鐮�
-                    //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
-                    //灏嗕笂绾� 涓洪潪鏈骇
-                    oCN.RunProc("Update Gy_Warehouse set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
-                    //
-                    oCN.Commit();
-                }
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
-                //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
-                objJsonResult.data = 1;
-                return objJsonResult;
-            }
-            catch (Exception e)
-            {
-                oCN.RollBack();
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "Exception锛�" + e.Message;
-                objJsonResult.data = null;
-                return objJsonResult;
-            }
-        }
+       
         /// <summary>
         ///鍒犻櫎鍔熻兘
         /// </summary>
@@ -381,6 +255,296 @@
             return objJsonResult;
         }
 
-        //
+        #region 鏀舵枡閫氱煡鍗� 淇濆瓨/缂栬緫鍔熻兘
+        [Route("Cg_POInStockBill/POInStockBillEdit")]
+        [HttpPost]
+        public object POInStockBillEdit([FromBody] JObject sMainSub)
+        {
+            try
+            {
+                var _value = sMainSub["sMainSub"].ToString();
+                string msg1 = _value.ToString();
+                oCN.BeginTran();
+                //淇濆瓨涓昏〃
+                objJsonResult = AddBillMain(msg1);
+                if (objJsonResult.code == "0")
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                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;
+            }
+        }
+
+        public json AddBillMain(string msg1)
+        {
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString(); //涓昏〃鏁版嵁
+            string msg3 = sArray[1].ToString(); //瀛愯〃鏁版嵁
+            int OperationType = int.Parse(sArray[2].ToString()); // 鏁版嵁绫诲瀷 1娣诲姞 3淇敼
+            string user = sArray[3].ToString();
+            string msg_allVal = sArray[4].ToString(); //涓昏〃+瀛愯〃鎵�鏈夋暟鎹�
+
+            try
+            {
+                msg2 = "[" + msg2.ToString() + "]";
+                List<ClsCg_POInStockBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillMain>>(msg2);
+
+                long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
+                string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
+                long HPRDORGID = mainList[0].HPRDORGID;//缁勭粐
+                DateTime HDate = mainList[0].HDate;//鏃ユ湡
+                string HRemark = mainList[0].HRemark;//澶囨敞
+                long HSupID = mainList[0].HSupID;//渚涘簲鍟�
+                long HEmpID = mainList[0].HEmpID;//涓氬姟鍛�
+                long HDeptID = mainList[0].HDeptID;//閮ㄩ棬
+                long HCurID = mainList[0].HCurID;//甯佸埆
+                Single HExRate = mainList[0].HExRate;//姹囩巼
+                long HManagerID = mainList[0].HManagerID;//涓荤
+                long HWHID = mainList[0].HWHID;//浠撳簱
+                string HMaker = user;//鍒跺崟浜�
+                string HAddress = mainList[0].HAddress;//鍦板潃
+                string HExplanation = mainList[0].HExplanation;//鎽樿
+                string HInnerBillNo = mainList[0].HInnerBillNo;//鍐呴儴鍗曟嵁鍙� 
+
+                List<ClsCg_POInStockBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillMain>>(msg2);
+                DateTime dt = DateTime.Now;
+
+                long HYear = mainList2[0].HYear == null ? 0 : mainList2[0].HYear;
+                long HPeriod = mainList2[0].HPeriod == null ? 0 : mainList2[0].HPeriod;
+                string HBillType = mainList2[0].HBillType == null ? "''" : mainList2[0].HBillType;
+                string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType;
+                long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus;
+                string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate;
+                string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker;
+                string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate;
+                string HOWNERTYPEID = mainList2[0].HOWNERTYPEID == null ? "''" : mainList2[0].HOWNERTYPEID;
+                long HOWNERID = mainList2[0].HOWNERID == null ? 0 : mainList2[0].HOWNERID;
+                long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID;
+                string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType;
+                long HPURCHASEORGID = mainList2[0].HPURCHASEORGID == null ? 0 : mainList2[0].HPURCHASEORGID;
+                long HSTOCKORGID = mainList2[0].HSTOCKORGID == null ? 0 : mainList2[0].HSTOCKORGID;
+                long HREQUIREORGID = mainList2[0].HREQUIREORGID == null ? 0 : mainList2[0].HREQUIREORGID;
+                long HSTOCKGROUPID = mainList2[0].HSTOCKGROUPID == null ? 0 : mainList2[0].HSTOCKGROUPID;
+                string HSENDBILLNO = mainList2[0].HSENDBILLNO == null ? "''" : mainList2[0].HSENDBILLNO;
+                string HLADBILLNO = mainList2[0].HLADBILLNO == null ? "''" : mainList2[0].HLADBILLNO;
+                long HPURDEPTID = mainList2[0].HPURDEPTID == null ? 0 : mainList2[0].HPURDEPTID;
+                long HPURGROUPID = mainList2[0].HPURGROUPID == null ? 0 : mainList2[0].HPURGROUPID;
+                long HSUPPLYID = mainList2[0].HSUPPLYID == null ? 0 : mainList2[0].HSUPPLYID;
+                long HSETTLEID = mainList2[0].HSETTLEID == null ? 0 : mainList2[0].HSETTLEID;
+                long HCHARGEID = mainList2[0].HCHARGEID == null ? 0 : mainList2[0].HCHARGEID;
+                string HBUSINESSTYPE = mainList2[0].HBUSINESSTYPE == null ? "''" : mainList2[0].HBUSINESSTYPE;
+                string HSUPPLYADDRESS = mainList2[0].HSUPPLYADDRESS == null ? "''" : mainList2[0].HSUPPLYADDRESS;
+                long HCORRESPONDORGID = mainList2[0].HCORRESPONDORGID == null ? 0 : mainList2[0].HCORRESPONDORGID;
+                long HPROVIDERCONTACTID = mainList2[0].HPROVIDERCONTACTID == null ? 0 : mainList2[0].HPROVIDERCONTACTID;
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_POOrderBillList");
+
+                if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
+                {
+                    //涓昏〃
+                    oCN.RunProc(@"Insert Into Cg_POInStockBillMain   
+                        (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate
+	                    ,HBillNo,HBillStatus,HSupID,HManagerID,HEmpID,HDeptID,HRemark
+	                    ,HMaker,HMakeDate,HChecker,HCheckDate,HOWNERTYPEID,HOWNERID
+	                    ,HERPInterID,HERPBillType,HPURCHASEORGID,HSTOCKORGID,HREQUIREORGID
+	                    ,HSTOCKGROUPID,HSENDBILLNO,HLADBILLNO,HPURDEPTID,HPURGROUPID,HSUPPLYID
+	                    ,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HSUPPLYADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID,HCurID,HExRate,HAddress,HWHID)
+                        values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1103 + "','" +
+                    HBillSubType + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HSupID +
+                    "," + HManagerID + "," + HEmpID + "," + HDeptID + ",'" + HRemark + "','" + HMaker +
+                    "','" + HMakeDate + "','" + HChecker + "','" + HCheckDate + "','" + HOWNERTYPEID + "'," + HOWNERID + "," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HSTOCKORGID + "," + HREQUIREORGID + "," +
+                    HSTOCKGROUPID + ",'" + HSENDBILLNO + "','" + HLADBILLNO + "'," + HPURDEPTID + "," + HPURGROUPID + "," + HSUPPLYID + "," +
+                    HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HSUPPLYADDRESS + "'," + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + "," + HCurID + "," + HExRate + ",'" + HAddress + "'," + HWHID + ")");
+                }
+                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
+                { //淇敼
+                    oCN.RunProc("update Cg_POInStockBillMain  set " +
+                                "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" +
+                                 ",HSupID=" + HSupID + ",HCurID=" + HCurID
+                                 + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
+                                 + ",HAddress='" + HAddress + " where HInterID=" + HInterID);
+
+                    //鍒犻櫎瀛愯〃
+                    oCN.RunProc("delete from Cg_POInStockBillSub where HInterID='" + HInterID + "'");
+                }
+                //淇濆瓨瀛愯〃
+                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
+
+                if (objJsonResult.code == "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = null;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        public json AddBillSub(string msg3, long HInterID, int OperationType)
+        {
+            List<ClsCg_POInStockBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillSub>>(msg3);
+
+            List<ClsCg_POInStockBillSub> DetailColl2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillSub>>(msg3);
+
+
+            long HSPID = DetailColl2[0].HSPID == null ? 0 : DetailColl2[0].HSPID;
+            long HSourceInterID = DetailColl2[0].HSourceInterID == null ? 0 : DetailColl2[0].HSourceInterID;
+            long HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? 0 : DetailColl2[0].HSourceEntryID;
+            string HSourceBillNo = DetailColl2[0].HSourceBillNo == null ? "''" : DetailColl2[0].HSourceBillNo;
+            string HSourceBillType = DetailColl2[0].HSourceBillType == null ? "''" : DetailColl2[0].HSourceBillType;
+            long HAuxPropID = DetailColl2[0].HAuxPropID == null ? 0 : DetailColl2[0].HAuxPropID;
+            string HBatchNO = DetailColl2[0].HBatchNO == null ? "''" : DetailColl2[0].HBatchNO;
+            string HMTONo = DetailColl2[0].HMTONo == null ? "''" : DetailColl2[0].HMTONo;
+            string HPlanMode = DetailColl2[0].HPlanMode == null ? "''" : DetailColl2[0].HPlanMode;
+            long HERPInterID = DetailColl2[0].HERPInterID == null ? 0 : DetailColl2[0].HERPInterID;
+            long HERPEntryID = DetailColl2[0].HERPEntryID == null ? 0 : DetailColl2[0].HERPEntryID;
+            double HRelationQty = DetailColl2[0].HRelationQty == null ? 0 : DetailColl2[0].HRelationQty;
+            long HGiveAwayFlag = DetailColl2[0].HGiveAwayFlag == null ? 0 : DetailColl2[0].HGiveAwayFlag;
+            double HReceiveQty = DetailColl2[0].HReceiveQty == null ? 0 : DetailColl2[0].HReceiveQty;
+            long HSEQ = DetailColl2[0].HSEQ == null ? 0 : DetailColl2[0].HSEQ;
+            string HPRODUCEDATE = DetailColl2[0].HPRODUCEDATE == null ? "''" : DetailColl2[0].HPRODUCEDATE;
+            string HEXPIRYDATE = DetailColl2[0].HEXPIRYDATE == null ? "''" : DetailColl2[0].HEXPIRYDATE;
+            string HSUPPLYLOT = DetailColl2[0].HSUPPLYLOT == null ? "''" : DetailColl2[0].HSUPPLYLOT;
+            string HREQTRACENO = DetailColl2[0].HREQTRACENO == null ? "''" : DetailColl2[0].HREQTRACENO;
+            long HBOMID = DetailColl2[0].HBOMID == null ? 0 : DetailColl2[0].HBOMID;
+            long HSTOCKUNITID = DetailColl2[0].HSTOCKUNITID == null ? 0 : DetailColl2[0].HSTOCKUNITID;
+            long HBASEUNITID = DetailColl2[0].HBASEUNITID == null ? 0 : DetailColl2[0].HBASEUNITID;
+            long HSTOCKSTATUSID = DetailColl2[0].HSTOCKSTATUSID == null ? 0 : DetailColl2[0].HSTOCKSTATUSID;
+            string HKEEPERTYPEID = DetailColl2[0].HKEEPERTYPEID == null ? "''" : DetailColl2[0].HKEEPERTYPEID;
+            string HPROJECTNO = DetailColl2[0].HPROJECTNO == null ? "''" : DetailColl2[0].HPROJECTNO;
+            string HGIVEAWAY = DetailColl2[0].HGIVEAWAY == null ? "''" : DetailColl2[0].HGIVEAWAY;
+            string HCHECKINCOMING = DetailColl2[0].HCHECKINCOMING == null ? "''" : DetailColl2[0].HCHECKINCOMING;
+            string HDISCOUNTRATE = DetailColl2[0].HDISCOUNTRATE == null ? "''" : DetailColl2[0].HDISCOUNTRATE;
+            double HPRICECOEFFICIENT = DetailColl2[0].HPRICECOEFFICIENT == null ? 0 : DetailColl2[0].HPRICECOEFFICIENT;
+            long HPRICEUNITID = DetailColl2[0].HPRICEUNITID == null ? 0 : DetailColl2[0].HPRICEUNITID;
+            long HPRICELISTENTRY = DetailColl2[0].HPRICELISTENTRY == null ? 0 : DetailColl2[0].HPRICELISTENTRY;
+            double HSAMPLEDAMAGEQTY = DetailColl2[0].HSAMPLEDAMAGEQTY == null ? 0 : DetailColl2[0].HSAMPLEDAMAGEQTY;
+            double HSAMPLEDAMAGEBASEQTY = DetailColl2[0].HSAMPLEDAMAGEBASEQTY == null ? 0 : DetailColl2[0].HSAMPLEDAMAGEBASEQTY;
+            long HPAYORGID = DetailColl2[0].HPAYORGID == null ? 0 : DetailColl2[0].HPAYORGID;
+            long HSETTLEORGID = DetailColl2[0].HSETTLEORGID == null ? 0 : DetailColl2[0].HSETTLEORGID;
+            long HSETTLECURRID = DetailColl2[0].HSETTLECURRID == null ? 0 : DetailColl2[0].HSETTLECURRID;
+            long HSETTLEMODEID = DetailColl2[0].HSETTLEMODEID == null ? 0 : DetailColl2[0].HSETTLEMODEID;
+            long HEXCHANGETYPEID = DetailColl2[0].HEXCHANGETYPEID == null ? 0 : DetailColl2[0].HEXCHANGETYPEID;
+            long HPAYCONDITONID = DetailColl2[0].HPAYCONDITONID == null ? 0 : DetailColl2[0].HPAYCONDITONID;
+            long HLOCALCURRID = DetailColl2[0].HLOCALCURRID == null ? 0 : DetailColl2[0].HLOCALCURRID;
+            long HISINCLUDEDTAX = DetailColl2[0].HISINCLUDEDTAX == null ? 0 : DetailColl2[0].HISINCLUDEDTAX;
+            long HISPRICEEXCLUDETAX = DetailColl2[0].HISPRICEEXCLUDETAX == null ? 0 : DetailColl2[0].HISPRICEEXCLUDETAX;
+            long HTAXRATEID = DetailColl2[0].HTAXRATEID == null ? 0 : DetailColl2[0].HTAXRATEID;
+            double HCOSTPERCENT = DetailColl2[0].HCOSTPERCENT == null ? 0 : DetailColl2[0].HCOSTPERCENT;
+            double HCOSTAMOUNT = DetailColl2[0].HCOSTAMOUNT == null ? 0 : DetailColl2[0].HCOSTAMOUNT;
+            long HVAT = DetailColl2[0].HVAT == null ? 0 : DetailColl2[0].HVAT;
+            long HSELLERWITHHOLDING = DetailColl2[0].HSELLERWITHHOLDING == null ? 0 : DetailColl2[0].HSELLERWITHHOLDING;
+            long HBUYERWITHHOLDING = DetailColl2[0].HBUYERWITHHOLDING == null ? 0 : DetailColl2[0].HBUYERWITHHOLDING;
+            string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark;
+            string HPOOrderBillNo = DetailColl2[0].HPOOrderBillNo == null ? "''" : DetailColl2[0].HPOOrderBillNo;
+
+            int i = 0;
+            foreach (ClsCg_POInStockBillSub oSub in DetailColl)
+            {
+                i++;
+                if (oSub.HQty <= 0 || oSub.HQty == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oSub.HMaterID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鐗╂枡涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //if (oSub.HSourceID == 0)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "绗�" + i + "琛岋紝鐢熶骇璧勬簮涓嶈兘涓虹┖";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                if (oSub.HUnitID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝璁¢噺鍗曚綅涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DataSet Cs;
+                Int64 NewHEntryID = 1;
+                Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Cg_POInStockBillSub", "Cg_POInStockBillSub");
+                if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+                {
+                    NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+                    NewHEntryID += 1;
+                }
+
+                oCN.RunProc($@"Insert into Cg_POInStockBillSub 
+                (HInterID,HEntryID,HMaterID,HUnitID,HQty,HPrice
+	            ,HMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID
+                ,HPOOrderEntryID,HPOORderBillNo,HAuxPropID,HBatchNO,HMTONo,HPlanMode,HERPInterID,HERPEntryID
+	            ,HRelationQty,HGiveAwayFlag,HReceiveQty,HSEQ,HPRODUCEDATE,HEXPIRYDATE,HSUPPLYLOT,HREQTRACENO,HBOMID,HSTOCKUNITID
+	            ,HBASEUNITID,HSTOCKSTATUSID,HKEEPERTYPEID,HPROJECTNO,HGIVEAWAY,HCHECKINCOMING,HTAXPRICE,HDISCOUNTRATE
+                ,HPRICECOEFFICIENT,HPRICEUNITID,HPRICELISTENTRY,HSAMPLEDAMAGEQTY,HSAMPLEDAMAGEBASEQTY
+	            ,HPAYORGID,HSETTLEORGID,HSETTLECURRID,HSETTLEMODEID,HEXCHANGETYPEID,HPAYCONDITONID
+	            ,HEXCHANGERATE,HLOCALCURRID,HISINCLUDEDTAX,HISPRICEEXCLUDETAX
+	            ,HTAXRATEID,HCOSTPERCENT,HCOSTAMOUNT,HVAT,HSELLERWITHHOLDING,HBUYERWITHHOLDING,HSecUnitID) 
+                 values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQty == null ? 0 : oSub.HQty)}
+                ,{oSub.HPrice},{oSub.HMoney},{oSub.HWHID},{oSub.HSPID},'{HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},{HSourceBillNo},{HSourceBillType},{oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},{HPOOrderBillNo},{HAuxPropID},{HBatchNO},{HMTONo},{HPlanMode},{HERPInterID},{HERPEntryID},{HRelationQty},{HGiveAwayFlag},{HReceiveQty},{HSEQ},{HPRODUCEDATE},{HEXPIRYDATE},
+                  {HSUPPLYLOT},{HREQTRACENO},{HBOMID},{HSTOCKUNITID},{HBASEUNITID},{HSTOCKSTATUSID},'{HKEEPERTYPEID}',{HPROJECTNO},{HGIVEAWAY},{HCHECKINCOMING},{oSub.HTaxPrice},{HDISCOUNTRATE},{HPRICECOEFFICIENT},{HPRICEUNITID},{HPRICELISTENTRY},{HSAMPLEDAMAGEQTY},{HSAMPLEDAMAGEBASEQTY},{HPAYORGID},{HSETTLEORGID},{HSETTLECURRID},{HSETTLEMODEID},{HEXCHANGETYPEID},{HPAYCONDITONID},{oSub.HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},{oSub.HSecUnitID})");
+            }
+
+            objJsonResult.code = "1";
+            objJsonResult.count = 1;
+            objJsonResult.Message = null;
+            objJsonResult.data = null;
+            return objJsonResult;
+        }
+
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
index 3f88755..dcc0ab2 100644
--- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing Model;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
@@ -659,7 +660,321 @@
             }
         }
 
-        //
+        #region 閲囪喘璁㈠崟 淇濆瓨/缂栬緫鍔熻兘
+        [Route("Cg_POOrderBill/POOrderBillEdit")]
+        [HttpPost]
+        public object POOrderBillEdit([FromBody] JObject sMainSub)
+        {
+            try
+            {
+                var _value = sMainSub["sMainSub"].ToString();
+                string msg1 = _value.ToString();
+                oCN.BeginTran();
+                //淇濆瓨涓昏〃
+                objJsonResult = AddBillMain(msg1);
+                if (objJsonResult.code == "0")
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                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;
+            }
+        }
+
+        public json AddBillMain(string msg1)
+        {
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString(); //涓昏〃鏁版嵁
+            string msg3 = sArray[1].ToString(); //瀛愯〃鏁版嵁
+            int OperationType = int.Parse(sArray[2].ToString()); // 鏁版嵁绫诲瀷 1娣诲姞 3淇敼
+            string user = sArray[3].ToString();
+            string msg_allVal = sArray[4].ToString(); //涓昏〃+瀛愯〃鎵�鏈夋暟鎹�
+
+            try
+            {
+                msg2 = "[" + msg2.ToString() + "]";
+                List<ClsCg_POOrderBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillMain>>(msg2);
+
+                long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
+                string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
+                long HPRDORGID = mainList[0].HPRDORGID;//缁勭粐
+                DateTime HDate = mainList[0].HDate;//鏃ユ湡
+                string HRemark = mainList[0].HRemark;//澶囨敞
+                long HSupID = mainList[0].HSupID;//渚涘簲鍟�
+                long HEmpID = mainList[0].HEmpID;//涓氬姟鍛�
+                long HDeptID = mainList[0].HDeptID;//閮ㄩ棬
+                long HCurID = mainList[0].HCurID;//甯佸埆
+                Single HExRate = mainList[0].HExRate;//姹囩巼
+                long HManagerID = mainList[0].HManagerID;//涓荤
+                long HPSStyleID = mainList[0].HPSStyleID;//閲囪喘鏂瑰紡
+                long HSSID = mainList[0].HSSID;//缁撶畻鏂瑰紡
+                DateTime HSSDate = mainList[0].HSSDate;//缁撶畻鏃ユ湡
+                string HMaker = user;//鍒跺崟浜�
+                string HAddress = mainList[0].HAddress;//鍦板潃
+                string HExplanation = mainList[0].HExplanation;//鎽樿
+                string HInnerBillNo = mainList[0].HInnerBillNo;//鍐呴儴鍗曟嵁鍙� 
+
+                List<ClsCg_POOrderBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillMain>>(msg2);
+                DateTime dt = DateTime.Now;
+
+                long HYear = mainList2[0].HYear == null ? 0 : mainList2[0].HYear;
+                long HPeriod = mainList2[0].HPeriod == null ? 0 : mainList2[0].HPeriod;
+                string HBillType = mainList2[0].HBillType == null ? "''" : mainList2[0].HBillType;
+                string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType;
+                long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus;
+                string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker;
+                string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate;
+                string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate;
+                long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID;
+                string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType;
+                long HPURCHASEORGID = mainList2[0].HPURCHASEORGID == null ? 0 : mainList2[0].HPURCHASEORGID;
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_POOrderBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_POOrderBillList");
+
+                if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
+                {
+                    DataSet Ds;
+                    Int64 NewHInterID = 1;
+                    Ds = oCN.RunProcReturn("select MAX(HInterID)HInterID from Cg_POOrderBillMain", "Cg_POOrderBillMain");
+                    if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()) != 0)
+                    {
+                        NewHInterID = ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
+                        NewHInterID += 1;
+                    }
+                    //涓昏〃
+                    oCN.RunProc(@"Insert Into Cg_POOrderBillMain   
+                        (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus
+	                    ,HAddress,HSSID,HSSDate,HPSStyleID,HSupID,HCurID
+	                    ,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HRemark,HInnerBillNo
+	                    ,HChecker,HCheckDate,HMaker,HMakeDate
+	                    ,HERPInterID,HERPBillType,HPURCHASEORGID)
+                        values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1102 + "','" +
+                    HBillSubType + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress +
+                    "'," + HSSID + ",'" + HSSDate + "'," + HPSStyleID + "," + HSupID + "," + HCurID +
+                    "," + HExRate + "," + HEmpID + "," + HManagerID + "," + HDeptID + ",'" + HExplanation + "','" + HRemark + "','" + HInnerBillNo + "','" + HChecker + "','" + HCheckDate + "','" + HMaker + "','" +
+                    HMakeDate + "'," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + ")");
+                }
+                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
+                { //淇敼
+                    oCN.RunProc("update Cg_POOrderBillMain  set " +
+                                "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" +
+                                 ",HSSID=" + HSSID + ",HPSStyleID=" + HPSStyleID + ",HSupID=" + HSupID + ",HCurID=" + HCurID
+                                 + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
+                                 + ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "' where HInterID=" + HInterID);
+
+                    //鍒犻櫎瀛愯〃
+                    oCN.RunProc("delete from Cg_POOrderBillSub where HInterID='" + HInterID + "'");
+                }
+                //淇濆瓨瀛愯〃
+                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
+
+                if (objJsonResult.code == "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = null;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        public json AddBillSub(string msg3, long HInterID, int OperationType)
+        {
+            List<ClsCg_POOrderBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillSub>>(msg3);
+
+            List<ClsCg_POOrderBillSub> DetailColl2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillSub>>(msg3);
+
+            
+            string HSourceBillNo = DetailColl2[0].HSourceBillNo == null ? "''" : DetailColl2[0].HSourceBillNo;
+            string HSourceBillType = DetailColl2[0].HSourceBillType == null ? "''" : DetailColl2[0].HSourceBillType;
+            double HRelationQty = DetailColl2[0].HRelationQty == null ? 0 : DetailColl2[0].HRelationQty;
+            double HBackRelationQty = DetailColl2[0].HBackRelationQty == null ? 0 : DetailColl2[0].HBackRelationQty;
+            long HPropertyID = DetailColl2[0].HPropertyID == null ? 0 : DetailColl2[0].HPropertyID;
+            string HBatChNo = DetailColl2[0].HBatChNo == null ? "''" : DetailColl2[0].HBatChNo;
+            long HAuxPropID = DetailColl2[0].HAuxPropID == null ? 0 : DetailColl2[0].HAuxPropID;
+            string HMTONo = DetailColl2[0].HMTONo == null ? "''" : DetailColl2[0].HMTONo;
+            long HERPInterID = DetailColl2[0].HERPInterID == null ? 0 : DetailColl2[0].HERPInterID;
+            long HERPEntryID = DetailColl2[0].HERPEntryID == null ? 0 : DetailColl2[0].HERPEntryID;
+
+            string HSeOrderBillNo = DetailColl2[0].HSeOrderBillNo == null ? "''" : DetailColl2[0].HSeOrderBillNo;
+            string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark;
+            string HSourceInterID = DetailColl2[0].HSourceInterID == null ? "''" : DetailColl2[0].HSourceInterID;
+            string HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? "''" : DetailColl2[0].HSourceEntryID;
+
+
+            int i = 0;
+            foreach (ClsCg_POOrderBillSub oSub in DetailColl)
+            {
+                i++;
+                if (oSub.HQty <= 0 || oSub.HQty == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oSub.HMaterID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鐗╂枡涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //if (oSub.HSourceID == 0)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "绗�" + i + "琛岋紝鐢熶骇璧勬簮涓嶈兘涓虹┖";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                if (oSub.HUnitID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝璁¢噺鍗曚綅涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DataSet Cs;
+                Int64 NewHEntryID = 1;
+                Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Cg_POOrderBillSub", "Cg_POOrderBillSub");
+                if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+                {
+                    NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+                    NewHEntryID += 1;
+                }
+
+                oCN.RunProc($@"Insert into Cg_POOrderBillSub 
+                (HInterID,HEntryID,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HDiscountRate,HRelTaxPrice
+	            ,HMoney,HTaxRate,HTaxMoney,HLineTotal,HlineTotalBB,HDate,HInStockQty,HInvoiceQty,HSeOrderBillNo,HSeOrderInterID
+	            ,HSeOrderEntryID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo
+	            ,HSourceBillType,HRelationQty,HBackRelationQty,HPropertyID,HBatChNo,HAuxPropID,HMTONo
+	            ,HERPInterID,HERPEntryID) 
+                 values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQty == null ? 0 : oSub.HQty)}
+                ,{oSub.HPrice},{oSub.HTaxPrice},{oSub.HDiscountRate},{oSub.HRelTaxPrice},{oSub.HMoney},{oSub.HTaxRate},{oSub.HTaxMoney},{oSub.HlineTotal},{oSub.HlineTotalBB},'{oSub.HDate}',{oSub.HInStockQty},{oSub.HInvoiceQty},{HSeOrderBillNo},{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{HRemark}',{HSourceInterID},{HSourceEntryID},{HSourceBillNo},{HSourceBillType},{HRelationQty},{HBackRelationQty},{HPropertyID},{HBatChNo},
+                  {HAuxPropID},{HMTONo},{HERPInterID},{HERPEntryID})");
+            }
+
+            objJsonResult.code = "1";
+            objJsonResult.count = 1;
+            objJsonResult.Message = null;
+            objJsonResult.data = null;
+            return objJsonResult;
+        }
+
+        #endregion
+        /// <summary>
+        ///鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("Cg_POOrderBill/DeltetCg_POOrderBill")]
+        [HttpGet]
+        public object DeltetCg_POOrderBill(string HInterID)
+        {
+            try
+            {
+                oCN.BeginTran();
+                oCN.RunProc("Delete From Cg_POOrderBillMain where HInterID = " + HInterID);
+                oCN.RunProc("Delete From Cg_POOrderBillSub where HInterID = " + HInterID);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Cg_POOrderBill/cx")]
+        [HttpGet]
+        public object cx(long HInterID)
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_POOrderBillList where hmainid =" + HInterID, "h_v_IF_POOrderBillList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "false锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    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;
+            }
+        }
+
     }
 
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
index 643d544..cddfdaf 100644
--- a/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Model.鐢熶骇绠$悊;
+using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
 using System.Collections;
@@ -240,5 +241,333 @@
             }
         }
         #endregion
+
+        #region 鐢熶骇鐢ㄦ枡鍗� 淇濆瓨/缂栬緫鍔熻兘
+        [Route("Sc_PPBomBill/PPBomBillEdit")]
+        [HttpPost]
+        public object PPBomBillEdit([FromBody] JObject sMainSub)
+        {
+            try
+            {
+                var _value = sMainSub["sMainSub"].ToString();
+                string msg1 = _value.ToString();
+                oCN.BeginTran();
+                //淇濆瓨涓昏〃
+                objJsonResult = AddBillMain(msg1);
+                if (objJsonResult.code == "0")
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                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;
+            }
+        }
+
+        public json AddBillMain(string msg1)
+        {
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString(); //涓昏〃鏁版嵁
+            string msg3 = sArray[1].ToString(); //瀛愯〃鏁版嵁
+            int OperationType = int.Parse(sArray[2].ToString()); // 鏁版嵁绫诲瀷 1娣诲姞 3淇敼
+            string user = sArray[3].ToString();
+            string msg_allVal = sArray[4].ToString(); //涓昏〃+瀛愯〃鎵�鏈夋暟鎹�
+
+            try
+            {
+                msg2 = "[" + msg2.ToString() + "]";
+                List<ClsSc_PPBomBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_PPBomBillMain>>(msg2);
+
+                string HBillNo = mainList[0].HBillNo;     //鍗曟嵁鍙�
+                long HMaterID = mainList[0].HMaterID;  //鐗╂枡
+                long HUnitID = mainList[0].HUnitID;  //璁¢噺鍗曚綅
+                long HDeptID = mainList[0].HDeptID;    //閮ㄩ棬
+                DateTime HDate = mainList[0].HDate;  //鏃ユ湡
+                double HQty = mainList[0].HQty;  //鏁伴噺
+                string HRemark = mainList[0].HRemark;   //澶囨敞
+
+
+                List<ClsSc_PPBomBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_PPBomBillMain>>(msg2);
+                DateTime dt = DateTime.Now;
+
+                long HYear = mainList2[0].HYear == null ? 0 : mainList2[0].HYear;
+                long HPeriod = mainList2[0].HPeriod == null ? 0 : mainList2[0].HPeriod;
+                string HBillType = mainList2[0].HBillType == null ? "''" : mainList2[0].HBillType; // 鍗曟嵁绫诲瀷
+                string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType; // 瀛愮被鍨�
+                long HInterID = mainList2[0].HInterID == null ? 0 : mainList2[0].HInterID;
+                long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus;        //鍗曟嵁鐘舵��
+                long HCheckItemNextID = mainList2[0].HCheckItemNextID == null ? 0 : mainList2[0].HCheckItemNextID;  //寰呭鏍搁」鐩紙榛樿鍊� 0锛�
+                long HCheckFlowID = mainList2[0].HCheckFlowID == null ? 0 : mainList2[0].HCheckFlowID;  //瀹℃壒娴侊紙榛樿鍊� 0锛�  鐣岄潰涓婁笉闇�瑕佹樉绀�
+                string HBacker = mainList2[0].HBacker == null ? "''" : mainList2[0].HBacker; //閫�鍥炰汉  锛堥粯璁や负''锛�
+                string HBackDate = mainList2[0].HBackDate == null ? "''" : mainList2[0].HBackDate;  //閫�鍥炴棩鏈� 锛堝厑璁窷ULL锛�
+                string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker;   //瀹℃牳浜� 锛堥粯璁や负''锛�
+                string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate;          //瀹℃牳鏃ユ湡 锛堝厑璁窷ULL锛�
+                string HMaker = mainList2[0].HMaker == null ? "''" : mainList2[0].HMaker;          //鍒跺崟浜�
+                string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate;             //鍒跺崟鏃ユ湡
+                string HUpDater = mainList2[0].HUpDater == null ? "''" : mainList2[0].HUpDater;                 //淇敼浜� 锛堥粯璁や负''锛�
+                string HUpDateDate = mainList2[0].HUpDateDate == null ? "''" : mainList2[0].HUpDateDate;         //淇敼鏃ユ湡 锛堝厑璁窷ULL锛�
+                string HCloseMan = mainList2[0].HCloseMan == null ? "''" : mainList2[0].HCloseMan;          //鍏抽棴浜� 锛堥粯璁や负''锛�
+                string HCloseDate = mainList2[0].HCloseDate == null ? "''" : mainList2[0].HCloseDate;         //鍏抽棴鏃ユ湡 锛堝厑璁窷ULL锛�
+                long HCloseType = mainList2[0].HCloseType == null ? 0 : mainList2[0].HCloseType;           //鍏抽棴绫诲瀷   锛堥粯璁や负0锛�
+                string HDeleteMan = mainList2[0].HDeleteMan == null ? "''" : mainList2[0].HDeleteMan;           //浣滃簾浜� 锛堥粯璁や负''锛�
+                string HDeleteDate = mainList2[0].HDeleteDate == null ? "''" : mainList2[0].HDeleteDate;           //浣滃簾鏃ユ湡 锛堝厑璁窷ULL锛�
+                long HICMOInterID = mainList2[0].HICMOInterID == null ? 0 : mainList2[0].HICMOInterID;  //鐢熶骇璁㈠崟鍐呯爜
+                long HCheckItemNowID = mainList2[0].HCheckItemNowID == null ? 0 : mainList2[0].HCheckItemNowID;      //褰撳墠瀹℃牳椤圭洰锛堥粯璁ゅ�� 0锛�
+                long HSeOrderInterID = mainList2[0].HSeOrderInterID == null ? 0 : mainList2[0].HSeOrderInterID;  //閿�鍞鍗曞唴鐮�
+                long HSeOrderEntryID = mainList2[0].HSeOrderEntryID == null ? 0 : mainList2[0].HSeOrderEntryID;  //閿�鍞鍗曞瓙鍐呯爜
+                string HSeOrderBillNo = mainList2[0].HSeOrderBillNo == null ? "''" : mainList2[0].HSeOrderBillNo;  //閿�鍞鍗曞彿
+                string HType = mainList2[0].HType == null ? "''" : mainList2[0].HType; // 绫诲瀷(鍙兘鏄� 濮斿鍜岀敓浜�)
+                long HSeOrderEntrySEQ = mainList2[0].HSeOrderEntrySEQ == null ? 0 : mainList2[0].HSeOrderEntrySEQ;  //閿�鍞鍗曡鍙�
+                long HICMOEntrySEQ = mainList2[0].HICMOEntrySEQ == null ? 0 : mainList2[0].HICMOEntrySEQ;  //鐢熶骇璁㈠崟琛屽彿
+                string HREQSRC = mainList2[0].HREQSRC == null ? "''" : mainList2[0].HREQSRC;   //闇�姹傛潵婧�
+
+                long HICMOEntryID = mainList2[0].HICMOEntryID == null ? 0 : mainList2[0].HICMOEntryID;
+                long HPRDORGID = mainList2[0].HPRDORGID == null ? 0 : mainList2[0].HPRDORGID;
+                long HENTRUSTORGID = mainList2[0].HENTRUSTORGID == null ? 0 : mainList2[0].HENTRUSTORGID;
+                long HPARENTOWNERID = mainList2[0].HPARENTOWNERID == null ? 0 : mainList2[0].HPARENTOWNERID;
+                string HPARENTOWNERTYPEID = mainList2[0].HPARENTOWNERTYPEID == null ? "''" : mainList2[0].HPARENTOWNERTYPEID;
+                long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID;
+                string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType;
+
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_PPBomBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_PPBomBillList");
+
+                if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
+                {
+                    //涓昏〃
+                    oCN.RunProc(@"Insert Into Sc_PPBomBillMain   
+                        (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus,HICMOInterID
+                        ,HICMOEntryID,HMaterID,HUnitID,HQty,HDeptID,HMaker,HMakeDate,HChecker,HCheckDate
+                        ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HPRDORGID,HENTRUSTORGID,HPARENTOWNERID
+                        ,HPARENTOWNERTYPEID,HERPInterID,HERPBillType,HSeOrderEntrySEQ,HICMOEntrySEQ)
+                        values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 3720 + "','" +
+                    HBillSubType + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "'," + HICMOInterID +
+                    "," + HICMOEntryID + ",'" + HMaterID + "'," + HUnitID + "," + HQty + "," + HDeptID +
+                    ",'" + HMaker + "','" + HMakeDate + "','" + HChecker + "','" + HCheckDate + "','" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HPRDORGID + "," + HENTRUSTORGID + "," + HPARENTOWNERID + "," +
+                    HPARENTOWNERTYPEID + "," + HERPInterID + ",'" + HERPBillType + "'," + HSeOrderEntrySEQ + "," + HICMOEntrySEQ + ")");
+                }
+                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
+                { //淇敼
+                    oCN.RunProc("update Sc_PPBomBillMain  set " +
+                                "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" +
+                                ",HDeptID=" + HDeptID + " where HInterID=" + HInterID);
+
+                    //鍒犻櫎瀛愯〃
+                    oCN.RunProc("delete from Sc_PPBomBillSub where HInterID='" + HInterID + "'");
+                }
+                //淇濆瓨瀛愯〃
+                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
+
+                if (objJsonResult.code == "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = objJsonResult.Message;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = null;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        public json AddBillSub(string msg3, long HInterID, int OperationType)
+        {
+            List<ClsSc_PPBomBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_PPBomBillSub>>(msg3);
+
+            List<ClsSc_PPBomBillSub> DetailColl2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_PPBomBillSub>>(msg3);
+
+            DateTime dt = DateTime.Now;
+
+            long HQtyMust = DetailColl2[0].HQtyMust == null ? 0 : DetailColl2[0].HQtyMust; //搴斿彂鏁伴噺
+            double HNumerator = DetailColl2[0].HNumerator == null ? 0 : DetailColl2[0].HNumerator;  //鍒嗗瓙
+            double HDenominator = DetailColl2[0].HDenominator == null ? 0 : DetailColl2[0].HDenominator;  //鍒嗘瘝
+            double HQtyScrap = DetailColl2[0].HQtyScrap == null ? 0 : DetailColl2[0].HQtyScrap;  //鎹熻�楃巼
+            DateTime HSendDate = DetailColl2[0].HSendDate == null ? dt : DetailColl2[0].HSendDate;  //鍙戞枡鏃ユ湡
+            long HBomInterID = DetailColl2[0].HBomInterID == null ? 0 : DetailColl2[0].HBomInterID; //BOM
+            long HProcID = DetailColl2[0].HProcID == null ? 0 : DetailColl2[0].HProcID;      //宸ュ簭鍐呯爜
+            long HKeyMaterID_Line = DetailColl2[0].HKeyMaterID_Line == null ? 0 : DetailColl2[0].HKeyMaterID_Line;  //鍏抽敭浠剁粦瀹氭爣璁�
+            long HKeyMaterID_InStock = DetailColl2[0].HKeyMaterID_InStock == null ? 0 : DetailColl2[0].HKeyMaterID_InStock;     //鍏抽敭浠跺叆搴撴爣璁�
+            long HKeyMaterID_Ready = DetailColl2[0].HKeyMaterID_Ready == null ? 0 : DetailColl2[0].HKeyMaterID_Ready;  //鍏抽敭浠堕綈濂楁爣璁�
+            long HICMOInterID = DetailColl2[0].HICMOInterID == null ? 0 : DetailColl2[0].HICMOInterID;   //浠诲姟鍗旾D
+            string HICMOBillNo = DetailColl2[0].HICMOBillNo == null ? "''" : DetailColl2[0].HICMOBillNo;  //浠诲姟鍗曞彿
+            string HSeOrderBillNo = DetailColl2[0].HSeOrderBillNo == null ? "''" : DetailColl2[0].HSeOrderBillNo;  //(閿�鍞鍗曞彿)
+            long HSeOrderInterID = DetailColl2[0].HSeOrderInterID == null ? 0 : DetailColl2[0].HSeOrderInterID;    //(閿�鍞鍗曚富鍐呯爜)
+            long HSeOrderEntryID = DetailColl2[0].HSeOrderEntryID == null ? 0 : DetailColl2[0].HSeOrderEntryID;     //(閿�鍞鍗曞瓙鍐呯爜)
+            long HChangeTimes = DetailColl2[0].HChangeTimes == null ? 0 : DetailColl2[0].HChangeTimes;         //鍙樻洿娆℃暟
+            long HProcessID = DetailColl2[0].HProcessID == null ? 0 : DetailColl2[0].HProcessID; //浣滀笟,
+            long HICMOENTRYSEQ = DetailColl2[0].HICMOENTRYSEQ == null ? 0 : DetailColl2[0].HICMOENTRYSEQ;//鐢熶骇璁㈠崟琛屽彿,
+            long HICMOEntryID = DetailColl2[0].HICMOEntryID == null ? 0 : DetailColl2[0].HICMOEntryID;//鐢熶骇璁㈠崟瀛愬唴鐮�
+            string HPROJECTNO = DetailColl2[0].HPROJECTNO == null ? "''" : DetailColl2[0].HPROJECTNO;  //椤圭洰缂栧彿,
+            long HOPERID = DetailColl2[0].HOPERID == null ? 0 : DetailColl2[0].HOPERID;//閲戣澏宸ュ簭,
+            long HSEQ = DetailColl2[0].HSEQ == null ? 0 : DetailColl2[0].HSEQ;//琛屽彿,
+            long HSTOCKSTATUSID = DetailColl2[0].HSTOCKSTATUSID == null ? 0 : DetailColl2[0].HSTOCKSTATUSID; //搴撳瓨鐘舵��,
+            long HLOT = DetailColl2[0].HLOT == null ? 0 : DetailColl2[0].HLOT; //鎵规鍐呯爜,
+            long HOPTQUEUE = DetailColl2[0].HOPTQUEUE == null ? 0 : DetailColl2[0].HOPTQUEUE;//宸ュ簭搴忓垪,
+            long HRESERVETYPE = DetailColl2[0].HRESERVETYPE == null ? 0 : DetailColl2[0].HRESERVETYPE;//棰勭暀绫诲瀷,
+            double HSelPickedQty = DetailColl2[0].HSelPickedQty == null ? 0 : DetailColl2[0].HSelPickedQty; //棰嗘枡閫夊崟鏁伴噺,
+            double HSELPRCDRETURNQTY = DetailColl2[0].HSELPRCDRETURNQTY == null ? 0 : DetailColl2[0].HSELPRCDRETURNQTY;  //閫�鏂欓�夊崟鏁伴噺,
+            string HCloseMan = DetailColl2[0].HCloseMan == null ? "''" : DetailColl2[0].HCloseMan; //琛屽叧闂�(榛樿涓�'')
+            DateTime HEntryCloseDate = DetailColl2[0].HEntryCloseDate == null ? dt : DetailColl2[0].HEntryCloseDate;    //琛屽叧闂�(榛樿涓�'')
+            long HCloseType = DetailColl2[0].HCloseType == null ? 0 : DetailColl2[0].HCloseType; //鍏抽棴绫诲瀷(榛樿涓�0)
+            long HSourceInterID = DetailColl2[0].HSourceInterID == null ? 0 : DetailColl2[0].HSourceInterID;     //婧愬崟ID
+            long HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? 0 : DetailColl2[0].HSourceEntryID; //婧愬崟瀛怚D
+            string HSourceBillNo = DetailColl2[0].HSourceBillNo == null ? "''" : DetailColl2[0].HSourceBillNo; //婧愬崟鍗曞彿
+            string HSourceBillType = DetailColl2[0].HSourceBillType == null ? "''" : DetailColl2[0].HSourceBillType; //婧愬崟绫诲瀷
+            double HRelationQty = DetailColl2[0].HRelationQty == null ? 0 : DetailColl2[0].HRelationQty;     //鍏宠仈鏁伴噺
+            double HRelationMoney = DetailColl2[0].HRelationMoney == null ? 0 : DetailColl2[0].HRelationMoney; //鍏宠仈閲戦
+
+
+            long HCHILDSUPPLYORGID = DetailColl2[0].HCHILDSUPPLYORGID == null ? 0 : DetailColl2[0].HCHILDSUPPLYORGID;
+            long HSUPPLYORGID = DetailColl2[0].HSUPPLYORGID == null ? 0 : DetailColl2[0].HSUPPLYORGID;
+            long HENTRUSTPICKORGID = DetailColl2[0].HENTRUSTPICKORGID == null ? 0 : DetailColl2[0].HENTRUSTPICKORGID;
+            long HSRCTRANSORGID = DetailColl2[0].HSRCTRANSORGID == null ? 0 : DetailColl2[0].HSRCTRANSORGID;
+            long HGROUPBYOWNERID = DetailColl2[0].HGROUPBYOWNERID == null ? 0 : DetailColl2[0].HGROUPBYOWNERID;
+            long HOWNERID = DetailColl2[0].HOWNERID == null ? 0 : DetailColl2[0].HOWNERID;
+            long HAuxPropID = DetailColl2[0].HAuxPropID == null ? 0 : DetailColl2[0].HAuxPropID;
+            long HERPInterID = DetailColl2[0].HERPInterID == null ? 0 : DetailColl2[0].HERPInterID;
+            long HERPEntryID = DetailColl2[0].HERPEntryID == null ? 0 : DetailColl2[0].HERPEntryID;
+            double HMoveStockQty = DetailColl2[0].HMoveStockQty == null ? 0 : DetailColl2[0].HMoveStockQty;
+            double HBackRelationQty = DetailColl2[0].HBackRelationQty == null ? 0 : DetailColl2[0].HBackRelationQty;
+            string HOWNERTYPEID = DetailColl2[0].HOWNERTYPEID == null ? "''" : DetailColl2[0].HOWNERTYPEID;
+            string HBatchNO = DetailColl2[0].HBatchNO == null ? "''" : DetailColl2[0].HBatchNO;
+            string HMTONo = DetailColl2[0].HMTONo == null ? "''" : DetailColl2[0].HMTONo;
+
+            string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark;
+            string HMaterNumber = DetailColl2[0].HMaterNumber == null ? "''" : DetailColl2[0].HMaterNumber;
+            string HUnitNumber = DetailColl2[0].HUnitNumber == null ? "''" : DetailColl2[0].HUnitNumber;
+
+            int i = 0;
+            foreach (ClsSc_PPBomBillSub oSub in DetailColl)
+            {
+                i++;
+                if (oSub.HQty <= 0 || oSub.HQty == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oSub.HMaterID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝鐗╂枡涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //if (oSub.HSourceID == 0)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "绗�" + i + "琛岋紝鐢熶骇璧勬簮涓嶈兘涓虹┖";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                if (oSub.HUnitID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绗�" + i + "琛岋紝璁¢噺鍗曚綅涓嶈兘涓虹┖";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DataSet Cs;
+                Int64 NewHEntryID = 1;
+                Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Sc_PPBomBillSub", "Sc_PPBomBillSub");
+                if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+                {
+                    NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+                    NewHEntryID += 1;
+                }            
+
+
+                oCN.RunProc($@"Insert into Sc_PPBomBillSub 
+                (HInterID,HEntryID,HMaterID,HMaterNumber,HUnitID,HUnitNumber,HSPID,HQty,HQtyMust,HWHID,HRemark
+	            ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HICMOInterID,HICMOEntryID,HICMOBillNo
+	            ,HCHILDSUPPLYORGID,HSUPPLYORGID,HENTRUSTPICKORGID,HSRCTRANSORGID,HGROUPBYOWNERID,HOWNERID,HOWNERTYPEID
+	            ,HRelationQty,HMoveStockQty,HAuxPropID,HBatchNO,HMTONo,HQtyScrap,HERPInterID,HERPEntryID
+	            ,HBackRelationQty,HNumerator,HDenominator,HBASEUNITID,HProcessID,HICMOENTRYSEQ,HPROJECTNO
+                ,HOPERID,HSEQ,HSTOCKSTATUSID,HLOT,HOPTQUEUE,HRESERVETYPE,HSelPickedQty,HSELPRCDRETURNQTY) 
+                 values({HInterID},{NewHEntryID},{oSub.HMaterID},'{HMaterNumber}',{oSub.HUnitID},'{HUnitNumber}',{oSub.HSPID},{(oSub.HQty == null ? 0 : oSub.HQty)}
+                ,{HQtyMust},{oSub.HWHID},'{HRemark}',{HSourceInterID},{HSourceEntryID},{HSourceBillNo},{HSourceBillType},{HICMOInterID},{HICMOEntryID},{HICMOBillNo},{HCHILDSUPPLYORGID},{HSUPPLYORGID},{HENTRUSTPICKORGID},{HSRCTRANSORGID},{HGROUPBYOWNERID},{HOWNERID},{HOWNERTYPEID},{HRelationQty},{HMoveStockQty},{HAuxPropID},{HBatchNO},{HMTONo},{HQtyScrap},{HERPInterID},
+                  {HERPEntryID},{HBackRelationQty},{HNumerator},{HDenominator},{oSub.HBASEUNITID},{HProcessID},{HICMOENTRYSEQ},{HPROJECTNO},{HOPERID},{HSEQ},{HSTOCKSTATUSID},{HLOT},{HOPTQUEUE},{HRESERVETYPE},{HSelPickedQty},{HSELPRCDRETURNQTY})");
+            }
+
+            objJsonResult.code = "1";
+            objJsonResult.count = 1;
+            objJsonResult.Message = null;
+            objJsonResult.data = null;
+            return objJsonResult;
+        }
+
+        #endregion
+
+        /// <summary>
+        ///鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_PPBomBill/DeltetPPBomBillBill")]
+        [HttpGet]
+        public object DeltetSeOrderBill(string HInterID)
+        {
+            try
+            {
+                oCN.BeginTran();
+                oCN.RunProc("Delete From Sc_PPBomBillMain where HInterID = " + HInterID);
+                oCN.RunProc("Delete From Sc_PPBomBillSub where HInterID = " + HInterID);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index bf201ac..d5525cd 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -955,7 +955,7 @@
             //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
             if (Supplier != "")
             {
-                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) ";
+                sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
             }
             try
             {
@@ -1453,6 +1453,60 @@
         }
 
         /// <summary>
+        /// 鑾峰彇閲囪喘鏂瑰紡鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetPoStockStyleList_Json")]
+        [HttpGet]
+        public object GetPoStockStyleList_Json(string PoStockStyle)
+        {
+            if (PoStockStyle != "")
+            {
+                sWhere = sWhere + " and ( HNumber like '%" + PoStockStyle + "%' or HName like '%" + PoStockStyle + "%' ) ";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_PoStockStyle where HStopflag=0 Order by HItemID ", "Gy_PoStockStyle");
+                }
+                else
+                {
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_PoStockStyle where HStopflag=0 and HEndFlag=1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "Gy_PoStockStyle");
+                }
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛!";
+                    objjson.data = ds.Tables[0];
+                    return objjson;
+                }
+            }
+            catch (Exception ex)
+            {
+
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
+
+        /// <summary>
         /// 鑾峰彇瀹㈡埛鍒楄〃
         /// </summary>
         /// <returns></returns>
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_COMMONCONTACTBillController.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_COMMONCONTACTBillController.cs"
new file mode 100644
index 0000000..dcde980
--- /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_COMMONCONTACTBillController.cs"
@@ -0,0 +1,346 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_COMMONCONTACTBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region  鏀惰揣鏂硅仈绯讳汉 鍒楄〃
+        [Route("Gy_COMMONCONTACTBill/Gy_COMMONCONTACTList")]
+        [HttpGet]
+        public object Gy_COMMONCONTACTList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_COMMONCONTACT_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_Gy_COMMONCONTACTList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_COMMONCONTACTList");
+
+                //娣诲姞鍒楀悕
+                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_COMMONCONTACTBill/Gy_COMMONCONTACTEdit")]
+        [HttpPost]
+        public object Gy_COMMONCONTACTEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_COMMONCONTACT_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_COMMONCONTACT ", "Gy_COMMONCONTACT");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_COMMONCONTACT_Ctl oBill = new DAL.ClsGy_COMMONCONTACT_Ctl();
+                List<Model.ClsGy_COMMONCONTACT_Model> lsmain = new List<Model.ClsGy_COMMONCONTACT_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_COMMONCONTACT(msg1);
+                foreach (Model.ClsGy_COMMONCONTACT_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_COMMONCONTACT where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_COMMONCONTACT");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_COMMONCONTACTBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_COMMONCONTACT_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_COMMONCONTACT where HItemID=" + HItemID, "Gy_COMMONCONTACT");
+                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_COMMONCONTACT 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
+    }
+}
\ No newline at end of file
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_PaymentConditionListBillController.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_PaymentConditionListBillController.cs"
new file mode 100644
index 0000000..585b001
--- /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_PaymentConditionListBillController.cs"
@@ -0,0 +1,345 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_PaymentConditionListBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region  浠樻鏉′欢 鍒楄〃
+        [Route("Gy_PaymentConditionBill/Gy_PaymentConditionList")]
+        [HttpGet]
+        public object Gy_PaymentConditionList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_PaymentCondition_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_Gy_PaymentConditionList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_PaymentConditionList");
+
+                //娣诲姞鍒楀悕
+                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_PaymentConditionBill/Gy_PaymentConditionEdit")]
+        [HttpPost]
+        public object Gy_PaymentConditionEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_PaymentCondition_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_PaymentCondition ", "Gy_PaymentCondition");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_PaymentCondition_Ctl oBill = new DAL.ClsGy_PaymentCondition_Ctl();
+                List<Model.ClsGy_PaymentCondition_Model> lsmain = new List<Model.ClsGy_PaymentCondition_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_PaymentCondition(msg1);
+                foreach (Model.ClsGy_PaymentCondition_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_PaymentCondition where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PaymentCondition");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_PaymentConditionBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_PaymentCondition_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_PaymentCondition where HItemID=" + HItemID, "Gy_PaymentCondition");
+                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_PaymentCondition 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
+    }
+}
\ No newline at end of file
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_RecConditionBillController.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_RecConditionBillController.cs"
new file mode 100644
index 0000000..3b04503
--- /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_RecConditionBillController.cs"
@@ -0,0 +1,346 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_RecConditionBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region  鏀舵鏉′欢 鍒楄〃
+        [Route("Gy_RecConditionBill/Gy_RecConditionList")]
+        [HttpGet]
+        public object Gy_RecConditionList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_RecCondition_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_Gy_RecConditionList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_RecConditionList");
+
+                //娣诲姞鍒楀悕
+                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_RecConditionBill/Gy_RecConditionEdit")]
+        [HttpPost]
+        public object Gy_RecConditionEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_RecCondition_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_RecCondition ", "Gy_RecCondition");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_RecCondition_Ctl oBill = new DAL.ClsGy_RecCondition_Ctl();
+                List<Model.ClsGy_RecCondition_Model> lsmain = new List<Model.ClsGy_RecCondition_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_RecCondition(msg1);
+                foreach (Model.ClsGy_RecCondition_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_RecCondition where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_RecCondition");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_RecConditionBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_RecCondition_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_RecCondition where HItemID=" + HItemID, "Gy_RecCondition");
+                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_RecCondition 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
+    }
+}
\ No newline at end of file
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_StockStatusBillController.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_StockStatusBillController.cs"
new file mode 100644
index 0000000..186748c
--- /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_StockStatusBillController.cs"
@@ -0,0 +1,346 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_StockStatusBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 搴撳瓨鐘舵�� 鍒楄〃
+        [Route("Gy_StockStatusBill/Gy_StockStatusList")]
+        [HttpGet]
+        public object Gy_StockStatusList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_StockStatus_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_Gy_StockStatusList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_StockStatusList");
+
+                //娣诲姞鍒楀悕
+                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_StockStatusBill/Gy_StockStatusEdit")]
+        [HttpPost]
+        public object Gy_StockStatusEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_StockStatus_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_StockStatus ", "Gy_StockStatus");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_StockStatus_Ctl oBill = new DAL.ClsGy_StockStatus_Ctl();
+                List<Model.ClsGy_StockStatus_Model> lsmain = new List<Model.ClsGy_StockStatus_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_StockStatus(msg1);
+                foreach (Model.ClsGy_StockStatus_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_StockStatus where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_StockStatus");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0) {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                  
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_StockStatusBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_StockStatus_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_StockStatus where HItemID=" + HItemID, "Gy_StockStatus");
+                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_StockStatus 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
+    }
+}
\ No newline at end of file
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_SupplierContactBillController.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_SupplierContactBillController.cs"
new file mode 100644
index 0000000..49043ad
--- /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_SupplierContactBillController.cs"
@@ -0,0 +1,346 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_SupplierContactBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 渚涜揣鏂硅仈绯讳汉 鍒楄〃
+        [Route("Gy_SupplierContactBill/Gy_SupplierContactList")]
+        [HttpGet]
+        public object Gy_SupplierContactList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_SupplierContact_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_Gy_SupplierContactList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierContactList");
+
+                //娣诲姞鍒楀悕
+                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_SupplierContactBill/Gy_SupplierContactEdit")]
+        [HttpPost]
+        public object Gy_SupplierContactEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_SupplierContact_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_SupplierContact ", "Gy_SupplierContact");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_SupplierContact_Ctl oBill = new DAL.ClsGy_SupplierContact_Ctl();
+                List<Model.ClsGy_SupplierContact_Model> lsmain = new List<Model.ClsGy_SupplierContact_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_SupplierContact(msg1);
+                foreach (Model.ClsGy_SupplierContact_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_SupplierContact where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_SupplierContact");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_SupplierContactBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_SupplierContact_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_SupplierContact where HItemID=" + HItemID, "Gy_SupplierContact");
+                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_SupplierContact 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
+    }
+}
\ No newline at end of file
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_TaxRateBillController.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_TaxRateBillController.cs"
new file mode 100644
index 0000000..56dce91
--- /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_TaxRateBillController.cs"
@@ -0,0 +1,346 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_TaxRateBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region  浠樻鏉′欢 鍒楄〃
+        [Route("Gy_TaxRateBill/Gy_TaxRateList")]
+        [HttpGet]
+        public object Gy_TaxRateList(string sWhere, string user, string Organization)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_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_Gy_TaxRateList where 浣跨敤缁勭粐='" + Organization + "'");
+
+                string sql = sql1 + sWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_TaxRateList");
+
+                //娣诲姞鍒楀悕
+                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_TaxRateBill/Gy_TaxRateEdit")]
+        [HttpPost]
+        public object Gy_TaxRateEdit([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();
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_TaxRate_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            //DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_TaxRate ", "Gy_TaxRate");
+            //if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            //{
+            //    //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+            //    var maxid = Convert.ToInt32((Maxds.Tables[0].Rows[0]["HItemID"].ToString()==""?0: Maxds.Tables[0].Rows[0]["HItemID"]));
+            //    maxid += 1;
+            //    HItemID = maxid;
+            //}
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                DAL.ClsGy_TaxRate_Ctl oBill = new DAL.ClsGy_TaxRate_Ctl();
+                List<Model.ClsGy_TaxRate_Model> lsmain = new List<Model.ClsGy_TaxRate_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Gy_TaxRate(msg1);
+                foreach (Model.ClsGy_TaxRate_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;
+                    }
+
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+                    ds = oCN.RunProcReturn("select * from  Gy_TaxRate where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_TaxRate");
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            if (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString())
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+
+
+                    //鏂板鏃跺垽鏂�
+                    #region 鐖剁骇鏍¢獙鏂规硶锛坅pi璋冪敤鍏堟敞閲婃帀锛岋級
+                    /*
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    */
+                    #endregion
+                    //寰楀埌鐭唬鐮�
+                    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.HUSEORGID = Convert.ToInt32(msg_HUSEORGID); //缁勭粐id
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = 1; //绛夌骇 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 = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    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_TaxRateBill/Delete")]
+        [HttpGet]
+        public object Delete(string HItemID, string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_TaxRate_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_TaxRate where HItemID=" + HItemID, "Gy_TaxRate");
+                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_TaxRate 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
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 8cda146..8f87506 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -849,6 +849,78 @@
         }
 
         /// <summary>
+        /// 澶勭悊搴撳瓨鐘舵�佽〃鐨刯son
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_StockStatus_Model> getObjectByJson_Gy_StockStatus(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_StockStatus_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_StockStatus_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊浠樻鏉′欢琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_PaymentCondition_Model> getObjectByJson_Gy_PaymentCondition(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_PaymentCondition_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_PaymentCondition_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊绋庣巼琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_TaxRate_Model> getObjectByJson_Gy_TaxRate(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_TaxRate_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_TaxRate_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊鏀舵鏉′欢琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_RecCondition_Model> getObjectByJson_Gy_RecCondition(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_RecCondition_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_RecCondition_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊渚涜揣鏂硅仈绯讳汉琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_SupplierContact_Model> getObjectByJson_Gy_SupplierContact(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_SupplierContact_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SupplierContact_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊鏀惰揣鏂硅仈绯讳汉琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_COMMONCONTACT_Model> getObjectByJson_Gy_COMMONCONTACT(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_COMMONCONTACT_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_COMMONCONTACT_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
         /// 澶勭悊鏂板瀹℃牳椤圭洰鐨刯son
         /// </summary>
         /// <param name="jsonString"></param>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 0de35ea..6f7c654 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -443,11 +443,17 @@
     <Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\Kf_StepFoldOutBillController.cs" />
     <Compile Include="Controllers\浠撳瓨绠$悊\楠屾敹鍏ュ簱\Kf_StepFoldinBillController.cs" />
     <Compile Include="Controllers\鍗氭棩鑷姩鎵爜绾縗ScanlineAPIController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DutyBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RecConditionBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillEditController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SOPBillListController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockCheckItemBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockStatusBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SupplierContactBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TaxRateBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_WorkStationBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_CheckFlowBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_CheckItemBillController.cs" />
@@ -876,14 +882,20 @@
     <Folder Include="Views\Cj_CallGoodsBillMain\" />
     <Folder Include="Views\Cj_ComplementGoodsBill\" />
     <Folder Include="Views\Cj_SendGoodsBill\" />
+    <Folder Include="Views\Gy_COMMONCONTACTBill\" />
     <Folder Include="Views\Gy_ConkType\" />
     <Folder Include="Views\Gy_DutyBill\" />
     <Folder Include="Views\Gy_EquipType\" />
     <Folder Include="Views\Gy_ICBomBill\" />
     <Folder Include="Views\Gy_MateMould\" />
     <Folder Include="Views\Gy_PackType\" />
+    <Folder Include="Views\Gy_PaymentConditionListBill\" />
+    <Folder Include="Views\Gy_RecConditionBill\" />
     <Folder Include="Views\Gy_RoutingGroup\" />
     <Folder Include="Views\Gy_SOPBill\" />
+    <Folder Include="Views\Gy_StockStatusBill\" />
+    <Folder Include="Views\Gy_SupplierContactBill\" />
+    <Folder Include="Views\Gy_TaxRateBill\" />
     <Folder Include="Views\Gy_WorkStation\" />
     <Folder Include="Views\JIT_DayPlanPlatFormBill\" />
     <Folder Include="Views\JIT_DayPlanPlatFormImport\" />

--
Gitblit v1.9.1