Browse Source

更新版本

master
zhaoxinyu 11 months ago
parent
commit
935ba2e150
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  2. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  3. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  4. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -373,8 +373,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
itm.SetId(GuidGenerator.Create());
itm.BusinessType= inv.BusinessType;
if (itm.Qty > 0)
{
//if (itm.Qty > 0)
//{
bbaclist.Add(new BBAC_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
@ -396,7 +396,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode
));
}
//}
}
}
var entitys = bbaclist;//合并库存调整单和就发票可结算明细数据

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

@ -366,8 +366,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
itm.SetId(GuidGenerator.Create());
if (itm.Qty > 0)
{
//if (itm.Qty > 0)
//{
hbpolist.Add(new HBPO_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
@ -387,7 +387,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invbillnum: string.Empty,
partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode
));
}
//}
}
}
var entitys = hbpolist;//合并库存调整单和就发票可结算明细数据

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -305,8 +305,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
itm.SetId(GuidGenerator.Create());
if (itm.Qty > 0)
{
//if (itm.Qty > 0)
//{
var entity = new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
@ -338,7 +338,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
entity.SetProperty("PN", "");
entity.SetProperty("SettleDate", itm.SettleDate);
publist.Add(entity);
}
//}
}
}
else

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

@ -1,10 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.EntityFrameworkCore;
using NPOI.SS.Formula.Functions;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using Volo.Abp;
@ -532,6 +534,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
detail.Extend2 = itm.ErpLoc;//ERP库位
bbacDetail.Add(detail);
}
var main = invList.FirstOrDefault();
foreach (var itm in bbacDetail)
{
if (string.IsNullOrEmpty(itm.RELU))
@ -543,6 +548,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var relist = relationList.Where(p => p.BusinessType == itm.BusinessType).ToList();
var material = relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU);
itm.RELU = material.ErpMaterialCode;
itm.Site = main.Site;
}
}
await _repository.DbContext.BulkInsertAsync(bbacmainlist).ConfigureAwait(false);
@ -646,13 +652,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
entityList.AddRange(entityDetail);
}
var bbacmainlist = new List<HBPO_PD>();
var main = invList.FirstOrDefault();
foreach (var itm in invList)
{
var bbac = new HBPO_PD(
@ -706,7 +706,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
var relist = relationList.Where(p => p.BusinessType == itm.BusinessType).ToList();
var material = relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU);
itm.RELU = material.ErpMaterialCode;
itm.BusinessType = main.BusinessType;
itm.Site = main.Site;
}
}
await _repository.DbContext.BulkInsertAsync(bbacmainlist).ConfigureAwait(false);
@ -812,6 +813,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
entityList.AddRange(entityDetail);
}
var bbacmainlist = new List<PUB_PD>();
foreach (var itm in invList)
{
@ -868,6 +870,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var material = relist.FirstOrDefault(p => p.SettleMaterialCode.Replace(" ","") == itm.LU.Replace(" ", ""));
itm.RELU = material.ErpMaterialCode;
itm.BusinessType= main.BusinessType;
itm.Site = main.Site;
}
}
await _repository.DbContext.BulkInsertAsync(bbacmainlist);
@ -2208,6 +2211,17 @@ 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)
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>();
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>();//原本

Loading…
Cancel
Save