Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
17410e62b1
  1. 60
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  3. 36
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
  4. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  5. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

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

@ -62,8 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "客户代码")] [Display(Name = "客户代码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
} }
[Display(Name = "发票")] [Display(Name = "发票")]
public class INVOICE_REPEAT_DTO : EntityDto<Guid> public class INVOICE_REPEAT_DTO : EntityDto<Guid>
{ {
@ -104,19 +102,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "业务类别")] [Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; } public EnumBusinessType BusinessType { get; set; }
public List<INVOICE_WAIT_DETAIL_DTO> DETIAL { set; get; } public List<INVOICE_WAIT_DETAIL_DTO> DETIAL { set; get; }
} }
public class INVOICE_GRP_EXP_DTO public class INVOICE_GRP_EXP_DTO
{ {
/// <summary> /// <summary>
@ -198,11 +186,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ImporterHeader(Name = "金税发票金额", FixAllSpace = true)] [ImporterHeader(Name = "金税发票金额", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public decimal RealAmt { get; set; } public decimal RealAmt { get; set; }
} }
public class INVOICE_GRP_REQ_DTO : RequestInputBase public class INVOICE_GRP_REQ_DTO : RequestInputBase
@ -248,7 +233,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
} }
public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid> public class INVOICE_WAIT_DETAIL_DTO
{ {
@ -304,7 +289,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
///扩展字段1 ///扩展字段1
/// </summary> /// </summary>
[Display(Name = "扩展字段1")] [Display(Name = "合同号")]
public string Extend1 { get; set; } public string Extend1 { get; set; }
/// <summary> /// <summary>
@ -317,7 +302,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[Display(Name = "价格结束日期")] [Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; } public DateTime EndDate { get; set; }
[Display(Name = "扩展字段", AutoGenerateField = false)]
public Dictionary<string, object> ExtraProperties { get; set; } public Dictionary<string, object> ExtraProperties { get; set; }
@ -338,7 +323,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
} }
public class INVOICE_MAP_GROUP_DTO : EntityDto<Guid> public class INVOICE_MAP_GROUP_DTO
{ {
@ -365,19 +350,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
///金额 ///金额
/// </summary> /// </summary>
[Display(Name = "金额")] //[Display(Name = "金额")]
public decimal Amt { get; set; } //public decimal Amt { get; set; }
/// <summary>
///扩展字段1
/// </summary>
[Display(Name = "扩展字段1")]
public string Extend1 { get; set; }
/// <summary> /// <summary>
///扩展字段2 /////扩展字段1
/// </summary> ///// </summary>
[Display(Name = "扩展字段2")] //[Display(Name = "扩展字段1")]
public string Extend2 { get; set; } //public string Extend1 { get; set; }
public bool IsDeleted { get; set; } ///// <summary>
/////扩展字段2
///// </summary>
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
//public bool IsDeleted { get; set; }
} }
@ -433,14 +418,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string InvGroupNum { get; set; } public string InvGroupNum { get; set; }
} }
public class INVOICE_NOT_SETTLE_DTO : EntityDto<Guid> public class INVOICE_NOT_SETTLE_DTO
{ {
///// <summary> [Display(Name = "发票号")]
/////期间 public string InvBillNum { get; set; }
///// </summary>
//[Display(Name = "期间")]
//public int Version { get; set; }
/// <summary> /// <summary>
///发票分组号 ///发票分组号
/// </summary> /// </summary>
@ -463,8 +445,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string LU1 { get; set; } public string LU1 { get; set; }
[Display(Name = "不可结算零件号")]
public string InvBillNum { get; set; }
//[Display(Name = "不可结算零件号")] //[Display(Name = "不可结算零件号")]
@ -482,7 +462,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///// </summary> ///// </summary>
//[Display(Name = "扩展字段2")] //[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; } //public string Extend2 { get; set; }
[Display(Name = "不可结算零件号",AutoGenerateField =false)]
public Dictionary<string, object> ExtraProperties { get; set; } public Dictionary<string, object> ExtraProperties { get; set; }
} }

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

