Browse Source

修改可结算实体类,添加发票创建

master
学 赵 1 year ago
parent
commit
4854b33d98
  1. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
  3. 170
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  4. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
  5. 144
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  6. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_NOT_SA_SERVICE.cs
  7. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
  8. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_NOT_SA_DETAIL.cs
  9. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
  10. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_NOT_SA_DETAIL.cs
  11. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
  12. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs
  13. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs
  14. 4
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  15. BIN
      repos.lnk

3
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs

@ -99,6 +99,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public decimal Amt { get; set; }
public string ContractDocID { set; get; }
}
public class BBAC_CAN_SA_DETAIL_EXP_DTO
{

3
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs

@ -1,4 +1,4 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@ -92,6 +92,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string GroupNum { get; set; }
public decimal Amt { get; set; }
}
public class HBPO_CAN_SA_DETAIL_EXP_DTO
{

170
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -63,7 +63,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var groupNumList= entitys.Select(p=>p.GroupNum).Distinct().ToList();
var notList =_notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
var notList =_notRepository.Where(p => groupNumList.Contains(p.GroupNum)).ToList();//不能结算
var dtos = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
@ -72,6 +74,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
dto.Amt = Math.Round(dto.Price * dto.Qty, 2);
});
dtos = dtos.OrderBy(p => p.SettleDate).ToList();
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>();//原本
@ -90,8 +95,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
List<string> invoiceGroupNumList = new List<string>();//每个发票对应的结算分组号
List<string> List = new List<string>();
decimal sum = itm.Value;//初始分组合计金额
List<string> luList= dtos.Where(p => p.GroupNum == itm.Key).Select(p => p.LU).Distinct().ToList(); //初始LU种类
List<string> luList= dtos.Where(p => p.GroupNum == itm.Key).Select(p => p.LU+p.ContractDocID ).Distinct().ToList(); //初始LU种类
if (copyDic.ContainsKey(itm.Key)==true)//是否存在分组
{
foreach (var _itm1 in copyDic)
@ -101,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invoiceGroupNumList.Add(itm.Key);
continue;
}
var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
var grouplist = dtos.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU + p.ContractDocID).Distinct().ToList();//每项LU种类
luList.AddRange(grouplist);
luList = luList.Distinct().ToList();
if (luList.Count > 20)//累加零件不超过20种
@ -125,100 +129,116 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
if(invoiceMap.Keys.Count > 0) {
var inv=new INVOICE_GRP();
var groupList = new List<INVOICE_MAP_GROUP>();
var notDetialList=new List<INVOICE_NOT_SETTLE>();
var detailList= new List<INVOICE_WAIT_DETAIL>();
foreach (var itm in invoiceMap)
var notDetialList = new List<INVOICE_NOT_SETTLE>();
var detailList = new List<INVOICE_WAIT_DETAIL>();
var invlist = new List<INVOICE_GRP>();
foreach (var itm in invoiceMap)//分组影响和
{
var key = itm.Key;//发票票号
var ls = itm.Value;//结算分组号列表
var detailDtos= dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p=>new {p.InvGroupNum, p.LU,p.Price })
.Select(itm=>new { InvGroupNum=itm.Key.InvGroupNum,
var detailDtos= dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p=>new {p.InvGroupNum, p.LU,p.Price,p.ContractDocID })
.Select(itm=>new {
InvGroupNum=itm.Key.InvGroupNum,
LU=itm.Key.LU,
Price=itm.Key.Price,Amt=Math.Round(itm.Sum(k=>k.Qty)*itm.Key.Price,2) ,
Qty= itm.Sum(k => k.Qty) })
ContactDocID=itm.Key.ContractDocID,
Price=itm.Key.Price,
Amt=Math.Round(itm.Sum(k=>k.Qty)*itm.Key.Price,2) ,
Qty= itm.Sum(k => k.Qty)
})
.ToList();
var invbill=new INVOICE_GRP();
decimal amt=detailDtos.Sum(k=>k.Amt);
decimal txtAmt=Math.Round(detailDtos.Sum(k => k.Amt),2);
var mapList= new List<INVOICE_MAP_GROUP>();
foreach (var obj in detailDtos)
foreach (var groupnum in ls)
{
amt=dtos.Where(p => p.GroupNum == groupnum).Sum(p => p.Amt);
mapList.Add(new INVOICE_MAP_GROUP(
guid: GuidGenerator.Create(),
version: main.Version,
invbillNum: key,
invGroupNum: main.InvGroupNum,
settleGroupNum:groupnum,
amt:amt,
extend1:string.Empty,
extend2:string.Empty
)
);
}
if(mapList.Count > 0)
{
groupList.AddRange(mapList);
}
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>();
foreach (var detail in detailDtos)
{
_entityDetailList.Add(
new INVOICE_WAIT_DETAIL(
guid: GuidGenerator.Create(),
version:main.Version,
invbillNum: key,
invGroupNum: obj.InvGroupNum,
lU: obj.LU,
qty: obj.Qty,
invGroupNum: main.InvGroupNum,
lU: detail.LU,
qty: detail.Qty,
bussiessType: EnumBusinessType.BBAC,
amt: obj.Amt,
pRICE:obj.Price,
extend1: string.Empty, extend2: string.Empty, extend3: string.Empty, extend4: string.Empty
);
amt: detail.Amt,
pRICE:detail.Price,
extend1: detail.ContactDocID,
extend2: string.Empty,
extend3: string.Empty,
extend4: string.Empty
));
}
if (_entityDetailList.Count > 0)
{
detailList.AddRange(_entityDetailList);
}
var notls= notList.GroupBy(p => new { p.GroupNum, p.LU }).Select(p=>new {GroupNum= p.Key.GroupNum,LU=p.Key.LU,Qty= p.Sum(itm=>itm.Qty) });
foreach (var groupnum in ls)
var innotls= new List<INVOICE_NOT_SETTLE>();
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
guid: GuidGenerator.Create(),
version: main.Version,
invGroupNum: main.InvGroupNum,
settleGroupNum: nitm.GroupNum,
lU: string.Empty,
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
));
}
}
if (innotls.Count > 0)
{
notDetialList.AddRange(innotls);
}
var invbill = new INVOICE_GRP
(guid: GuidGenerator.Create(),
realnvBillNum: string.Empty,
invbillNum: key,
amt:amt,
taxAmt:txtAmt,
fileName: string.Empty,
businessType: EnumBusinessType.BBAC,
invGroupNum: main.InvGroupNum,
state: SettleBillState.,
invoiceBillState: InvoiceBillState.
);
invlist.Add( invbill );
}
}
return ApplicationConsts.SuccessStr;
}
//private Dictionary<string, decimal> GenerateInvoice(Dictionary<string, decimal> p_dic)
//{
// string invoiceBillNum = OrderNumberGenerator.GenerateOrderNumber("INV");
// List<string> invoiceGroupNumList = new List<string>();//每个发票对应的结算分组号
// List<string> List = new List<string>();
// decimal sum = p_dic.Value;//初始分组合计金额
// List<string> luList = dtos.Where(p => p.GroupNum == itm.Key).Select(p => p.LU).Distinct().ToList(); //初始LU种类
// foreach (var _itm1 in copyDic)
// {
// if (itm.Key == _itm1.Key)//相同结算分组项不计算
// {
// invoiceGroupNumList.Add(itm.Key);
// 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;
// }
// if (sum > 10000000)
// {
// break;
// }
// sum += _itm1.Value;
// invoiceGroupNumList.Add(_itm1.Key);//所有条件都满足添加发票和结算分组对应关系
// }
// foreach (var rem in invoiceGroupNumList)//移除
// {
// copyDic.Remove(rem);
// }
// return
//}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs

