Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
32f9785ea0
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 23
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  3. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -367,6 +367,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var dtos = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_DTO>>(entitys); var dtos = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_DTO>>(entitys);
foreach (var itm in dtos) foreach (var itm in dtos)
{ {
if(DateTime.Parse(itm.CreationTime) == DateTime.MinValue)
{
itm.CreationTime = string.Empty;
}
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff; itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
} }
return new PagedResultDto<INVOICE_GRP_DTO>(totalCount, dtos); return new PagedResultDto<INVOICE_GRP_DTO>(totalCount, dtos);

23
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -197,7 +197,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
// return pageCount; // return pageCount;
//} //}
[UnitOfWork(false)] [UnitOfWork(false)]
public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType, string p_email, bool flag = true) where T : PD_BASE, new() public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType, string p_email, bool flag = true)
where T : PD_BASE, new()
{ {
var query = from itm in p_ls var query = from itm in p_ls
select new VmiLog() select new VmiLog()
@ -236,16 +237,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
// 执行批量数据操作 // 执行批量数据操作
if (ls != null && ls.Count > 0) if (ls != null && ls.Count > 0)
{ {
var messagelist = new List<VmiMessage>(); //var messagelist = new List<VmiMessage>();
foreach (var item in ls) //foreach (var item in ls)
{ //{
var message = new VmiMessage // var message = new VmiMessage
{ // {
Message = System.Text.Json.JsonSerializer.Serialize(item), // Message = System.Text.Json.JsonSerializer.Serialize(item),
}; // };
messagelist.Add(message); // messagelist.Add(message);
} //}
_dbcontext.BulkInsert(messagelist); // _dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(ls, new BulkConfig() { }); _dbcontext.BulkInsert(ls, new BulkConfig() { });
var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();//同步数据的发票号 var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();//同步数据的发票号
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容 var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -123,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return false; return false;
} }
return false; // return false;
} }
@ -1180,6 +1180,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: readAmt realAmt: readAmt
); );
invbill.ClientCode = clientCode; invbill.ClientCode = clientCode;
invbill.CreationTime = DateTime.MinValue;
invbill.Site = dtos.FirstOrDefault().Site; invbill.Site = dtos.FirstOrDefault().Site;
invlist.Add(invbill); invlist.Add(invbill);
} }
@ -1481,7 +1482,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
invbill.ClientCode = clientCode; invbill.ClientCode = clientCode;
invbill.Site = dtos.FirstOrDefault().Site; invbill.Site = dtos.FirstOrDefault().Site;
invbill.CreationTime = DateTime.Now; invbill.CreationTime =DateTime.MinValue;
invlist.Add(invbill); invlist.Add(invbill);
i++; i++;
} }
@ -1828,7 +1829,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: realAmt realAmt: realAmt
); );
invbill.Site = dtos.FirstOrDefault().Site; invbill.Site = dtos.FirstOrDefault().Site;
invbill.CreationTime = DateTime.Now; invbill.CreationTime = DateTime.MinValue;
invlist.Add(invbill); invlist.Add(invbill);
} }
await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false); await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false);
@ -2045,7 +2046,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
); );
invbill.Site = dtos.FirstOrDefault().Site; invbill.Site = dtos.FirstOrDefault().Site;
invbill.ClientCode = clientCode; invbill.ClientCode = clientCode;
invbill.CreationTime = DateTime.Now; invbill.CreationTime = DateTime.MinValue;
invlist.Add(invbill); invlist.Add(invbill);
} }
await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false); await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false);
@ -2371,7 +2372,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: realAmt realAmt: realAmt
); );
invbill.Site = "1049"; invbill.Site = "1049";
invbill.CreationTime = DateTime.Now; invbill.CreationTime = DateTime.MinValue;
invbill.ClientCode = "C001"; invbill.ClientCode = "C001";
invlist.Add(invbill); invlist.Add(invbill);
} }

Loading…
Cancel
Save