From d50c6e10a6e481d66e209fd109fe091d5fe60e74 Mon Sep 17 00:00:00 2001 From: douhandong Date: Fri, 1 Nov 2024 16:06:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84api=20?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuarztJobs/Method/BankStatementService.cs | 4 ++-- .../QuarztJobs/Method/InInvoiceService.cs | 12 ++++++------ .../DS.WMS.Core/Sys/Dtos/OrgAuthReq.cs | 15 +++++++++++++++ .../DS.WMS.Core/Sys/Dtos/OrgAuthRes.cs | 15 +++++++++++++++ .../DS.WMS.Core/Sys/Entity/SysOrgAuth.cs | 18 +++++++++++++++++- .../Sys/Method/SysOrgAuthService.cs | 8 ++------ 6 files changed, 57 insertions(+), 15 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs index 85e70b62..1d54bf71 100644 --- a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs +++ b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs @@ -39,9 +39,9 @@ namespace DS.WMS.Core.QuarztJobs.Method return; } - var orgauthlist = db.Queryable().ClearFilter().Where(t => t.Deleted == false && t.Type == Module.Core.Enums.OrgAuthTypeEnum.BankStatement).ToList(); + var orgauthlist = db.Queryable().ClearFilter().Where(t => t.Deleted == false && t.Type == "BankStatement").ToList(); + - //遍历授权数据集 foreach (var item in orgauthlist) { diff --git a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/InInvoiceService.cs b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/InInvoiceService.cs index 464660a9..37c91039 100644 --- a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/InInvoiceService.cs +++ b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/InInvoiceService.cs @@ -39,11 +39,11 @@ namespace DS.WMS.Core.QuarztJobs.Method return; } - var orgauthlist= db.Queryable().ClearFilter().Where(t => t.Deleted == false&&t.Type==OrgAuthTypeEnum.InInvoice).ToList(); + var orgauthlist= db.Queryable().ClearFilter().Where(t => t.Deleted == false&&t.Type== "InInvoice").ToList(); + + + - - - //遍历授权数据集 foreach (var item in orgauthlist) { @@ -197,7 +197,7 @@ namespace DS.WMS.Core.QuarztJobs.Method try { #region 同步发票到钉钉审批 - var dingconfig = db.Queryable().Where(t => t.Type == OrgAuthTypeEnum.DingConfig &&t.OrgId==item.OrgId).First(); + var dingconfig = db.Queryable().Where(t => t.Type == "DingConfig" &&t.OrgId==item.OrgId).First(); if (dingconfig!=null) { @@ -206,7 +206,7 @@ namespace DS.WMS.Core.QuarztJobs.Method //获取对应的组织机构的发票列表 var ininviceList = await tenantDb.Queryable().Where(x => x.ReimbursementType == ReimbursementTypeEnums.NotSubmitted && x.OrgId == item.OrgId).ToListAsync(); //将发票信息同步更新到钉钉 - var DingProcess = db.Queryable().Where(t => t.Type == OrgAuthTypeEnum.DingProcessCode && t.OrgId == item.OrgId).First(); + var DingProcess = db.Queryable().Where(t => t.Type == "DingProcessCode" && t.OrgId == item.OrgId).First(); DingDing.UpDingOAForm(token, DingProcess.Key, ininviceList); diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthReq.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthReq.cs index c479d490..11d34012 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthReq.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthReq.cs @@ -32,5 +32,20 @@ public class OrgAuthReq /// public string Secret { get; set; } + /// + /// 描述 + /// + public string Describe { get; set; } + + /// + /// 状态 + /// + public string Status { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthRes.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthRes.cs index afce302b..c2b148b2 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthRes.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/OrgAuthRes.cs @@ -27,4 +27,19 @@ public class OrgAuthRes /// 密钥 /// public string Secret { get; set; } + + /// + /// 描述 + /// + public string Describe { get; set; } + + /// + /// 状态 + /// + public string Status { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysOrgAuth.cs b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysOrgAuth.cs index b3135a97..8af716e8 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysOrgAuth.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysOrgAuth.cs @@ -22,7 +22,7 @@ namespace DS.WMS.Core.Sys.Entity /// 类型 /// - public OrgAuthTypeEnum Type { get; set; } + public string Type { get; set; } /// /// 请求key @@ -32,5 +32,21 @@ namespace DS.WMS.Core.Sys.Entity /// 密钥 /// public string Secret { get; set; } + + + /// + /// 描述 + /// + public string Describe { get; set; } + + /// + /// 状态 + /// + public string Status { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgAuthService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgAuthService.cs index 8ab617a6..f54db76f 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgAuthService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgAuthService.cs @@ -43,13 +43,9 @@ public class SysOrgAuthService: IOrgAuthService public DataResult> GetListByPage(PageRequest request) { //序列化查询条件 - if (!string.IsNullOrWhiteSpace(request.QueryCondition)) - { - //var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); - } - + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); var data = db.Queryable() - //.Where(whereList) + .Where(whereList) .Select().ToQueryPage(request.PageCondition); return data; }