guoshuang hace 2 años
padre
commit
642775ea53

+ 2 - 2
HH.YiDaSyncNC/App.config

@@ -14,8 +14,8 @@
     <!--<add key="NCApiUrl" value="http://60.204.136.100:9099/service/XChangeServlet"/>-->
 
     <!--NC 审核 接口地址-->
-    <add key="NCApporeApiUrl" value="http://60.204.136.100:9099/"/>
-    <!--<add key="NCApporeApiUrl" value="http://58.246.128.122:9090/"/>-->
+    <!--<add key="NCApporeApiUrl" value="http://60.204.136.100:9099/"/>-->
+    <add key="NCApporeApiUrl" value="http://58.246.128.122:9090/"/>
 
     <!--宜搭配置-->
     <add key="AppType" value="APP_ERBDTFS82HOVBPL3NFH0" />

+ 1 - 1
HH.YiDaSyncNC/DataSync/CGDD_SyncService.cs

@@ -52,7 +52,7 @@ namespace HH.YiDaSyncNC.DataSync
 
             //var idList = _dingTalkService.GetFormIdList();
 
-            // var idList = _dingTalkService.GetFormIdList("{\"radioField_lycrvvtk\":\"Y\",\"textField_lr26y1io\":\"DD202407170157\"}");
+            // var idList = _dingTalkService.GetFormIdList("{\"radioField_lycrvvtk\":\"Y\",\"textField_lr26y1io\":\"DD202407190170\"}");
 
             LogHelper.WriteLog(JsonConvert.SerializeObject(idList.Count), "idList");
 

+ 1 - 1
HH.YiDaSyncNC/DataSync/FK_FYBX_SyncService.cs

@@ -156,7 +156,7 @@ namespace HH.YiDaSyncNC.DataSync
 
                             decimal se = 0;
 
-                            if (((Dictionary<string, object>)objItem).FirstOrDefault(f => f.Key == "dateField_lsx0pirp").Value != null)
+                            if (((Dictionary<string, object>)objItem).FirstOrDefault(f => f.Key == "numberField_lrnh633p").Value != null)
                             {
                                 se = Convert.ToDecimal(((Dictionary<string, object>)objItem)["numberField_lrnh633p"].ToString());
                             }

+ 259 - 0
HH.YiDaSyncNC/DataSync/FK_YF_SyncService.cs

@@ -0,0 +1,259 @@
+using HH.YiDaSyncNC.Dtos;
+using HH.YiDaSyncNC.Dtos.NC;
+using HH.YiDaSyncNC.Helper;
+using HH.YiDaSyncNC.Models;
+using Newtonsoft.Json;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace HH.YiDaSyncNC.DataSync
+{
+    class FK_YF_SyncService
+    {
+        public string _AppType;
+        public string _SystemToken;
+        public string _UserId;
+        public string _FormId;
+        public SqlSugarClient _db;
+        public SqlSugarClient _db_nc;
+        public string _NCApiUrl;
+
+        public static string _Static_PK_bd_project = ConfigurationManager.AppSettings["bd_project"];
+        public static string _Static_pk_org_jt = ConfigurationManager.AppSettings["pk_org_jt"];
+
+        public FK_YF_SyncService(string AppType, string SystemToken, string UserId, string FormId, SqlSugarClient db, SqlSugarClient db_nc, string NCApiUrl)
+        {
+            _AppType = AppType;
+            _SystemToken = SystemToken;
+            _UserId = UserId;
+            _FormId = FormId;
+            _db = db;
+            _db_nc = db_nc;
+            _NCApiUrl = NCApiUrl;
+        }
+
+        public class IdCodeModel
+        {
+            public int sourceId { get; set; }
+            public string Id { get; set; }
+        }
+
+        public void DataSync()
+        {
+            DingTalkService _dingTalkService = new DingTalkService(_AppType, _SystemToken, _UserId, _FormId);
+
+            // 宜搭全量数据Id
+            // var idList = _dingTalkService.GetFormIdList("{\"radioField_lycrvvtk\":\"Y\",\"selectField_lrnh633d\":\"预付\",\"selectField_lwiuvaws\":\"日常费用付款\"}");
+
+            //var idList = _dingTalkService.GetFormIdList("{\"selectField_lwiuvaws\":\"日常费用付款\",\"selectField_lrnh633d\":\"结付\"}");
+
+            var idList = _dingTalkService.GetFormIdList("{\"textField_lvj2jklf\":\"FK2024072400058\"}");
+
+            LogHelper.WriteLog(JsonConvert.SerializeObject(idList.Count), "idList");
+
+            #region 获取NC中选项数据的Id
+            var bd_custclassDic = _db_nc.Queryable<bd_custclass>().ToList();
+            var org_orgsDic = _db_nc.Queryable<org_orgs>().ToList();
+            #endregion
+
+            #region 插入数据
+            // 向NC插入数据
+            foreach (var item in idList)
+            {
+                string createTime = "";
+                string modifyTime = "";
+
+                var ydDataSource = _dingTalkService.GetFormDataById(item, out createTime, out modifyTime);
+
+                var ncResData = new List<YiDaResDto>();
+
+                #region 表头
+                // 表头
+                var dataSource = new FK_YF_SyncServiceModel.DataModel();
+                if (ydDataSource.FirstOrDefault(f => f.Key == "selectField_lvywoqmb").Value != null)
+                {
+                    if (!string.IsNullOrWhiteSpace(ydDataSource["selectField_lvywoqmb"].ToString()))
+                    {
+                        var tempData = org_orgsDic.FirstOrDefault(f => f.name == ydDataSource["selectField_lvywoqmb"].ToString());
+                        if (tempData != null)
+                        {
+                            dataSource.组织 = tempData.code; // 组织
+                        }
+                    }
+                }
+
+                dataSource.支付人 = "OA-NC";
+
+                if (!string.IsNullOrWhiteSpace(ydDataSource["dateField_lwitiobz"].ToString()))
+                {
+                    dataSource.支付日期 = UnixTimeHelper.ConvertMillisecondsToDateTime(Convert.ToInt64(ydDataSource["dateField_lwitiobz"].ToString())).ToString("yyyy-MM-dd HH:mm:ss");
+                }
+
+                dataSource.创建人 = "OA-NC";
+                dataSource.制单人 = "OA-NC";
+                dataSource.单据日期 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+                dataSource.生效人 = "OA-NC";
+                dataSource.生效日期 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+                dataSource.发票号 = ydDataSource["textField_lw7erc7d"].ToString();
+                dataSource.供应商 = ydDataSource["textField_lwitiobt"].ToString();
+                dataSource.付款银行账户 = ydDataSource["textField_lrngrtgj"].ToString().Trim().Replace(" ", "");
+
+                dataSource.年份 = DateTime.Now.ToString("yyyy");
+                dataSource.月份 = DateTime.Now.ToString("MM");
+
+                dataSource.起算日期 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+                // 价税合计
+
+                #endregion
+
+                var detailList = new List<FK_YF_SyncServiceModel.DataModel.Item>();
+
+                #region 明细
+                if (ydDataSource.FirstOrDefault(f => f.Key == "tableField_lrngrtgu").Value != null)
+                {
+                    var detailObjList1 = (List<object>)ydDataSource["tableField_lrngrtgu"]; // 付款明细
+
+                    if (detailObjList1.Count() > 0 && !string.IsNullOrWhiteSpace(((Dictionary<string, object>)detailObjList1.FirstOrDefault())["numberField_lvua3j17"].ToString()))
+                    {
+                        foreach (var objItem in detailObjList1)
+                        {
+                            var detailItem = new FK_YF_SyncServiceModel.DataModel.Item();
+
+                            var hsje = Convert.ToDecimal(((Dictionary<string, object>)objItem)["numberField_lvua3j17"].ToString());
+                            var se = Convert.ToDecimal(((Dictionary<string, object>)objItem)["numberField_lvxa4v08"].ToString());
+                            var wsje = Convert.ToDecimal(((Dictionary<string, object>)objItem)["numberField_lvxa4v09"].ToString());
+
+                            // 含税金额
+                            detailItem.价税合计 = hsje.ToString();
+
+                            // 无税金额
+                            detailItem.无税金额 = wsje.ToString();
+
+                            // 税额
+                            detailItem.税额 = se.ToString();
+
+                            detailItem.摘要 = ((Dictionary<string, object>)objItem)["textField_lvxa4v05"].ToString();
+
+                            detailItem.科目 = ((Dictionary<string, object>)objItem)["textField_lwitioce"].ToString();
+
+                            var a = ((Dictionary<string, object>)objItem)["textField_lypfw8rw"].ToString();
+                            if (a.Contains("PM"))
+                                detailItem.项目 = a;
+                            else
+                                detailItem.部门 = a;
+
+                            detailList.Add(detailItem);
+                        }
+                    }
+                }
+                #endregion
+
+                dataSource.明细 = detailList;
+                dataSource.价税合计 = dataSource.明细.Sum(s => Convert.ToDecimal(s.价税合计)).ToString();
+
+                if (string.IsNullOrWhiteSpace(dataSource.付款银行账户))
+                {
+                    var resData = new YiDaResDto();
+                    resData.bSuccess = false;
+                    resData.syncTime = DateTime.Now;
+                    resData.ncNo = "";
+                    resData.log = "付款银行账户为空,NC无法执行审批操作";
+
+                    _dingTalkService.UpdateFormDataSyncDataById(resData, item);
+
+                    continue;
+                }
+
+                var results = NCImportFunc.NCImport(FK_YF_SyncServiceModel.ImportXml.TemplateHeade(), FK_YF_SyncServiceModel.ImportXml.Header(dataSource, item+"2"), _NCApiUrl + "?account=01&groupcode=0");
+
+                LogHelper.WriteLog(JsonConvert.SerializeObject(results), "results");
+
+                XElement xE = XElement.Parse(results);
+                string resultcode = xE.Element("sendresult").Element("resultcode").Value;
+                string resultdescription = xE.Element("sendresult").Element("resultdescription")?.Value;
+
+                if (resultcode == "1")
+                {
+                    ncResData.Add(new YiDaResDto()
+                    {
+                        bSuccess = true,
+                        ncNo = xE.Element("sendresult").Element("content").Value,
+                        log = "同步成功!"
+                    });
+
+                    var recitemData = _db_nc.Queryable<ap_payitem>().Where(w => w.pk_paybill == xE.Element("sendresult").Element("content").Value).ToList();
+
+                    foreach (var recitem in recitemData)
+                    {
+                        var a = dataSource.明细.FirstOrDefault(f => f.无税金额 == recitem.def11);
+
+                        recitem.scomment = a.摘要;
+
+                        _db_nc.Updateable(recitem).ExecuteCommand();
+                    }
+                }
+                else
+                {
+                    ncResData.Add(new YiDaResDto()
+                    {
+                        bSuccess = false,
+                        ncNo = "",
+                        log = "同步失败!原因为【" + resultdescription + "】!"
+                    });
+                }
+
+                var results_付款单审核 = HttpRequestHelper.ApproveNCFKBill(xE.Element("sendresult").Element("content").Value);
+
+                LogHelper.WriteLog(JsonConvert.SerializeObject(results_付款单审核), "results_付款单审核");
+
+                if (results_付款单审核.state == 0)
+                {
+                    ncResData.Add(new YiDaResDto()
+                    {
+                        bSuccess = true,
+                        ncNo = "",
+                        log = "同步成功!"
+                    });
+                }
+                else
+                {
+                    ncResData.Add(new YiDaResDto()
+                    {
+                        bSuccess = false,
+                        ncNo = "",
+                        log = "同步失败!原因为【" + results_付款单审核.msg + "】!"
+                    });
+                }
+
+                var finalResData = new YiDaResDto();
+
+                if (ncResData.FirstOrDefault(f => !f.bSuccess) != null)
+                {
+                    finalResData.bSuccess = false;
+                    finalResData.syncTime = DateTime.Now;
+                    finalResData.ncNo = xE.Element("sendresult").Element("content").Value;
+                    finalResData.log = string.Join(" || ", ncResData.Select(s => s.log));
+                }
+                else
+                {
+                    finalResData.bSuccess = true;
+                    finalResData.syncTime = DateTime.Now;
+                    finalResData.ncNo = xE.Element("sendresult").Element("content").Value;
+                    finalResData.log = string.Join(" || ", ncResData.Select(s => s.log));
+                }
+
+                var ydRes = _dingTalkService.UpdateFormDataSyncDataById(finalResData, item);
+            }
+            #endregion
+        }
+    }
+}

