1、试题导入 如果没找到答案做提示

2、培训计划 查看页面 添加审批详情
This commit is contained in:
wyw 2026-04-08 16:04:03 +08:00
parent 81e7935040
commit bbee339c2c
5 changed files with 73276 additions and 74641 deletions

View File

@ -11112,6 +11112,7 @@ builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.LAUNCH_USER_ID).
builder.Property(t => t.PLAN_NAME).HasMaxLength(200); builder.Property(t => t.PLAN_NAME).HasMaxLength(200);
builder.Property(t => t.GUIDE_PRINCIPLE).HasMaxLength(500); builder.Property(t => t.GUIDE_PRINCIPLE).HasMaxLength(500);
builder.Property(t => t.TRAIN_REQUIREMENT).HasMaxLength(500); builder.Property(t => t.TRAIN_REQUIREMENT).HasMaxLength(500);
builder.Ignore(t => t.Nav_Approve);
} }
} }
#endregion #endregion

View File

@ -138,5 +138,12 @@ namespace APT.MS.Domain.Entities.SE
[FormFieldTable] [FormFieldTable]
[FormFieldQuery] [FormFieldQuery]
public PFStandardStatus STATUS { get; set; } public PFStandardStatus STATUS { get; set; }
/// <summary>
/// 审批信息
/// </summary>
[Description("审批信息")]
[DataFieldIngore]
public BaseData.Domain.Entities.T_PF_APPROVE Nav_Approve { get; set; }
} }
} }

View File

@ -344,6 +344,8 @@ namespace APT.SE.WebApi.Controllers.Api
T_FM_USER_POST modelPost = null; T_FM_USER_POST modelPost = null;
List<string> listPostNameEmpty = new List<string>(); List<string> listPostNameEmpty = new List<string>();
List<string> listAnswerNullIndex = new List<string>();//未获取到答案
List<string> listAnswerErrorIndex = new List<string>(); List<string> listAnswerErrorIndex = new List<string>();
List<string> listAnswerError = new List<string>(); List<string> listAnswerError = new List<string>();
string strANSWER = string.Empty; string strANSWER = string.Empty;
@ -538,6 +540,11 @@ namespace APT.SE.WebApi.Controllers.Api
} }
listAnswerErrorIndex.Add((i + rowIndex).ToString()); listAnswerErrorIndex.Add((i + rowIndex).ToString());
} }
if (mainTable.ANSWER == 0)
{
listAnswerNullIndex.Add((i + rowIndex).ToString());
}
if (!string.IsNullOrEmpty(dtSource.Rows[i][8].ToString().Trim())) if (!string.IsNullOrEmpty(dtSource.Rows[i][8].ToString().Trim()))
{ {
int k = 0; int k = 0;
@ -620,7 +627,7 @@ namespace APT.SE.WebApi.Controllers.Api
#region #region
string strEmptyError = string.Empty; string strEmptyError = string.Empty;
if (listPostNameEmpty.Count > 0 || dicIndexEmpty.Count > 0 || listPointNameEmpty.Count > 0 || listRepeatDataIndex.Count > 0 || listRepeatExcelIndex.Count > 0) if (listPostNameEmpty.Count > 0 || dicIndexEmpty.Count > 0 || listPointNameEmpty.Count > 0 || listRepeatDataIndex.Count > 0 || listRepeatExcelIndex.Count > 0 || listAnswerErrorIndex.Count > 0 || listAnswerNullIndex.Count > 0)
{ {
if (dicIndexEmpty.Count > 0) if (dicIndexEmpty.Count > 0)
{ {
@ -651,7 +658,10 @@ namespace APT.SE.WebApi.Controllers.Api
{ {
throw new Exception("答案有误,行:【" + string.Join(",", listAnswerErrorIndex) + "】值:" + string.Join(",", listAnswerError)); throw new Exception("答案有误,行:【" + string.Join(",", listAnswerErrorIndex) + "】值:" + string.Join(",", listAnswerError));
} }
if (listAnswerNullIndex.Count > 0)
{
throw new Exception("获取答案有误,行:【" + string.Join(",", listAnswerNullIndex) + "】");
}
if (listRepeatDataIndex.Count > 0) if (listRepeatDataIndex.Count > 0)
{ {
throw new Exception("与现有题库重复,行:【" + string.Join(",", listRepeatDataIndex) + "】值:" + string.Join(",", listNameTypeError)); throw new Exception("与现有题库重复,行:【" + string.Join(",", listRepeatDataIndex) + "】值:" + string.Join(",", listNameTypeError));

View File

@ -161,6 +161,23 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{ {
return SafeExecute(() => return SafeExecute(() =>
{ {
bool isAppRove = false;
string pathApp = "";
if (filter.Include.Count() > 0)
{
foreach (var item in filter.Include)
{
if (item.IndexOf("Nav_Approve") > -1)
{
var list = filter.Include.ToList();
list.Remove(item);
filter.Include = list;
pathApp = item.Split("Nav_Approve.", StringSplitOptions.RemoveEmptyEntries)[0];
isAppRove = true;
break;
}
}
}
var result = GetEntity<T_SE_TRAIN_PLAN>(null, filter, null); var result = GetEntity<T_SE_TRAIN_PLAN>(null, filter, null);
if (result.Nav_ListPlanDetail != null && result.Nav_ListPlanDetail.Any()) if (result.Nav_ListPlanDetail != null && result.Nav_ListPlanDetail.Any())
{ {
@ -170,6 +187,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
} }
result.Nav_ListPlanDetail = result.Nav_ListPlanDetail.OrderBy(e => e.DEPARTMENT_ID).ThenBy(e => e.DATE_TRAIN).ToList(); result.Nav_ListPlanDetail = result.Nav_ListPlanDetail.OrderBy(e => e.DEPARTMENT_ID).ThenBy(e => e.DATE_TRAIN).ToList();
} }
if (isAppRove)
{
result.Nav_Approve = GetEntity<T_PF_APPROVE>(e => e.DATA_ID == result.ID, pathApp);
}
return result; return result;
}); });
} }

File diff suppressed because it is too large Load Diff