From 7a38fb909c74d9e18c49394facc735fc352b9b2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com>
Date: Wed, 9 Aug 2023 08:41:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BQ/Dtos/BBAC_PD_DTO.cs | 30 +--
.../Bases/BA_SERVICE.cs | 37 ---
.../Bases/PD_SERVICE.cs | 211 +++++++++++++++++-
.../Entities/BQ/BBAC_CAN_SA_SERVICE.cs | 4 -
.../Entities/BQ/BBAC_NOT_SA_SERVICE.cs | 2 -
.../Entities/BQ/BBAC_PD_SERVICE.cs | 12 +-
.../Entities/BQ/HBPO_PD_SERVICE.cs | 47 ++--
.../Entities/BQ/PUB_PD_SERVICE.cs | 2 +-
...ttleAccountApplicationAutoMapperProfile.cs | 17 ++
.../Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs | 2 +-
.../Entities/BQ/Managers/INV_MNG.cs | 10 +-
.../Entities/BQ/Vmi/VmiLog.cs | 29 ++-
12 files changed, 299 insertions(+), 104 deletions(-)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
index 645dba67..1a6924f8 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
@@ -1,4 +1,4 @@
-using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -21,7 +21,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
///结算单据
///
- [Display(Name = "发票分组号")]
+ [Display(Name = "发票号")]
public string BillNum { get; set; }
///
///关联结算单号
@@ -40,7 +40,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string Site { get; set; }
}
- public class BBAC_PD_EXPORT
+ public class BBAC_PD_EXP_DTO
{
///
///期间
@@ -50,7 +50,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
///结算单据
///
- [ExporterHeader(DisplayName = "结算单据")]
+ [ExporterHeader(DisplayName = "发票号")]
public string BillNum { get; set; }
///
///关联结算单号
@@ -73,7 +73,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
[Display(Name = "期间")]
public int Version { get; set; }
- [Display(Name = "结算单据")]
+ [Display(Name = "发票号")]
public string BillNum { get; set; }
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
@@ -162,12 +162,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
- ///
- ///工厂地点
- ///
- [ExporterHeader(DisplayName = "工厂地点")]
- public string Site { get; set; }
-
///
/// 版本
///
@@ -176,18 +170,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
/// 发票分组号
///
- [ExporterHeader(DisplayName = "发票分组号")]
+ [ExporterHeader(DisplayName = "发票号")]
public string BillNum { get; set; }
///
/// 数量
///
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
- ///
- /// 价格
- ///
- [ExporterHeader(DisplayName = "单价")]
- public decimal Price { get; set; }
+ /////
+ ///// 价格
+ /////
+ //[ExporterHeader(DisplayName = "单价")]
+ //public decimal Price { get; set; }
///
/// 发票分组号
///
@@ -206,7 +200,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
/// 零件LU
///
- [ExporterHeader(DisplayName = "LU")]
+ [ExporterHeader(DisplayName = "零件号LU")]
public string LU { get; set; }
///
/// 生产码
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
index aab4ca3e..22deb4e9 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
@@ -212,44 +212,7 @@ namespace Win.Sfs.SettleAccount.Bases
[UnitOfWork(false)]
public virtual async Task ReceivedAsync(List p_ins)
{
-
await _invMng.ReceivedAsync(p_ins);
-
-
-
-
- //var entity = await _invMng.GetMainAsync(input.InvbillNum);
- //if (entity.InvoiceState == InvoiceBillState.报废)
- //{
- // throw new BusinessException("8989", $"发票号{entity.InvbillNum}为报废状态, 不能提交!");
- //}
- //if (entity.InvoiceState == InvoiceBillState.提交 )
- //{
- // throw new BusinessException("8989", $"发票号{entity.InvbillNum}所在发票分组{entity.InvGroupNum}现在为提交状态!");
- //}
- //if (entity.State != SettleBillState.财务已审核)
- //{
- // throw new BusinessException("8989", $"发票号{entity.InvbillNum}所在发票分组{entity.InvGroupNum}不是财务已审核状态,不能收票!");
- //}
- //if (entity != null)
- //{
- // List customConditionList = new List();
- // customConditionList.Add(new CustomCondition() { Name = "InvGroupNum", Value = entity.InvGroupNum?? string.Empty });
- // var invlist= _repository.Where(p => p.InvGroupNum == entity.InvGroupNum).ToList();
- // foreach (var inv in invlist) {
-
- // if (inv.InvoiceState != InvoiceBillState.报废)
- // {
- // inv.InvoiceState = InvoiceBillState.提交;
- // }
- // }
- // await _repository.DbContext.BulkUpdateAsync(invlist);
- // var _taskid = await _service.ExportEnqueueAsync($"发票分组{entity.InvGroupNum}收票任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyymm"), string.Empty, CurrentUser, typeof(PD_SERVICE), customConditionList, (rs) =>
- // {
-
- // });
- // return _taskid;
- //}
return ApplicationConsts.SuccessStr;
}
protected virtual async Task> GetMapGroupAsync(INVOICE_GRP_REQ_DTO input)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
index 0686b126..9f3cf6a9 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
@@ -1,11 +1,14 @@
using AutoMapper;
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Charts;
+using DocumentFormat.OpenXml.Office2010.Excel;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
+using NPOI.HPSF;
+using NPOI.OpenXmlFormats.Spreadsheet;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using SettleAccount.Bases;
using Shouldly;
@@ -25,7 +28,10 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
+using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
+using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
@@ -41,19 +47,22 @@ namespace Win.Sfs.SettleAccount.Bases
where TRequestDetailInput : RequestInputBase
where TEntityDetailExportDto : class, new()
{
-
+ private readonly VmiAppService _vimservice;
private readonly INormalEfCoreRepository _repository;
private readonly INormalEfCoreRepository _detailRepository;
public PD_SERVICE(
+
+
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
INormalEfCoreRepository repository,
-
+ VmiAppService vimservice,
INormalEfCoreRepository detailRepository
) : base(excelImportService, snowflakeIdGenerator, commonManager)
{
+ _vimservice = vimservice;
_repository = repository;
_detailRepository = detailRepository;
}
@@ -116,11 +125,205 @@ namespace Win.Sfs.SettleAccount.Bases
}
[HttpPost]
//[Route("generateinvoice")]
- public virtual async Task ApprovalPassed(TRequestMainInput input)
+ public virtual async Task ApprovalPassed(List p_list)
{
+ //_repository.Where(p => p_list.Contains(p.BillNum));
+ var detailist=_detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
+ if (detailist != null && detailist.Count > 0)
+ {
+ foreach (var itm in detailist)
+ {
+ await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
+ {
+ BillTime=itm.CreationTime,
+ ChangedTime=DateTime.Now,
+ Qty = itm.Qty,
+ DeliverTime = itm.CreationTime,
+ LogType= Entities.BQ.Vmi.VmiLogType.Type200,
+ ChangedQty=itm.Qty,
+ ChangedType=VmiType.Out,
+ SubBillType=EnumDeliverSubBillType.小件BBAC,
+ BillType=EnumDeliverBjBmpBillType.JIS件,
+ PartCode=itm.LU,
+ SettlementVinCode = itm.PN,
+ PartCode2 = itm.LU,
+ CustomerPartCode=itm.LU,
+ VinCode=itm.PN,
+ OrderNum=itm.GroupNum,
+ ErpToLoc="C0001"
+ }) ;
+ }
+ }
+ //public VmiLog()
+ //{
+ //}
-
+ //public VmiLog(Guid id)
+ //{
+ // this.Id = id;
+ //}
+
+ /////
+ ///// 分组编号
+ /////
+ //public string GroupId { get; set; }
+
+ // ///
+ // /// 库存事务分类
+ // ///
+ // public VmiLogType LogType { get; set; }
+
+ // [Display(Name = "库存变动")]
+ // public decimal ChangedQty { get; set; }
+
+ // [Display(Name = "变动单号")]
+ // public string ChangedNumber { get; set; }
+
+ // [Display(Name = "变动时间")]
+ // public DateTime ChangedTime { get; set; } = DateTime.Now;
+
+ // [Display(Name = "变动类型")]
+ // public VmiType ChangedType { get; set; }
+
+ // [Display(Name = "便动人")]
+ // public string ChangedBy { get; set; }
+
+ // [Display(Name = "是否补货")]
+ // public bool? IsReplenished { get; set; }
+
+ // #region 附加信息
+
+ // //[Display(Name = "实扣厂内零件号")]
+ // //public string PartCode { get; set; }
+
+ // [Display(Name = "结算厂内零件号")]
+ // public string PartCode2 { get; set; }
+
+ // //[Display(Name = "结算客户零件号")]
+ // //public string CustomerPartCode { get; set; }
+
+ // //[Display(Name = "EDI订单生产码")]
+ // //public string VinCode { get; set; }
+
+ // [Display(Name = "结算生产码")]
+ // public string SettlementVinCode { get; set; }
+
+ // #endregion 附加信息
+
+ // #region 库存备份
+
+ // ///
+ // /// LU零件号
+ // ///
+ // [Display(Name = "LU零件号")]
+ // public string PartCode { get; set; }
+
+ // [Display(Name = "生产码")]
+ // public string VinCode { get; set; }
+
+ // ///
+ // /// 根据零件关系表匹配
+ // ///
+ // [Display(Name = "客户零件号")]
+ // public string CustomerPartCode { get; set; }
+
+ // [Display(Name = "生产码类型")]
+ // public string CodeType { get; set; }
+
+ // [Display(Name = "发货类型")]
+ // public EnumDeliverBjBmpBillType BillType { get; set; }
+
+ // [Display(Name = "数量")]
+ // public decimal Qty { get; set; }
+
+ // [Display(Name = "发运日期")]
+ // public DateTime BillTime { get; set; }
+
+ // [Display(Name = "订单日期")]
+ // public DateTime DeliverTime { get; set; }
+
+ // ///
+ // /// ERP库位
+ // ///
+ // [Display(Name = "ERP库位")]
+ // public string ErpToLoc { get; set; }
+
+ // [Display(Name = "EDI顺序号")]
+ // public string Seq { get; set; }
+
+ // [Display(Name = "客户订单号")]
+ // public string OrderNum { get; set; }
+
+ // [Display(Name = "塑件唯一码")]
+ // public string UniqueCode { get; set; }
+
+ // [Display(Name = "EDI总成号")]
+ // public string MatchNumber { get; set; }
+
+ // [Display(Name = "PJIS生产顺序号")]
+ // public string PjsNum { get; set; }
+
+ // [Display(Name = "配置码")]
+ // public string Configcode { get; set; }
+
+ // [Display(Name = "工厂")]
+ // public string factory { get; set; }
+
+ // [Display(Name = "发货子类型")]
+ // public EnumDeliverSubBillType SubBillType { get; set; }
+
+ // [Display(Name = "WMS实发生产码")]
+ // public string RealCode { get; set; }
+
+ // [Display(Name = "备注")]
+ // public string ReMark { get; set; }
+
+ // #endregion 库存备份
+
+
+
+
+
+
+ // public enum VmiLogType
+ //{
+ // ///
+ // /// 发运入库
+ // ///
+ // [Display(Name = "发运入库")]
+ // Type100 = 100,
+
+ // ///
+ // /// 结算出库
+ // ///
+ // [Display(Name = "结算出库")]
+ // Type200 = 200,
+
+ // ///
+ // /// 反结入库
+ // ///
+ // [Display(Name = "反结入库")]
+ // Type300 = 300,
+
+ // ///
+ // /// 退货出库
+ // ///
+ // [Display(Name = "退货出库")]
+ // Type400 = 400,
+
+ // ///
+ // /// 调整入库
+ // ///
+ // [Display(Name = "调整入库")]
+ // Type500 = 500,
+
+ // ///
+ // /// 调整出库
+ // ///
+ // [Display(Name = "调整出库")]
+ // Type600 = 600,
+ //}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
index 93f8af10..35c17389 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
@@ -93,11 +93,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算
-
-
var priceList = _priceRepository.ToList();//价格单
var errorList = await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则
-
if (errorList.Count() > 0)
{
return await ExportErrorReportAsync(errorList);
@@ -147,7 +144,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
SettleDate = p.SettleDate,
GroupNum = p.GroupNum,
ContractDocID = string.Empty
-
}).ToList();//不能结算
await FirstInvoice(entitys,new List(),dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
index 9d5e565c..e9f51a5b 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
@@ -50,8 +50,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
await _bbacNotMng.GenerateSettlementOrder(entitys);
-
-
return ApplicationConsts.SuccessStr;
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
index 015537ec..8dbfbd69 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
@@ -25,16 +25,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
- public BBAC_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository)
+ public BBAC_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
-
-
-
-
-
-
-
}
-
}
-}
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
index 55856361..5690e5f4 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
@@ -26,35 +26,40 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO>
{
- public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository)
- {
- //List customConditionList = new List();
- //customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
- //customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
- //customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
- //customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty });
- //customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
- //var _versionQuery = _versionRepository.Where(p => p.Version == version);
- //if (_versionQuery.Count() > 0)
- //{
- // _versionQuery.BatchDelete();
- //}
- //var _query = _repository.Where(p => p.Version == version);
- //if (_query.Count() > 0)
- //{
- // await _query.BatchDeleteAsync();
- //}
- //var _taskid = await _service.ImportEnqueueAsync(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) =>
- //{
+ //public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository)
+ //{
+ // //List customConditionList = new List();
+ // //customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
+ // //customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
+ // //customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
+ // //customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty });
+ // //customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
+ // //var _versionQuery = _versionRepository.Where(p => p.Version == version);
+ // //if (_versionQuery.Count() > 0)
+ // //{
+ // // _versionQuery.BatchDelete();
+ // //}
+
+ // //var _query = _repository.Where(p => p.Version == version);
+ // //if (_query.Count() > 0)
+ // //{
+ // // await _query.BatchDeleteAsync();
+ // //}
+ // //var _taskid = await _service.ImportEnqueueAsync(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) =>
+ // //{
- //});
+ // //});
+
+ //}
+ public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
+ {
}
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
index 0ef7cf8c..95977867 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
@@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
PUB_PD_DETAIL, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO,
PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_DTO>
{
- public PUB_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository)
+ public PUB_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index ec4662eb..23322d6b 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -59,6 +59,7 @@ using SettleAccount.Domain.BQ;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
+using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
namespace Win.Sfs.SettleAccount
{
@@ -319,6 +320,22 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap();
}
+ private void CreateMapBBAC_PD()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ //CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapBBAC_PD_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ //CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ }
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
index 351effa7..d23afa17 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
@@ -261,7 +261,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
///
public virtual async Task> GetDetailByInbillNumAsync(List p_invs)
{
- return await _detailRepository.Where(p =>p_invs.Contains(p.BillNum)).ToListAsync();
+ return await _detailRepository.Where(p =>p_invs.Contains(p.InvbillNum)).ToListAsync();
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
index e68ef06f..b5cb2889 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
@@ -47,10 +47,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
PUB_CAN_SA_MNG pubMng,
BBAC_CAN_SA_MNG bbacMng,
HBPO_CAN_SA_MNG hbpoMng,
- INormalEfCoreRepository pdbbacRepository,
- INormalEfCoreRepository pdhbpoRepository,
- INormalEfCoreRepository pdpubRepository,
- INormalEfCoreRepository repository,
+ INormalEfCoreRepository pdbbacRepository,
+ INormalEfCoreRepository pdhbpoRepository,
+ INormalEfCoreRepository pdpubRepository,
+ INormalEfCoreRepository repository,
INormalEfCoreRepository groupRepository,
INormalEfCoreRepository detailRepository,
INormalEfCoreRepository notRepository,
@@ -446,7 +446,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
guid: itm.Id,
keyCode: itm.KeyCode,
version: itm.Version,
- billNum: itm.BillNum,
+ billNum: itm.InvbillNum,
lU: itm.LU,
rELU: string.Empty,
pN: itm.PN,
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
index 6cfcd2b4..9382f572 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
@@ -29,20 +29,39 @@ public class VmiLog : BasicAggregateRoot
///
public VmiLogType LogType { get; set; }
+ ///
+ /// 库存变动
+ ///
[Display(Name = "库存变动")]
+
public decimal ChangedQty { get; set; }
+ ///
+ /// 变动单号
+ ///
[Display(Name = "变动单号")]
public string ChangedNumber { get; set; }
+ ///
+ /// 变动时间
+ ///
[Display(Name = "变动时间")]
public DateTime ChangedTime { get; set; } = DateTime.Now;
+ ///
+ /// 变动类型
+ ///
[Display(Name = "变动类型")]
public VmiType ChangedType { get; set; }
+ ///
+ /// 变动人
+ ///
[Display(Name = "便动人")]
public string ChangedBy { get; set; }
+ ///
+ /// 是否补货
+ ///
[Display(Name = "是否补货")]
public bool? IsReplenished { get; set; }
@@ -51,6 +70,9 @@ public class VmiLog : BasicAggregateRoot
//[Display(Name = "实扣厂内零件号")]
//public string PartCode { get; set; }
+ ///
+ /// 结算厂内零件号
+ ///
[Display(Name = "结算厂内零件号")]
public string PartCode2 { get; set; }
@@ -60,6 +82,9 @@ public class VmiLog : BasicAggregateRoot
//[Display(Name = "EDI订单生产码")]
//public string VinCode { get; set; }
+ ///
+ /// 结算生产码
+ ///
[Display(Name = "结算生产码")]
public string SettlementVinCode { get; set; }
@@ -88,7 +113,9 @@ public class VmiLog : BasicAggregateRoot
[Display(Name = "发货类型")]
public EnumDeliverBjBmpBillType BillType { get; set; }
-
+ ///
+ /// 数量
+ ///
[Display(Name = "数量")]
public decimal Qty { get; set; }