@ -64,11 +64,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
, site: entity.Site
, qty: entity.Qty
, price: entity.Price
, category: entity.Category
, category: entity.BusinessType
, isReturn: entity.IsReturn
, settleDate: entity.SettleDate
, groupNum: entity.GroupNum
, invGroupNum: entity.InvGroupNum
,contactid:entity.ContractDocID
);
}

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

@ -9,8 +9,10 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.Shared.RepositoryBase;
@ -34,8 +36,148 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
HBPO_CAN_SA_DETAIL_EXP_DTO
>
{
public HBPO_CAN_SA_SERVICE(INormalEfCoreRepository<HBPO_CAN_SA, Guid> repository, IExcelImportAppService excelImportService, INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> detailRepository, INV_MNG invmng) : base(repository, excelImportService, detailRepository, invmng)
private INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository;
public HBPO_CAN_SA_SERVICE(INormalEfCoreRepository<HBPO_CAN_SA, Guid> repository,
IExcelImportAppService excelImportService,
INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> detailRepository,
INV_MNG invmng,
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository
) : base(repository, excelImportService, detailRepository, invmng)
{
_notRepository = notRepository;
}
/// <summary>
/// 生成发票
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
//[Route("generateinvoice")]
public async override Task<string> GenerateInvoice(HBPO_CAN_SA_REQ_DTO input)
{
var main = _repository.Where(p => p.InvGroupNum == input.Filters.Where(p => p.Column == "BillNum").FirstOrDefault().Value).FirstOrDefault();
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);//可结算
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notList = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算
var dtos = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
dtos.ForEach(dto =>
{
dto.Amt = Math.Round(dto.Price * dto.Qty, 2);
});
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> copyDic = new Dictionary<string, decimal>();//变换数组副本
foreach (var itm in _query.ToList())
{
dic.Add(itm.GroupNum, itm.Amt);
copyDic.Add(itm.GroupNum, itm.Amt);
}
Dictionary<string, List<string>> invoiceMap = new Dictionary<string, List<string>>();
foreach (var itm in dic)
{
string invoiceBillNum = OrderNumberGenerator.GenerateOrderNumber("INV");
List<string> invoiceGroupNumList = new List<string>();//每个发票对应的结算分组号
List<string> List = new List<string>();
decimal sum = itm.Value;//初始分组合计金额
List<string> luList = dtos.Where(p => p.GroupNum == itm.Key).Select(p => p.LU).Distinct().ToList(); //初始LU种类
if (copyDic.ContainsKey(itm.Key) == true)//是否存在分组
{
foreach (var _itm1 in copyDic)
{
if (itm.Key == _itm1.Key)//相同结算分组项不计算,已初始化
{
invoiceGroupNumList.Add(itm.Key);
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;
}
if (sum > 10000000)
{
break;
}
sum += _itm1.Value;
invoiceGroupNumList.Add(_itm1.Key);//所有条件都满足添加发票和结算分组对应关系
}
invoiceMap.Add(invoiceBillNum, invoiceGroupNumList);//记录发票对应关系
foreach (var rem in invoiceGroupNumList)//移除
{
copyDic.Remove(rem);
}
}
}
if (invoiceMap.Keys.Count > 0)
{
var inv = new INVOICE_GRP();
var groupList = new List<INVOICE_MAP_GROUP>();
var notDetialList = new List<INVOICE_NOT_SETTLE>();
var detailList = new List<INVOICE_WAIT_DETAIL>();
foreach (var itm in invoiceMap)
{
var key = itm.Key;//发票票号
var ls = itm.Value;//结算分组号列表
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.LU, p.Price })
.Select(itm => new {
InvGroupNum = itm.Key.InvGroupNum,
LU = itm.Key.LU,
Price = itm.Key.Price,
Amt = Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),
Qty = itm.Sum(k => k.Qty)
})
.ToList();
var invbill = new INVOICE_GRP();
foreach (var obj in detailDtos)
{
new INVOICE_WAIT_DETAIL(
guid: GuidGenerator.Create(),
version: main.Version,
invbillNum: key,
invGroupNum: obj.InvGroupNum,
lU: obj.LU,
qty: obj.Qty,
bussiessType: EnumBusinessType.BBAC,
amt: obj.Amt,
pRICE: obj.Price,
extend1: string.Empty, extend2: string.Empty, extend3: string.Empty, extend4: string.Empty
);
}
foreach (var groupnum in ls)
{
}
}
}
return ApplicationConsts.SuccessStr;
}
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_NOT_SA_SERVICE.cs

