forked from ddrilling/AsbCloudServer
DrillingProgramStateDto Add PermissionToEdit
This commit is contained in:
parent
5d8afcd907
commit
cee68bf4ee
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
@ -16,6 +12,7 @@ namespace AsbCloudApp.Data
|
||||
/// </summary>
|
||||
public int IdState { get; set; }
|
||||
public FileInfoDto Program { get; set; }
|
||||
public bool PermissionToEdit { get; set; }
|
||||
public IEnumerable<DrillingProgramPartDto> Parts { get; set; }
|
||||
}
|
||||
}
|
||||
|
15
AsbCloudDb/UsefulQueries/export_sp.sql
Normal file
15
AsbCloudDb/UsefulQueries/export_sp.sql
Normal file
@ -0,0 +1,15 @@
|
||||
-- USAGE:
|
||||
--sudo -u postgres psql -v id_t=103 -v file="'/home/soltex/export/t_103.csv'" < export_sp.sql
|
||||
copy (select
|
||||
"date",
|
||||
well_depth,
|
||||
t_te.id_event,
|
||||
t_te.message_template,
|
||||
arg0 as old_value,
|
||||
arg1 as new_value
|
||||
from t_telemetry_message t_tm
|
||||
left join (select * from t_telemetry_event where id_telemetry = :id_t) t_te
|
||||
on t_te.id_event = t_tm.id_event
|
||||
where t_tm.id_telemetry = :id_t and t_tm.id_event != 40
|
||||
order by date)
|
||||
to :file DELIMITER ';' CSV header ENCODING 'WIN1251';
|
@ -1,36 +0,0 @@
|
||||
select t_cluster.caption as cluster,
|
||||
t_well.caption as well,
|
||||
t_well.id_telemetry
|
||||
from t_cluster
|
||||
join t_well on t_well.id_cluster = t_cluster.id
|
||||
where t_cluster.caption in ('82', 'ê50 Á', 'ê8', '6 A') and t_well.id_telemetry is not null
|
||||
order by cluster , well
|
||||
|
||||
select * from t_telemetry_event
|
||||
where id_telemetry = 94;
|
||||
|
||||
select * from t_telemetry_message t_tm
|
||||
where id_telemetry = 94;
|
||||
|
||||
select
|
||||
date,
|
||||
well_depth,
|
||||
t_te.id_event,
|
||||
t_te.message_template,
|
||||
arg0 as old_value,
|
||||
arg1 as new_value
|
||||
from t_telemetry_message t_tm
|
||||
left join (select * from t_telemetry_event where id_telemetry = 94) t_te
|
||||
on t_te.id_event = t_tm.id_event
|
||||
where t_tm.id_telemetry = 94
|
||||
order by date;
|
||||
|
||||
select *
|
||||
from t_telemetry_data_saub
|
||||
where id_telemetry = 94;
|
||||
|
||||
select *
|
||||
from t_telemetry_data_saub
|
||||
where id_telemetry = 94
|
||||
window w as (PARTITION BY id_telemetry order by date)
|
||||
|
@ -116,7 +116,8 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
{
|
||||
Parts = parts,
|
||||
Program = files.FirstOrDefault(f => f.IdCategory == idFileCategoryDrillingProgram)
|
||||
.Adapt<FileInfoDto>()
|
||||
.Adapt<FileInfoDto>(),
|
||||
PermissionToEdit = userService.HasPermission(idUser, "DrillingProgram.edit"),
|
||||
};
|
||||
|
||||
if (parts.Any())
|
||||
|
Loading…
Reference in New Issue
Block a user