修改任务读文件

usertest
jianghaiqing 3 months ago
parent cc5cb0df79
commit 4a2af33f3d

@ -1,4 +1,5 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.SqlSugar; using DS.Module.SqlSugar;
using DS.Module.UserModule; using DS.Module.UserModule;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
@ -55,6 +56,8 @@ namespace DS.WMS.Core.TaskPlat.Method
public async Task SetTaskStatus(long[] taskIds, params Expression<Func<TaskBaseInfo, bool>>[] columns) public async Task SetTaskStatus(long[] taskIds, params Expression<Func<TaskBaseInfo, bool>>[] columns)
{ {
SqlSugarScopeProvider tenantDb = saasDbService.GetBizDbScopeById(user.TenantId); SqlSugarScopeProvider tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
//任务不考虑OrgId,这里去掉
tenantDb.QueryFilter.Clear<IOrgId>();
var updateable = tenantDb.Updateable<TaskBaseInfo>(); var updateable = tenantDb.Updateable<TaskBaseInfo>();
foreach (var item in columns) foreach (var item in columns)
@ -79,6 +82,9 @@ namespace DS.WMS.Core.TaskPlat.Method
public async Task SetTaskOwner(long[] taskIds, List<RecvUserInfo> userInfo) public async Task SetTaskOwner(long[] taskIds, List<RecvUserInfo> userInfo)
{ {
SqlSugarScopeProvider tenantDb = saasDbService.GetBizDbScopeById(user.TenantId); SqlSugarScopeProvider tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
//任务不考虑OrgId,这里去掉
tenantDb.QueryFilter.Clear<IOrgId>();
try try
{ {
var taskList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => taskIds.Contains(x.Id)).ToListAsync(x => new var taskList = await tenantDb.Queryable<TaskBaseInfo>().Where(x => taskIds.Contains(x.Id)).ToListAsync(x => new
@ -256,6 +262,8 @@ namespace DS.WMS.Core.TaskPlat.Method
public async Task<(string fileFullPath, string fileName)> GetTaskFileInfo(long taskId, string fileCategory) public async Task<(string fileFullPath, string fileName)> GetTaskFileInfo(long taskId, string fileCategory)
{ {
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId); var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
//任务不考虑OrgId,这里去掉
tenantDb.QueryFilter.Clear<IOrgId>();
var bcTaskInfo = await tenantDb.Queryable<TaskBaseInfo>().Where(u => u.Id == taskId).FirstAsync(); var bcTaskInfo = await tenantDb.Queryable<TaskBaseInfo>().Where(u => u.Id == taskId).FirstAsync();
if (bcTaskInfo == null) if (bcTaskInfo == null)
@ -320,6 +328,8 @@ namespace DS.WMS.Core.TaskPlat.Method
MatchTaskResultDto result = new MatchTaskResultDto(); MatchTaskResultDto result = new MatchTaskResultDto();
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId); var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
//任务不考虑OrgId,这里去掉
tenantDb.QueryFilter.Clear<IOrgId>();
var taskList = await tenantDb.Queryable<TaskBaseInfo>() var taskList = await tenantDb.Queryable<TaskBaseInfo>()
.Where(x => x.IS_PUBLIC == 1 .Where(x => x.IS_PUBLIC == 1

Loading…
Cancel
Save