姜旭之 1 year ago
parent
commit
8b6f65586f
  1. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_WAIT_DETAIL.cs
  4. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  5. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

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

@ -74,14 +74,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号 /// 零件号
/// </summary> /// </summary>
public string LU { get; set; } public string LU { get; set; }
/// <summary> /// <summary>
/// 物料描述 /// 物料描述
/// </summary> /// </summary>
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
/// <summary> /// <summary>
/// 生产号 /// 生产号
/// </summary> /// </summary>
@ -98,20 +94,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 金额 /// 金额
/// </summary> /// </summary>
public decimal Amt { get; set; } public decimal Amt { get; set; }
/// <summary>
/// 合同号
/// </summary>
public string ContractDocID { set; get; } public string ContractDocID { set; get; }
/// <summary> /// <summary>
/// 客户零件号 /// 客户零件号
/// </summary> /// </summary>
public string PartCode { get; set; } public string PartCode { get; set; }
} }
public class BBAC_CAN_SA_DETAIL_EXP_DTO public class BBAC_CAN_SA_DETAIL_EXP_DTO
{ {
@ -152,8 +143,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "物料描述")] [ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")] [ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; } public string PN { get; set; }
public string KeyCode { get; set; } public string KeyCode { get; set; }
@ -231,10 +220,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public int Version { get; set; } public int Version { get; set; }
//[Display(Name = "单价")] //[Display(Name = "单价")]
//public decimal Price { get; set; } //public decimal Price { get; set; }
[Display(Name = "发票分组号")]
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; } public string BillNum { get; set; }
[Display(Name = "下线日期")] [Display(Name = "下线日期")]
public DateTime SettleDate { get; set; } public DateTime SettleDate { get; set; }

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

@ -172,7 +172,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 发票明细 /// 发票明细
/// </summary> /// </summary>
public List<INVOICE_WAIT_DETAIL_DTO> INVOICE_WAIT_DETAIL { get; set; } public List<INVOICE_WAIT_DETAIL_DTO> INVOICE_WAIT_DETAIL { get; set; }
/// <summary> /// <summary>
/// 发票和结算分组对应关系 /// 发票和结算分组对应关系
/// </summary> /// </summary>
@ -181,15 +180,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 已结分组包含不可结算零件 /// 已结分组包含不可结算零件
/// </summary> /// </summary>
public List<INVOICE_NOT_SETTLE_DTO> INVOICE_NOT_SETTLE { get; set; } public List<INVOICE_NOT_SETTLE_DTO> INVOICE_NOT_SETTLE { get; set; }
/// <summary> /// <summary>
/// 发票调整明细 /// 发票调整明细
/// </summary> /// </summary>
public List<PUB_ADJ_DETAIL_DTO> ADJ_DETAIL { get; set; } public List<PUB_ADJ_DETAIL_DTO> ADJ_DETAIL { get; set; }
} }
public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid> public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid>
@ -216,6 +211,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[Display(Name = "零件号")] [Display(Name = "零件号")]
public string LU { get; set; } public string LU { get; set; }
/// <summary>
///零件号
/// </summary>
[Display(Name = "客户零件号")]
public string PartCode { get; set; }
/// <summary> /// <summary>
///单价 ///单价
/// </summary> /// </summary>
@ -241,20 +245,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[Display(Name = "扩展字段1")] [Display(Name = "扩展字段1")]
public string Extend1 { get; set; } public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary>
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
/// <summary> /// <summary>
///扩展字段3 ///扩展字段3
/// </summary> /// </summary>
[Display(Name = "扩展字段3")] [Display(Name = "价格开始日期")]
public DateTime BeginDate { get; set; } public DateTime BeginDate { get; set; }
/// <summary> /// <summary>
///扩展字段4 ///扩展字段4
/// </summary> /// </summary>
[Display(Name = "扩展字段4")] [Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; } public DateTime EndDate { get; set; }
} }

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_WAIT_DETAIL.cs

