Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
5da6dcf3c5
  1. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs
  3. 82
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  4. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  5. 81
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  6. 19
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  7. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

57
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -231,6 +231,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public List<PUB_ADJ_DETAIL_DTO> ADJ_DETAIL { get; set; }
}
public class INVOICE_WAIT_DETAIL_DTO
@ -242,6 +245,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "金税发票号")]
public string RealInvbillNum { get; set; }
[Display(Name = "发票日期")]
public DateTime? InvDate { set; get; }
/// <summary>
///发票号
/// </summary>
@ -264,8 +275,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "零件号")]
public string PartCode { get; set; }
/// <summary>
///单价
/// </summary>
@ -314,6 +323,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class INVOICE_WAIT_DETAIL_REQ_DTO : RequestInputBase
{
[Display(Name = "金税发票")]
public string RealInvBillNum { get; set; }
[Display(Name = "发票号")]
public string InvbillNum { get; set; }
[Display(Name = "发票分组号")]
@ -327,11 +339,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "金税发票")]
public string RealInvBillNum { get; set; }
[Display(Name = "发票日期")]
public DateTime? InvDate { set; get; }
/// <summary>
///发票号
/// </summary>
@ -420,6 +435,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class INVOICE_NOT_SETTLE_DTO
{
[Display(Name = "金税发票")]
public string RealInvBillNum { get; set; }
[Display(Name = "发票日期")]
public DateTime? InvDate { set; get; }
[Display(Name = "发票号")]
public string InvBillNum { get; set; }
@ -438,6 +458,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
[Display(Name = "数量")]
public string Qty { get; set; }
/// <summary>
///不可结算零件号
/// </summary>
@ -445,26 +468,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string Extend1 { get; set; }
//[Display(Name = "不可结算零件号")]
//public string LU1 { get; set; }
///// <summary>
/////扩展字段1
///// </summary>
//[Display(Name = "扩展字段1")]
//public string Extend1 { get; set; }
///// <summary>
/////扩展字段2
///// </summary>
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
[Display(Name = "不可结算零件号",AutoGenerateField =false)]
public Dictionary<string, object> ExtraProperties { get; set; }
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_ADJ_DETAIL_DTO.cs

@ -14,6 +14,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos;
public class PUB_ADJ_DETAIL_DTO : EntityDto<Guid>
{
[Display(Name = "金税发票")]
public string RealInvBillNum { get; set; }
///// <summary>
/////作废发票号
///// </summary>

82
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -1,6 +1,7 @@
using CodeArts.Db.Lts;
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Charts;
using DocumentFormat.OpenXml.Wordprocessing;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
@ -147,18 +148,91 @@ namespace Win.Sfs.SettleAccount.Bases
{
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO();
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var w = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var wdtos = ObjectMapper.Map<List<INVOICE_WAIT_DETAIL>, List<INVOICE_WAIT_DETAIL_DTO>>(w);
var s = await _sRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var sdtos = ObjectMapper.Map<List<INVOICE_NOT_SETTLE>, List<INVOICE_NOT_SETTLE_DTO>>(s);
var notquery = from itm in sdtos
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum
select
new INVOICE_NOT_SETTLE_DTO()
{
InvDate = itm1.CreationTime,
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvBillNum = itm.InvBillNum,
InvGroupNum = itm.InvGroupNum,
SettleGroupNum = itm.SettleGroupNum,
LU = itm.LU,
Qty = itm.Qty,
Extend1 = itm.Extend1,
};
var wquery = from itm in wdtos
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum
select
new INVOICE_WAIT_DETAIL_DTO()
{
InvDate = itm1.CreationTime,
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
Version = itm.Version,
InvbillNum = itm.InvbillNum,
InvGroupNum = itm.InvGroupNum,
LU = itm.LU,
PartCode = itm.PartCode,
PRICE = itm.PRICE,
Qty = itm.Qty,
Amt = itm.Amt,
BussiessType = itm.BussiessType,
Extend1 = itm.Extend1,
BeginDate = itm.BeginDate,
EndDate = itm.EndDate,
};
var mquery = from itm in mdtos
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum
select
new INVOICE_MAP_GROUP_DTO()
{
InvDate = itm1.CreationTime,
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvbillNum = itm.InvbillNum,
InvGroupNum = itm.InvGroupNum,
SettleGroupNum = itm.SettleGroupNum
};
var adjs = await _adjRepository.GetListByFilterAsync(input.Filters);
var adjdtos = ObjectMapper.Map<List<PUB_ADJ_DETAIL>, List<PUB_ADJ_DETAIL_DTO>>(adjs);
entity.INVOICE_NOT_SETTLE = sdtos;
entity.INVOICE_WAIT_DETAIL = wdtos;
entity.INVOICE_MAP_GROUP = mdtos;
entity.ADJ_DETAIL = adjdtos;
var adjQuery = from itm in adjdtos
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum
select
new PUB_ADJ_DETAIL_DTO()
{
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvBillNum = itm.InvBillNum,
SettleDate = itm.SettleDate,
LU = itm.LU,
PN = itm.PN,
Qty = itm.Qty,
GroupNum = itm.GroupNum,
KeyCode = itm.KeyCode,
Price = itm.Price
};
entity.INVOICE_NOT_SETTLE = notquery.ToList();
entity.INVOICE_WAIT_DETAIL = wquery.ToList();
entity.INVOICE_MAP_GROUP = mquery.ToList();
entity.ADJ_DETAIL = adjQuery.ToList();
return entity;
}
/// <summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs

@ -77,17 +77,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//[Route("generateinvoice")]
public async override Task<IActionResult> GenerateInvoice([FromBody] string invbillnum)
{
var main =await _hbpoMng.GetMainAsync(invbillnum);
if (main != null)
{
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _hbpoMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _hbpoMng.GetDetalListAsync(invbillnum);

81
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -20,6 +20,7 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
@ -138,7 +139,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input)
{
INVOICE_GRP_DETAIL_DTO _entity = new INVOICE_GRP_DETAIL_DTO();
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO();
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var w = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
@ -147,11 +153,74 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var sdtos = ObjectMapper.Map<List<INVOICE_NOT_SETTLE>, List<INVOICE_NOT_SETTLE_DTO>>(s);
var adjs =await _adjRepository.GetListByFilterAsync(input.Filters);
var adjdtos = ObjectMapper.Map<List<PUB_ADJ_DETAIL>, List<PUB_ADJ_DETAIL_DTO>>(adjs);
_entity.INVOICE_NOT_SETTLE = sdtos;
_entity.INVOICE_WAIT_DETAIL = wdtos;
_entity.INVOICE_MAP_GROUP = mdtos;
_entity.ADJ_DETAIL = adjdtos;
return _entity;
var notquery = from itm in sdtos
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum
select
new INVOICE_NOT_SETTLE_DTO()
{
InvDate = itm1.CreationTime,
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvBillNum = itm.InvBillNum,
InvGroupNum = itm.InvGroupNum,
SettleGroupNum = itm.SettleGroupNum,
LU = itm.LU,
Qty = itm.Qty,
Extend1 = itm.Extend1,
};
var wquery = from itm in wdtos
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum
select
new INVOICE_WAIT_DETAIL_DTO()
{
InvDate = itm1.CreationTime,
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
Version = itm.Version,
InvbillNum = itm.InvbillNum,
InvGroupNum = itm.InvGroupNum,
LU = itm.LU,
PartCode = itm.PartCode,
PRICE = itm.PRICE,
Qty = itm.Qty,
Amt = itm.Amt,
BussiessType = itm.BussiessType,
Extend1 = itm.Extend1,
BeginDate = itm.BeginDate,
EndDate = itm.EndDate,
};
var mquery = from itm in mdtos
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum
select
new INVOICE_MAP_GROUP_DTO()
{
InvDate = itm1.CreationTime,
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvbillNum = itm.InvbillNum,
InvGroupNum = itm.InvGroupNum,
SettleGroupNum = itm.SettleGroupNum
};
var adjQuery = from itm in adjdtos
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum
select
new PUB_ADJ_DETAIL_DTO()
{
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum,
InvBillNum = itm.InvBillNum,
SettleDate = itm.SettleDate,
LU = itm.LU,
PN = itm.PN,
Qty = itm.Qty,
GroupNum = itm.GroupNum,
KeyCode = itm.KeyCode,
Price = itm.Price
};
entity.INVOICE_NOT_SETTLE = notquery.ToList();
entity.INVOICE_WAIT_DETAIL = wquery.ToList();
entity.INVOICE_MAP_GROUP = mquery.ToList();
entity.ADJ_DETAIL = adjQuery.ToList();
return entity;
}

19
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -101,8 +101,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
var query = from itm in p_ls
select new VmiLog()
{
{
CodeType=string.Empty,
BillTime = DateTime.Now,
ChangedTime = DateTime.Now,
@ -120,7 +119,6 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = string.IsNullOrEmpty(itm.Extend2)?"CC001":itm.Extend2, //寄售库
};
var ls = query.ToList();
var _first= p_ls.FirstOrDefault();
@ -154,21 +152,6 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
throw;
}
}
;
}

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

@ -1444,6 +1444,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
clientCode: string.Empty,
realAmt: 0
);
invbill.CreationTime = DateTime.Now;
invlist.Add(invbill);
}
@ -1453,7 +1454,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _repository.DbContext.BulkUpdateAsync(salist,new BulkConfig() { BatchSize=10000 });
}
await _repository.DbContext.BulkInsertAsync(invlist);
await _repository.DbContext.BulkInsertAsync(groupList);
await _repository.DbContext.BulkInsertAsync(detailList);
@ -1686,6 +1686,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
realAmt:0
);
invbill.CreationTime = DateTime.Now;
invlist.Add(invbill);
}
await _repository.DbContext.BulkInsertAsync(invlist);
@ -1909,6 +1910,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
clientCode: string.Empty,
realAmt: 0
);
invbill.CreationTime = DateTime.Now;
invlist.Add(invbill);
}
await _repository.DbContext.BulkInsertAsync(invlist);
@ -2233,6 +2235,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
clientCode: string.Empty,
realAmt: 0
);
invbill.CreationTime = DateTime.Now;
invlist.Add(invbill);
}
await _repository.DbContext.BulkInsertAsync(invlist);

Loading…
Cancel
Save