修改权限
parent
2440d9b94c
commit
4955437524
|
@ -10,7 +10,11 @@ using System.Threading.Tasks;
|
|||
using MassTransit;
|
||||
using MassTransit.NewIdProviders;
|
||||
using System.IO;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
|
@ -20,16 +24,47 @@ namespace IRaCIS.Core.API
|
|||
public static async Task Main(string[] args)
|
||||
{
|
||||
|
||||
if(!File.Exists($@"C:\.xingcang\config.json"))
|
||||
{
|
||||
Console.WriteLine("µ±Ç°Î´×¢²á");
|
||||
//if(!File.Exists($@"C:\.xingcang\config.json"))
|
||||
//{
|
||||
// Console.WriteLine("当前未注册");
|
||||
// Console.ReadLine();
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// var json = File.ReadAllText($@"C:\.xingcang\config.json");
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// JObject jsonObject = JObject.Parse(json);
|
||||
|
||||
}
|
||||
// var key = jsonObject["key"].ToString();
|
||||
|
||||
// var value= jsonObject["value"].ToString();
|
||||
|
||||
|
||||
// var physicalAddressList = NetworkInterface.GetAllNetworkInterfaces().Select(t=>t.GetPhysicalAddress().ToString());
|
||||
|
||||
// // 判断文件里面的机器码是否是本机的
|
||||
// if (!physicalAddressList.Contains(key))
|
||||
// {
|
||||
// Console.WriteLine("机器码和本机不对应");
|
||||
// Console.ReadLine();
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
// var secrete = MD5Helper.Md5($"{key}_XINGCANG");
|
||||
|
||||
// if (value != secrete)
|
||||
// {
|
||||
// Console.WriteLine("机器码和注册码不匹配");
|
||||
// Console.ReadLine();
|
||||
|
||||
// return;
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
try
|
||||
|
|
|
@ -264,7 +264,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPost("{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
|
||||
public async Task<IResponseOutput> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand)
|
||||
{
|
||||
|
||||
|
@ -303,7 +302,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> CloseCheckChallenge(CloseCheckChallengeDto input)
|
||||
{
|
||||
|
||||
|
@ -337,7 +335,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetCheckPass(SetCheckPassDt data)
|
||||
{
|
||||
|
@ -382,7 +379,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> CRCRequstCheckBack(Guid subjectVisitId)
|
||||
{
|
||||
var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
|
||||
|
@ -423,7 +419,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> RejectCheckBack(Guid subjectVisitId)
|
||||
{
|
||||
|
@ -456,7 +451,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CheckBack(Guid subjectVisitId)
|
||||
{
|
||||
|
@ -533,7 +527,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// </summary>
|
||||
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{trialQCProcess:int}/{currentQCType:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
|
||||
{
|
||||
//验证是否能操作
|
||||
|
@ -605,7 +598,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{studyId:guid}/{seriesId:guid}/{state:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
public async Task<IResponseOutput> SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state)
|
||||
{
|
||||
|
||||
|
@ -672,7 +664,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPost("{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
||||
public async Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
|
||||
|
@ -750,7 +741,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
[HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
||||
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
|
||||
{
|
||||
|
||||
|
@ -862,7 +852,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
/// <summary>替换当前领取人 </summary>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ReplaceQCTaskActionUser(Guid trialId, Guid subjectVisitId)
|
||||
{
|
||||
|
@ -896,7 +885,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{obtaionOrCancel:bool}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
public async Task<IResponseOutput> ObtainOrCancelQCTask(Guid trialId, Guid subjectVisitId, bool obtaionOrCancel)
|
||||
{
|
||||
|
||||
|
@ -1108,7 +1096,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> CRCRequestToQC(CRCRequestToQCCommand cRCRequestToQCCommand)
|
||||
{
|
||||
|
||||
|
@ -1411,7 +1398,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{auditState:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState)
|
||||
{
|
||||
|
@ -1676,7 +1662,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
public async Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId)
|
||||
{
|
||||
|
||||
|
@ -1773,7 +1758,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand)
|
||||
{
|
||||
|
||||
|
@ -1848,7 +1832,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> CRCRequestReUpload(Guid qcChallengeId)
|
||||
{
|
||||
var qcChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == qcChallengeId)).IfNullThrowException();
|
||||
|
@ -1929,7 +1912,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
[HttpPost("{trialId:guid}")]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList)
|
||||
{
|
||||
|
|
|
@ -150,7 +150,6 @@ namespace IRaCIS.Application.Services
|
|||
//[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)]
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> AddTrialUsers(TrialUserAddCommand[] userTrialCommands)
|
||||
{
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
[TrialAudit(AuditType.SubjectAudit, AuditOptType.AddOrUpdateSubject)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
|
||||
public async Task<IResponseOutput<string>> AddOrUpdateSubject([FromBody] SubjectCommand subjectCommand)
|
||||
{
|
||||
var svlist = new List<SubjectVisit>();
|
||||
|
@ -73,7 +72,6 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
[HttpPut]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> UpdateSubjectStatus(SubjectStatusChangeCommand subjectStatusChangeCommand)
|
||||
{
|
||||
|
@ -85,7 +83,6 @@ namespace IRaCIS.Application.Services
|
|||
[HttpDelete("{trialId:guid}/{id:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
|
||||
public async Task<IResponseOutput> DeleteSubject(Guid id)
|
||||
{
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
||||
{
|
||||
|
||||
|
@ -183,7 +182,6 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{isUrgent:bool}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_IQC)]
|
||||
public async Task<IResponseOutput> SetSubjectVisitUrgent(Guid subjectVisitId, bool isUrgent)
|
||||
{
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(subjectVisitId, u => new SubjectVisit() { IsUrgent = isUrgent }, true);
|
||||
|
@ -195,7 +193,6 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
[HttpDelete, Route("{trialId:guid}/{id:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> DeleteSV(Guid id)
|
||||
{
|
||||
if (await _repository.AnyAsync<DicomStudy>(t => t.SubjectVisitId == id))
|
||||
|
|
Loading…
Reference in New Issue