晓海 曾 2 anos atrás
pai
commit
a591fef329

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
HH.YiDaSyncNC/.vs/HH.YiDaSyncNC.csproj.dtbcache.json


+ 5 - 1
HH.YiDaSyncNC/App.config

@@ -23,14 +23,18 @@
     <add key="FormId_KH" value="FORM-E95BF43276BC4BD78B269729F716AA63LDR2" />
     <add key="FormId_ZC" value="FORM-F3695066AABE41F6AF241489F8558ACA78OI" />
     <!--流程表单-->
-    <add key="FormCode_FYBXD" value="FORMTPROC--J1A66U81S5VHPM8C8H1N1D11U8VL3VRWEHNRL3" />
+    <add key="FormCode_FYBXD" value="TPROC--J1A66U81S5VHPM8C8H1N1D11U8VL3VRWEHNRL3" />
     <add key="FormCode_CLBXD" value="TPROC--5L666481BADIN79I7U3PV7NY34HC3M0CL1XSL3" />
+    <add key="FormCode_ZZSQ" value="TPROC--KW766OD1LVUH19EE9PQH67Q4JOZ03N5ULHNRL2" />
     <!--表单-->
     <add key="FormId_FYBXD" value="FORM-0C15BF8B40EA475C898190288E3057D8UO5W" />
     <add key="FormId_CLBXD" value="FORM-0851B163795E4EB78728C70D85132BE4QTN5" />
     <add key="FormId_KP" value="FORM-6603375ED27B4D059CBB919C2BEFA44BZVOL" />
     <add key="FormId_CGDD" value="FORM-61F329A9DFFE4CF0BBEC0FDC34C42C03QJKQ" />
     <add key="FormId_FK" value="FORM-B8C2006FAA1645B4BC2A6E71F8CC35BFQ71Y" />
+    <add key="FormId_ZZSQ" value="FORM-0D007913C9234D92BADE92375CA464A2MHB2" />
+    <add key="FormId_ZZDA" value="FORM-91E9DF06D7F14AEA9F71E1BB5410AA884D9C" />
+    <add key="FormId_ZZHX" value="FORM-8FC638B3417E47ED86983AB9FD9CAA447V39" />
 
     <!--NC写库主键配置-->
     <add key="xx_idcontrast" value="DINGTALKIDC" />

+ 257 - 0
HH.YiDaSyncNC/DataSync/HKD_GL_SyncService.cs

