From f1c0e5c826848fad2602a45cabdcecd021e287bf Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 27 Mar 2024 14:53:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8F=90=E4=BA=A4=E8=81=94=E8=B0=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonJobs/MealSupplementHandlerJob.cs | 39 +++++++++++-------- .../Services/Implements/JinkoJIPService.cs | 2 +- Src/Dlhis.ScheduledTask/appsettings.json | 6 +-- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs b/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs index 4a2aa78a..bc0e11c7 100644 --- a/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs +++ b/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs @@ -40,27 +40,32 @@ public class MealSupplementHandlerJob //档案不存在 if (gainfo == null) { - _logger.LogWarning("档案code:{code}不存在.flowno:{flowno}", item.Code, item.UniqueId); - continue; + //todo + //_logger.LogWarning("档案code:{code}不存在.flowno:{flowno}", item.Code, item.UniqueId); + //continue; + + gainfo = new GainfoEntity() { No = Guid.NewGuid().ToString() }; } else { - mealUser = await _dbContext.Queryable().Where(x => x.UserNo == gainfo.No).SingleAsync(); - if (mealUser == null) - { - mealUser = new GainfoMealEntity - { - Balance = 0, - BalanceOfRecharge = 0, - BalanceOfSubsidies = 0, - UserNo = gainfo.No, - UserCode = gainfo.Code, - Version = 0, - TenantId = gainfo.Factory, - }; + + } - await _dbContext.InsertAsync(mealUser); - } + mealUser = await _dbContext.Queryable().Where(x => x.UserNo == gainfo.No).SingleAsync(); + if (mealUser == null) + { + mealUser = new GainfoMealEntity + { + Balance = 0, + BalanceOfRecharge = 0, + BalanceOfSubsidies = 0, + UserNo = gainfo.No, + UserCode = gainfo.Code, + Version = 0, + TenantId = gainfo.Factory, + }; + + await _dbContext.InsertAsync(mealUser); } await SetMealSupplementAsync(mealUser, item); diff --git a/Src/Dlhis.ScheduledTask/SyncSapInfo/Services/Implements/JinkoJIPService.cs b/Src/Dlhis.ScheduledTask/SyncSapInfo/Services/Implements/JinkoJIPService.cs index 1142885d..0b9d512f 100644 --- a/Src/Dlhis.ScheduledTask/SyncSapInfo/Services/Implements/JinkoJIPService.cs +++ b/Src/Dlhis.ScheduledTask/SyncSapInfo/Services/Implements/JinkoJIPService.cs @@ -58,7 +58,7 @@ public class JinkoJIPService : IJinkoJIPService public async Task SyncMealSupplementRecordsAsync(List requests) { - var requestUrl = "/JIP/DHR/DHR_DL_CALLBACK"; + var requestUrl = "/JIP/DHR/DHR_DL_CALLBACK_UAT"; var json = requests.ToJson(); diff --git a/Src/Dlhis.ScheduledTask/appsettings.json b/Src/Dlhis.ScheduledTask/appsettings.json index 354708ae..92cb3b23 100644 --- a/Src/Dlhis.ScheduledTask/appsettings.json +++ b/Src/Dlhis.ScheduledTask/appsettings.json @@ -52,9 +52,9 @@ }, "JinkoOptions": { "Jip": { - "BaseUrl": "http://jip.jinkosolar.com", - "Key": "FACE-CUOJG9N7", - "Secret": "130c2f2d-03a0-4720-8e25-538ffac7a7cb" + "BaseUrl": "http://172.16.202.34:8000", + "Key": "FACE-7409WIBX", + "Secret": "be0a4b88-cd80-4509-b9b9-865205d0d3d8" } }, "RedisOptions": {