This commit is contained in:
何美荣 2026-06-24 16:35:06 +08:00
commit 2ffa1dbebb

View File

@ -350,7 +350,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
throw new Exception("试卷不能为空"); throw new Exception("试卷不能为空");
} }
var safeID = entity.Nav_Papers[0].SAFE_ID; var safeID = entity.Nav_Papers[0].SAFE_ID;
var safe = GetEntity<T_SE_SAFE_SURVEY>(it => it.ID == safeID, new BaseFilter(null)); var safe = GetEntity<T_SE_SAFE_SURVEY>(it => it.ID == safeID, new BaseFilter(APT.Infrastructure.Api.AppContext.CurrentSession.OrgId));
if (safe == null) if (safe == null)
{ {
throw new Exception("未查到有效数据"); throw new Exception("未查到有效数据");
@ -416,7 +416,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
var dt = DateTime.Now; var dt = DateTime.Now;
var data = GetEntities<T_SE_SAFE_SURVEY>( var data = GetEntities<T_SE_SAFE_SURVEY>(
it => it.STATUS == SESafeSurveyStatus. && it.TASK_ID != null && it.LAUNCH_TIME != null && it.LAUNCH_TIME.Value.Year == dt.Year, it => it.STATUS == SESafeSurveyStatus. && it.TASK_ID != null && it.LAUNCH_TIME != null && it.LAUNCH_TIME.Value.Year == dt.Year,
new BaseFilter(null)).Distinct(it => it.TASK_ID).ToList(); new BaseFilter(filter.OrgId)).Distinct(it => it.TASK_ID).ToList();
if (data != null) if (data != null)
{ {
data.ForEach(it => data.ForEach(it =>
@ -481,7 +481,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{ {
var tmp = GetEntity<T_SE_SAFE_SURVEY>( var tmp = GetEntity<T_SE_SAFE_SURVEY>(
t => t.ID == ret.SURVEY_ID.Value, t => t.ID == ret.SURVEY_ID.Value,
new BaseFilter(null), new BaseFilter(filter.OrgId),
paths); paths);
if (tmp != null) if (tmp != null)
{ {
@ -498,7 +498,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{ {
var tmp = GetEntities<T_SE_SAFE_SURVEY>( var tmp = GetEntities<T_SE_SAFE_SURVEY>(
t => t.TASK_ID != null && t.TASK_ID.Value == ret.TASK_ID.Value, t => t.TASK_ID != null && t.TASK_ID.Value == ret.TASK_ID.Value,
new BaseFilter(null), new BaseFilter(filter.OrgId),
paths).ToList(); paths).ToList();
if (tmp != null && tmp.Count > 0) if (tmp != null && tmp.Count > 0)
{ {
@ -594,8 +594,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
else if (ret.TYPE == "部门") else if (ret.TYPE == "部门")
{ {
baseFilter.SelectField = new string[] { "ANSWER", "Nav_User.Nav_Department.NAME", "Nav_Department.NAME", "Nav_Test.Nav_Points.POINT_ID", "Nav_Test.ANSWER" }; baseFilter.SelectField = new string[] { "ANSWER", "Nav_User.Nav_Department.NAME", "Nav_Department.NAME", "Nav_Test.Nav_Points.POINT_ID", "Nav_Test.ANSWER" };
baseFilter.Include.Add("Nav_Department");
papers = GetEntities<T_SE_SAFE_SURVEY_LIST_PAPER>(t => surveyIds.Contains(t.SAFE_ID), baseFilter); baseFilter.Include.Add("Nav_User.Nav_Department");
papers = GetEntities<T_SE_SAFE_SURVEY_LIST_PAPER>(t => surveyIds.Contains(t.SAFE_ID) && t.DEPARTMENT_ID.HasValue && !t.Nav_Department.IS_DELETED, baseFilter);
baseFilter.Include = new List<string>();
papers.ForEach(paper => papers.ForEach(paper =>
{ {
int idx = 0; int idx = 0;