@@ -0,0 +1,257 @@
+using HH.YiDaSyncNC.Dtos.NC;
+using HH.YiDaSyncNC.Dtos;
+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
+{
+    public class HKD_GL_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 HKD_GL_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 void DataSync()
+        {
+            try
+            {
+
+                DingTalkService _dingTalkService = new DingTalkService(_AppType, _SystemToken, _UserId, _FormId);
+
+                var serchKeyListJson = new
+                {
+                    //radioField_lycrvvtk = "Y",
+
+                };
+                var idList = _dingTalkService.GetFormCodeList(JsonConvert.SerializeObject(serchKeyListJson));
+                #region 获取NC中选项数据的Id
+                var bd_customerDic = _db_nc.Queryable<bd_customer>().ToList();
+                var bd_incomeDic = _db_nc.Queryable<bd_income>().ToList();
+                var org_orgsDic = _db_nc.Queryable<org_orgs>().ToList();
+                var bd_projectDic = _db_nc.Queryable<bd_project>().ToList();
+                var bd_materialDic = _db_nc.Queryable<bd_material>().ToList();
+                var bd_measdocDic = _db_nc.Queryable<bd_measdoc>().ToList();
+                var org_deptDic = _db_nc.Queryable<org_dept>().ToList();
+                var bd_psndocDic = _db_nc.Queryable<bd_psndoc>().ToList();
+                var sm_userDic = _db_nc.Queryable<sm_user>().ToList();
+                var org_accountingbookDic = _db_nc.Queryable<org_accountingbook>().ToList();
+                #endregion
+
+                foreach (var item in idList)
+                {
+                    var ydDataSource = _dingTalkService.GetFormDataByCode(item);
+                    string jsonData = JsonConvert.SerializeObject(ydDataSource);
+
+
+
+                    DateTime 凭证日期 = DateTime.Now;
+
+                    string 组织 = "A102";
+                    //if (!string.IsNullOrWhiteSpace(thisYiDaData.selectField_lvywoqmb))
+                    //{
+                    //    var tempData = org_orgsDic.FirstOrDefault(f => f.name == thisYiDaData.selectField_lvywoqmb);
+                    //    if (tempData != null)
+                    //    {
+                    //        组织 = tempData.code; // 组织
+                    //    }
+                    //}
+
+
+                    string 账簿 = "A02-0004";
+                    //if (!string.IsNullOrWhiteSpace(thisYiDaData.selectField_lvywoqmb))
+                    //{
+                    //    var tempData = org_accountingbookDic.FirstOrDefault(f => f.name == thisYiDaData.selectField_lvywoqmb + "-蓝云账簿");
+                    //    if (tempData != null)
+                    //    {
+                    //        账簿 = tempData.code; // 账簿
+                    //    }
+                    //}
+                    string 制单人 = "OA-NC";
+
+                    // 表头
+                    var headModel = new HKD_GL_SyncServiceModel.DataModel.voucher_header()
+                    {
+                        year = 凭证日期.ToString("yyyy"),//会计年度
+                        prepareddate = 凭证日期.ToString("yyyy-MM-dd"),//制单日期
+                        period = 凭证日期.ToString("MM"),//会计期间
+                        pk_prepared = 制单人,//凭证制单人--操作员工工号
+                        no = "",//凭证号
+                        pk_accountingbook = 账簿,//账簿
+                        org = 组织,//组织编码
+                        pk_vouchertype = "02",//凭证类别 : 01-记账凭证 ,02-收款凭证 ,03-付款凭证 ,04-转账凭证 要确定
+                    };
+                    //表体
+                    var detailList = new List<HKD_GL_SyncServiceModel.DataModel.voucher_body>();
+
+
+                    //贷方
+                    detailList.Add(new HKD_GL_SyncServiceModel.DataModel.voucher_body()
+                    {
+                        detailindex = 1,
+                        accsubjcode = "122105",//科目编码 预付账款 1
+                        pk_accasoa = "122105",//科目编码  1
+                        explanation = "贷方摘要",//摘要  1
+                        verifydate = 凭证日期.ToString("yyyy-MM-dd"),
+                        price = "0.00000000",
+                        excrate2 = "1",
+                        creditamount = "1234",//贷方金额  1
+                        localcreditamount = "1234",//贷方金额  1
+                        debitquantity = "0.00000000",
+                        debitamount = "0.00000000",
+                        groupdebitamount = "0.00000000",
+                        globaldebitamount = "0.00000000",
+                        localdebitamount = "0.00000000",
+                        creditquantity = "0.00000000",
+                        groupcreditamount = "0.00000000",
+                        globalcreditamount = "0.00000000",
+                        billtype = "",
+                        bankaccount = "",
+                        checkstyle = "",
+                        checkno = "",
+                        checkdate = "",
+                        bill_id = "",
+                        bill_date = "",
+                        pk_currtype = "CNY",
+                        cash_flow = new HKD_GL_SyncServiceModel.DataModel.cash_flow()//现金流 
+                        {
+                            m_pk_currtype = "CNY",
+                            pk_cashflow = "1113",//现金流编码 
+                            money = "1234",//金额  1
+                            moneymain = "1234",//金额  1
+                            moneygroup = "",
+                            moneyglobal = "",
+                            pk_innercorp = "",
+                        },
+                        ass = new List<HKD_GL_SyncServiceModel.DataModel.ass>()//
+                                {
+                                    new HKD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0001",//0019-部门
+                                        pk_Checkvalue = "0402",//部门编码 1
+                                    },
+                                     new HKD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0002",//0019-人员
+                                        pk_Checkvalue = "011070",//人员编码 1
+                                    }
+                                },
+                    });
+
+                    //借方
+                    detailList.Add(
+                        new HKD_GL_SyncServiceModel.DataModel.voucher_body()
+                        {
+                            detailindex = 2,
+                            accsubjcode = "100204",//科目编码  1
+                            pk_accasoa = "100204",//科目编码 1
+                            explanation = "借方摘要",//摘要 
+                            verifydate = 凭证日期.ToString("yyyy-MM-dd"),
+                            price = "0.00000000",
+                            excrate2 = "1",
+                            debitamount = "1234",//借方金额  1
+                            localdebitamount = "1234",//借方金额 1
+                            debitquantity = "0.00000000",
+                            groupdebitamount = "0.00000000",
+                            globaldebitamount = "0.00000000",
+                            creditquantity = "0.00000000",
+                            creditamount = "0.00000000",
+                            groupcreditamount = "0.00000000",
+                            globalcreditamount = "0.00000000",
+                            localcreditamount = "0.00000000",
+                            billtype = "",
+                            bankaccount = "",
+                            checkstyle = "",
+                            checkno = "",
+                            checkdate = "",
+                            bill_id = "",
+                            bill_date = "",
+                            pk_currtype = "CNY",
+                            cash_flow = new HKD_GL_SyncServiceModel.DataModel.cash_flow()
+                            {
+                            },
+                            ass = new List<HKD_GL_SyncServiceModel.DataModel.ass>()//辅助核算 
+                            {
+                                    new HKD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0011",//0011-银行账户辅助核算 
+                                        pk_Checkvalue =  "36640188000164043",//银行账户  1
+                                    }
+                            },
+                        }
+                    );
+
+                    XElement xElement = HKD_GL_SyncServiceModel.ImportXml_凭证.TemplateHeade(headModel);
+                    xElement.Add(HKD_GL_SyncServiceModel.ImportXml_凭证.Header(headModel));//添加表头数据
+                    xElement.Element("voucher").Element("voucher_head").Element("details").Add(HKD_GL_SyncServiceModel.ImportXml_凭证.Bodydebit(detailList));
+                    //生成凭证
+                    var results_凭证 = NCImportFunc.NCImport2(xElement, _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 content = xE.Element("sendresult").Element("content")?.Value;
+
+                    string resultdescription = xE.Element("sendresult").Element("resultdescription")?.Value;
+                    var ncResData = new YiDaResDto();
+                    if (resultcode == "1")
+                    {
+                        ncResData = (new YiDaResDto()
+                        {
+                            bSuccess = true,
+                            syncTime = DateTime.Now,
+                            ncNo = resultdescription,//xE.Element("sendresult").Element("content").Value,
+                            log = "同步成功!"
+                        });
+                    }
+                    else
+                    {
+                        ncResData = (new YiDaResDto()
+                        {
+                            bSuccess = false,
+                            syncTime = DateTime.Now,
+                            ncNo = "",
+                            log = "同步失败!原因为【" + resultdescription + "】!"
+                        });
+                    }
+                    //更新同步标识
+                    var ydRes = _dingTalkService.UpdateFormDataSyncDataById(ncResData, item);
+                }
+            }
+            catch (Exception ex)
+            {
+
+                throw;
+            }
+        }
+    }
+}

+ 261 - 0
HH.YiDaSyncNC/DataSync/ZZD_GL_SyncService.cs

