|
@ -32,9 +32,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public partial class INV_MNG : DomainService |
|
|
public partial class INV_MNG : DomainService |
|
|
{ |
|
|
{ |
|
|
//private readonly INormalEfCoreRepository<TCAN_SA, Guid> _canRepository;
|
|
|
//private readonly INormalEfCoreRepository<TCAN_SA, Guid> _canRepository;
|
|
@ -380,9 +377,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
/// <returns></returns>
|
|
|
/// <returns></returns>
|
|
|
public virtual async Task<bool> ReceivedAsync(List<string> p_invs) |
|
|
public virtual async Task<bool> ReceivedAsync(List<string> p_invs) |
|
|
{ |
|
|
{ |
|
|
var relationList=_relationRepository.ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var relationList=_relationRepository.ToList(); |
|
|
var invList = _repository.Where(p => p_invs.Contains(p.InvbillNum)).ToList();//所有提交发票信息
|
|
|
var invList = _repository.Where(p => p_invs.Contains(p.InvbillNum)).ToList();//所有提交发票信息
|
|
|
int count = invList.Select(p => p.InvGroupNum).Distinct().Count(); |
|
|
int count = invList.Select(p => p.InvGroupNum).Distinct().Count(); |
|
|
if (count > 1) |
|
|
if (count > 1) |
|
@ -502,7 +499,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
state: SettleBillState.客户已收票, |
|
|
state: SettleBillState.客户已收票, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
site: itm.Site |
|
|
site: itm.Site, |
|
|
|
|
|
enumBusinessType:itm.BusinessType |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
); |
|
@ -665,7 +663,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
state: SettleBillState.客户已收票, |
|
|
state: SettleBillState.客户已收票, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
site: itm.Site |
|
|
site: itm.Site, |
|
|
|
|
|
enumBusinessType:itm.BusinessType |
|
|
); |
|
|
); |
|
|
bbac.SetBusinessType(itm.BusinessType); |
|
|
bbac.SetBusinessType(itm.BusinessType); |
|
|
bbacmainlist.Add(bbac); |
|
|
bbacmainlist.Add(bbac); |
|
@ -829,7 +828,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
settleBillNum: itm.InvGroupNum, |
|
|
state: SettleBillState.客户已收票, |
|
|
state: SettleBillState.客户已收票, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
invGroupNum: itm.InvGroupNum, |
|
|
site: itm.Site |
|
|
site: itm.Site, |
|
|
|
|
|
enumBusinessType:itm.BusinessType |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
); |
|
@ -1295,13 +1295,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
invoiceGroupNumList.Add(itm.Key); |
|
|
invoiceGroupNumList.Add(itm.Key); |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
//var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
|
|
|
|
|
|
//luList.AddRange(grouplist);
|
|
|
|
|
|
//luList = luList.Distinct().ToList();
|
|
|
|
|
|
//if (luList.Count > 20)//累加零件不超过20种
|
|
|
|
|
|
//{
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
//}
|
|
|
|
|
|
sum += _itm1.Value; |
|
|
sum += _itm1.Value; |
|
|
if (sum > 10000000) |
|
|
if (sum > 10000000) |
|
|
{ |
|
|
{ |
|
@ -1330,13 +1324,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
{ |
|
|
{ |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
//var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
|
|
|
|
|
|
//luList.AddRange(grouplist);
|
|
|
|
|
|
//luList = luList.Distinct().ToList();
|
|
|
|
|
|
//if (luList.Count > 20)//累加零件不超过20种
|
|
|
|
|
|
//{
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
//}
|
|
|
|
|
|
sum += _itm1.Value; |
|
|
sum += _itm1.Value; |
|
|
if (sum > 10000000) |
|
|
if (sum > 10000000) |
|
|
{ |
|
|
{ |
|
@ -2218,17 +2206,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
public async Task<List<string>> BJInvoice<TDetail>(List<TDetail> p_list, List<PUB_ADJ_DETAIL> p_adjlist, List<TEMP_CAN_SA_DETAIL> dtos, List<TEMP_NOT_SA_DETAIL> p_notlist, int p_version, string p_InvGroupNum, string p_parentInvBillNum, EnumBusinessType businessType, bool p_first = true) |
|
|
public async Task<List<string>> BJInvoice<TDetail>(List<TDetail> p_list, List<PUB_ADJ_DETAIL> p_adjlist, List<TEMP_CAN_SA_DETAIL> dtos, List<TEMP_NOT_SA_DETAIL> p_notlist, int p_version, string p_InvGroupNum, string p_parentInvBillNum, EnumBusinessType businessType, bool p_first = true) |
|
|
where TDetail : SA_CAN_BASE |
|
|
where TDetail : SA_CAN_BASE |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
foreach (var itm in p_list) |
|
|
|
|
|
{ |
|
|
|
|
|
if (itm.Qty < 0) |
|
|
|
|
|
{ |
|
|
|
|
|
var str = itm.PartCode; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<string> _invls = new List<string>(); |
|
|
List<string> _invls = new List<string>(); |
|
|
var _query = dtos.GroupBy(p => new { p.GroupNum }).Select(p => new { GroupNum = p.Key.GroupNum, Amt = p.Sum(itm => itm.Amt) }); |
|
|
var _query = dtos.GroupBy(p => new { p.GroupNum }).Select(p => new { GroupNum = p.Key.GroupNum, Amt = p.Sum(itm => itm.Amt) }); |
|
|
Dictionary<string, decimal> dic = new Dictionary<string, decimal>();//原本
|
|
|
Dictionary<string, decimal> dic = new Dictionary<string, decimal>();//原本
|
|
|