From b536bc1fc0974a24531f365381ace95f0a736208 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 23 二月 2024 16:18:31 +0800
Subject: [PATCH] 项目费用基础资料

---
 WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs                     |  102 +++
 Model/Model.csproj                                       |    3 
 WebAPI/Controllers/WebAPIController.cs                   |  281 ++++++++++
 WebAPI/Service/LuBaoSevice.cs                            |   21 
 Model/项目管理/ClsPM_ProjectMoneyBillSub.cs                  |   14 
 DAL/ClsPM_ProjectMoneyBillMain.cs                        |  286 +++++++++++
 WebAPI/ListModels.cs                                     |   37 +
 WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs     |  241 +++++++++
 DAL/DAL.csproj                                           |    1 
 WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs |  529 ++++++++++++++++++++
 Model/基础资料/基础资料/ClsGy_ProjectMoney_Model.cs              |   14 
 WebAPI/WebAPI.csproj                                     |    1 
 Model/项目管理/ClsPM_ProjectMoneyBillMain.cs                 |   21 
 13 files changed, 1,547 insertions(+), 4 deletions(-)

diff --git a/DAL/ClsPM_ProjectMoneyBillMain.cs b/DAL/ClsPM_ProjectMoneyBillMain.cs
new file mode 100644
index 0000000..a91a6c8
--- /dev/null
+++ b/DAL/ClsPM_ProjectMoneyBillMain.cs
@@ -0,0 +1,286 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsPM_ProjectMoneyBillMain : DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsPM_ProjectMoneyBillMain omodel = new Model.ClsPM_ProjectMoneyBillMain();
+        public List<Model.ClsPM_ProjectMoneyBillSub> DetailColl = new List<Model.ClsPM_ProjectMoneyBillSub>();
+
+        public ClsPM_ProjectMoneyBillMain()
+        {
+            base.MvarItemKeySub = "PM_ProjectMoneyBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey= "PM_ProjectMoneyBillMain";
+            base.MvarReportTitle="椤圭洰璐圭敤鍗�";
+            base.BillType="4759";
+            base.HBillSubType = "4759";
+
+        }
+
+        #region 鍥哄畾浠g爜
+        #region 鏃犲弬鏋勯�犲嚱鏁�
+        ~ClsPM_ProjectMoneyBillMain()
+        {
+            DetailColl = null;
+        }
+        #endregion
+        #endregion
+
+        //#region 淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                string mainSql = "update PM_ProjectMoneyBillMain set " +
+                    " HBillNo = '" + omodel.HBillNo +
+                     "', HRemark  = '" + omodel.HRemark + 
+                    "', HProNumber  = '" + omodel.HProNumber +
+                     "', HProjectID  = '" + omodel.HProjectID +
+                    "', HProNumber   = " + omodel.HProNumber+
+                    ", HProName  = " + omodel.HProName +
+                    ", HCusID  = '" + omodel.HCusID +
+                     "', HPMTeamID  = '" + omodel.HPMTeamID +
+                    "', HPMEmpID = '" + omodel.HPMEmpID +
+                    "', HWorkEmpID  = '" + omodel.HWorkEmpID +
+                     "', HManagerID  = '" + omodel.HManagerID +
+                    "', HOrgID  ='" + omodel.HOrgID +
+                    "', HUpDateDate = getdate()" +
+                    //===============================================================
+
+                    " where HInterID = " + omodel.HInterID;
+                oCn.RunProc(mainSql);
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsPM_ProjectMoneyBillSub oSub in DetailColl)
+                {
+                    string subSql = "insert into PM_ProjectMoneyBillSub " +
+                        "" +
+                        "" +
+                        "" +
+                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                        ",HProMoneyID,HQty,HPrice,HMoney) " +
+                        " values(" +
+                        "" + omodel.HInterID.ToString() +
+                        "," + oSub.HEntryID.ToString() +
+                        "," + oSub.HSourceInterID +
+                        "," + oSub.HSourceEntryID +
+                        ",'" + oSub.HSourceBillNo +
+                        "','" + oSub.HSourceBillType +
+                        "','" + oSub.HProMoneyID +
+                        "'," + oSub.HQty +
+                        "," + oSub.HPrice +
+                        ",'" + oSub.HMoney +
+                        "')";
+                    oCn.RunProc(subSql);
+                }
+
+
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //#endregion
+
+        #region  鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                DataSet ds;
+
+
+                oCn.BeginTran();
+
+                //妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
+                while (true)
+                {
+                    ds = oCn.RunProcReturn("select * from PM_ProjectMoneyBillMain where HInterID = " + omodel.HInterID, "PM_ProjectMoneyBillMain");
+                    if(ds!=null && ds.Tables[0].Rows.Count > 0)
+                    {
+                        omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+
+                //鎻掑叆涓昏〃
+                string mainSql = "insert into PM_ProjectMoneyBillMain" +
+                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
+                    ",HProjectID,HProNumber,HProName,HCusID,HPMTeamID,HPMEmpID,HWorkEmpID,HManagerID,HOrgID) " +
+                    "values(" +
+                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
+                    "," + omodel.HPeriod.ToString() +
+                    ",'" + this.BillType +
+                    "','" + this.HBillSubType +
+                    "'," + omodel.HInterID +
+                    ",'" + omodel.HDate +
+                    "','" + omodel.HBillNo +
+                    "','" + omodel.HRemark +
+                    "','" + omodel.HMaker +
+                    "','" + omodel.HMakeDate +
+                    "','" + omodel.HProjectID +
+                    "','" + omodel.HProNumber +
+                    "'," + omodel.HProName+
+                    ",'" + omodel.HCusID+
+                    "','" + omodel.HPMTeamID+
+                    "','" + omodel.HPMEmpID+
+                    "','" + omodel.HWorkEmpID+
+                    "','" + omodel.HManagerID+
+                    "','" + omodel.HOrgID+
+                    "')";
+
+                oCn.RunProc(mainSql);
+
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsPM_ProjectMoneyBillSub oSub in DetailColl)
+                {
+                    string subSql = "insert into PM_ProjectMoneyBillSub " +
+                        "" +
+                        "" +
+                        "" +
+                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                        ",HProMoneyID,HQty,HPrice,HMoney) " +
+                        " values(" +
+                        "" + omodel.HInterID.ToString() +
+                        "," + oSub.HEntryID.ToString() +
+                        "," + oSub.HSourceInterID +
+                        "," + oSub.HSourceEntryID +
+                        ",'" + oSub.HSourceBillNo +
+                        "','" + oSub.HSourceBillType +
+                        "','" + oSub.HProMoneyID +
+                        "'," + oSub.HQty +
+                        "," + oSub.HPrice +
+                        ",'" + oSub.HMoney +
+                        "')";
+                    oCn.RunProc(subSql);
+                }
+
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        #endregion
+
+        #region 鏄剧ず鍗曟嵁
+        //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        //{
+        //    try
+        //    {
+        //        //鏌ヨ涓昏〃
+        //        DataSet Ds ;
+        //        Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
+        //        if(Ds.Tables[0].Rows.Count==0)
+        //        {
+        //            sReturn = "鍗曟嵁鏈壘鍒帮紒";
+        //            return false;
+        //        }
+
+        //        //鍥哄畾璧嬪��===========================================
+        //        omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+        //        omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+        //        omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+        //        omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+        //        omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+        //        omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+        //        omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+        //        omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+        //        omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+        //        omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+        //        omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+        //        omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+        //        omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+        //        omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+        //        omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+        //        omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+        //        omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+        //        omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+        //        omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+        //        omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+        //        omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+        //        omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+        //        omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+        //        omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+        //        omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+        //        //========================================================
+
+        //        omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+        //        omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
+        //        omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
+        //        omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
+        //        omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+
+        //        //
+                
+        //        //寰幆
+        //        DataSet DsSub ;
+        //        DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
+        //        DetailColl.Clear();//娓呯┖
+        //        for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+        //        {
+        //            Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
+        //            // 鍥哄畾璧嬪��===============================================
+        //            oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+        //            oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+        //            oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+        //            oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+        //            oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+        //            oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+        //            oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+        //            oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); 
+        //            oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+        //            oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+        //            oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+        //            oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+        //            //===================================================
+        //            oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
+        //            oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
+        //            oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
+        //            oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
+        //            oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
+        //            oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+
+        //            DetailColl.Add(oSub);
+        //        }
+        //        sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+        //        return true;
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        sReturn = e.Message;
+        //        throw (e);
+        //    }
+        //}
+        #endregion
+
+    }
+
+}
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index a3d128d..63365c6 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -80,6 +80,7 @@
     <Compile Include="ClsPay_EarlyLateErrBill.cs" />
     <Compile Include="ClsPay_RewardPunishBill.cs" />
     <Compile Include="ClsPay_WorkErrTimesBill.cs" />