+ 1 - 0
HH.YiDaSyncNC/DataSync/YF_FPRZ_SyncService.cs

@@ -50,6 +50,7 @@ namespace HH.YiDaSyncNC.DataSync
                 {
                     radioField_lycrvvtk = "Y",
                     selectField_lrnh633d = "预付",
+                    textField_lvj2jklf= "FK2024072400058"
 
                 };
                 var idList = _dingTalkService.GetFormIdList(JsonConvert.SerializeObject(serchKeyListJson));

+ 2 - 0
HH.YiDaSyncNC/HH.YiDaSyncNC.csproj

@@ -131,6 +131,7 @@
     <Compile Include="DataSync\FK_CLBX_SyncService.cs" />
     <Compile Include="DataSync\FK_FYBX_SyncService.cs" />
     <Compile Include="DataSync\FK_FKD_SyncService.cs" />
+    <Compile Include="DataSync\FK_YF_SyncService.cs" />
     <Compile Include="DataSync\FK_XZ_SyncService.cs" />
     <Compile Include="DataSync\FK_SyncService.cs" />
     <Compile Include="DataSync\HKD_GL_SyncService.cs" />
@@ -203,6 +204,7 @@
     <Compile Include="Models\FK_CLBX_SyncServiceModel.cs" />
     <Compile Include="Models\FK_FYBX_SyncServiceModel.cs" />
     <Compile Include="Models\FK_FKD_SyncServiceModel.cs" />