@ -65,6 +65,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
, settleDate: entity.SettleDate
, groupNum: entity.GroupNum
, invGroupNum: entity.InvGroupNum
,businessType: entity.BusinessType
);
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs

@ -103,7 +103,7 @@ public class BBAC_CAN_SA_DETAIL: SA_CAN_BASE
/// ExternalCallNumber包含(R0)为买单件 1为JIS 2.为买单件
/// </summary>
[Display(Name = "业务类别")]
public string Category { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 对应字段MovementType,996正常,997为退货
@ -111,6 +111,11 @@ public class BBAC_CAN_SA_DETAIL: SA_CAN_BASE
[Display(Name = "是否退货")]
public string IsReturn { get; set; } = null!;
[Display(Name="合同号")]
public string ContractDocID { get; set; }
/// <summary>
/// 对应字段PostingDate
/// </summary>
@ -134,7 +139,10 @@ public class BBAC_CAN_SA_DETAIL: SA_CAN_BASE
public BBAC_CAN_SA_DETAIL(Guid guid,string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, string category, string isReturn, DateTime settleDate, string groupNum, string invGroupNum)
public BBAC_CAN_SA_DETAIL(Guid guid,string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, EnumBusinessType category, string isReturn,
DateTime settleDate, string groupNum, string invGroupNum
,string contactid
)
{
Id = guid;
KeyCode = keyCode;
@ -146,10 +154,11 @@ public class BBAC_CAN_SA_DETAIL: SA_CAN_BASE
Site = site;
Qty = qty;
Price = price;
Category = category;
BusinessType = category;
IsReturn = isReturn;
SettleDate = settleDate;
GroupNum = groupNum;
InvGroupNum = invGroupNum;
ContractDocID = contactid;
}
}