+    <Compile Include="ClsPM_ProjectMoneyBillMain.cs" />
     <Compile Include="ClsPM_CustomerTaskBillMain.cs" />
     <Compile Include="ClsPM_WorkPlanMonthBillMain.cs" />
     <Compile Include="MES\ClsSc_SourceLineRepairBill.cs" />
diff --git a/Model/Model.csproj b/Model/Model.csproj
index c013508..e7160a2 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -351,6 +351,7 @@
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Operator_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RateType_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Staff_Model.cs" />
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_ProjectMoney_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxMIXMain_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxMIXSub_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TaxRate_Model.cs" />
@@ -975,6 +976,8 @@
     <Compile Include="閿�鍞鐞哱鍗曡瘉绠$悊\ClsXs_LadingBillSub.cs" />
     <Compile Include="閿�鍞鐞哱鍗曡瘉绠$悊\ClsXs_ShippingAdviceBillMain.cs" />
     <Compile Include="閿�鍞鐞哱鍗曡瘉绠$悊\ClsXs_ShippingAdviceBillSub.cs" />
+    <Compile Include="椤圭洰绠$悊\ClsPM_ProjectMoneyBillSub.cs" />
+    <Compile Include="椤圭洰绠$悊\ClsPM_ProjectMoneyBillMain.cs" />
     <Compile Include="椤圭洰绠$悊\ClsPM_CustomerTaskBillMain.cs" />
     <Compile Include="椤圭洰绠$悊\ClsPM_WorkPlanMonthBillMain.cs" />
     <Compile Include="椤圭洰绠$悊\ClsPM_CustomerTaskBillSub.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_ProjectMoney_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_ProjectMoney_Model.cs"