@ -115,6 +115,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}).ConfigureAwait(false); }).ConfigureAwait(false);
} }
} }
//var query1=
} }
else if (type == "JisHBPO") else if (type == "JisHBPO")
{ {

36
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs

@ -62,18 +62,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
var ls = _repository.Where(p => p.InvGroupNum == p_billNum).ToList(); var ls = _repository.Where(p => p.InvGroupNum == p_billNum).ToList();
if (ls == null && ls.Count ==0) if (ls.Count > 1)
{ {
throw new UserFriendlyException(string.Format("不存在编号为{0}",p_billNum)); throw new UserFriendlyException("可结算单有重复");
} }
foreach (BBAC_CAN_SA p_entiy in ls) var first = ls.FirstOrDefault();
{
switch (state) switch (state)
{ {
case SettleBillState.: case SettleBillState.:
if (p_entiy.State == SettleBillState.) if (first.State == SettleBillState.)
{ {
p_entiy.State = state; first.State = state;
} }
else else
{ {
@ -81,9 +81,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
break; break;
case SettleBillState.: case SettleBillState.:
if (p_entiy.State == SettleBillState.) if (first.State == SettleBillState.)
{ {
p_entiy.State = state; first.State = state;
} }
else else
{ {
@ -91,9 +91,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
break; break;
case SettleBillState.: case SettleBillState.:
if (p_entiy.State == SettleBillState.) if (first.State == SettleBillState.)
{ {
p_entiy.State = state; first.State = state;
} }
else else
{ {
@ -101,9 +101,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
break; break;
case SettleBillState.: case SettleBillState.:
if (p_entiy.State == SettleBillState.) if (first.State == SettleBillState.)
{ {
p_entiy.State = state; first.State = state;
} }
else else
{ {
@ -111,20 +111,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
break; break;
case SettleBillState.: case SettleBillState.:
if (p_entiy.State == SettleBillState.) if (first.State == SettleBillState.)
{ {
p_entiy.State = state; first.State = state;
} }
else else
{ {
throw new UserFriendlyException("当前状态不是[财务已审核],无法设置成【客户已收票】状态"); throw new UserFriendlyException("当前状态不是[财务已审核],无法设置成【客户已收票】状态");
} }
break; break;
}
await _repository.UpdateAsync(p_entiy);
return true;
} }
return false; await _repository.UpdateAsync(first);
return true;
} }
/// <summary> /// <summary>
/// 向后流程 /// 向后流程

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs

@ -62,7 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return errors; return errors;
} }
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N"); var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA(); var _entity = new BBAC_CAN_SA();
_entity.BillNum = billNumber; _entity.BillNum = billNumber;
@ -93,9 +92,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
contactid: itm.ContractDocID, contactid: itm.ContractDocID,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode:itm.PartCode partcode:itm.PartCode
); );
_entityList.Add(_detailEntity); _entityList.Add(_detailEntity);
} }
await _repository.DbContext.BulkDeleteAsync(p_list); await _repository.DbContext.BulkDeleteAsync(p_list);

18
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -51,15 +51,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
public virtual async Task<List<string>> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list) public virtual async Task<List<string>> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list)
{ {
List<string> errors = new List<string>(); List<string> errors = new List<string>();
var query = p_list.Select(p => p.BusinessType).Distinct(); var query = p_list.Select(p => p.BusinessType).Distinct().ToList();
foreach (var itm in query.ToList()) if (query.Count > 1)
{ {
errors.Add("选择项有不在同一业务的数据!"); foreach (var itm in query.ToList())
{
} errors.Add("选择项有不在同一业务的数据!");
if (errors.Count > 0) }
{ if (errors.Count > 0)
return errors; {
return errors;
}
} }
var first= p_list.FirstOrDefault(); var first= p_list.FirstOrDefault();

Loading…
Cancel
Save