lvzb 1 year ago
parent
commit
dec2a9eb66
  1. 20
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

20
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

@ -6,6 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
@ -14,6 +15,7 @@ using WY.NewJit.PrintTable;
namespace WY.NewJit.MsgCheck namespace WY.NewJit.MsgCheck
{ {
[Dependency(Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton, ReplaceServices =true)]
public class BillNumberRecordDomainService : DomainService public class BillNumberRecordDomainService : DomainService
{ {
private readonly IRepository<BillNumberRecord, Guid> _billNumberRepository; private readonly IRepository<BillNumberRecord, Guid> _billNumberRepository;
@ -47,18 +49,18 @@ namespace WY.NewJit.MsgCheck
ObjectResultDto ret = new ObjectResultDto(true, null); ObjectResultDto ret = new ObjectResultDto(true, null);
if (isupdate) if (isupdate)
{ {
await _billNumberRepository.UpdateManyAsync(_billNumberRecordCaches); //await _billNumberRepository.UpdateManyAsync(_billNumberRecordCaches);
foreach (var item in _billNumberRecordCaches) foreach (var item in _billNumberRecordCaches)
{ {
var re = await _billNumberRepository.GetListAsync(r=>r.Id==item.Id); var re = await _billNumberRepository.GetListAsync(r=>r.Id==item.Id);
if (re.Count == 0) if (re.Count == 0)
{ {
await _billNumberRepository.InsertAsync(item); await _billNumberRepository.InsertAsync(item);
} }
else else
{ {
await _billNumberRepository.UpdateAsync(item); await _billNumberRepository.UpdateAsync(item);
} }
} }
} }
else else

Loading…
Cancel
Save