fix 代码调试
This commit is contained in:
@@ -105,14 +105,6 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
|
|
||||||
}, 5);
|
}, 5);
|
||||||
|
|
||||||
//更新餐补信息为成功(同步成功)
|
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
|
||||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Sucess)
|
|
||||||
.SetColumns(x => x.Sync == true)
|
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
|
||||||
.ExecuteCommandAsync();
|
|
||||||
|
|
||||||
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
||||||
{
|
{
|
||||||
new()
|
new()
|
||||||
@@ -123,8 +115,11 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//更新餐补信息为成功(同步成功)
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||||
.SetColumns(x => x.Result == r)
|
.SetColumns(x => x.Result == r)
|
||||||
|
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Sucess)
|
||||||
|
.SetColumns(x => x.Sync == true)
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
@@ -137,7 +132,7 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
|
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Error)
|
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Error)
|
||||||
.SetColumns(x => x.Result == ex.Message)
|
.SetColumns(x => x.Result == ex.Message + " " + ex.StackTrace)
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
@@ -154,21 +149,13 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
{
|
{
|
||||||
Code = mealSupplement.Code,
|
Code = mealSupplement.Code,
|
||||||
Amount = mealSupplement.Amount,
|
Amount = mealSupplement.Amount,
|
||||||
Date = mealSupplement.Date,
|
Date = mealSupplement.Date.Date,
|
||||||
Remark = mealSupplement.Remark,
|
Remark = mealSupplement.Remark,
|
||||||
UniqueId = mealSupplement.UniqueId,
|
UniqueId = mealSupplement.UniqueId,
|
||||||
});
|
});
|
||||||
|
|
||||||
(hnResponse == null || hnResponse.Code != 200).ThrowIfTrue("海宁餐补写入失败:" + hnResponse?.Message);
|
(hnResponse == null || hnResponse.Code != 200).ThrowIfTrue("海宁餐补写入失败:" + hnResponse?.Message);
|
||||||
|
|
||||||
//更新餐补信息为成功(同步成功)
|
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
|
||||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Sucess)
|
|
||||||
.SetColumns(x => x.Sync == true)
|
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
|
||||||
.ExecuteCommandAsync();
|
|
||||||
|
|
||||||
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
||||||
{
|
{
|
||||||
new()
|
new()
|
||||||
@@ -179,8 +166,11 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//更新餐补信息为成功(同步成功)
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||||
.SetColumns(x => x.Result == r)
|
.SetColumns(x => x.Result == r)
|
||||||
|
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Sucess)
|
||||||
|
.SetColumns(x => x.Sync == true)
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
@@ -193,7 +183,7 @@ public class MealSupplementHandlerJob : BaseJob
|
|||||||
|
|
||||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Error)
|
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Error)
|
||||||
.SetColumns(x => x.Result == ex.Message)
|
.SetColumns(x => x.Result == ex.Message + " " + ex.StackTrace)
|
||||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user