diff --git a/Src/Dlhis.Entity/Canteen/Enums/CanteenApplicaitonTypeEnumType.cs b/Src/Dlhis.Entity/Canteen/Enums/CanteenApplicaitonTypeEnumType.cs
index 00dcd22a..f7c9ce2e 100644
--- a/Src/Dlhis.Entity/Canteen/Enums/CanteenApplicaitonTypeEnumType.cs
+++ b/Src/Dlhis.Entity/Canteen/Enums/CanteenApplicaitonTypeEnumType.cs
@@ -22,4 +22,10 @@ public enum CanteenApplicaitonTypeEnumType
///
[Description("扫码点餐")]
QrCode = 300,
+
+ ///
+ /// 餐补发放
+ ///
+ [Description("餐补发放")]
+ MealSupplement = 400
}
diff --git a/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs b/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs
index 9b9cc18c..a76882b1 100644
--- a/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs
+++ b/Src/Dlhis.Entity/Device/Enums/DeviceTaskStatusEnumType.cs
@@ -26,6 +26,12 @@ public enum DeviceTaskStatusEnumType
[Description("下发完成")]
Success = 10,
+ ///
+ /// 人脸照片不存在
+ ///
+ [Description("人脸照片不存在")]
+ FaceNotFound = 20,
+
///
/// 取消
diff --git a/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs b/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
index ff507825..a6aa2520 100644
--- a/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
+++ b/Src/Dlhis.ScheduledTask/Jobs/MealSupplementHandlerJob.cs
@@ -3,9 +3,11 @@ using Dlhis.Canteen.Api.Request;
using Dlhis.Entity.Basic.Entity;
using Dlhis.Entity.Basic.Enums;
using Dlhis.Entity.Canteen.Entities;
+using Dlhis.Entity.Canteen.Enums;
using Dlhis.ScheduledTask.SyncSapInfo;
using Dlhis.ScheduledTask.SyncSapInfo.Services;
using Kurisu.AspNetCore.UnifyResultAndValidation;
+using Kurisu.AspNetCore.Utils;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.Scheduled;
using Kurisu.Scheduled.Attributes;
@@ -22,7 +24,9 @@ public class MealSupplementHandlerJob : BaseJob
private readonly IHainingMealSupplementApi _hainingMealSupplementApi;
private readonly IJinkoJIPService _jinkoJIPService;
- public MealSupplementHandlerJob(IServiceProvider serviceProvider, IHainingMealSupplementApi hainingMealSupplementApi, IJinkoJIPService jinkoJIPService) : base(serviceProvider)
+ public MealSupplementHandlerJob(IServiceProvider serviceProvider,
+ IHainingMealSupplementApi hainingMealSupplementApi,
+ IJinkoJIPService jinkoJIPService) : base(serviceProvider)
{
_hainingMealSupplementApi = hainingMealSupplementApi;
_jinkoJIPService = jinkoJIPService;
@@ -78,12 +82,12 @@ public class MealSupplementHandlerJob : BaseJob
}
else
{
- await SetMealSupplementAsync(item);
+ await SetMealSupplementAsync(gainfo, item);
}
}
}
- private async Task SetMealSupplementAsync(MealSupplementRecordEntity mealSupplement)
+ private async Task SetMealSupplementAsync(GainfoEntity gainfo, MealSupplementRecordEntity mealSupplement)
{
await DbContext.Client.Ado.BeginTranAsync();
try
@@ -125,6 +129,40 @@ public class MealSupplementHandlerJob : BaseJob
.Where(x => x.UniqueId == mealSupplement.UniqueId)
.ExecuteCommandAsync();
+ await DbContext.InsertAsync(new BalanceRecordEntity
+ {
+ Amount = mealSupplement.Amount,
+ //ApplicationType = CanteenApplicaitonTypeEnumType.
+ Type = BalanceRecordTypeEnumType.In,
+ BusinessPlaceCode = null,
+ BusinessShiftCode = null,
+ ShiftType = null,
+ CostDate = mealSupplement.Date,
+ CostDateTime = DateTime.Now,
+ UserNo = gainfo.No,
+ No = SnowFlakeHelper.Instance.NextId().ToString(),
+ UserCode = gainfo.Code,
+ TenantId = mealSupplement.Factory,
+ Status = BalanceRecordStatusEnumType.Valid,
+ Source = BalanceRecordSourceEnumType.LocalTenantSubsidies,
+ Remark = gainfo.Remark,
+ CostId = gainfo.CostId,
+ SubsidiesFromMonth = mealSupplement.Date.ToString("yyyyMM"),
+ OriginTenantId = gainfo.Factory,
+ Name = gainfo.Name,
+ IsCostCrossTenant = false,
+ ApplicationType = CanteenApplicaitonTypeEnumType.MealSupplement,
+ DepartmentNo = gainfo.DepartmentNo,
+ DeviceUniqueNo = null,
+
+ IsDeleted = false,
+
+ CreatedBy = 1,
+ CreateTime = DateTime.Now,
+ ModifiedBy = 1,
+ ModifiedTime = DateTime.Now,
+ });
+
await DbContext.Client.Ado.CommitTranAsync();
}
catch (Exception ex)