@@ -0,0 +1,261 @@
+using HH.YiDaSyncNC.Dtos;
+using HH.YiDaSyncNC.Dtos.NC;
+using HH.YiDaSyncNC.Dtos.YIDA;
+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
+{
+    public class ZZD_GL_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 ZZD_GL_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 void DataSync()
+        {
+            try
+            {
+
+                DingTalkService _dingTalkService = new DingTalkService(_AppType, _SystemToken, _UserId, _FormId);
+
+                var serchKeyListJson = new
+                {
+                    radioField_lycrvvtk = "Y",
+
+                };
+                var idList = _dingTalkService.GetFormIdList(JsonConvert.SerializeObject(serchKeyListJson));
+                #region 获取NC中选项数据的Id
+                var bd_customerDic = _db_nc.Queryable<bd_customer>().ToList();
+                var bd_incomeDic = _db_nc.Queryable<bd_income>().ToList();
+                var org_orgsDic = _db_nc.Queryable<org_orgs>().ToList();
+                var bd_projectDic = _db_nc.Queryable<bd_project>().ToList();
+                var bd_materialDic = _db_nc.Queryable<bd_material>().ToList();
+                var bd_measdocDic = _db_nc.Queryable<bd_measdoc>().ToList();
+                var org_deptDic = _db_nc.Queryable<org_dept>().ToList();
+                var bd_psndocDic = _db_nc.Queryable<bd_psndoc>().ToList();
+                var sm_userDic = _db_nc.Queryable<sm_user>().ToList();
+                var org_accountingbookDic = _db_nc.Queryable<org_accountingbook>().ToList();
+                #endregion
+
+                foreach (var item in idList)
+                {
+                    string createTime = "";
+                    string modifyTime = "";
+                    var ydDataSource = _dingTalkService.GetFormDataById(item, out createTime, out modifyTime);
+                    string jsonData = JsonConvert.SerializeObject(ydDataSource);
+
+
+                    YiDa_ZZDA thisYiDaData = JsonConvert.DeserializeObject<YiDa_ZZDA>(jsonData);
+
+                    DateTime 凭证日期 = DateTime.Now;
+
+                    string 组织 = "A102";
+                    if (!string.IsNullOrWhiteSpace(thisYiDaData.textField_lw0ef16v))
+                    {
+                        var tempData = org_orgsDic.FirstOrDefault(f => f.name == thisYiDaData.textField_lw0ef16v);
+                        if (tempData != null)
+                        {
+                            组织 = tempData.code; // 组织
+                        }
+                    }
+
+
+                    string 账簿 = "A02-0004";
+                    if (!string.IsNullOrWhiteSpace(thisYiDaData.textField_lw0ef16v))
+                    {
+                        var tempData = org_accountingbookDic.FirstOrDefault(f => f.name == thisYiDaData.textField_lw0ef16v + "-蓝云账簿");
+                        if (tempData != null)
+                        {
+                            账簿 = tempData.code; // 账簿
+                        }
+                    }
+                    string 制单人 = "OA-NC";
+
+                    // 表头
+                    var headModel = new ZZD_GL_SyncServiceModel.DataModel.voucher_header()
+                    {
+                        year = 凭证日期.ToString("yyyy"),//会计年度
+                        prepareddate = 凭证日期.ToString("yyyy-MM-dd"),//制单日期
+                        period = 凭证日期.ToString("MM"),//会计期间
+                        pk_prepared = 制单人,//凭证制单人--操作员工工号
+                        no = "",//凭证号
+                        pk_accountingbook = 账簿,//账簿
+                        org = 组织,//组织编码
+                        pk_vouchertype = "03",//凭证类别 : 01-记账凭证 ,02-收款凭证 ,03-付款凭证 ,04-转账凭证 要确定
+                    };
+                    //表体
+                    var detailList = new List<ZZD_GL_SyncServiceModel.DataModel.voucher_body>();
+
+
+                    //借方分录
+                    detailList.Add(new ZZD_GL_SyncServiceModel.DataModel.voucher_body()
+                    {
+                        detailindex = 1,
+                        accsubjcode = "122105",//科目编码 预付账款 
+                        pk_accasoa = "122105",//科目编码  
+                        explanation = "借方摘要",//摘要 
+                        verifydate = 凭证日期.ToString("yyyy-MM-dd"),
+                        price = "0.00000000",
+                        excrate2 = "1",
+                        debitquantity = "0.00000000",
+                        debitamount =  "1234",//借方金额  1
+                        groupdebitamount = "0.00000000",
+                        globaldebitamount = "0.00000000",
+                        localdebitamount = "1234",//借方金额 1
+                        creditquantity = "0.00000000",
+                        creditamount = "0.00000000",
+                        groupcreditamount = "0.00000000",
+                        globalcreditamount = "0.00000000",
+                        localcreditamount = "0.00000000",
+                        billtype = "",
+                        bankaccount = "",
+                        checkstyle = "",
+                        checkno = "",
+                        checkdate = "",
+                        bill_id = "",
+                        bill_date = "",
+                        pk_currtype = "CNY",
+                        cash_flow = new ZZD_GL_SyncServiceModel.DataModel.cash_flow()//现金流 
+                        {
+                            m_pk_currtype = "CNY",
+                            pk_cashflow = "1124",//现金流编码 
+                            money = "1234",//金额  1
+                            moneymain = "1234",//金额  1
+                            moneygroup = "",
+                            moneyglobal = "",
+                            pk_innercorp = "",
+                        },
+                        ass = new List<ZZD_GL_SyncServiceModel.DataModel.ass>()//
+                                {
+                                    new ZZD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0001",//0019-部门
+                                        pk_Checkvalue = "0402",//部门编码 1
+                                    },
+                                     new ZZD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0002",//0019-人员
+                                        pk_Checkvalue = "011070",//人员编码 1
+                                    }
+                                },
+                    });
+
+                    //贷方
+                    detailList.Add(
+                        new ZZD_GL_SyncServiceModel.DataModel.voucher_body()
+                        {
+                            detailindex = 2,
+                            accsubjcode = "100204",//科目编码  
+                            pk_accasoa = "100204",//科目编码 
+                            explanation = "贷方摘要",//摘要  1
+                            verifydate = 凭证日期.ToString("yyyy-MM-dd"),
+                            price = "0.00000000",
+                            excrate2 = "1",
+                            debitquantity = "0.00000000",
+                            debitamount = "0.00000000",
+                            groupdebitamount = "0.00000000",
+                            globaldebitamount = "0.00000000",
+                            localdebitamount = "0.00000000",
+                            creditquantity = "0.00000000",
+                            creditamount ="1234",//贷方金额  1
+                            groupcreditamount = "0.00000000",
+                            globalcreditamount = "0.00000000",
+                            localcreditamount = "1234",//贷方金额  1
+                            billtype = "",
+                            bankaccount = "",
+                            checkstyle = "",
+                            checkno = "",
+                            checkdate = "",
+                            bill_id = "",
+                            bill_date = "",
+                            pk_currtype = "CNY",
+                            cash_flow = new ZZD_GL_SyncServiceModel.DataModel.cash_flow()
+                            {
+                            },
+                            ass = new List<ZZD_GL_SyncServiceModel.DataModel.ass>()//辅助核算 
+                            {
+                                    new ZZD_GL_SyncServiceModel.DataModel.ass()
+                                    {
+                                        pk_Checktype ="0011",//0011-银行账户辅助核算 
+                                        pk_Checkvalue =  "36640188000164043",//银行账户  1
+                                    }
+                            },
+                        }
+                    );
+
+                    XElement xElement = ZZD_GL_SyncServiceModel.ImportXml_凭证.TemplateHeade(headModel);
+                    xElement.Add(ZZD_GL_SyncServiceModel.ImportXml_凭证.Header(headModel));//添加表头数据
+                    xElement.Element("voucher").Element("voucher_head").Element("details").Add(ZZD_GL_SyncServiceModel.ImportXml_凭证.Bodydebit(detailList));
+                    //生成凭证
+                    var results_凭证 = NCImportFunc.NCImport2(xElement, _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 content = xE.Element("sendresult").Element("content")?.Value;
+
+                    string resultdescription = xE.Element("sendresult").Element("resultdescription")?.Value;
+                    var ncResData = new YiDaResDto();
+                    if (resultcode == "1")
+                    {
+                        ncResData = (new YiDaResDto()
+                        {
+                            bSuccess = true,
+                            syncTime = DateTime.Now,
+                            ncNo = resultdescription,//xE.Element("sendresult").Element("content").Value,
+                            log = "同步成功!"
+                        });
+                    }
+                    else
+                    {
+                        ncResData = (new YiDaResDto()
+                        {
+                            bSuccess = false,
+                            syncTime = DateTime.Now,
+                            ncNo = "",
+                            log = "同步失败!原因为【" + resultdescription + "】!"
+                        });
+                    }
+                    //更新同步标识
+                    var ydRes = _dingTalkService.UpdateFormDataSyncDataById(ncResData, item);
+                }
+            }
+            catch (Exception ex)
+            {
+
+                throw;
+            }
+        }
+    }
+}

