修复相关bug
This commit is contained in:
+22
-1
@@ -117,6 +117,28 @@ public class OnboardingTaskLifecycleService : IOnboardingTaskLifecycleService
|
||||
.Select(x => x.Id)
|
||||
.ToListAsync();
|
||||
|
||||
var signProcessIds = await _db.Queryable<ObElectronicSignProcess>()
|
||||
.Where(x => x.TaskId == task.Id)
|
||||
.Select(x => x.Id)
|
||||
.ToListAsync();
|
||||
|
||||
if (signProcessIds.Count > 0)
|
||||
{
|
||||
await _db.Deleteable<ObElectronicSignEvent>()
|
||||
.Where(x => x.SignProcessId.HasValue
|
||||
&& signProcessIds.Contains(x.SignProcessId.Value))
|
||||
.ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObElectronicSignDocument>()
|
||||
.Where(x => signProcessIds.Contains(x.SignProcessId))
|
||||
.ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObElectronicSignProcess>()
|
||||
.Where(x => signProcessIds.Contains(x.Id))
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
await _db.Deleteable<ObEmployeeContractSnapshot>()
|
||||
.Where(x => x.TaskId == task.Id)
|
||||
.ExecuteCommandAsync();
|
||||
if (taskContractIds.Count > 0)
|
||||
{
|
||||
await _db.Deleteable<ObTaskContractVariable>()
|
||||
@@ -130,7 +152,6 @@ public class OnboardingTaskLifecycleService : IOnboardingTaskLifecycleService
|
||||
await _db.Deleteable<ObTaskMaterial>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObTaskEmployeeInfo>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObTaskFormRequirement>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObTaskFormValue>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObTaskOperationLog>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObTaskAudit>().Where(x => x.TaskId == task.Id).ExecuteCommandAsync();
|
||||
await _db.Deleteable<ObOnboardingTask>().In(task.Id).ExecuteCommandAsync();
|
||||
|
||||
Reference in New Issue
Block a user