From 2a35d4efe338282214ae67c92303a04664e7cea4 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 21 May 2025 08:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APT.PP.WebApi/Controllers/Api/BIController.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/BIController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/BIController.cs index eef9e61..5dfa60f 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/BIController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/BIController.cs @@ -267,6 +267,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI { TencentSendSMS tencentSendSMS = new TencentSendSMS(); string PhoneText = string.Empty; + DateTime now = DateTime.Now; if (!string.IsNullOrEmpty(filter.Parameter1)) { PhoneText = filter.Parameter1; @@ -277,6 +278,14 @@ namespace APT.SC.WebApi.Controllers.Api.BI var result3 = tencentSendSMS.sendSMS("2428708", new string[] { PhoneText }, null); if (result2.SendStatusSet[0].Code.Equals("Ok")) { + var task = GetEntity(filter.Keyword); + task.CURR_TASK_START_TIME = now;//上次同步结束时间 + task.UPDATE_SUCCES_TIME = now;//上次同步结束时间 + task.SYNC_PARAM = "";//清空参数 + if (task != null) + { + UpdateEntityNoCommit(task); + } return true; } else @@ -286,14 +295,13 @@ namespace APT.SC.WebApi.Controllers.Api.BI } else { - DateTime now = DateTime.Now; var allUsers = GetEntities(t => t.ENABLE_STATUS == 0, new BaseFilter(filter.GetOrgId())); var approveUsers = GetEntities(t => t.Nav_Department.DEPARTMENT_TYPE != 2 && t.ENABLE_STATUS == 0, new BaseFilter(filter.GetOrgId())); var userIds = approveUsers.Select(t => t.ID); List sendSMSs = null; if (now.Hour >= 7 && now.Hour < 20) { - sendSMSs = GetEntities(t => t.NOTICE_STATUS == 0 && t.TASK_ENDDT >= now && t.CREATE_TIME > now.AddDays(-12) && !t.SOURCE_FORMCODE.Contains("FO005") && t.SENDTIME == DateTime.MinValue, new BaseFilter(filter.GetOrgId())).ToList();//未超期的进行提醒 + sendSMSs = GetEntities(t => t.NOTICE_STATUS == 0 && t.TASK_ENDDT >= now && t.CREATE_TIME > now.AddDays(-10) && !t.SOURCE_FORMCODE.Contains("FO005") && t.SENDTIME == DateTime.MinValue, new BaseFilter(filter.GetOrgId())).ToList();//未超期的进行提醒 var sendSMSs2 = sendSMSs.Where(t => t.TASK_ENDDT < now.AddHours(1) && t.TASK_ENDDT > t.TASK_STARTDT); foreach (var send in sendSMSs2)//1个小时以内 临超时提醒 {