diff --git a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/IdentifyEvaluationPlanController.cs b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/IdentifyEvaluationPlanController.cs index 6491de9..2fc9f1d 100644 --- a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/IdentifyEvaluationPlanController.cs +++ b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/IdentifyEvaluationPlanController.cs @@ -73,6 +73,26 @@ namespace APT.SK.WebApi.Controllers.Api { throw new Exception("辨识人员不能为空"); } + T_FM_NOTIFICATION_TASK finishNotice = null; + if (entity.STATUS != PFStandardStatus.Draft && entity.STATUS != PFStandardStatus.Rejected) + { + var taskId = entity.TaskID; + if (taskId == Guid.Empty) + { + var task = GetEntity(i => i.SOURCE_DATA_ID == entity.ID && i.USER_ID == userId + && i.NOTICE_STATUS == FMNoticeStatusEnum.未处理.GetInt() && i.SOURCE_FORMCODE == "SK031"); + if (task != null) + { + taskId = task.ID; + } + } + if (taskId != Guid.Empty) + { + finishNotice = NotificationTaskService.FOGetTaskFinishModel(taskId, entity.ID, "SK031_SHOWPRINT"); + } + UpdateEntity(finishNotice); + throw new Exception("你已提交,请勿重复提交!"); + } deleteIds = this.GetEntities(t => t.IDENTIFY_EVALUATION_PLAN_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList(); deleteUserIds = this.GetEntities(t => deleteIds.Contains(t.IDENTIFY_EVALUATION_PLAN_DETAIL_ID), new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList(); if (details != null && details.Where(t => !t.IS_DELETED).Any())