Commit 6c6db09c by 纪旭 韦

加载上月代码优化

parent 84971c18
using FluentScheduler;
using Microsoft.Extensions.Logging;
using Performance.DtoModels;
using Performance.Infrastructure;
using Performance.Repository;
using Performance.Services;
......@@ -50,7 +51,7 @@ public void Execute()
if (needSyncData != null && needSyncData.Any())
{
foreach (var item in needSyncData)
configService.CopyCommand(item, prevAllot.ID, true);
configService.NewCopy(new CopyRequest() { AllotId = item.ID, Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department" } });
}
var noModify = allots.FirstOrDefault(w => ConvertHelper.To<DateTime>($"{w.Year}-{w.Month}") < date && w.IsModifyConfig == 0);
......
......@@ -739,21 +739,7 @@ public ApiResponse BatchSaveAccounting(int allotId, SaveCollectData request)
public void Copy(per_allot allot)
{
var prevAllotId = _perforPerAllotRepository.GetPrevAllot(allot);
CopyCommand(allot, prevAllotId);
}
public void CopyCommand(per_allot allot, int prevAllotId, bool delHistotyData = false)
{
_personService.CreateAllotPersons(allot.HospitalId, allot.ID, prevAllotId);
_copyService.Copy_WorkItems(allot, prevAllotId, delHistotyData);
_copyService.Copy_DrugTypes(allot, prevAllotId, delHistotyData);
_copyService.Copy_DrugTypeDisburses(allot, prevAllotId, delHistotyData);
_copyService.Copy_DrugTypeFactors(allot, prevAllotId, delHistotyData);
_copyService.Copy_DeptTypes(allot, prevAllotId, delHistotyData);
_copyService.Copy_Agains(allot, prevAllotId, delHistotyData);
_copyService.Copy_Accountings(allot, prevAllotId, delHistotyData);
_copyService.Copy_DeptDic(allot, prevAllotId, delHistotyData);
NewCopy(new CopyRequest() { AllotId = allot.ID, Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department" } });
}
//todo:新copy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment