sunpengfei
2025-08-19 6f450ffa6628d206d4f60284e16e84e4adbcd789
feat:开发
3个文件已修改
13 ■■■■■ 已修改文件
FlexJobApi.Core/Jobs/CalcTaskSatusByDateJob.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FlexJobApi.Core/Jobs/CalcUserAgeByIdCardJob.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/ApplyTaskCommandHandler.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FlexJobApi.Core/Jobs/CalcTaskSatusByDateJob.cs
@@ -31,6 +31,7 @@
                {
                    entity.ReleaseStatus = EnumTaskReleaseStatus.Stopped;
                }
                await rep.UpdateNowAsync(entities);
            }
        }
    }
FlexJobApi.Core/Jobs/CalcUserAgeByIdCardJob.cs
@@ -24,11 +24,18 @@
            var enities = await rep.AsQueryable()
                .Where(it => it.Type == EnumUserType.Personal && it.Identity != null && it.Identity != "")
                .ToListAsync(stoppingToken);
            if (enities.IsNotNull())
            {
            foreach (var entity in enities)
            {
                var age = entity.Identity.GetAge();
                    if (age.HasValue)
                    {
                entity.Age = age;
            }
        }
                await rep.UpdateNowAsync(enities);
            }
        }
    }
}
FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/ApplyTaskCommandHandler.cs
@@ -65,7 +65,8 @@
                    .Select(it => new
                    {
                        it.Id,
                        it.EnterpriseId
                        it.EnterpriseId,
                        it.ReleaseStatus
                    })
                    .ToListAsync(cancellationToken);
                var enterpriseIds = tasks.DistinctSelect(it => it.EnterpriseId);
@@ -80,6 +81,8 @@
                {
                    var task = tasks.FirstOrDefault(it => it.Id == taskId);
                    if (task == null) throw Oops.Oh(EnumErrorCodeType.s404, "任务");
                    if (task.ReleaseStatus == EnumTaskReleaseStatus.Stopped)
                        throw Oops.Oh(EnumErrorCodeType.s510, "任务已停止");
                    var employee = employees.FirstOrDefault(it => it.EnterpriseId == task.EnterpriseId && it.UserId == logier.Id);
                    if (employee == null)
                    {