组织机构api 授权调整

dev
douhandong 3 weeks ago
parent 3367d57a0a
commit d50c6e10a6

@ -39,9 +39,9 @@ namespace DS.WMS.Core.QuarztJobs.Method
return;
}
var orgauthlist = db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false && t.Type == Module.Core.Enums.OrgAuthTypeEnum.BankStatement).ToList();
var orgauthlist = db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false && t.Type == "BankStatement").ToList();
//遍历授权数据集
foreach (var item in orgauthlist)
{

@ -39,11 +39,11 @@ namespace DS.WMS.Core.QuarztJobs.Method
return;
}
var orgauthlist= db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false&&t.Type==OrgAuthTypeEnum.InInvoice).ToList();
var orgauthlist= db.Queryable<SysOrgAuth>().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<SysOrgAuth>().Where(t => t.Type == OrgAuthTypeEnum.DingConfig &&t.OrgId==item.OrgId).First();
var dingconfig = db.Queryable<SysOrgAuth>().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<InInvoice>().Where(x => x.ReimbursementType == ReimbursementTypeEnums.NotSubmitted && x.OrgId == item.OrgId).ToListAsync();
//将发票信息同步更新到钉钉
var DingProcess = db.Queryable<SysOrgAuth>().Where(t => t.Type == OrgAuthTypeEnum.DingProcessCode && t.OrgId == item.OrgId).First();
var DingProcess = db.Queryable<SysOrgAuth>().Where(t => t.Type == "DingProcessCode" && t.OrgId == item.OrgId).First();
DingDing.UpDingOAForm(token, DingProcess.Key, ininviceList);

@ -32,5 +32,20 @@ public class OrgAuthReq
/// </summary>
public string Secret { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Describe { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -27,4 +27,19 @@ public class OrgAuthRes
/// 密钥
/// </summary>
public string Secret { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Describe { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}

@ -22,7 +22,7 @@ namespace DS.WMS.Core.Sys.Entity
/// 类型
/// </summary>
public OrgAuthTypeEnum Type { get; set; }
public string Type { get; set; }
/// <summary>
/// 请求key
@ -32,5 +32,21 @@ namespace DS.WMS.Core.Sys.Entity
/// 密钥
/// </summary>
public string Secret { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Describe { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -43,13 +43,9 @@ public class SysOrgAuthService: IOrgAuthService
public DataResult<List<OrgAuthRes>> 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<SysOrgAuth>()
//.Where(whereList)
.Where(whereList)
.Select<OrgAuthRes>().ToQueryPage(request.PageCondition);
return data;
}

Loading…
Cancel
Save