13
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_NOT_SA_DETAIL.cs

@ -1,7 +1,7 @@
using SettleAccount.Bases;
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
@ -61,7 +61,7 @@ public class BBAC_NOT_SA_DETAIL:SA_NOT_BASE
/// ExternalCallNumber包含(R0)为买单件 1为JIS 2.为买单件
/// </summary>
[Display(Name = "业务类别")]
public string Category { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 对应字段MovementType,996正常,997为退货
@ -84,13 +84,15 @@ public class BBAC_NOT_SA_DETAIL:SA_NOT_BASE
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
[Display(Name = "合同号")]
public string ContractDocID { get; set; }
public BBAC_NOT_SA_DETAIL()
{
}
public BBAC_NOT_SA_DETAIL(Guid guid, string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, string category, string isReturn, string invGroupNum, DateTime settleDate, string groupNum)
public BBAC_NOT_SA_DETAIL(Guid guid, string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, EnumBusinessType category, string isReturn, string invGroupNum, DateTime settleDate, string groupNum,string contractDocID)
{
Id = guid;
@ -102,10 +104,11 @@ public class BBAC_NOT_SA_DETAIL:SA_NOT_BASE
Site = site;
Qty = qty;
Price = price;
Category = category;
BusinessType = category;
IsReturn = isReturn;
InvGroupNum = invGroupNum;
SettleDate = settleDate;
GroupNum = groupNum;
ContractDocID = contractDocID;
}
}

13
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs

@ -13,7 +13,7 @@ public class HBPO_CAN_SA : SA_CAN_BASE_MAIN
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; } = null!;
//[Display(Name = "结算单据")]
//public string BillNum { get; set; } = null!;
///// <summary>
@ -33,6 +33,10 @@ public class HBPO_CAN_SA : SA_CAN_BASE_MAIN
/// </summary>
//[Display(Name = "工厂地点")]
//public string Site { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
public HBPO_CAN_SA(Guid guid, int version, string settleBillNum, string billNum, SettleBillState state, string invGroupNum,string site)
{
@ -115,8 +119,12 @@ public class HBPO_CAN_SA_DETAIL:SA_CAN_BASE
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
public HBPO_CAN_SA_DETAIL(Guid guid ,string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum)
public HBPO_CAN_SA_DETAIL(Guid guid ,string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum, EnumBusinessType businessType)
{
Id = guid;
KeyCode = keyCode;
@ -131,6 +139,7 @@ public class HBPO_CAN_SA_DETAIL:SA_CAN_BASE
SettleDate = settleDate;
GroupNum = groupNum;
InvGroupNum = invGroupNum;
BusinessType = businessType;
}
public HBPO_CAN_SA_DETAIL()

13
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_NOT_SA_DETAIL.cs

@ -1,8 +1,7 @@
using SettleAccount.Bases;
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
//
@ -94,10 +93,13 @@ public class HBPO_NOT_SA_DETAIL :SA_NOT_BASE
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
public HBPO_NOT_SA_DETAIL(Guid guid ,string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum)
public HBPO_NOT_SA_DETAIL(Guid guid ,string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum, EnumBusinessType businessType)
{
Id = guid;
KeyCode = keyCode;
@ -111,6 +113,7 @@ public class HBPO_NOT_SA_DETAIL :SA_NOT_BASE
SettleDate = settleDate;
GroupNum = groupNum;
InvGroupNum = invGroupNum;
BusinessType = businessType;
}
public HBPO_NOT_SA_DETAIL()

17
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs

@ -1,7 +1,8 @@
using SettleAccount.Bases;
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "HBPO结算导入")]
@ -35,6 +36,12 @@ public class HBPO_SA :FullAuditedAggregateRoot<Guid>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
public HBPO_SA(Guid guid, int version, string billNum, string dNBillNum, string state, string recordCount)
{
this.Id= guid;
@ -114,12 +121,17 @@ public class HBPO_SA_DETAIL :SA_BASE
///// </summary>
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } = null!;
public HBPO_SA_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum)
public HBPO_SA_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum, EnumBusinessType businessType)
{
this.Id= guid;
KeyCode = keyCode;
@ -133,6 +145,7 @@ public class HBPO_SA_DETAIL :SA_BASE
SettleDate = settleDate;
GroupNum = groupNum;
InvGroupNum = invGroupNum;
BusinessType= businessType;
}
public HBPO_SA_DETAIL()

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
@ -23,13 +23,19 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
[Display(Name = "不可结算零件号")]
public string LU1 { get; set; } = null!;
[Display(Name = "数量")]
public decimal Qty { get; set; }
[Display(Name = "扩展字段1")]
public string Extend1 { get; set; } = null!;
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; } = null!;
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2)
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2,decimal qty)
{
Id = guid;
Version = version;
@ -39,6 +45,7 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
LU1 = lU1;
Extend1 = extend1;
Extend2 = extend2;
Qty = qty;
}
public INVOICE_NOT_SETTLE()

17
code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

@ -35,16 +35,13 @@ namespace Win.Sfs.SettleAccount
public enum InvoiceBillState
{
[Description("已开票")]
= 1,
[Description("商务已审核")]
= 2,
[Description("财务已审核")]
= 3,
[Description("已扣减")]
= 5,
[Description("客户已收票")]
= 4,
[Description("正常")]
= 1,
[Description("报废")]
= 2,
[Description("替换")]
= 3,

4
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -515,7 +515,7 @@ namespace Win.Sfs.SettleAccount
b.ConfigureByConvention();
b.Property(x => x.SettleBillNum).HasMaxLength(50);
b.Property(x => x.Site).HasMaxLength(50);
b.Property(x => x.Category).HasMaxLength(50);
b.Property(x => x.IsReturn).HasMaxLength(50);
b.Property(x => x.BillNum).HasMaxLength(50);
b.Property(x => x.InvGroupNum).HasMaxLength(50);
@ -555,7 +555,7 @@ namespace Win.Sfs.SettleAccount
b.ConfigureByConvention();
b.Property(x => x.Site).HasMaxLength(50);
b.Property(x => x.Category).HasMaxLength(50);
b.Property(x => x.IsReturn).HasMaxLength(50);
b.Property(x => x.SettleBillNum).HasMaxLength(50);
b.Property(x => x.InvGroupNum).HasMaxLength(50);

BIN
repos.lnk

Binary file not shown.
Loading…
Cancel
Save