|
@ -38,6 +38,7 @@ using Win.Sfs.SettleAccount.CommonManagers; |
|
|
using Win.Sfs.SettleAccount.Constant; |
|
|
using Win.Sfs.SettleAccount.Constant; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Managers; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Managers; |
|
|
|
|
|
using Win.Sfs.SettleAccount.Entities.CodeSettings; |
|
|
using Win.Sfs.SettleAccount.Entities.Invoices; |
|
|
using Win.Sfs.SettleAccount.Entities.Invoices; |
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
|
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
|
@ -319,6 +320,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
|
private async Task CreatePubTaskAsync(List<string> invoiceGrps) |
|
|
private async Task CreatePubTaskAsync(List<string> invoiceGrps) |
|
|
{ |
|
|
{ |
|
|
|
|
|
var codelist = _settleAccountDbContext.Set<CodeSetting>().Where(p => p.Project == "库位").ToList(); |
|
|
|
|
|
var zg1 = codelist.Where(p => p.Value == "ZhiGongJianBBAC").FirstOrDefault().Description; |
|
|
|
|
|
var zg2 = codelist.Where(p => p.Value == "ZhiGongJianBBAC顺义").FirstOrDefault().Description; |
|
|
|
|
|
|
|
|
|
|
|
var bj = codelist.Where(p => p.Value == "BeiJian").FirstOrDefault().Description; |
|
|
|
|
|
var yindu = codelist.Where(p => p.Value == "YinDuJian").FirstOrDefault().Description; |
|
|
|
|
|
var zgh = codelist.Where(p => p.Value == "ZhiGongJianHBPO").FirstOrDefault().Description; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 对发票组进行处理
|
|
|
// 对发票组进行处理
|
|
|
foreach (var itm in invoiceGrps) |
|
|
foreach (var itm in invoiceGrps) |
|
|
{ |
|
|
{ |
|
@ -350,23 +360,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
case EnumBusinessType.YinDuJian: |
|
|
case EnumBusinessType.YinDuJian: |
|
|
itm1.ErpLoc = $"CC001"; |
|
|
itm1.ErpLoc = yindu; |
|
|
break; |
|
|
break; |
|
|
case EnumBusinessType.BeiJian: |
|
|
case EnumBusinessType.BeiJian: |
|
|
itm1.ErpLoc = $"CC005"; |
|
|
itm1.ErpLoc = bj; |
|
|
break; |
|
|
break; |
|
|
case EnumBusinessType.ZhiGongJianBBAC: |
|
|
case EnumBusinessType.ZhiGongJianBBAC: |
|
|
if (site == "1046") |
|
|
if (site == "1046") |
|
|
{ |
|
|
{ |
|
|
itm1.ErpLoc = "CC171"; |
|
|
itm1.ErpLoc = zg2; |
|
|
} |
|
|
} |
|
|
if (site == "1040") |
|
|
if (site == "1040") |
|
|
{ |
|
|
{ |
|
|
itm1.ErpLoc = "CC001"; |
|
|
itm1.ErpLoc = zg1; |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case EnumBusinessType.ZhiGongJianHBPO: |
|
|
case EnumBusinessType.ZhiGongJianHBPO: |
|
|
itm1.ErpLoc = $"CC004"; |
|
|
itm1.ErpLoc = zgh; |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
itm1.ErpLoc = $"C{invoice.ClientCode}"; |
|
|
itm1.ErpLoc = $"C{invoice.ClientCode}"; |
|
|