+ 44 - 0
HH.YiDaSyncNC/Dtos/YIDA/YiDa_ZZDA.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HH.YiDaSyncNC.Dtos.YIDA
+{
+    public class YiDa_ZZDA
+    {
+        /// <summary>
+        /// 请款组织
+        /// </summary>
+        public string associationFormField_lvyplgvg { get; set; }
+        /// <summary>
+        /// 成本组织 用这个获取组织
+        /// </summary>
+        public string textField_lw0ef16v { get; set; }
+        /// <summary>
+        /// 借款类型
+        /// </summary>
+        public string selectField_lw927e8f { get; set; }
+        /// <summary>
+        /// 借款金额
+        /// </summary>
+        public decimal numberField_lrnhnsxp { get; set; }
+        /// <summary>
+        /// 预计归还日期
+        /// </summary>
+        public long dateField_lrnhnsxr { get; set; }
+        /// <summary>
+        /// 借款事由
+        /// </summary>
+        public string textareaField_lsx6hx5f { get; set; }
+        /// <summary>
+        /// 已还款金额
+        /// </summary>
+        public decimal? numberField_lvubcczs { get; set; }
+        /// <summary>
+        /// 待还款金额
+        /// </summary>
+        public decimal? numberField_lvubcczt { get; set; }
+    }
+}

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

@@ -129,12 +129,14 @@
     <Compile Include="DataSync\FKGL_SyncService.cs" />
     <Compile Include="DataSync\FKYF_SyncService.cs" />
     <Compile Include="DataSync\FK_SyncService.cs" />
+    <Compile Include="DataSync\HKD_GL_SyncService.cs" />
     <Compile Include="DataSync\KH_SyncService.cs" />
     <Compile Include="DataSync\GYS_SyncService.cs" />
     <Compile Include="DataSync\KP_SyncService.cs" />
     <Compile Include="DataSync\ZC_SyncService.cs" />
     <Compile Include="DataSync\XMD_SyncService.cs" />
     <Compile Include="DataSync\WL_SyncService.cs" />
+    <Compile Include="DataSync\ZZD_GL_SyncService.cs" />
     <Compile Include="Dtos\NC\bd_defdoc.cs" />
     <Compile Include="Dtos\NC\bd_income.cs" />
     <Compile Include="Dtos\NC\bd_customer.cs" />
@@ -175,6 +177,7 @@
     <Compile Include="Dtos\YiDaResDto.cs" />
     <Compile Include="Dtos\YIDA\YiDa_FYBXD.cs" />
     <Compile Include="Dtos\YIDA\YiDa_SKDNC.cs" />
