Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
8d57501627
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
  4. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs
  5. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
  6. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  7. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  8. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs
  9. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  10. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
  11. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

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

@ -52,9 +52,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票号")] //全部业务都显示
public string InvBillNum { get; set; }
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示
public string LU { get; set; }
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示 (查询条件)
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示 (查询条件)
public string PartCode { get; set; }
[ExporterHeader(DisplayName = "零件描述")] //全部业务都显示
public string MaterialDesc { get; set; }
@ -106,9 +106,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票号")] //全部业务都显示
public string InvBillNum { get; set; }
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示
public string LU { get; set; }
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示 (查询条件)
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示 (查询条件)
public string PartCode { get; set; }
[ExporterHeader(DisplayName = "零件描述")] //全部业务都显示
public string MaterialDesc { get; set; }

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

@ -105,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
[ExporterHeader(DisplayName = "LU")]
[ExporterHeader(DisplayName = "客户零件")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
@ -121,7 +121,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 客户零件号
/// </summary>
[ExporterHeader(DisplayName = "何苦零件号")]
[ExporterHeader(DisplayName = "厂内零件号")]
public string PartCode { get; set; }
}

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

@ -144,7 +144,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
[ExporterHeader(DisplayName = "零件号")]
[ExporterHeader(DisplayName = "客户零件号")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
@ -160,7 +160,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 客户零件号
/// </summary>
[ExporterHeader(DisplayName = "客户零件号")]
[ExporterHeader(DisplayName = "厂内零件号")]
public string PartCode { get; set; }
}

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

@ -102,7 +102,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
[ExporterHeader(DisplayName = "零件号(LU)")]
[ExporterHeader(DisplayName = "客户零件号")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
@ -116,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "结算分组号")]
public string GroupNum { get; set; }
[ExporterHeader(DisplayName = "客户零件号")]
[ExporterHeader(DisplayName = "厂内零件号")]
public string PartCode { get; set; }

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

@ -35,9 +35,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_NOT_SA_DETAIL_REQ_DTO,
BBAC_NOT_SA_DETAIL_EXP_DTO>
{
private readonly BBAC_NOT_SA_MNG _bbacNotMng;
public BBAC_NOT_SA_SERVICE(IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager, INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> detailRepository, BBAC_NOT_SA_MNG bbacNotMng) :
@ -45,32 +43,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
_bbacNotMng = bbacNotMng;
}
[HttpPost]
public override async Task<IActionResult> GenerateSettlementOrder(BBAC_NOT_SA_DETAIL_REQ_DTO input)
{
List<ERR_EXP_DTO> errorlist = new List<ERR_EXP_DTO>();
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
if (entitys == null )
{
errorlist.Add(new ERR_EXP_DTO() { Message = "查询条件无记录" });
}
else
{
var errors = await _bbacNotMng.GenerateSettlementOrder(entitys);
if (errors.Count > 0)
{
foreach (var itm in errors)
{
errorlist.Add(new ERR_EXP_DTO() { Message = itm });
}
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorlist) });
}
}
return new JsonResult(new { Code = 200, Message = "生成成功" });

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

@ -49,7 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[UnitOfWork(false)]
public override async Task<string> ApprovalPassed(List<string> p_list)
{
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value =string.Join(",",p_list) });

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

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

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

@ -47,7 +47,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public override async Task<IActionResult> GenerateSettlementOrder(PUB_NOT_SA_DETAIL_REQ_DTO input)
{
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
List<ERR_EXP_DTO> errorlist = new List<ERR_EXP_DTO>();
if (entitys == null)
{

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

@ -102,6 +102,8 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType, bool flag=true) where T : PD_BASE,new()
{
var query = from itm in p_ls
select new VmiLog()
{

9
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs

@ -49,6 +49,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
public virtual async Task<List<string>> GenerateSettlementOrder(List<HBPO_NOT_SA_DETAIL> p_list)
{
var first=p_list.FirstOrDefault();
List<string> errors = new List<string>();
var priceErrors = await _service.CheckPriceList(p_list);
if (priceErrors.Count > 0)
@ -58,6 +59,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (first.BusinessType == EnumBusinessType.JisHBPO)
{
var ls = p_list.Select(p => p.Site.Substring(0, 3)).Distinct().ToList();
if (ls.Count > 1)
{
@ -68,6 +72,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return errors;
}
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new HBPO_CAN_SA();
_entity.BillNum = billNumber;
@ -104,6 +110,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<HBPO_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
return errors;
}

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

@ -86,7 +86,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
foreach (var itm in priceErrors)
{
errors.Add($"{name}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
errors.Add($"{name}{itm.GroupNum}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)

Loading…
Cancel
Save