按模块获取表单设置列表

usertest
cjy 3 months ago
parent 292588b509
commit 167c603daf

@ -48,5 +48,11 @@ public interface IFormSetService
/// <returns></returns>
public DataResult BatchDelFormSet(IdModel req);
/// <summary>
/// 根据权限模块获取表单设置列表
/// </summary>
/// <param name="permissionId"></param>
/// <returns></returns>
public Task<DataResult<List<CodeFormSetRes>>> GetFormSetListByModule(string permissionId);
}

@ -118,7 +118,21 @@ public class CodeFormSetService : IFormSetService
.First();
return DataResult<CodeFormSetRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 根据权限模块获取表单设置列表
/// </summary>
/// <param name="permissionId"></param>
/// <returns></returns>
public async Task<DataResult<List<CodeFormSetRes>>> GetFormSetListByModule(string permissionId)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = await tenantDb.Queryable<CodeFormSet>()
.Where(x => x.PermissionId == long.Parse(permissionId) && x.Status == StatusEnum.Enable)
.Select<CodeFormSetRes>()
.ToListAsync();
return await Task.FromResult(DataResult<List<CodeFormSetRes>>.Success(data, MultiLanguageConst.DataQuerySuccess));
}
public DataResult BatchDelFormSet(IdModel req)
{

@ -31,10 +31,10 @@ public class SeaExportRes
/// </summary>
public OpBusinessYardRes? YardInfo { get; set; }
/// <summary>
/// 表单设置
/// </summary>
public List<CodeFormSetRes>? FormSetList { get; set; }
///// <summary>
///// 表单设置
///// </summary>
//public List<CodeFormSetRes>? FormSetList { get; set; }
/// <summary>
/// 业务日志

@ -547,7 +547,7 @@ public partial class SeaExportService : ISeaExportService
it.CtnInfo = tenantDb.Queryable<OpCtn>().Where(x => x.BSNO == it.Id.ToString()).Select<OpCtnRes>().ToList();
it.CtnPriceInfo = tenantDb.Queryable<BusinessCtnPrice>().Where(x => x.BusinessId == it.Id).Select<BusinessCtnPriceRes>().ToList();
it.FormSetList = tenantDb.Queryable<CodeFormSet>().Where(x => x.PermissionName == "海运出口-详情").Select<CodeFormSetRes>().ToList();
//it.FormSetList = tenantDb.Queryable<CodeFormSet>().Where(x => x.PermissionName == "海运出口-详情").Select<CodeFormSetRes>().ToList();
it.BusinessLogList = tenantDb.Queryable<OpBusinessLog>().Where(x => x.BusinessId == it.Id).Select<OpBusinessLogRes>().ToList();

@ -75,6 +75,19 @@ public class FormSetController : ApiController
var res = _invokeService.GetFormSetInfoByModule(permissionId, formNo);
return res;
}
/// <summary>
/// 按模块获取表单设置列表
/// </summary>
/// <param name="permissionId">权限模块id</param>
/// <returns></returns>
[HttpGet]
[Route("GetFormSetListByModule")]
public async Task<DataResult<List<CodeFormSetRes>>> GetFormSetListByModule([FromQuery] string permissionId)
{
var res = await _invokeService.GetFormSetListByModule(permissionId);
return res;
}
/// <summary>
/// 批量删除
/// </summary>

Loading…
Cancel
Save