+    <Compile Include="Dtos\YIDA\YiDa_ZZDA.cs" />
     <Compile Include="Helper\AbPrivoder.cs" />
     <Compile Include="Helper\CommHelper.cs" />
     <Compile Include="Helper\DBHelper.cs" />
@@ -186,6 +189,7 @@
     <Compile Include="Models\FKGL_SyncServiceModel.cs" />
     <Compile Include="Models\FKYF_SyncServiceModel.cs" />
     <Compile Include="Models\FK_SyncServiceModel.cs" />
+    <Compile Include="Models\HKD_GL_SyncServiceModel.cs" />
     <Compile Include="Models\XSFP_SyncServiceModel.cs" />
     <Compile Include="Models\KP_SyncServiceModel.cs" />
     <Compile Include="Models\CGDD_SyncServiceModel.cs" />
@@ -193,6 +197,7 @@
     <Compile Include="Models\GYS_SyncServiceModel.cs" />
     <Compile Include="Models\XMD_SyncServiceModel.cs" />
     <Compile Include="Models\WL_SyncServiceModel.cs" />
+    <Compile Include="Models\ZZD_GL_SyncServiceModel.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>

+ 319 - 0
HH.YiDaSyncNC/Models/HKD_GL_SyncServiceModel.cs

@@ -0,0 +1,319 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace HH.YiDaSyncNC.Models
+{
+    public class HKD_GL_SyncServiceModel
+    {
+        #region 凭证数据模型
+        /// <summary>
+        /// 凭证模型
+        /// </summary>
+        public class DataModel
+        {
+            /// <summary>
+            /// 头部
+            /// </summary>
+            public class voucher_header
+            {
+                /// <summary>
+                /// 会计年度
+                /// </summary>
+                public string year { get; set; }
+
+                /// <summary>
+                /// 会计期间
+                /// </summary>
+                public string period { get; set; }
+
+                /// <summary>
+                /// 凭证类别
+                /// </summary>
+                public string pk_vouchertype { get; set; }
+
+                /// <summary>
+                /// 制单日期
+                /// </summary>
+                public string prepareddate { get; set; }
+
+                /// <summary>
+                /// 凭证号
+                /// </summary>
+                public string no { get; set; }
+
+                /// <summary>
+                /// 账簿
+                /// </summary>
+                public string pk_accountingbook { get; set; }
+
+                /// <summary>
+                /// 制单人
+                /// </summary>
+                public string pk_prepared { get; set; }
+
+                /// <summary>
+                /// 附件张数
+                /// </summary>
+                public string attachment { get; set; }
+
+                /// <summary>
+                /// 组织
+                /// </summary>
+                public string org { get; set; }
+            }
+
+            /// <summary>
+            /// 头部分录
+            /// </summary>
+            public class voucher_body
+            {
+                /// <summary>
+                /// 分录序号
+                /// </summary>
+                public int detailindex { get; set; }
+                /// <summary>
+                /// 科目编码
+                /// </summary>
+                public string accsubjcode { get; set; }
+                /// <summary>
+                /// 摘要
+                /// </summary>
+                public string explanation { get; set; }
+
+                public string verifydate { get; set; }
+
+                public string price { get; set; }
+
+                public string excrate2 { get; set; }
+
+                public string debitquantity { get; set; }
+                /// <summary>
+                /// 借方金额
+                /// </summary>
+                public string debitamount { get; set; }
+                public string groupdebitamount { get; set; }
+
+                public string globaldebitamount { get; set; }
+                /// <summary>
+                /// 借方金额
+                /// </summary>
+                public string localdebitamount { get; set; }
+
+                public string creditquantity { get; set; }
+                /// <summary>
+                /// 贷方金额
+                /// </summary>
+                public string creditamount { get; set; }
+                public string groupcreditamount { get; set; }
+
+                public string globalcreditamount { get; set; }
+                /// <summary>
+                /// 贷方金额
+                /// </summary>
+                public string localcreditamount { get; set; }
+                public string billtype { get; set; }
+                public string bankaccount { get; set; }
+                public string checkstyle { get; set; }
+                public string checkno { get; set; }
+                public string checkdate { get; set; }
+                public string bill_id { get; set; }
+                public string bill_date { get; set; }
+                public string pk_currtype { get; set; }
+                /// <summary>
+                /// 科目编码
+                /// </summary>
+                public string pk_accasoa { get; set; }
+
+                public string pk_unit { get; set; }
+
+                public string pk_unit_v { get; set; }
+                /// <summary>
+                /// 辅助核算
+                /// </summary>
+                public List<DataModel.ass> ass { get; set; }
+                /// <summary>
+                /// 现金流量
+                /// </summary>
+                public DataModel.cash_flow cash_flow { get; set; }
+            }
+
+            public class cash_flow
+            {
+
+                public string m_pk_currtype { get; set; }
+
+                public string money { get; set; }
+
+                public string moneyglobal { get; set; }
+
+                public string moneygroup { get; set; }
+
+                public string moneymain { get; set; }
+                /// <summary>
+                /// 现金主键
+                /// </summary>
+                public string pk_cashflow { get; set; }
+
+                public string pk_innercorp { get; set; }
+            }
+
+            public class ass
+            {
+                /// <summary>
+                /// 辅助核算类型 编码
+                /// </summary>
+                public string pk_Checktype { get; set; }
+                /// <summary>
+                /// 值
+                /// </summary>
+                public string pk_Checkvalue { get; set; }
+            }
+        }
+        #endregion
+
+        public class ImportXml_凭证
+        {
+            public static XElement TemplateHeade(DataModel.voucher_header item)
+            {
+
+                return new XElement(new XElement("ufinterface", new object[]
+                {
+                    new XAttribute("proc","add"),
+                    new XAttribute("sender","dingding"),
+                    new XAttribute("receiver",item.org),
+                    new XAttribute("roottag",""),
+                    new XAttribute("replace","N"),
+                    new XAttribute("orgcode",item.org),
+                    new XAttribute("isexchange",""),
+                    new XAttribute("groupcode","0"),
+                    new XAttribute("filename",""),
+                    new XAttribute("businessunitcode","develop"),
+                    new XAttribute("billtype","vouchergl"),
+                    new XAttribute("account","develop")
+                }));
+            }
+            /// <summary>
+            /// 组建表头xml
+            /// </summary>
+            /// <param name="item">表头参数</param>
+            /// <returns></returns>
+            public static XElement Header(DataModel.voucher_header item)
+            {
+                return new XElement("voucher", new object[]
+                {
+                "",
+				//new XAttribute("id",""),
+				new XElement("voucher_head", new object[]
+                {
+                    new XElement("pk_voucher",""),
+                    new XElement("pk_vouchertype",item.pk_vouchertype),
+                    new XElement("year",item.year),
+                    new XElement("pk_system","GL"),
+                    new XElement("voucherkind","0"),
+                    new XElement("pk_accountingbook",item.pk_accountingbook),
+                    new XElement("discardflag","N"),
+                    new XElement("period",item.period),
+                    new XElement("no",item.no),
+                    new XElement("attachment",""),
+                    new XElement("prepareddate",item.prepareddate),
+                    new XElement("pk_prepared",/*"DINGDING"*/item.pk_prepared),
+                    new XElement("pk_casher",""),
+                    new XElement("signflag","Y"),
+                    new XElement("pk_checked",""),
+                    new XElement("tallydate",""),
+                    new XElement("pk_manager",""),
+                    new XElement("memo1",""),
+                    new XElement("memo2",""),
+                    new XElement("reserve1",""),
+                    new XElement("reserve2","N"),
+                    new XElement("siscardflag",""),
+                    new XElement("pk_org",item.org),
+                    new XElement("pk_org_v",item.org),
+                    new XElement("pk_group","0"),
+                    new XElement("details","")
+                }),
+                });
+            }
+
+            /// <summary>
+            /// 组建表体xml
+            /// </summary>
+            /// <param name="items">表体</param>
+            /// <returns></returns>
+            public static List<XElement> Bodydebit(List<DataModel.voucher_body> items)
+            {
+                List<XElement> list = new List<XElement>();
+
+                foreach (DataModel.voucher_body current in items)
+                {
+                    List<XElement> lstItem = new List<XElement>();
+                    foreach (var ite in current.ass)
+                    {
+                        if (!string.IsNullOrWhiteSpace(ite.pk_Checktype) && !string.IsNullOrWhiteSpace(ite.pk_Checkvalue))
+                        {
+                            XElement ites = new XElement("item", new object[] {
+                            new XElement("pk_Checktype",ite.pk_Checktype),
+                            new XElement("pk_Checkvalue",ite.pk_Checkvalue)
+                        });
+                            lstItem.Add(ites);
+                        }
+                    }
+
+                    XElement item = new XElement("item", new object[]
+                    {
+                    new XElement("detailindex",current.detailindex),
+                    new XElement("accsubjcode",current.pk_accasoa),
+                    new XElement("explanation",current.explanation),
+                    new XElement("verifydate",current.verifydate),
+                    new XElement("price",current.price),
+                    new XElement("excrate2",current.excrate2),
+                    new XElement("debitquantity",current.debitquantity),
+                    new XElement("debitamount",current.debitamount),
+                    new XElement("groupdebitamount",current.groupdebitamount),
+                    new XElement("globaldebitamount",current.globaldebitamount),
+                    new XElement("localdebitamount",current.localdebitamount),
+                    new XElement("creditquantity",current.creditquantity),
+                    new XElement("creditamount",current.creditamount),
+                    new XElement("groupcreditamount",current.groupcreditamount),
+                    new XElement("globalcreditamount",current.globalcreditamount),
+                    new XElement("localcreditamount",current.localcreditamount),
+                    new XElement("billtype",current.billtype),
+                    new XElement("bankaccount",current.bankaccount),
+                    new XElement("checkstyle",current.checkstyle),
+                    new XElement("checkno",current.checkno),
+                    new XElement("checkdate",current.checkdate),
+                    new XElement("bill_id",current.bill_id),
+                    new XElement("bill_date",current.bill_date),
+                    new XElement("pk_currtype",current.pk_currtype),
+                    new XElement("pk_accasoa",current.pk_accasoa),
+                    new XElement("ass",new object[]
+                        {
+                            lstItem,
+                        }),
+                        });
+
+                    if (!string.IsNullOrWhiteSpace(current.cash_flow.m_pk_currtype) && !string.IsNullOrWhiteSpace(current.cash_flow.money) && !string.IsNullOrWhiteSpace(current.cash_flow.moneymain) && !string.IsNullOrWhiteSpace(current.cash_flow.pk_cashflow))
+                    {
+                        XElement cashFlow = new XElement("cashFlow", new XElement("item", new object[]
+                           {
+                            new XElement("m_pk_currtype",current.cash_flow.m_pk_currtype),
+                            new XElement("money",current.cash_flow.money),
+                            new XElement("moneyglobal",current.cash_flow.moneyglobal),
+                            new XElement("moneygroup",current.cash_flow.moneygroup),
+                            new XElement("moneymain",current.cash_flow.moneymain),
+                            new XElement("pk_cashflow",current.cash_flow.pk_cashflow),
+                            new XElement("pk_innercorp",current.cash_flow.pk_innercorp)
+                           }));
+                        item.Add(cashFlow);
+                    }
+                    list.Add(item);
+                }
+                return list;
+            }
+        }
+    }
+}

