|
|
@ -8,6 +8,7 @@ using SettleAccount.Domain.BQ; |
|
|
|
using TaskJob.EventArgs; |
|
|
|
using TaskJob.Interfaces; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.Emailing; |
|
|
|
using Volo.Abp.Uow; |
|
|
@ -224,7 +225,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
//SubBillType = EnumDeliverSubBillType.小件BBAC,
|
|
|
|
//BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
CustPartCode = itm.LU, |
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
SettlementVinCode = inv.InvbillNum, |
|
|
|
DeliverBillType = bussinessType, |
|
|
|
VinCode = itm.PN, |
|
|
|
OrderNum = itm.GroupNum, |
|
|
@ -287,6 +288,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容
|
|
|
|
var pdinvList = _dbcontext.Set<INVOICE_GRP>().Where(p => billList.Contains(p.InvbillNum)).ToList(); |
|
|
|
var pddetail = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => billList.Contains(p.BillNum)).ToList(); |
|
|
|
|
|
|
|
var erploc= ls.FirstOrDefault().ErpToLoc; |
|
|
|
if (pdList.Count > 0) |
|
|
|
{ |
|
|
|
if (flag == true) |
|
|
@ -297,6 +300,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in pdinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
item.State = SettleBillState.已扣减; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(pdList); |
|
|
@ -310,6 +314,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in pdinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
if (item.State == SettleBillState.已提交QAD) |
|
|
|
{ |
|
|
|
item.State = SettleBillState.红冲发票; |
|
|
@ -337,6 +342,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in bbacinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
item.State = SettleBillState.已扣减; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(bbacList); |
|
|
@ -350,6 +356,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in bbacinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
|
|
|
|
if (item.State == SettleBillState.已提交QAD) |
|
|
|
{ |
|
|
|
item.State = SettleBillState.红冲发票; |
|
|
@ -377,6 +385,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in hbpoinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
item.State = SettleBillState.已扣减; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(hbpoList); |
|
|
@ -390,6 +399,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
foreach (var item in hbpoinvList) |
|
|
|
{ |
|
|
|
item.SetProperty("ErpToLoc", erploc); |
|
|
|
if (item.State == SettleBillState.已提交QAD) |
|
|
|
{ |
|
|
|
item.State = SettleBillState.红冲发票; |
|
|
|