@ -20,6 +20,11 @@ public class INVOICE_WAIT_DETAIL :FullAuditedAggregateRoot<Guid>
[Display(Name = "零件号")] [Display(Name = "零件号")]
public string LU { get; set; } = null!; public string LU { get; set; } = null!;
[Display(Name = "客户零件号")]
public string PartCode { get; set; } = null!;
[Display(Name = "单价")] [Display(Name = "单价")]
public decimal PRICE { get; set; } public decimal PRICE { get; set; }
@ -48,7 +53,7 @@ public class INVOICE_WAIT_DETAIL :FullAuditedAggregateRoot<Guid>
public INVOICE_WAIT_DETAIL(Guid guid, int version, string invbillNum, string invGroupNum, string lU, decimal pRICE, decimal qty, decimal amt, EnumBusinessType bussiessType, string extend1, string extend2,DateTime beginDate,DateTime endDate) public INVOICE_WAIT_DETAIL(Guid guid, int version, string invbillNum, string invGroupNum, string lU, decimal pRICE, decimal qty, decimal amt, EnumBusinessType bussiessType, string extend1, string extend2,DateTime beginDate,DateTime endDate,string partcode)
{ {
Id = guid; Id = guid;
Version = version; Version = version;
@ -63,6 +68,7 @@ public class INVOICE_WAIT_DETAIL :FullAuditedAggregateRoot<Guid>
Extend2 = extend2; Extend2 = extend2;
BeginDate = beginDate; BeginDate = beginDate;
EndDate = endDate; EndDate = endDate;
PartCode = partcode;
} }

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

@ -840,16 +840,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
public virtual async Task<bool> Reject(string groupbillNum) public virtual async Task<bool> Reject(string groupbillNum)
{ {
var ls = await _repository.Where(p => p.InvGroupNum == groupbillNum).ToListAsync(); var ls = await _repository.Where(p => p.InvGroupNum == groupbillNum).ToListAsync();
if (ls != null && ls.Count > 0) if (ls != null && ls.Count > 0)
{ {
var count=ls.Select(p => p.State).Distinct().Count(); var count=ls.Select(p => p.State).Distinct().Count();
@ -1030,7 +1021,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
where tm == null where tm == null
select new TMEP_INV select new TMEP_INV
{ {
LU = itm.LU, LU = itm.LU,
Amt = itm.Amt, Amt = itm.Amt,
Qty = itm.Qty, Qty = itm.Qty,
@ -1100,7 +1090,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend1: string.Empty, extend1: string.Empty,
extend2: string.Empty, extend2: string.Empty,
beginDate: detail.BeginDate, beginDate: detail.BeginDate,
endDate: detail.EndDate endDate: detail.EndDate,
partcode:detail.PartCode
)); ));
} }
if (_entityDetailList.Count > 0) if (_entityDetailList.Count > 0)
@ -1335,7 +1326,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend1: string.Empty, extend1: string.Empty,
extend2: string.Empty, extend2: string.Empty,
beginDate: detail.BeginDate, beginDate: detail.BeginDate,
endDate: detail.EndDate endDate: detail.EndDate,
partcode:detail.PartCode
)); ));
} }
if (_entityDetailList.Count > 0) if (_entityDetailList.Count > 0)
@ -1406,14 +1399,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_invls = invlist.Select(p => p.InvbillNum).ToList(); _invls = invlist.Select(p => p.InvbillNum).ToList();
} }
return _invls; return _invls;
} }
/// <summary> /// <summary>
/// 第一次开票 /// 第一次开票
/// </summary> /// </summary>
@ -1509,7 +1496,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID }) var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID })
.Select(itm => new .Select(itm => new
{ {
PartCode=itm.Key.PartCode,
InvGroupNum = itm.Key.InvGroupNum, InvGroupNum = itm.Key.InvGroupNum,
LU = itm.Key.PartCode, LU = itm.Key.PartCode,
ContactDocID = itm.Key.ContractDocID, ContactDocID = itm.Key.ContractDocID,
@ -1551,7 +1538,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invbillNum: key, invbillNum: key,
invGroupNum: p_InvGroupNum, invGroupNum: p_InvGroupNum,
lU: detail.LU, lU: detail.LU,
qty: detail.Qty, qty: detail.Qty,
bussiessType: businessType, bussiessType: businessType,
amt: detail.Amt, amt: detail.Amt,
@ -1559,7 +1545,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend1: string.Empty, extend1: string.Empty,
extend2: string.Empty, extend2: string.Empty,
beginDate: detail.BeginDate, beginDate: detail.BeginDate,
endDate: detail.EndDate endDate: detail.EndDate,
partcode:detail.PartCode
)); ));
} }
if (_entityDetailList.Count > 0) if (_entityDetailList.Count > 0)
@ -1625,8 +1612,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
await _repository.DbContext.BulkInsertAsync(notDetialList); await _repository.DbContext.BulkInsertAsync(notDetialList);
} }
_invls = invlist.Select(p => p.InvbillNum).ToList(); _invls = invlist.Select(p => p.InvbillNum).ToList();
} }

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

@ -39,14 +39,9 @@ namespace Win.Sfs.SettleAccount
= 1, = 1,
[Description("报废")] [Description("报废")]
= 2, = 2,
[Description("替换")]
= 3,
[Description("提交")] [Description("提交")]
= 3, = 3,
} }
public enum BusinessType public enum BusinessType

Loading…
Cancel
Save