学 赵 1 year ago
parent
commit
889687b8c4
  1. 12
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  2. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
  3. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
  4. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  5. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumMappingType.cs
  6. 72
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs
  7. 102
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisHBPOEidSeCompareReport.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  9. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

12
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js

@ -23,6 +23,14 @@ const schema = {
title: "税后金额",
type: "number",
},
realAmt: {
title: "税额",
type: "number",
},
taxDiff: {
title: "税后金额含尾差",
type: "number",
},
invGroupNum: {
title: "发票分组号",
type: "number",
@ -39,10 +47,6 @@ const schema = {
{ value: 3, label: "提交" },
],
},
taxDiff: {
title: "发票税后尾差",
type: "number",
},
clientCode: {
title: "客户代码",
type: "string",

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

@ -335,7 +335,6 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
}
bbacSaDetail.PN = Regex.Replace(bbacSaDetail.PN, "['‘’]", "");
});
return GroupPnLu(bbacSaDetails);
}

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

@ -297,7 +297,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
hbpoSaDetail.CustomerPartCodeNoSpace = hbpoSaDetail.LU.Replace(" ", "");
hbpoSaDetail.Version = Version;
});
return GroupPnLu(hbpoSaDetails);
}

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

@ -406,7 +406,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
}
pubSaDetail.PN = Regex.Replace(pubSaDetail.PN, "['‘’]", "");
});
return GroupPnLu(pubSaDetails);
}

20
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumMappingType.cs

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Enums;
/// <summary>
/// 匹配类型
/// </summary>
public enum EnumMappingType
{
/// <summary>
/// 未定义
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
/// 完全匹配
/// </summary>
[Display(Name = "完全匹配")]
PerfectMatch = 1
}

72
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs

@ -25,12 +25,6 @@ public class JisBBACEidSeCompareExport
[ExporterHeader(DisplayName = "类别")]
public string Category { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 车型
/// </summary>
[Display(Name = "车型")]
@ -49,42 +43,12 @@ public class JisBBACEidSeCompareExport
[ExporterHeader(DisplayName = "生产码序列号日期")]
public string SequenceNumber { get; set; }
/// <summary>
/// ParType
/// </summary>
[Display(Name = "ParType")]
[ExporterHeader(DisplayName = "ParType")]
public string ParType { get; set; }
/// <summary>
/// 配置码
/// </summary>
[Display(Name = "配置码")]
[ExporterHeader(DisplayName = "配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime? ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Display(Name = "序列号")]
[ExporterHeader(DisplayName = "序列号")]
public string Seq { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
@ -115,6 +79,42 @@ public class JisBBACEidSeCompareExport
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")]
public decimal DiffQty => SEQty - EdiQty;
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// ParType
/// </summary>
[Display(Name = "ParType")]
[ExporterHeader(DisplayName = "ParType")]
public string ParType { get; set; }
/// <summary>
/// 配置码
/// </summary>
[Display(Name = "配置码")]
[ExporterHeader(DisplayName = "配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime? ShippingDate { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Display(Name = "序列号")]
[ExporterHeader(DisplayName = "序列号")]
public string Seq { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 客户下线时间
/// </summary>
[Display(Name = "客户下线时间")]

102
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisHBPOEidSeCompareReport.cs

@ -25,30 +25,66 @@ public class JisHBPOEidSeCompareExport
[ExporterHeader(DisplayName = "类别")]
public string Category { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// CarModeCode
/// 车型
/// </summary>
[Display(Name = "CarModeCode")]
[ExporterHeader(DisplayName = "CarModeCode")]
[Display(Name = "车型")]
[ExporterHeader(DisplayName = "车型")]
public string CarModeCode { get; set; }
/// <summary>
/// LineStationcode
/// 生产线
/// </summary>
[Display(Name = "LineStationcode")]
[ExporterHeader(DisplayName = "LineStationcode")]
[Display(Name = "生产线")]
[ExporterHeader(DisplayName = "生产线")]
public string LineStationcode { get; set; }
/// <summary>
/// SequenceNumber
/// 生产码序列号日期
/// </summary>
[Display(Name = "SequenceNumber")]
[ExporterHeader(DisplayName = "SequenceNumber")]
[Display(Name = "生产码序列号日期")]
[ExporterHeader(DisplayName = "生产码序列号日期")]
public string SequenceNumber { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// WMS发货数量
/// </summary>
[Display(Name = "WMS发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
[ExporterHeader(DisplayName = "EDI数量")]
public decimal EdiQty { get; set; }
/// <summary>
/// WMS发货与EDI数量差
/// </summary>
[Display(Name = "WMS发货与EDI数量差")]
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")]
public decimal DiffQty => SEQty - EdiQty;
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// ParType
/// </summary>
[Display(Name = "ParType")]
@ -73,12 +109,6 @@ public class JisHBPOEidSeCompareExport
[ExporterHeader(DisplayName = "实际发货生产号")]
public string RealCode { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Display(Name = "序列号")]
@ -103,36 +133,6 @@ public class JisHBPOEidSeCompareExport
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ErpToLoc { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// WMS发货数量
/// </summary>
[Display(Name = "WMS发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
[ExporterHeader(DisplayName = "EDI数量")]
public decimal EdiQty { get; set; }
/// <summary>
/// WMS发货与EDI数量差
/// </summary>
[Display(Name = "WMS发货与EDI数量差")]
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")]
public decimal DiffQty => SEQty - EdiQty;
/// <summary>
/// 客户下线时间
/// </summary>
[Display(Name = "客户下线时间")]

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.SignalR;
using Microsoft.OpenApi.Extensions;
@ -17,7 +16,6 @@ using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Enums;
using Win.Sfs.SettleAccount.Reports;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.RepositoryBase;

33
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.SignalR;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.SignalR;
using Volo.Abp;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Consts;
using Win.Sfs.SettleAccount.Enums;
@ -173,6 +174,38 @@ namespace SettleAccount.Job.Services.Report
}
}
/// <summary>
/// 处理发运数据
/// 结算、发运对比上的数据修改结算数据状态
/// </summary>
public virtual void HandLeSaDetailsMain<T>(List<PubSaSeCompareDiff> pubSaSeCompareDiffs, EnumBusinessType businessType, int version) where T : SA_BASE
{
var haveSaHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
if (haveSaHaveSes.Any())
{
//结算详情
var saDetails = (from sa in _settleAccountDbContext.Set<T>()
where sa.BusinessType == businessType && sa.Version == version
select sa).ToList();
if (saDetails.Any())
{
var saDetailsUpdate = saDetails.Join(haveSaHaveSes, o => new { o.PN, o.LU }, i => new { i.PN, LU = i.CustomerPartCode }, (o, i) =>
{
var mappingType = (i.SAQty - i.SEQty) switch
{
> 0 => EnumMappingType.None,
0 => EnumMappingType.PerfectMatch,
< 0 => EnumMappingType.None,
_ => default,
};
o.ExtraProperties.Add("MappingType", mappingType);
return o;
}).ToList();
_settleAccountDbContext.BulkUpdate(saDetailsUpdate);
}
}
}
/// <summary>
/// 创建导出文件结构
/// </summary>

Loading…
Cancel
Save