+    <Compile Include="Models\FK_YF_SyncServiceModel.cs" />
     <Compile Include="Models\FK_XZ_SyncServiceModel.cs" />
     <Compile Include="Models\FK_SyncServiceModel.cs" />
     <Compile Include="Models\HKD_GL_SyncServiceModel.cs" />

+ 233 - 0
HH.YiDaSyncNC/Models/FK_YF_SyncServiceModel.cs

@@ -0,0 +1,233 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace HH.YiDaSyncNC.Models
+{
+    class FK_YF_SyncServiceModel
+    {
+        public class DataModel
+        {
+            public string 集团 { get; set; } = "0";
+            public string 组织 { get; set; }
+
+            public string 支付人 { get; set; }
+            public string 支付日期 { get; set; }
+
+            public string 创建人 { get; set; }
+            public string 创建时间 { get; set; }
+            public string 制单人 { get; set; }
+
+            public string 单据类型 { get; set; } = "F3";
+            public string 付款类型 { get; set; } = "F3-Cxx-010";
+            public string 单据大类 { get; set; } = "fk";
+            public string 业务流程 { get; set; } = "AP02";
+
+            public string 单据号 { get; set; }
+            public string 单据日期 { get; set; }
+
+            public string 单据所属系统 { get; set; } = "1";
+            public string 单据来源系统 { get; set; } = "1";
+            public string 单据状态 { get; set; } = "-1";
+            public string 结算状态 { get; set; } = "1";
+            public string 生效状态 { get; set; } = "10";
+
+            public string 生效人 { get; set; } 
+            public string 生效日期 { get; set; }
+
+            public string 发票号 { get; set; }
+
+            public string 供应商 { get; set; }
+            public string 币种 { get; set; } = "CNY";
+
+            public string 往来对象 { get; set; } = "1";
+            public string 付款银行账户 { get; set; }
+
+            public string 价税合计 { get; set; }
+
+            public string 年份 { get; set; }
+            public string 月份 { get; set; }
+            
+            public string 起算日期 { get; set; }
+
+            public string 汇率 { get; set; } = "1";
+            public string 折扣 { get; set; } = "100";
+
+            public List<Item> 明细 { get; set; }
+
+            public class Item
+            {
+                public string 摘要 { get; set; }
+                public string 科目 { get; set; }
+                public string 部门 { get; set; }
+                public string 项目 { get; set; }
+
+                public string 价税合计 { get; set; }
+                public string 无税金额 { get; set; }
+                public string 税额 { get; set; }
+            }
+        }
+
+        public class ImportXml
+        {
+            /// <summary>
+            /// 模板头部份
+            /// </summary>
+            /// <returns></returns>
+            public static XElement TemplateHeade()
+            {
+
+                return new XElement(new XElement("ufinterface", new object[]
+                {
+                new XAttribute("sender","dingding"),
+                new XAttribute("roottag",""),
+                new XAttribute("replace","Y"),
+                new XAttribute("isexchange","Y"),
+                new XAttribute("groupcode","0"),
+                new XAttribute("filename",""),
+                new XAttribute("billtype","F3"),
+                new XAttribute("proc","add"),
+                new XAttribute("account","develop")
+                }));
+            }
+
+            /// <summary>
+            /// 组建表头xml
+            /// </summary>
+            /// <param name="item">表头参数</param>
+            /// <returns></returns>
+            public static XElement Header(DataModel item, string id)
+            {
+                var bodys = new List<XElement>();
+
+                if (item.明细 != null && item.明细.Count > 0)
+                {
+                    var crowno = 10; // 行号
+
+                    foreach (var itemData in item.明细)
+                    {
+                        bodys.Add(new XElement("item", new object[] {
+                            new XElement("pk_group",item.集团),
+                            new XElement("sett_org",item.组织),
+                            new XElement("pk_org",item.组织),
+                            new XElement("pk_fiorg",item.组织),
+                            new XElement("prepay","1"),// 预付款
+                            new XElement("supplier",item.供应商),
+                            new XElement("checkdirection","ap"),
+                            new XElement("billdate",item.单据日期),
+
+                            new XElement("pk_billtype",item.单据类型),
+                            new XElement("billclass",item.单据大类),
+                            new XElement("pk_tradetype",item.付款类型),
+                            new XElement("busidate",item.起算日期),
+
+                            new XElement("billno",item.单据号),
+                            new XElement("objtype",item.往来对象),
+                            new XElement("rowno",crowno.ToString()),
+                            new XElement("direction","1"),
+
+                            // new XElement("scomment",itemData.摘要),
+                            new XElement("subjcode",itemData.科目),
+                            new XElement("pk_currtype",item.币种),
+                            new XElement("rate",item.汇率),
+                            new XElement("pk_deptid",itemData.部门),
+                            new XElement("project",itemData.项目),
+
+                            new XElement("money_de",itemData.价税合计),
+                            new XElement("local_money_de",itemData.价税合计),
+                            new XElement("local_money_bal",itemData.价税合计),
+                            new XElement("notax_de",itemData.无税金额),
+                            new XElement("local_notax_de",itemData.价税合计),
+
+                            new XElement("payaccount",item.付款银行账户),
+                            new XElement("invoiceno",item.发票号),
+
+                            new XElement("def12",itemData.税额),
+                            new XElement("def11",itemData.无税金额),
+                            new XElement("occupationmny",itemData.价税合计),
+
+                            new XElement("grouprate","0"),
+                            new XElement("globalrate","0"),
+                            new XElement("groupdebit","0"),
+                            new XElement("globaldebit","0"),
+                            new XElement("groupbalance","0"),
+                            new XElement("globalbalance","0"),
+                            new XElement("groupnotax_de","0"),
+                            new XElement("globalnotax_de","0"),
+
+                        }));
+
+                        crowno = crowno + 10;
+                    }
+                }
+
+                return new XElement("bill", new object[]
+                {
+                "",
+                new XAttribute("id",id),
+                new XElement("billhead", new object[]
+                {
+                    new XElement("pk_group",item.集团),
+                    new XElement("pk_fiorg",item.组织),
+                    new XElement("pk_org",item.组织),
+                    new XElement("sett_org",item.组织),
+                    new XElement("pk_corp",item.组织),
+
+                    new XElement("isreded","N"),
+
+                    new XElement("payman",item.支付人),
+                    new XElement("paydate",item.支付日期),
+                    new XElement("isonlinepay","N"),
+
+                    new XElement("creationtime",item.创建时间),
+                    new XElement("creator",item.创建人),
+
+                    new XElement("pk_billtype",item.单据类型),
+                    new XElement("pk_tradetype",item.付款类型),
+                    new XElement("billclass",item.单据大类),
+                    new XElement("pk_busitype",item.业务流程),
+                    new XElement("ismandatepay","N"),
+                    new XElement("accessorynum","0"),
+                    new XElement("isflowbill","N"),
+                    new XElement("isinit","N"),
+
+                    new XElement("billno",item.单据号),
+                    new XElement("billdate",item.单据日期),
+
+                    new XElement("syscode",item.单据所属系统),
+                    new XElement("src_syscode",item.单据来源系统),
+                    new XElement("billstatus",item.单据状态),
+
+                    new XElement("billmaker",item.制单人),
+                    new XElement("isnetpayready","N"),
+
+                    new XElement("money",item.价税合计),
+                    new XElement("local_money",item.价税合计),
+                    new XElement("billyear",item.年份),
+                    new XElement("billperiod",item.月份),
+
+                    new XElement("settleflag",item.结算状态),
+                    new XElement("effectstatus",item.生效状态),
+                    new XElement("effectuser",item.生效人),
+                    new XElement("effectdate",item.生效日期),
+
+                    new XElement("def2",item.发票号),
+                   //  new XElement("pk_deptid",item.发票号),
+
+                    new XElement("supplier",item.供应商),
+                    new XElement("pk_currtype",item.币种),
+                    new XElement("objtype",item.往来对象),
+                    new XElement("payaccount",item.付款银行账户),
+
+                    new XElement("busidate",item.起算日期),
+
+                    new XElement("bodys",bodys),
+                }),
+                });
+            }
+        }
+    }
+}