new file mode 100644
index 0000000..8a3bcde
--- /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_ProjectMoney_Model.cs"
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_ProjectMoney_Model : DBUtility.ClsGy_Base_Model
+    {
+        public DateTime HMakeTime;
+        public int HUSEORGID;
+        public string HMakeEmp;
+        public DateTime HModifyTime;
+    }
+}
diff --git "a/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillMain.cs" "b/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillMain.cs"
new file mode 100644
index 0000000..0d7d766
--- /dev/null
+++ "b/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillMain.cs"
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsPM_ProjectMoneyBillMain : DBUtility.ClsXt_BaseBillMain
+    {   
+
+        public Int64 HProjectID;    //int       项目内码
+        public string HProNumber;//	varchar(50)	//项目代码
+        public string HProName;//	varchar(50)	项目阶段
+        public Int64 HCusID;//		int		//客户
+        public Int64 HPMTeamID;// 	int  交付方
+        public Int64 HPMEmpID;//	int 	项目经理
+        public Int64 HWorkEmpID;//	int 	实施担当
+        public Int64 HManagerID;//	int 	管理员
+        public Int64 HOrgID;//		int    //组织
+
+    }
+}
diff --git "a/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillSub.cs" "b/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillSub.cs"
new file mode 100644
index 0000000..e95e5d0
--- /dev/null
+++ "b/Model/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_ProjectMoneyBillSub.cs"
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsPM_ProjectMoneyBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+        public Int64 HProMoneyID;    //int --项目费用
+        public decimal HQty;        //money --数量
+        public decimal HPrice;        //money --单价
+        public decimal HMoney;        //money --金额
+    }
+}
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index 703a89a..dee798f 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -4634,6 +4634,247 @@
         }
         #endregion
 
