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);
foreach (var itm in dtos)
{
if(DateTime.Parse(itm.CreationTime) == DateTime.MinValue)
{
itm.CreationTime = string.Empty;
}
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
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;
//}
[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
select new VmiLog()
@ -236,16 +237,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
// 执行批量数据操作
if (ls != null && ls.Count > 0)
{
var messagelist = new List<VmiMessage>();
foreach (var item in ls)
{
var message = new VmiMessage
{
Message = System.Text.Json.JsonSerializer.Serialize(item),
};
messagelist.Add(message);
}
_dbcontext.BulkInsert(messagelist);
//var messagelist = new List<VmiMessage>();
//foreach (var item in ls)
//{
// var message = new VmiMessage
// {
// Message = System.Text.Json.JsonSerializer.Serialize(item),
// };
// messagelist.Add(message);
//}
// _dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(ls, new BulkConfig() { });
var billList = p_ls.Select(p => p.BillNum).Distinct().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;
}
@ -1180,6 +1180,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: readAmt
);
invbill.ClientCode = clientCode;
invbill.CreationTime = DateTime.MinValue;
invbill.Site = dtos.FirstOrDefault().Site;
invlist.Add(invbill);
}
@ -1481,7 +1482,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
invbill.ClientCode = clientCode;
invbill.Site = dtos.FirstOrDefault().Site;
invbill.CreationTime = DateTime.Now;
invbill.CreationTime =DateTime.MinValue;
invlist.Add(invbill);
i++;
}
@ -1828,7 +1829,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: realAmt
);
invbill.Site = dtos.FirstOrDefault().Site;
invbill.CreationTime = DateTime.Now;
invbill.CreationTime = DateTime.MinValue;
invlist.Add(invbill);
}
await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false);
@ -2045,7 +2046,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
);
invbill.Site = dtos.FirstOrDefault().Site;
invbill.ClientCode = clientCode;
invbill.CreationTime = DateTime.Now;
invbill.CreationTime = DateTime.MinValue;
invlist.Add(invbill);
}
await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false);
@ -2371,7 +2372,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt: realAmt
);
invbill.Site = "1049";
invbill.CreationTime = DateTime.Now;
invbill.CreationTime = DateTime.MinValue;
invbill.ClientCode = "C001";
invlist.Add(invbill);
}

Loading…
Cancel
Save