+ 21 - 9
HH.YiDaSyncNC/Program.cs

@@ -79,12 +79,14 @@ namespace HH.YiDaSyncNC
                 //kh_SyncService.DataSync();
                 #endregion
 
-                KP_SyncService kp_SyncService = new KP_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_KP, db, db_nc, _Static_NCApiUrl);
-                kp_SyncService.DataSync();
+                #region 开票
+                //KP_SyncService kp_SyncService = new KP_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_KP, db, db_nc, _Static_NCApiUrl);
+                //kp_SyncService.DataSync();
 
                 // 退票
                 //KP_TP_SyncService kp_tp_SyncService = new KP_TP_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_KP, db, db_nc, _Static_NCApiUrl);
                 //kp_tp_SyncService.DataSync();
+                #endregion
 
 
                 #region 采购订单
@@ -94,7 +96,6 @@ namespace HH.YiDaSyncNC
                 #endregion
 
                 #region 付款单
-                #endregion
                 // 付款单
                 //FK_FKD_SyncService fk_fkd_SyncService = new FK_FKD_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
                 //fk_fkd_SyncService.DataSync();
@@ -103,6 +104,10 @@ namespace HH.YiDaSyncNC
                 //FK_SyncService fk_SyncService = new FK_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
                 //fk_SyncService.DataSync();
 