+        #region  椤圭洰璐圭敤  鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢�
+        /// <summary> 
+        /// 渚涘簲鍟嗗垎绫�  鏌ヨ
+        /// </summary>
+        /// <param name="sWhere"></param>
+        /// <param name="user"></param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/Gy_ProjectMoneyList")]
+        [HttpGet]
+        public object Gy_ProjectMoneyList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sql1 = "select * from  h_v_Gy_ProjectMoney where 1 = 1";
+                string sql = sql1 + sWhere + " order by 椤圭洰璐圭敤浠g爜 ";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_ProjectMoney");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 椤圭洰璐圭敤 瀹℃牳銆佸弽瀹℃牳
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/AuditGy_ProjectMoney")]
+        [HttpGet]
+        public object AuditGy_ProjectMoney(int HInterID, int IsAudit, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectMoney_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HInterID, "Gy_ProjectMoney");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                {
+                    oCN.RunProc("update Gy_ProjectMoney set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "瀹℃牳鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                {
+                    oCN.RunProc("update Gy_ProjectMoney set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+
+
+        /// <summary>
+        /// 椤圭洰璐圭敤 绂佺敤銆佸弽绂佺敤
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/StopGy_ProjectMoney")]
+        [HttpGet]
+        public object StopGy_ProjectMoney(int HInterID, int IsStop, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectMoney_Close", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HInterID, "Gy_SupType");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsStop == 0)  //绂佺敤鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘鍐嶆绂佺敤锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鐢�!涓嶉渶瑕佸弽绂佺敤!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsStop == 0)  //绂佺敤鍒ゆ柇
+                {
+                    oCN.RunProc("update Gy_ProjectMoney set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "绂佺敤鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+                {
+                    oCN.RunProc("update Gy_ProjectMoney set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "绂佺敤澶辫触鎴栬�呭弽绂佺敤澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
 
 
         #region 寮傚父绫诲瀷  鏌ヨ
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index f50621d..0acb9b9 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -7859,6 +7859,287 @@
         }
         #endregion
 
+        #region  椤圭洰璐圭敤  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+        /// <summary>
+        ///  椤圭洰璐圭敤 淇濆瓨
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("SaveGy_ProjectMoneyList")]
+        [HttpPost]
+        public object SaveGy_ProjectMoneyList([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();
+
+            //鏌ョ湅鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_ProjectMoney ", "Gy_ProjectMoney");
+            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"]);
+                maxid += 1;
+                HItemID = maxid;
+            }
+            ListModels oListModels = new ListModels();
+            try
+            {
+                
+                WebAPI.DLL.ClsGy_ProjectMoney_Ctl oBill = new WebAPI.DLL.ClsGy_ProjectMoney_Ctl();
+                List<Model.ClsGy_ProjectMoney_Model> lsmain = new List<Model.ClsGy_ProjectMoney_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");
+                lsmain = oListModels.getObjectByJson_Gy_ProjectMoney(msg1);
+                foreach (Model.ClsGy_ProjectMoney_Model oItem in lsmain)
+                {
+                    if (oItem.HNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (oItem.HName.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+
+                    ds = oCN.RunProcReturn("select * from  Gy_ProjectMoney where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProjectMoney");
+                    if (oItem.HNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    //鏂板鏃跺垽鏂�
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count == 0)
+                        {
+
+                        }
+                        else
+                        {
+                            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;
+                            }
+                        }
+                    }
+                    //寰楀埌鐭唬鐮�
+                    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.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+                    oItem.HMakeEmp = msg2; //鍒涘缓浜�
+
+                    oBill.oModel = oItem;
+                }
+
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (oBill.oModel.HItemID == 0)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = oBill.AddNew();
+                }
+                else
+                {
+                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    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;
+            }
+        }
+
+        /// <summary>
+        /// 椤圭洰璐圭敤 鑾峰彇淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("GetGy_ProjectMoneyDetail")]
+        [HttpGet]
+        public ApiResult<DataSet> GetGy_ProjectMoneyDetail(string HID)
+        {
+            var model = LuBaoSevice.GetGy_ProjectMoneyDetail(HID);
+            return model;
+        }
+
+        /// <summary>
+        /// 椤圭洰璐圭敤 鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("DeltetGy_ProjectMoney")]
+        [HttpGet]
+        public object DeltetGy_ProjectMoney(string HItemID, string user)
+        {
+            DataSet ds;
+            //string ModRightNameCheck = "Sc_ProcessReport_check";
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                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_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+
+
+                oCN.RunProc("delete Gy_ProjectMoney 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
+
 
         /// <summary>
         /// 鐢ㄥ叧鑱斿伐搴忚幏鍙栦俊鎭�
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
index a626d3e..87a3d34 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
@@ -2337,5 +2337,534 @@
             }
         }
         #endregion
+
+        #region 椤圭洰璐圭敤 淇濆瓨/缂栬緫
+        /// <summary>
+        /// 椤圭洰璐圭敤
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("PM_ProjectBill/SavePM_ProjectMoneyBillMain")]
+        [HttpPost]
+        public object SavePM_ProjectMoneyBillMain([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string msg3 = sArray[1].ToString(); //瀛愯〃
+            string refSav = sArray[2].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+            string user = sArray[3].ToString();//鐢ㄦ埛鍚�
+
+            string UserName = "";
+            string s = "";
+            ListModels oListModels = new ListModels();
+            try
+            {
+                //淇濆瓨鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Edit", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                
+                DAL.ClsPM_ProjectMoneyBillMain oBill = new DAL.ClsPM_ProjectMoneyBillMain();
+                List<Model.ClsPM_ProjectMoneyBillMain> lsmain = new List<Model.ClsPM_ProjectMoneyBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_PM_ProjectMoneyBillMain(msg2);
+                foreach (Model.ClsPM_ProjectMoneyBillMain oItem in lsmain)
+                {
+                    if (refSav == "Add")
+                    {
+                        //鍗曟嵁鍙锋槸鍚﹂噸澶�
+                        if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    if (refSav == "Update")
+                    {
+                        if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //鍒ゆ柇鏄惁鍙紪杈�
+                        if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (BillOld1.omodel.HBillStatus > 1)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    oItem.HBillType = "4762";
+                    oItem.HBillSubType = "4762";
+
+
+
+                    //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
+                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oBill.omodel = oItem;
+                }
+                // 琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                msg3 = msg3.Substring(1, msg3.Length - 2);
+                msg3 = msg3.Replace("\\", "");
+                msg3 = msg3.Replace("\n", "");  //\n
+                List<Model.ClsPM_ProjectMoneyBillSub> ls = new List<Model.ClsPM_ProjectMoneyBillSub>();
+                ls = oListModels.getObjectByJson_PM_ProjectMoneyBillSub(msg3);
+                int i = 0;
+                foreach (Model.ClsPM_ProjectMoneyBillSub oItemSub in ls)
+                {
+                    i++;
+                    oItemSub.HEntryID = i;
+
+                   
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
+                   
+                    oBill.DetailColl.Add(oItemSub);
+
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (refSav == "Add")
+                {
+
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else if (refSav == "Update")
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = false;
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    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 椤圭洰璐圭敤鍒楄〃 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰璐圭敤鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("PM_ProjectBill/getPM_ProjectMoneyBillMainList")]
+        [HttpGet]
+        public object getPM_ProjectMoneyBillMainList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_PM_ProjectMoneyBillMainList order by 鍗曟嵁鍙� desc", "h_v_PM_ProjectMoneyBillMainList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_PM_ProjectMoneyBillMainList where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_PM_ProjectMoneyBillMainList");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 椤圭洰璐圭敤鍒楄〃 鑾峰彇缂栬緫鍒楄〃鏁版嵁
+        [Route("PM_ProjectBill/PM_ProjectMoneyBillMainEditList")]
+        [HttpGet]
+        public object PM_ProjectMoneyBillMainEditList(string HInterID, string User)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Edit", 1, false, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (HInterID == null || HInterID.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn("select * from  h_v_PM_ProjectMoneyBillMainList where HInterID =" + HInterID, "h_v_PM_ProjectMoneyBillMainList");
+                //娣诲姞鍒楀悕
+                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 = "鏌ヨ鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 椤圭洰璐圭敤鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
+        [Route("PM_ProjectBill/CheckPM_ProjectMoneyBillMain")]
+        [HttpGet]
+        public object CheckPM_ProjectMoneyBillMain(string HInterID, int IsAudit, string user)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Check", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from PM_ProjectMoneyBillMain  where HInterID=" + HInterID, "PM_ProjectMoneyBillMain ");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                {
+                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "瀹℃牳鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                {
+                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HChecker='',HCheckDate=null where HInterID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+        }
+        #endregion
+
+        #region 椤圭洰璐圭敤鍒楄〃 鍏抽棴/鍙嶅叧闂姛鑳�
+        [Route("PM_ProjectBill/ClosePM_ProjectMoneyBillMain")]
+        [HttpGet]
+        public object ClosePM_ProjectMoneyBillMain(string HInterID, int IsAudit, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊叧闂潈闄�
+                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Close", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                var ds = oCN.RunProcReturn("select * from PM_ProjectMoneyBillMain  where HInterID=" + HInterID, "PM_ProjectMoneyBillMain");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsAudit == 0)  //鍏抽棴鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅叧闂垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸弽鍏抽棴!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsAudit == 0)  //鍏抽棴鍒ゆ柇
+                {
+                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HCloseMan='" + user + "',HCloseDate=getdate() where HInterID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍏抽棴鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                {
+                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HCloseMan='',HCloseDate=null where HInterID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶅叧闂垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 椤圭洰璐圭敤鍒楄〃 鍒犻櫎
+        /// <summary>
+        ///鍙傛暟锛歴tring HInterID銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("PM_ProjectBill/PM_ProjectMoneyBillMainDelete")]
+        [HttpGet]
+        public object PM_ProjectMoneyBillMainDelete(string HInterID, string user)
+        {
+            try
+            {
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (HInterID == null || HInterID.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                oCN.RunProc("delete from PM_ProjectMoneyBillMain   where HInterID = " + HInterID);
+                oCN.RunProc("delete from PM_ProjectMoneyBillMain  where HInterID='" + HInterID + "'");
+
+                oCN.Commit();
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs b/WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs
new file mode 100644
index 0000000..5783fe6
--- /dev/null
+++ b/WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+    public class ClsGy_ProjectMoney_Ctl : DBUtility.ClsGy_Base_Ctl   
+    {
+        
+           SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_ProjectMoney_Model oModel = new Model.ClsGy_ProjectMoney_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            //
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Insert into " + MvarItemKey + " " +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
+                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','" +DateTime.Now+ "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID + "')", 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 + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                    ",HModifyTime='" + DateTime.Now + "'" +   
+                    ",HUSEORGID='" + oModel.HUSEORGID + "'" +
+                    ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                    ",HUseFlag='" + oModel.HUseFlag + "'" +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "' 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_ProjectMoney_Ctl()
+        {
+            MvarItemKey = "Gy_ProjectMoney";
+            MvarReportTitle = "椤圭洰璐圭敤璁剧疆";
+            oModel = new Model.ClsGy_ProjectMoney_Model();
+        }
+
+    
+
+    }
+}
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 03ef777..c3cb37c 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -951,7 +951,7 @@
             List<Model.ClsGy_CusType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CusType_Model>>(jsonString);
             return list;
         }
-
+        
         /// <summary>  
         /// 澶勭悊鏂板渚涘簲鍟嗗垎绫昏〃鐨刯son
         /// </summary>
@@ -963,7 +963,17 @@
             List<Model.ClsGy_SupType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SupType_Model>>(jsonString);
             return list;
         }
-
+        /// <summary>  
+        /// 澶勭悊鏂板椤圭洰璐圭敤琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_ProjectMoney_Model> getObjectByJson_Gy_ProjectMoney(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_ProjectMoney_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoney_Model>>(jsonString);
+            return list;
+        }
         /// <summary>
         /// 澶勭悊鏂板寮傚父绫诲瀷琛ㄧ殑json
         /// </summary>
@@ -1044,7 +1054,28 @@
             List<Model.ClsPM_CustomerTaskBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_CustomerTaskBillMain>>(jsonString);
             return list;
         }
-
+        /// <summary>
+        /// 澶勭悊鏂板椤圭洰璐圭敤琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsPM_ProjectMoneyBillMain> getObjectByJson_PM_ProjectMoneyBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsPM_ProjectMoneyBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_ProjectMoneyBillMain>>(jsonString);
+            return list;
+        }
+        /// <summary>
+        /// 澶勭悊鏂板椤圭洰璐圭敤瀛愯〃鐨刯son
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsPM_ProjectMoneyBillSub> getObjectByJson_PM_ProjectMoneyBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsPM_ProjectMoneyBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_ProjectMoneyBillSub>>(jsonString);
+            return list;
+        }
         /// <summary>
         /// 澶勭悊鏂板妯″叿淇濆吇璁板綍琛ㄤ富琛ㄧ殑json
         /// </summary>
diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs
index 953b68a..a46463f 100644
--- a/WebAPI/Service/LuBaoSevice.cs
+++ b/WebAPI/Service/LuBaoSevice.cs
@@ -584,7 +584,7 @@
             var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_PoStockStyle  where HItemID= " + HID + " ", "h_v_Gy_PoStockStyle");
             return dataSet;
         }
-
+        
         /// <summary>
         /// 渚涘簲鍟嗗垎绫绘牴鎹甶d鑾峰彇淇℃伅
         /// </summary>
@@ -605,6 +605,25 @@
         }
 
         /// <summary>
+        /// 椤圭洰璐圭敤鏍规嵁id鑾峰彇淇℃伅
+        /// </summary>
+        public static ApiResult<DataSet> GetGy_ProjectMoneyDetail(string HID)
+        {
+            if (string.IsNullOrEmpty(HID))
+                return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+            var dataSet = GetGy_ProjectMoneyDb(HID);
+            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+                return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄩ」鐩垂鐢ㄦ暟鎹�" };
+            return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+        }
+        public static DataSet GetGy_ProjectMoneyDb(string HID)
+        {
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); 
+             var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_ProjectMoney  where HItemID= " + HID + " ", "h_v_Gy_ProjectMoney");
+            return dataSet;
+        }
+
+        /// <summary>
         ///瀹㈡埛鍒嗙被鏍规嵁id鑾峰彇淇℃伅
         /// </summary>
         public static ApiResult<DataSet> GetGy_CusTypeDetail(string HID)
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 2915276..aa05fca 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -631,6 +631,7 @@
     <Compile Include="DLL\ClsGy_AreaSet_Ctl.cs" />
     <Compile Include="DLL\ClsGy_CusType_Ctl.cs" />
     <Compile Include="DLL\ClsGy_StockCheckItem_Ctl.cs" />
+    <Compile Include="DLL\ClsGy_ProjectMoney_Ctl.cs" />
     <Compile Include="DLL\ClsGy_SupType_Ctl.cs" />
     <Compile Include="DLL\ClsGy_SellStyle_Ctl.cs" />
     <Compile Include="DLL\ClsGy_PostSkill_Ctl.cs" />

--
Gitblit v1.9.1