diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
index 51a89a5f..a4523b04 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
@@ -61,45 +61,53 @@ public class HBPO_SA_DETAIL_IMPORT_DTO
/// 结算日期
///
[Display(Name = "结算日期")]
- [ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd")]
+ [ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd HH:mm:ss")]
public DateTime SettleDate { set; get; }
///
- /// 零件号
+ /// 结算分组号
///
- [Display(Name = "零件号")]
+ [Display(Name = "DeliveryNode")]
[Required(ErrorMessage = "{0}不能为空")]
- [ImporterHeader(Name = "PartNumber")]
- public string LU { get; set; }
+ [ImporterHeader(Name = "DeliveryNode")]
+ public string GroupNum { get; set; }
///
- /// 生产号
+ /// 到货日期
///
- [Display(Name = "生产号")]
- [ImporterHeader(Name = "productionNumber")]
+ [Display(Name = "DeliveryDate")]
[Required(ErrorMessage = "{0}不能为空")]
- public string PN { get; set; }
+ [ImporterHeader(Name = "DeliveryDate", Format = "MM/yyyy/dd HH:mm:ss")]
+ public DateTime? DeliveryDate { get; set; }
+
+ ///
+ /// 客户零件号
+ ///
+ [Display(Name = "PartNumber")]
+ [Required(ErrorMessage = "{0}不能为空")]
+ [ImporterHeader(Name = "PartNumber")]
+ public string LU { get; set; }
///
/// 数量
///
- [Display(Name = "数量")]
+ [Display(Name = "结算数量")]
[ImporterHeader(Name = "Qty")]
public decimal Qty { get; set; }
///
- /// 结算分组号
+ /// 工厂地点
///
- [Display(Name = "结算分组号")]
- [ImporterHeader(Name = "DeliveryNode")]
+ [Display(Name = "filename")]
[Required(ErrorMessage = "{0}不能为空")]
- public string GroupNum { get; set; }
+ [ImporterHeader(Name = "filename")]
+ public string Site { get; set; }
///
- /// 工厂地点
+ /// 生产号
///
- [Display(Name = "工厂地点")]
- [ImporterHeader(Name = "filename")]
+ [Display(Name = "productionNumber")]
[Required(ErrorMessage = "{0}不能为空")]
- public string Site { get; set; }
+ [ImporterHeader(Name = "productionNumber")]
+ public string PN { get; set; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
index 19c63ec0..18f2719c 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
@@ -22,6 +22,8 @@ using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
+using OfficeOpenXml;
+using OfficeOpenXml.Core;
namespace Win.Sfs.SettleAccount.Entities.BQ;
@@ -143,6 +145,8 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
var importPubSaDetails = ObjectMapper.Map, List>(result);
+ return "";
+
//结算分组号
var hbpoSaGroupNums = importPubSaDetails.Select(t => t.GroupNum).Distinct();
@@ -208,7 +212,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
});
#endregion
-
#region 入库数据赋值
//结算明细
hbpoSaDetails = importPubSaDetails;
@@ -243,7 +246,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
{
hbpoNotSaDetails.ForEach(hbpoNotSaDetail =>
{
- hbpoNotSaDetail.InvGroupNum = hbpoCanSaBillNum;
hbpoNotSaDetail.BusinessType = businessType;
});
@@ -310,19 +312,19 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
//删除
await _hbpoSaRepository.DeleteAsync(hbpoSaDelEntity);
- if (hbpoSaDetailDelEntitys != null)
+ if (hbpoSaDetailDelEntitys.Any())
{
await _hbpoSaDetailRepository.DeleteManyAsync(hbpoSaDetailDelEntitys);
}
- if (hbpoCanSaDelEntitys != null)
+ if (hbpoCanSaDelEntitys.Any())
{
await _hbpoCanSaRepository.DeleteManyAsync(hbpoCanSaDelEntitys);
}
- if (hbpoCanSaDetailDelEntitys != null)
+ if (hbpoCanSaDetailDelEntitys.Any())
{
await _hbpoCanSaDetailRepository.DeleteManyAsync(hbpoCanSaDetailDelEntitys);
}
- if (hbpoNotSaDetailDelEntitys != null)
+ if (hbpoNotSaDetailDelEntitys.Any())
{
await _hbpoNotSaDetailRepository.DeleteManyAsync(hbpoNotSaDetailDelEntitys);
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
index 952364aa..f630f957 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
@@ -140,7 +140,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//不可结算
List pubNotSaDetailDelEntitys;
-
pubSaDelEntity = await _repository.FindAsync(id);
if (pubSaDelEntity == null) return;
//结算单据
@@ -160,19 +159,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//删除
await _repository.DeleteAsync(pubSaDelEntity);
- if (pubSaDetailDelEntitys != null)
+ if (pubSaDetailDelEntitys.Any())
{
await _pubSaDetailRepository.DeleteManyAsync(pubSaDetailDelEntitys);
}
- if (pubCanSaDelEntitys != null)
+ if (pubCanSaDelEntitys.Any())
{
await _pubCanSaRepository.DeleteManyAsync(pubCanSaDelEntitys);
}
- if (pubCanSaDetailDelEntitys != null)
+ if (pubCanSaDetailDelEntitys.Any())
{
await _pubCanSaDetailRepository.DeleteManyAsync(pubCanSaDetailDelEntitys);
}
- if (pubNotSaDetailDelEntitys != null)
+ if (pubNotSaDetailDelEntitys.Any())
{
await _pubNotSaDetailRepository.DeleteManyAsync(pubNotSaDetailDelEntitys);
}
@@ -321,7 +320,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
pubNotSaDetails.ForEach(pubNotSaDetail =>
{
- pubNotSaDetail.InvGroupNum = pubCanSaBillNum;
pubNotSaDetail.BusinessType = businessType;
});