+ 319 - 0
HH.YiDaSyncNC/Models/ZZD_GL_SyncServiceModel.cs

@@ -0,0 +1,319 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace HH.YiDaSyncNC.Models
+{
+    public class ZZD_GL_SyncServiceModel
+    {
+        #region 凭证数据模型
+        /// <summary>
+        /// 凭证模型
+        /// </summary>
+        public class DataModel
+        {
+            /// <summary>
+            /// 头部
+            /// </summary>
+            public class voucher_header
+            {
+                /// <summary>
+                /// 会计年度
+                /// </summary>
+                public string year { get; set; }
+
+                /// <summary>
+                /// 会计期间
+                /// </summary>
+                public string period { get; set; }
+
+                /// <summary>
+                /// 凭证类别
+                /// </summary>
+                public string pk_vouchertype { get; set; }
+
+                /// <summary>
+                /// 制单日期
+                /// </summary>
+                public string prepareddate { get; set; }
+
+                /// <summary>
+                /// 凭证号
+                /// </summary>
+                public string no { get; set; }
+
+                /// <summary>
+                /// 账簿
+                /// </summary>
+                public string pk_accountingbook { get; set; }
+
+                /// <summary>
+                /// 制单人
+                /// </summary>
+                public string pk_prepared { get; set; }
+
+                /// <summary>
+                /// 附件张数
+                /// </summary>
+                public string attachment { get; set; }
+
+                /// <summary>
+                /// 组织
+                /// </summary>
+                public string org { get; set; }
+            }
+
+            /// <summary>
+            /// 头部分录
+            /// </summary>
+            public class voucher_body
+            {
+                /// <summary>
+                /// 分录序号
+                /// </summary>
+                public int detailindex { get; set; }
+                /// <summary>
+                /// 科目编码
+                /// </summary>
+                public string accsubjcode { get; set; }
+                /// <summary>
+                /// 摘要
+                /// </summary>
+                public string explanation { get; set; }
+
+                public string verifydate { get; set; }
+
+                public string price { get; set; }
+
+                public string excrate2 { get; set; }
+
+                public string debitquantity { get; set; }
+                /// <summary>
+                /// 借方金额
+                /// </summary>
+                public string debitamount { get; set; }
+                public string groupdebitamount { get; set; }
+
+                public string globaldebitamount { get; set; }
+                /// <summary>
+                /// 借方金额
+                /// </summary>
+                public string localdebitamount { get; set; }
+
+                public string creditquantity { get; set; }
+                /// <summary>
+                /// 贷方金额
+                /// </summary>
+                public string creditamount { get; set; }
+                public string groupcreditamount { get; set; }
+
+                public string globalcreditamount { get; set; }
+                /// <summary>
+                /// 贷方金额
+                /// </summary>
+                public string localcreditamount { get; set; }
+                public string billtype { get; set; }
+                public string bankaccount { get; set; }
+                public string checkstyle { get; set; }
+                public string checkno { get; set; }
+                public string checkdate { get; set; }
+                public string bill_id { get; set; }
+                public string bill_date { get; set; }
+                public string pk_currtype { get; set; }
+                /// <summary>
+                /// 科目编码
+                /// </summary>
+                public string pk_accasoa { get; set; }
+
+                public string pk_unit { get; set; }
+
+                public string pk_unit_v { get; set; }
+                /// <summary>
+                /// 辅助核算
+                /// </summary>
+                public List<DataModel.ass> ass { get; set; }
+                /// <summary>
+                /// 现金流量
+                /// </summary>
+                public DataModel.cash_flow cash_flow { get; set; }
+            }
+
+            public class cash_flow
+            {
+
+                public string m_pk_currtype { get; set; }
+
+                public string money { get; set; }
+
+                public string moneyglobal { get; set; }
+
+                public string moneygroup { get; set; }
+
+                public string moneymain { get; set; }
+                /// <summary>
+                /// 现金主键
+                /// </summary>
+                public string pk_cashflow { get; set; }
+
+                public string pk_innercorp { get; set; }
+            }
+
+            public class ass
+            {
+                /// <summary>
+                /// 辅助核算类型 编码
+                /// </summary>
+                public string pk_Checktype { get; set; }
+                /// <summary>
+                /// 值
+                /// </summary>
+                public string pk_Checkvalue { get; set; }
+            }
+        }
+        #endregion
+
+        public class ImportXml_凭证
+        {
+            public static XElement TemplateHeade(DataModel.voucher_header item)
+            {
+
+                return new XElement(new XElement("ufinterface", new object[]
+                {
+                    new XAttribute("proc","add"),
+                    new XAttribute("sender","dingding"),
+                    new XAttribute("receiver",item.org),
+                    new XAttribute("roottag",""),
+                    new XAttribute("replace","N"),
+                    new XAttribute("orgcode",item.org),
+                    new XAttribute("isexchange",""),
+                    new XAttribute("groupcode","0"),
+                    new XAttribute("filename",""),
+                    new XAttribute("businessunitcode","develop"),
+                    new XAttribute("billtype","vouchergl"),
+                    new XAttribute("account","develop")
+                }));
+            }
+            /// <summary>
+            /// 组建表头xml
+            /// </summary>
+            /// <param name="item">表头参数</param>
+            /// <returns></returns>
+            public static XElement Header(DataModel.voucher_header item)
+            {
+                return new XElement("voucher", new object[]
+                {
+                "",
+				//new XAttribute("id",""),
+				new XElement("voucher_head", new object[]
+                {
+                    new XElement("pk_voucher",""),
+                    new XElement("pk_vouchertype",item.pk_vouchertype),
+                    new XElement("year",item.year),
+                    new XElement("pk_system","GL"),
+                    new XElement("voucherkind","0"),
+                    new XElement("pk_accountingbook",item.pk_accountingbook),
+                    new XElement("discardflag","N"),
+                    new XElement("period",item.period),
+                    new XElement("no",item.no),
+                    new XElement("attachment",""),
+                    new XElement("prepareddate",item.prepareddate),
+                    new XElement("pk_prepared",/*"DINGDING"*/item.pk_prepared),
+                    new XElement("pk_casher",""),
+                    new XElement("signflag","Y"),
+                    new XElement("pk_checked",""),
+                    new XElement("tallydate",""),
+                    new XElement("pk_manager",""),
+                    new XElement("memo1",""),
+                    new XElement("memo2",""),
+                    new XElement("reserve1",""),
+                    new XElement("reserve2","N"),
+                    new XElement("siscardflag",""),
+                    new XElement("pk_org",item.org),
+                    new XElement("pk_org_v",item.org),
+                    new XElement("pk_group","0"),
+                    new XElement("details","")
+                }),
+                });
+            }
+
+            /// <summary>
+            /// 组建表体xml
+            /// </summary>
+            /// <param name="items">表体</param>
+            /// <returns></returns>
+            public static List<XElement> Bodydebit(List<DataModel.voucher_body> items)
+            {
+                List<XElement> list = new List<XElement>();
+
+                foreach (DataModel.voucher_body current in items)
+                {
+                    List<XElement> lstItem = new List<XElement>();
+                    foreach (var ite in current.ass)
+                    {
+                        if (!string.IsNullOrWhiteSpace(ite.pk_Checktype) && !string.IsNullOrWhiteSpace(ite.pk_Checkvalue))
+                        {
+                            XElement ites = new XElement("item", new object[] {
+                            new XElement("pk_Checktype",ite.pk_Checktype),
+                            new XElement("pk_Checkvalue",ite.pk_Checkvalue)
+                        });
+                            lstItem.Add(ites);
+                        }
+                    }
+
+                    XElement item = new XElement("item", new object[]
+                    {
+                    new XElement("detailindex",current.detailindex),
+                    new XElement("accsubjcode",current.pk_accasoa),
+                    new XElement("explanation",current.explanation),
+                    new XElement("verifydate",current.verifydate),
+                    new XElement("price",current.price),
+                    new XElement("excrate2",current.excrate2),
+                    new XElement("debitquantity",current.debitquantity),
+                    new XElement("debitamount",current.debitamount),
+                    new XElement("groupdebitamount",current.groupdebitamount),
+                    new XElement("globaldebitamount",current.globaldebitamount),
+                    new XElement("localdebitamount",current.localdebitamount),
+                    new XElement("creditquantity",current.creditquantity),
+                    new XElement("creditamount",current.creditamount),
+                    new XElement("groupcreditamount",current.groupcreditamount),
+                    new XElement("globalcreditamount",current.globalcreditamount),
+                    new XElement("localcreditamount",current.localcreditamount),
+                    new XElement("billtype",current.billtype),
+                    new XElement("bankaccount",current.bankaccount),
+                    new XElement("checkstyle",current.checkstyle),
+                    new XElement("checkno",current.checkno),
+                    new XElement("checkdate",current.checkdate),
+                    new XElement("bill_id",current.bill_id),
+                    new XElement("bill_date",current.bill_date),
+                    new XElement("pk_currtype",current.pk_currtype),
+                    new XElement("pk_accasoa",current.pk_accasoa),
+                    new XElement("ass",new object[]
+                        {
+                            lstItem,
+                        }),
+                        });
+
+                    if (!string.IsNullOrWhiteSpace(current.cash_flow.m_pk_currtype) && !string.IsNullOrWhiteSpace(current.cash_flow.money) && !string.IsNullOrWhiteSpace(current.cash_flow.moneymain) && !string.IsNullOrWhiteSpace(current.cash_flow.pk_cashflow))
+                    {
+                        XElement cashFlow = new XElement("cashFlow", new XElement("item", new object[]
+                           {
+                            new XElement("m_pk_currtype",current.cash_flow.m_pk_currtype),
+                            new XElement("money",current.cash_flow.money),
+                            new XElement("moneyglobal",current.cash_flow.moneyglobal),
+                            new XElement("moneygroup",current.cash_flow.moneygroup),
+                            new XElement("moneymain",current.cash_flow.moneymain),
+                            new XElement("pk_cashflow",current.cash_flow.pk_cashflow),
+                            new XElement("pk_innercorp",current.cash_flow.pk_innercorp)
+                           }));
+                        item.Add(cashFlow);
+                    }
+                    list.Add(item);
+                }
+                return list;
+            }
+        }
+    }
+}

