forked from ddrilling/AsbCloudServer
CF2-104: Added drilling program creation only from approved files
This commit is contained in:
parent
a53d557f2a
commit
e396066a68
@ -56,7 +56,9 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
var resultFileName = $"Программа бурения {well.Cluster} {well.Caption}.xlsx";
|
var resultFileName = $"Программа бурения {well.Cluster} {well.Caption}.xlsx";
|
||||||
|
|
||||||
var fileNames = filesInfos
|
var fileNames = filesInfos
|
||||||
.Where(f => f.Name != resultFileName)
|
.Where(f => f.Name != resultFileName &&
|
||||||
|
f.FileMarks != null &&
|
||||||
|
f.FileMarks.Any(file => file.IdMark == 0))
|
||||||
.Select(f => fileService.GetUrl(f));
|
.Select(f => fileService.GetUrl(f));
|
||||||
|
|
||||||
var tempResultFilePath = Path.Combine(Path.GetTempPath(), "drillingProgram", resultFileName);
|
var tempResultFilePath = Path.Combine(Path.GetTempPath(), "drillingProgram", resultFileName);
|
||||||
|
@ -120,6 +120,7 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
int idCategory, CancellationToken token = default)
|
int idCategory, CancellationToken token = default)
|
||||||
{
|
{
|
||||||
var entities = await dbSetConfigured
|
var entities = await dbSetConfigured
|
||||||
|
.Include(f => f.FileMarks)
|
||||||
.Where(e => e.IdWell == idWell && e.IdCategory == idCategory && e.IsDeleted == false)
|
.Where(e => e.IdWell == idWell && e.IdCategory == idCategory && e.IsDeleted == false)
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.ToListAsync(token)
|
.ToListAsync(token)
|
||||||
@ -139,6 +140,9 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
|
|
||||||
query = query.Where(e => !e.IsDeleted);
|
query = query.Where(e => !e.IsDeleted);
|
||||||
|
|
||||||
|
if (idCategory == 13)
|
||||||
|
query = query.Include(f => f.FileMarks);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(companyName))
|
if (!string.IsNullOrEmpty(companyName))
|
||||||
query = query
|
query = query
|
||||||
.Include(file => file.Author)
|
.Include(file => file.Author)
|
||||||
|
Loading…
Reference in New Issue
Block a user