+                // 费用报销付款
+                FK_FYBX_SyncService fk_fybx_SyncService = new FK_FYBX_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FYBX, db, db_nc, _Static_NCApiUrl);
+                fk_fybx_SyncService.DataSync();
+
                 // 付款单 预付类型 生成凭证 zxh
                 //FKGL_SyncService fkgl_SyncService = new FKGL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
                 //fkgl_SyncService.DataSync();
@@ -110,18 +115,25 @@ namespace HH.YiDaSyncNC
                 //FKYF_SyncService fkyf_SyncService = new FKYF_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
                 //fkyf_SyncService.DataSync();
                 // 暂支申请  生成凭证 zxh
-                ZZD_GL_SyncService zzsq_SyncService = new ZZD_GL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_ZZSQ, db, db_nc, _Static_NCApiUrl);
-                zzsq_SyncService.DataSync();
+                //ZZD_GL_SyncService zzsq_SyncService = new ZZD_GL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_ZZSQ, db, db_nc, _Static_NCApiUrl);
+                //zzsq_SyncService.DataSync();
                 // 还款单  生成凭证 zxh
-                HKD_GL_SyncService hkd_SyncService = new HKD_GL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_ZZHX, db, db_nc, _Static_NCApiUrl);
-                hkd_SyncService.DataSync();
+                //HKD_GL_SyncService hkd_SyncService = new HKD_GL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_ZZHX, db, db_nc, _Static_NCApiUrl);
+                //hkd_SyncService.DataSync();
+
+
+                // 付款单(预付)
+                //FK_YF_SyncService fk_yf_SyncService = new FK_YF_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
+                //fk_yf_SyncService.DataSync();
+
                 // 预付 发票入账  生成凭证 zxh
-                YF_FPRZ_SyncService yf_fprz_SyncService = new YF_FPRZ_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
-                yf_fprz_SyncService.DataSync();
+                //YF_FPRZ_SyncService yf_fprz_SyncService = new YF_FPRZ_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
+                //yf_fprz_SyncService.DataSync();
 
                 // 费用报销单 zxh 用不到
                 //BX_SyncService bx_SyncService = new BX_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FYBX, db, db_nc, _Static_NCApiUrl);
                 //bx_SyncService.DataSyncFYBX();
+                #endregion
 
                 Environment.Exit(0);
             }