+ 12 - 4
HH.YiDaSyncNC/Program.cs

@@ -47,6 +47,8 @@ namespace HH.YiDaSyncNC
         public static string _Static_FormId_clBX = ConfigurationManager.AppSettings["FormId_CLBXD"];
         public static string _Static_FormCode_fyBX = ConfigurationManager.AppSettings["FormCode_FYBXD"];
         public static string _Static_FormCode_clBX = ConfigurationManager.AppSettings["FormCode_CLBXD"];
+        public static string _Static_FormId_ZZDA = ConfigurationManager.AppSettings["FormId_ZZDA"];
+        public static string _Static_FormId_ZZHX = ConfigurationManager.AppSettings["FormId_ZZHX"];
 
         public static string _Static_NCApiUrl = ConfigurationManager.AppSettings["NCApiUrl"];
 
@@ -81,13 +83,19 @@ namespace HH.YiDaSyncNC
                 //fk_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();
+                //FKGL_SyncService fkgl_SyncService = new FKGL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_FK, db, db_nc, _Static_NCApiUrl);
+                //fkgl_SyncService.DataSync();
                 // 付款单 预付类型 生成应付单 zxh
                 //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
+                // 暂支申请  生成凭证 zxh
+                ZZD_GL_SyncService zzsq_SyncService = new ZZD_GL_SyncService(_Static_AppType, _Static_SystemToken, _Static_UserId, _Static_FormId_ZZDA, 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();
+
+                // 费用报销单 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();