fix 处理已知问题
This commit is contained in:
@@ -227,7 +227,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
{
|
||||
await _dingTalkApi.SendWorkMessageAsync(new JinkoSendWorkMessageRequest
|
||||
{
|
||||
Content = $"{workGridInfo.WorkGrid.WorkGridName}的网格长,你好,检测到你网格中 {currentGainfo.Name}({currentGainfo.Code})今日未排班,但是有考勤记录,请前往系统处理!",
|
||||
Content = $"{workGridInfo.WorkGrid.WorkGridName}的网格长,你好,检测到你网格中 {currentGainfo.Name}({currentGainfo.Code}){request.RaiseDateTime.ToString("yyyy年MM月dd日")}未排班,但是有考勤记录,请前往系统处理!",
|
||||
WorkCodes = new List<string> { workGridInfo.WorkGrid.LeaderUserCode }
|
||||
});
|
||||
|
||||
|
||||
38
Src/Dlhis.ScheduledTask/Jobs/SendMsgToWorkGridLeaderJob.cs
Normal file
38
Src/Dlhis.ScheduledTask/Jobs/SendMsgToWorkGridLeaderJob.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Dlhis.Basic.Api;
|
||||
using Dlhis.Basic.Api.Requests;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.ScheduledTask.Attributes;
|
||||
|
||||
namespace Dlhis.ScheduledTask.Jobs;
|
||||
|
||||
/// <summary>
|
||||
/// 发送信息到网格长
|
||||
/// </summary>
|
||||
[RecurringJob(nameof(SendMsgToWorkGridLeaderJob), "0 0 18 * * ? ", Name = "发送信息到网格长")]
|
||||
public class SendMsgToWorkGridLeaderJob : BaseJob
|
||||
{
|
||||
public SendMsgToWorkGridLeaderJob(IServiceProvider serviceProvider) : base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
protected override async Task RunAsync(IServiceProvider serviceProvider)
|
||||
{
|
||||
//
|
||||
var infos = await DbContext.Queryable<WorkGridEntity>()
|
||||
.LeftJoin<GainfoEntity>((x, ga) => x.LeaderUserCode == ga.Code)
|
||||
.Select((x, ga) => new
|
||||
{
|
||||
x.LeaderUserCode,
|
||||
WorkGridName = x.Name,
|
||||
UserName = x.Name,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var dingtalkApi = serviceProvider.GetService<IDingTalkApi>();
|
||||
await dingtalkApi.SendWorkMessageAsync(new JinkoSendWorkMessageRequest
|
||||
{
|
||||
Content = "你好,网格长,请看到消息后,前往人脸应用平台,执行明天的排班,已排班的请忽略!",
|
||||
WorkCodes = infos.Select(x => x.LeaderUserCode).ToList()
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user