工作票关联风险
This commit is contained in:
parent
26aae58eaf
commit
cadd709e06
@ -85,7 +85,7 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
if (string.IsNullOrEmpty(id))
|
if (string.IsNullOrEmpty(id))
|
||||||
this.ThrowError("060010");
|
this.ThrowError("060010");
|
||||||
var result = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id, new string[] { "Nav_CrucialLicensePerson", "Nav_CrucialLicensePerson.Nav_User","Nav_Files.Nav_ImgFile",
|
var result = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id, new string[] { "Nav_CrucialLicensePerson", "Nav_CrucialLicensePerson.Nav_User","Nav_Files.Nav_ImgFile",
|
||||||
"Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme",
|
"Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme","Nav_Risks",
|
||||||
"Nav_JobScheme.Nav_PreOperSchFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile"});
|
"Nav_JobScheme.Nav_PreOperSchFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile"});
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
@ -161,7 +161,7 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
// "Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile", "Nav_CrucialLicensePerson.Nav_User" };
|
// "Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile", "Nav_CrucialLicensePerson.Nav_User" };
|
||||||
//var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id);
|
//var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id);
|
||||||
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id,
|
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id,
|
||||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department");
|
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department", "Nav_Risks");
|
||||||
if (entity != null)
|
if (entity != null)
|
||||||
{
|
{
|
||||||
var newFilter = new BaseFilter(filter.OrgId);
|
var newFilter = new BaseFilter(filter.OrgId);
|
||||||
@ -243,6 +243,7 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
// dealMeasures = dealMeasures.Where(t => !t.IS_DELETED).ToList();
|
// dealMeasures = dealMeasures.Where(t => !t.IS_DELETED).ToList();
|
||||||
//}
|
//}
|
||||||
var files = entity.Nav_Files;
|
var files = entity.Nav_Files;
|
||||||
|
var risks = entity.Nav_Risks;
|
||||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||||
if (entity.TaskID != Guid.Empty)
|
if (entity.TaskID != Guid.Empty)
|
||||||
{
|
{
|
||||||
@ -257,6 +258,7 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
entity.Nav_SafeMeasures = null;
|
entity.Nav_SafeMeasures = null;
|
||||||
entity.Nav_DealMeasures = null;
|
entity.Nav_DealMeasures = null;
|
||||||
entity.Nav_Files = null;
|
entity.Nav_Files = null;
|
||||||
|
entity.Nav_Risks = null;
|
||||||
entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿;
|
entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿;
|
||||||
entity.APPLY_USER_ID = loginUserId;
|
entity.APPLY_USER_ID = loginUserId;
|
||||||
var loginUser = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId);
|
var loginUser = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId);
|
||||||
@ -309,6 +311,15 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
x.Nav_CrucialLicenseJob = null;
|
x.Nav_CrucialLicenseJob = null;
|
||||||
x.Nav_ImgFile = null;
|
x.Nav_ImgFile = null;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
{
|
||||||
|
risks.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.ORG_ID = entity.ORG_ID;
|
||||||
|
x.CRUCIAL_LICENSE_JOB_ID = entity.ID;
|
||||||
|
x.Nav_CrucialLicenseJob = null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(entity.CODE))
|
if (string.IsNullOrEmpty(entity.CODE))
|
||||||
{
|
{
|
||||||
@ -399,7 +410,9 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
else
|
else
|
||||||
throw new Exception("作业后处理措施不能为空!");
|
throw new Exception("作业后处理措施不能为空!");
|
||||||
if (files != null && files.Any())
|
if (files != null && files.Any())
|
||||||
BantchSaveEntityNoCommit(files);
|
BantchSaveEntityNoCommit(files);
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
BantchSaveEntityNoCommit(risks);
|
||||||
if (notices != null && notices.Any())
|
if (notices != null && notices.Any())
|
||||||
this.BantchSaveEntityNoCommit(notices);
|
this.BantchSaveEntityNoCommit(notices);
|
||||||
if (task != null)
|
if (task != null)
|
||||||
@ -444,7 +457,9 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
else
|
else
|
||||||
throw new Exception("作业后处理措施不能为空!");
|
throw new Exception("作业后处理措施不能为空!");
|
||||||
if (files != null && files.Any())
|
if (files != null && files.Any())
|
||||||
BantchSaveEntityNoCommit(files);
|
BantchSaveEntityNoCommit(files);
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
BantchSaveEntityNoCommit(risks);
|
||||||
if (notices != null && notices.Any())
|
if (notices != null && notices.Any())
|
||||||
this.BantchSaveEntityNoCommit(notices);
|
this.BantchSaveEntityNoCommit(notices);
|
||||||
if (task != null)
|
if (task != null)
|
||||||
|
|||||||
@ -56,7 +56,7 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
if (string.IsNullOrEmpty(id))
|
if (string.IsNullOrEmpty(id))
|
||||||
this.ThrowError("060010");
|
this.ThrowError("060010");
|
||||||
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(id,
|
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(id,
|
||||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department");
|
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department","Nav_Risks");
|
||||||
if (entity != null)
|
if (entity != null)
|
||||||
{
|
{
|
||||||
var newFilter = new BaseFilter(filter.OrgId);
|
var newFilter = new BaseFilter(filter.OrgId);
|
||||||
@ -105,7 +105,8 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
var users = entity.Nav_CrucialLicensePerson;
|
var users = entity.Nav_CrucialLicensePerson;
|
||||||
var safeConfirms = entity.Nav_SafeConfirms;
|
var safeConfirms = entity.Nav_SafeConfirms;
|
||||||
var safeMeasures = entity.Nav_SafeMeasures;
|
var safeMeasures = entity.Nav_SafeMeasures;
|
||||||
var dealMeasures = entity.Nav_DealMeasures;
|
var dealMeasures = entity.Nav_DealMeasures;
|
||||||
|
var risks = entity.Nav_Risks;
|
||||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||||
if (entity.TaskID != Guid.Empty)
|
if (entity.TaskID != Guid.Empty)
|
||||||
{
|
{
|
||||||
@ -118,7 +119,8 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
entity.Nav_CrucialLicensePerson = null;
|
entity.Nav_CrucialLicensePerson = null;
|
||||||
entity.Nav_SafeConfirms = null;
|
entity.Nav_SafeConfirms = null;
|
||||||
entity.Nav_SafeMeasures = null;
|
entity.Nav_SafeMeasures = null;
|
||||||
entity.Nav_DealMeasures = null;
|
entity.Nav_DealMeasures = null;
|
||||||
|
entity.Nav_Risks = null;
|
||||||
entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿;
|
entity.IS_PUBLISH = (int)FOPreMeetingStatusEnum.草稿;
|
||||||
entity.APPLY_USER_ID = loginUserId;
|
entity.APPLY_USER_ID = loginUserId;
|
||||||
entity.DEPARTMENT_ID = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId)?.DEPARTMENT_ID;
|
entity.DEPARTMENT_ID = this.GetEntity<T_FM_USER>(t => t.ENABLE_STATUS == 0 && t.ID == (Guid)loginUserId)?.DEPARTMENT_ID;
|
||||||
@ -155,7 +157,17 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new Exception("作业后处理措施必须填写!");
|
throw new Exception("作业后处理措施必须填写!");
|
||||||
|
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
{
|
||||||
|
risks.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.ORG_ID = entity.ORG_ID;
|
||||||
|
x.CRUCIAL_LICENSE_JOB_ID = entity.ID;
|
||||||
|
x.Nav_CrucialLicenseJob = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
if (string.IsNullOrEmpty(entity.CODE))
|
if (string.IsNullOrEmpty(entity.CODE))
|
||||||
{
|
{
|
||||||
//取审批流水码
|
//取审批流水码
|
||||||
@ -220,6 +232,8 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
BantchSaveEntityNoCommit(safeMeasures); //保存子表
|
BantchSaveEntityNoCommit(safeMeasures); //保存子表
|
||||||
if (dealMeasures != null && dealMeasures.Any())
|
if (dealMeasures != null && dealMeasures.Any())
|
||||||
BantchSaveEntityNoCommit(dealMeasures); //保存子表
|
BantchSaveEntityNoCommit(dealMeasures); //保存子表
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
BantchSaveEntityNoCommit(risks);
|
||||||
}, null, null, null, null, "", "FO025_SHOWPRINT", userIdss);
|
}, null, null, null, null, "", "FO025_SHOWPRINT", userIdss);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -242,6 +256,8 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
BantchSaveEntityNoCommit(safeMeasures); //保存子表
|
BantchSaveEntityNoCommit(safeMeasures); //保存子表
|
||||||
if (dealMeasures != null && dealMeasures.Any())
|
if (dealMeasures != null && dealMeasures.Any())
|
||||||
BantchSaveEntityNoCommit(dealMeasures); //保存子表
|
BantchSaveEntityNoCommit(dealMeasures); //保存子表
|
||||||
|
if (risks != null && risks.Any())
|
||||||
|
BantchSaveEntityNoCommit(risks);
|
||||||
//if (notices != null && notices.Any())
|
//if (notices != null && notices.Any())
|
||||||
// this.BantchSaveEntityNoCommit(notices);
|
// this.BantchSaveEntityNoCommit(notices);
|
||||||
//if (tech != null)
|
//if (tech != null)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user