diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs
index a6c829f9..214442b8 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs
@@ -14,7 +14,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
///
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部单号
///
public string ExternalKanbanNumber { get; set; }
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
index 7b3b5dc7..213804bd 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
@@ -15,9 +15,9 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部单号
///
- [ExporterHeader(DisplayName = "外部看板编号")]
+ [ExporterHeader(DisplayName = "外部单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
index 5d91ef7c..e46caa69 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
@@ -15,9 +15,9 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部单号
///
- [ImporterHeader(Name = "外部看板编号")]
+ [ImporterHeader(Name = "外部单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs
index e3b69036..5d0ee41c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs
@@ -15,7 +15,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
///
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部单号
///
public string ExternalKanbanNumber { get; set; }
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
index 3d93ae71..44041295 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
@@ -17,8 +17,8 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
///
///外部看板编号
///
- //[ExporterHeader(DisplayName = "外部看板编号")]
- //public string ExternalKanbanNumber { get; set; }
+ [ExporterHeader(DisplayName = "外部单号")]
+ public string ExternalKanbanNumber { get; set; }
///
///看板编号
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
index 1a4fff9b..ceb4f942 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
///
///外部看板编号
///
- [ImporterHeader(Name = "外部看板编号")]
+ [ImporterHeader(Name = "外部单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
index 4cb5bb4f..d2af958f 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
@@ -134,6 +134,66 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
+ [Display(Name = "版本号")]
+ public string Version { set; get; }
+
+ [Display(Name = "客户")]
+ public string Client { set; get; }
+ [Display(Name = "出库类型")]
+ public string Type { set; get; }
+ //[Display(Name = "结算编码")]
+ //public string SettleCode { set; get; }
+ //[Display(Name = "销售渠道")]
+ //public string SaleCode { set; get; }
+ //[Display(Name = "客户代码")]
+ //public string ClientCode { set; get; }
+ [Display(Name = "结算单")]
+ public string BillNum { set; get; }
+ [Display(Name = "交货编码")]
+ public string SwitchCode { set; get; }
+
+ [Display(Name = "物料号")]
+ public string MaterialCode { set; get; }
+ //[Display(Name = "寄售类别")]
+ //public string SaleType { set; get; }
+ [Display(Name = "结算数量")]
+ public decimal Qty { set; get; }
+ [Display(Name = "实际出库数量")]
+ public decimal OutputQty { set; get; }
+ [Display(Name = "差异数量")]
+ public decimal DiffQty { set; get; }
+ //[Display(Name = "开票单价")]
+ //public decimal Price { set; get; }
+ //[Display(Name = "结算金额")]
+ //public decimal Amt { set; get; }
+ //[Display(Name = "已出库金额")]
+ //public decimal OutPutAmt { set; get; }
+ //[Display(Name = "WMS待出库金额")]
+ //public decimal DiffAmt { set; get; }
+ [Display(Name = "物料组编码")]
+ public string MaterialGroupCode { set; get; }
+ [Display(Name = "物料组(车型)")]
+ public string MaterialGroup { set; get; }
+ [Display(Name = "物料组描述")]
+ public string MaterialDesc { set; get; }
+ [Display(Name = "备注")]
+ public string Remark1 { set; get; }
+ [Display(Name = "状态")]
+ public int State { set; get; }
+
+ }
+
+ ///
+ /// 有条码业务
+ ///
+ public class WmsDetailWithCodeReportDto
+ {
+ public WmsDetailWithCodeReportDto()
+ {
+ }
+
+
+
[Display(Name = "版本号")]
public string Version { set; get; }
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
index aff0a217..326ea468 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
@@ -149,7 +149,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 实体DTO
[HttpGet]
[Route("{id}")]
- [Authorize(SettleAccountPermissions.CodeSettings.Default)]
virtual public async Task GetAsync(Guid id)
{
var result = await _repository.GetAsync(id);
@@ -187,7 +186,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 实体DTO列表
[HttpPost]
[Route("list")]
- [Authorize(SettleAccountPermissions.CodeSettings.Default)]
virtual public async Task> GetListAsync(CodeSettingRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
@@ -209,7 +207,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 实体总数
[HttpGet]
[Route("count")]
- [Authorize(SettleAccountPermissions.CodeSettings.Default)]
virtual public async Task GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
@@ -221,7 +218,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 实体DTO列表
[HttpGet]
[Route("all")]
- [Authorize(SettleAccountPermissions.CodeSettings.Default)]
virtual public async Task> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
@@ -313,7 +309,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
[HttpPost]
[Route("Export")]
- [Authorize(SettleAccountPermissions.CodeSettings.Default)]
virtual public async Task ExportAsync(CodeSettingRequestDto input)
{
string _fileName = string.Format("通用代码设置_{0}.xlsx",DateTime.Now.ToString("yyyyMMdd"));
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
index 78bc6dd7..d54d9c7c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
@@ -444,10 +444,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
var _billNum = "HQHKB" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
- var result = await _exportImporter.ExtendExcelImport(files, _excelImportService);
+ var result = await _exportImporter.ExtendExcelOfSheetOneImport(files, _excelImportService);
+ var filteResult = result.Where(p => p.Kanban != "");//过滤掉看板号为空的数据
List _lst = new List();
var _lsCopy = new List();
- foreach (var itm in result)
+ foreach (var itm in filteResult)
{
WmsHQHKanbanOutPutDetial _detail = new WmsHQHKanbanOutPutDetial(
GuidGenerator.Create(),
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
index 95d6b7c0..3d17fd02 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
@@ -479,7 +479,7 @@ into temp1
{
var _billNum = "BHQH" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
- var result = await _exportImporter.ExtendExcelImport(files, _excelImportService);
+ var result = await _exportImporter.ExtendExcelOfSheetOneImport(files, _excelImportService);
List _lst = new List();
var _lsCopy = new List();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
index db719bfc..370475db 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
@@ -678,10 +678,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
- var result = await _exportImporter.ExtendExcelImport(files, _excelImportService);
+ var result = await _exportImporter.ExtendExcelOfSheetOneImport(files, _excelImportService);
+ var filteResult = result.Where(p => p.Kanban != "");
List _lst = new List();
var _lsCopy = new List();
- foreach (var itm in result)
+ foreach (var itm in filteResult)
{
WmsKanbanOutPutDetial _detail = new WmsKanbanOutPutDetial(
GuidGenerator.Create(),
@@ -754,7 +755,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var _version = new WmsKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
- return _billNum;
+ //return _billNum;
+ return ApplicationConsts.SuccessStr;
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
index 56c57dd1..2ad32740 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
@@ -478,11 +478,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
- var result = await _exportImporter.ExtendExcelImport(files, _excelImportService);
+ var result = await _exportImporter.ExtendExcelOfSheetOneImport(files, _excelImportService);
+ var filteResult = result.Where(p => p.OrderBillNum != "");//过滤掉订单号为空的数据,限制这样数据导入
List _lst = new List();
var _lsCopy = new List();
- foreach (var itm in result)
+ foreach (var itm in filteResult)
{
WmsSharePart90OutPutDetial _detail = new WmsSharePart90OutPutDetial(
GuidGenerator.Create(),
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
index 598224f7..3f598668 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
@@ -741,7 +741,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
List _lst = new List();
var _lsCopy = new List();
- foreach (var itm in result_withbill)
+ var filte_result_withbill = result_withbill.Where(p => p.OrderBillNum != "");//采购单号为空的过滤掉
+ foreach (var itm in filte_result_withbill)
{
WmsSharePart90OutPutDetial _detail = new WmsSharePart90OutPutDetial(
GuidGenerator.Create(),
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
index 34000c05..c62ecf21 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
@@ -412,7 +412,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
var _billNum = "BCar" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
- var result = await _exportImporter.ExtendExcelImport(files, _excelImportService);
+ var result = await _exportImporter.ExtendExcelOfSheetOneImport(files, _excelImportService);
List _lst = new List();
var _lsCopy = new List();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs
new file mode 100644
index 00000000..f86fb613
--- /dev/null
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs
@@ -0,0 +1,161 @@
+using EFCore.BulkExtensions;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
+using Microsoft.AspNetCore.Mvc;
+using Shouldly;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Caching;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Uow;
+using Win.Abp.Snowflakes;
+using Win.Sfs.BaseData.ImportExcelCommon;
+using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Constant;
+using Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput;
+using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
+using Win.Sfs.Shared.Filter;
+
+namespace Win.Sfs.SettleAccount.Entities.WMS
+{
+ [Route("api/settleaccount/WMSOutputDetailWithCodeReport")]
+ public class WMSOutputDetailWithCodeReportAppService :
+ SettleAccountApplicationBase
+ {
+ private readonly ISettleAccountBranchEfCoreRepository _wmsRepository;
+ private readonly WmsOutputSumDapperRepository _dapper;
+ private readonly IExcelImportAppService _excelImportService;
+
+ private readonly ErpSumOutputDapperRepository _erpDapper;
+ ///
+ ///
+ ///
+ ///
+ ///
+
+ public WMSOutputDetailWithCodeReportAppService(
+ WmsOutputSumDapperRepository dapper,
+ ISettleAccountBranchEfCoreRepository wmsRepository,
+ ISettleAccountBranchEfCoreRepository job,
+ IExcelImportAppService excelImportService,
+ IDistributedCache cache,
+ ISnowflakeIdGenerator snowflakeIdGenerator,
+ ICommonManager commonManager,
+ ErpSumOutputDapperRepository erpDapper
+ ) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
+ {
+ _erpDapper = erpDapper;
+ _wmsRepository = wmsRepository;
+ _dapper = dapper;
+ _excelImportService = excelImportService;
+
+ }
+
+ [HttpGet]
+ [Route("Make")]
+ [UnitOfWork(false)]
+ public async Task ReportMake(string version, DateTime accountDate)
+ {
+ //有条码的业务(可根据条码/K号/底盘号,查询是否结算过,结算期间)
+ var _ls = _dapper.GetWmsSearchWithCodeReportList(version, "0");
+
+ var _count = _wmsRepository.Count(p => p.Version == version && p.State > 0);
+ if (_count > 0)
+ {
+ throw new BusinessException("8899", "不能重新生成此版本!");
+ }
+ else
+ {
+ var query = _wmsRepository.Where(p => p.Version == version);
+ await query.BatchDeleteAsync();
+ }
+ List _lst = new List();
+ if (_ls != null && _ls.Count() > 0)
+ {
+ foreach (var itm in _ls)
+ {
+ _lst.Add(new WmsDetailWithCodeReport(
+ Guid.NewGuid(),
+ itm.客户,
+ itm.出库类型,
+ version,
+ itm.结算单,
+ itm.通用代码号,
+ itm.物料号,
+ itm.结算数量,
+ itm.实际出库数量,
+ itm.差异数量,
+ itm.物料组编码,
+ itm.物料组车型,
+ itm.物料描述,
+ itm.备注,
+ 0));
+ }
+ }
+ await _wmsRepository.GetDbContext().BulkInsertAsync(_lst);
+ return ApplicationConsts.SuccessStr;
+ }
+ ///
+ /// Wms汇总合计明细
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("WmsDetailReport")]
+
+ virtual public async Task> GetListAsync(WmsRequestDetailReportDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
+ input.SkipCount, true);
+ var totalCount = await GetCountAsync(input);
+ return new PagedResultDto(totalCount, entities);
+ }
+
+
+ private async Task GetCountAsync(WmsRequestDetailReportDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
+ }
+ [HttpPost]
+ [Route("ModifyTaskState")]
+
+ public virtual async Task SyncInterface()
+ {
+ //_wmsRepository.Where(p => p.BillNum ==)
+ return true;
+ }
+
+ [HttpPost]
+ [Route("Export")]
+ virtual public async Task ExportAsync(WmsRequestDetailReportDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
+ 0, true);
+ var dtoDetails = ObjectMapper.Map, List>(entities);
+ IExporter _excel = new ExcelExporter();
+ byte[] result = null;
+ var _fileName = string.Format("差异清单(有条码)报表_{0}.xlsx", Guid.NewGuid().ToString());
+ result = await _excel.ExportAsByteArray(dtoDetails);
+ result.ShouldNotBeNull();
+ //保存导出文件到服务器存成二进制
+ await _excelImportService.SaveBlobAsync(
+ new SaveExcelImportInputDto
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+ }
+
+
+ }
+}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
index 5d42c51c..78edb22a 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
@@ -15,6 +15,7 @@ using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
+using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
@@ -312,6 +313,43 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
}
+ ///
+ /// 结算总成和ERP总成价格对比
+ ///
+ /// 上传的文件(前端已经限制只能上传一个附件)
+ ///
+ [HttpGet]
+ [Route("BomDiffPrice-Make")]
+ [DisableRequestSizeLimit]
+
+ public async Task SettledPartAndErpPartPriceDiffMake(string version, string customerCode)
+ {
+
+ if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
+ {
+ throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
+ }
+ if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
+ {
+ throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
+ }
+
+ List customConditionList = new List();
+
+ customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "Bom定价差异明细" });
+ customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
+ customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
+
+ var _taskid = await _service.ExportEnqueueAsync("Bom定价差异明细", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
+ {
+
+ });
+ return _taskid;
+ }
+
+
+
+
///
/// 看板未结输出
///
@@ -976,6 +1014,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
[HttpPost]
[Route("FisUpdateExportService")]
[DisableRequestSizeLimit]
+ [UnitOfWork(isTransactional: false)]
public async Task FisUpdateExportServiceMake(
HQKanbanRequestDto input
)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
index 1c338884..fa0f4e49 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
@@ -6,6 +6,7 @@
net5.0
Win.Sfs.SettleAccount
false
+ False
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 967e3b5e..9d860b55 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -266,6 +266,7 @@ namespace Win.Sfs.SettleAccount
CreateMapWmsOneTimeSale();
CreateMapWMSOutputSum();
CreateMapWMSDiffOutputSum();
+ CreateMapWMSWithCodeOutputSum();
#endregion
}
@@ -282,6 +283,14 @@ namespace Win.Sfs.SettleAccount
{
CreateMap().ReverseMap();
+ }
+ ///
+ /// 有条码业务
+ ///
+ private void CreateMapWMSWithCodeOutputSum()
+ {
+ CreateMap().ReverseMap();
+
}
private void CreateMapWMSJit()
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettledPartAndErpPartPriceDiffs/SettledPartAndErpPartPriceDiff.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettledPartAndErpPartPriceDiffs/SettledPartAndErpPartPriceDiff.cs
index 9567de5b..3dba01d8 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettledPartAndErpPartPriceDiffs/SettledPartAndErpPartPriceDiff.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettledPartAndErpPartPriceDiffs/SettledPartAndErpPartPriceDiff.cs
@@ -19,9 +19,9 @@ namespace Win.Sfs.SettleAccount.Reports.SettledPartAndErpPartPriceDiffs
[ExporterHeader(DisplayName = "ERP物料编号")]
public string ErpMaterialCode { set; get; }
- [ExporterHeader(DisplayName = "总成价格")]
+ [ExporterHeader(DisplayName = "Bom总成价格")]
public decimal Price { set; get; }
- [ExporterHeader(DisplayName = "结算总成价格")]
+ [ExporterHeader(DisplayName = "总成价格")]
public decimal SumPrice { get; set; }
[ExporterHeader(DisplayName = "差额")]
public decimal DiffPrice { get; set; }
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
index 25d6e285..1e2e15af 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
@@ -172,4 +172,80 @@ namespace Win.Sfs.SettleAccount.Entities
public int State { set; get; }
}
+
+ ///
+ /// 有条码
+ ///
+ public class WmsDetailWithCodeReport : FullAuditedAggregateRootBase
+ {
+ public WmsDetailWithCodeReport()
+ {
+ }
+
+ public WmsDetailWithCodeReport(Guid id, string client, string type, string version, string billNum, string switchCode, string materialCode, decimal qty, decimal outputQty, decimal diffQty, string materialGroupCode, string materialGroup, string materialDesc, string remark1, int state) : base(id)
+ {
+ Version = version;
+ Type = type;
+ Client = client;
+ BillNum = billNum;
+ SwitchCode = switchCode;
+ MaterialCode = materialCode;
+ Qty = qty;
+ OutputQty = outputQty;
+ DiffQty = diffQty;
+ MaterialGroupCode = materialGroupCode;
+ MaterialGroup = materialGroup;
+ MaterialDesc = materialDesc;
+ Remark1 = remark1;
+ State = state;
+ }
+
+ [Display(Name = "版本号")]
+ public string Version { set; get; }
+
+ [Display(Name = "客户")]
+ public string Client { set; get; }
+ [Display(Name = "出库类型")]
+ public string Type { set; get; }
+ //[Display(Name = "结算编码")]
+ //public string SettleCode { set; get; }
+ //[Display(Name = "销售渠道")]
+ //public string SaleCode { set; get; }
+ //[Display(Name = "客户代码")]
+ //public string ClientCode { set; get; }
+ [Display(Name = "结算单")]
+ public string BillNum { set; get; }
+ [Display(Name = "交货编码")]
+ public string SwitchCode { set; get; }
+
+ [Display(Name = "物料号")]
+ public string MaterialCode { set; get; }
+ //[Display(Name = "寄售类别")]
+ //public string SaleType { set; get; }
+ [Display(Name = "结算数量")]
+ public decimal Qty { set; get; }
+ [Display(Name = "实际出库数量")]
+ public decimal OutputQty { set; get; }
+ [Display(Name = "差异数量")]
+ public decimal DiffQty { set; get; }
+ //[Display(Name = "开票单价")]
+ //public decimal Price { set; get; }
+ //[Display(Name = "结算金额")]
+ //public decimal Amt { set; get; }
+ //[Display(Name = "已出库金额")]
+ //public decimal OutPutAmt { set; get; }
+ //[Display(Name = "WMS待出库金额")]
+ //public decimal DiffAmt { set; get; }
+ [Display(Name = "物料组编码")]
+ public string MaterialGroupCode { set; get; }
+ [Display(Name = "物料组(车型)")]
+ public string MaterialGroup { set; get; }
+ [Display(Name = "物料组描述")]
+ public string MaterialDesc { set; get; }
+ [Display(Name = "备注")]
+ public string Remark1 { set; get; }
+ [Display(Name = "状态")]
+ public int State { set; get; }
+
+ }
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs
index 21a73298..cd270dc9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs
@@ -105,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs
public string Version { set; get; }
- [ExporterHeader(DisplayName = "未结期间", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "漏结期间")]
public string UnSettleVersion { set; get; }
//总金额差异
//[ExporterHeader(DisplayName = "总金额差异")]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
index e3961354..27586979 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
@@ -379,6 +379,9 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureWmsDetailReport(options);
builder.ConfigureWmsDetailDiffReport(options);
+ //有条码
+ builder.ConfigureWmsDetailWithCodeReport(options);
+
#endregion
@@ -606,6 +609,37 @@ namespace Win.Sfs.SettleAccount
});
}
+ ///
+ /// 有条码
+ ///
+ ///
+ ///
+ private static void ConfigureWmsDetailWithCodeReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
+ {
+
+ builder.Entity(b =>
+ {
+
+ b.ToTable($"{options.TablePrefix}_WmsDetailWithCodeReport", options.Schema);
+
+ b.ConfigureByConvention();
+ b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
+ b.Property(x => x.MaterialCode).HasMaxLength(50);
+ b.Property(x => x.MaterialDesc).HasMaxLength(100);
+ b.Property(x => x.Client).IsRequired().HasMaxLength(50);
+
+ b.Property(x => x.MaterialCode).HasMaxLength(50);
+ b.Property(x => x.MaterialDesc).HasMaxLength(150);
+
+ b.Property(x => x.MaterialGroup).HasMaxLength(50);
+ b.Property(x => x.MaterialGroupCode).HasMaxLength(50);
+
+ //创建组合索引
+
+
+ });
+ }
+
private static void ConfigureHQMKanban(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
index 3d5ddd2e..07245ff9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.Entities.Prices;
@@ -28,7 +29,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
}
-
+ [UnitOfWork(isTransactional: false)]
public virtual void UpdateFisSettle()
{
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettledPartAndErpPartPriceDiffRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettledPartAndErpPartPriceDiffRepository.cs
index 39979f27..b76c64f5 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettledPartAndErpPartPriceDiffRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettledPartAndErpPartPriceDiffRepository.cs
@@ -21,16 +21,35 @@ namespace Win.Sfs.SettleAccount.Repository.Report
public virtual List GetDiffReport(string year, string customcode, string version)
{
- string sqlString = " select " + string.Format(" {0} as Version , ", version) + " r1.ErpMaterialCode, r2.Price, r1.SumPrice , r1.MaterialDesc, (isnull(r2.Price,0)-isnull(r1.SumPrice,0)) as diffPrice from \n" +
- "( select ErpMaterialCode, MaterialDesc, SUM(Price) as SumPrice from(\n" +
- "select a.ErpMaterialCode, b.SettlementPartCode, a.MaterialDesc, (a.Qty * b.Price) as Price from\n" +
- "(SELECT ErpMaterialCode, MaterialDesc, SettleMaterialCode, Qty, Version ,CustomerCode \n" +
- "FROM [Set_MaterialRelationshipDetail] mdetail \n" +
+ string sqlString = "SELECT\n" +
+" t1.ErpMaterialCode,\n" +
+" t1.Price SumPrice,\n" +
+" t2.Price,\n" +
+" t3.MaterialDesc,\n" +
+" t3.EstimateTypeDesc ,\n" +
- " where mdetail.Version='{0}' and mdetail.CustomerCode='{1}' \n" +
- ") a \n" +
- "inner join Set_settlement_part b on a.Version = b.Version and a.SettleMaterialCode = b.SettlementPartCode and a.CustomerCode = b.CustomerCode) temp group by ErpMaterialCode, MaterialDesc) r1 left join set_pricelist r2 " +
- " on r2.MaterialCode=r1.ErpMaterialCode and r2.Version='{0}'\n";
+" (ISNULL(t1.price,0)-ISNULL(t2.price,0)) DiffPrice\n" +
+
+"FROM\n" +
+" (\n" +
+" SELECT\n" +
+" ErpMaterialCode,\n" +
+" SUM( amt ) Price \n" +
+" FROM\n" +
+" (\n" +
+" SELECT\n" +
+" ErpMaterialCode,\n" +
+" SettleMaterialCode,(\n" +
+" Qty * isnull( b.Price, 0 )) amt \n" +
+" FROM\n" +
+" Set_MaterialRelationshipDetail a\n" +
+" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) AND type = 10 ) b ON a.SettleMaterialCode = b.MaterialCode \n" +
+" ) temp1 \n" +
+" GROUP BY\n" +
+" ErpMaterialCode \n" +
+" ) t1\n" +
+" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) AND type = 10 ) t2 ON t1.ErpMaterialCode = t2.MaterialCode\n" +
+" LEFT JOIN ( SELECT max( Id ) Id, MaterialCode, MaterialDesc, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc ) t3 ON t1.ErpMaterialCode = t3.MaterialCode";
string _sql = string.Format(sqlString, version, customcode);
@@ -38,5 +57,32 @@ namespace Win.Sfs.SettleAccount.Repository.Report
//var _query = _db.Query();
return _query.ToList();
}
+
+ public virtual List GetDiffDetailReport(string year, string customcode, string version)
+ {
+ string sqlString = "select a.ErpMaterialCode,SettleMaterialCode,a.ShipMaterailCode,d.MaterialDesc,d.EstimateTypeDesc from\n" +
+" Set_MaterialRelationshipDetail_pg a left join\n" +
+" (\n" +
+" SELECT\n" +
+" Price,\n" +
+" MaterialCode \n" +
+" FROM\n" +
+" Set_PriceList \n" +
+" WHERE\n" +
+" version = ( SELECT Max( Version ) FROM Set_PriceList ) and type=10 )\n" +
+" b on a.SettleMaterialCode=b.MaterialCode \n" +
+" left join \n" +
+" set_material d ON a.ShipMaterailCode = d.CustomerPartCode\n" +
+" \n" +
+" \n" +
+" where b.MaterialCode is null";
+ string _sql = string.Format(sqlString, version, customcode);
+
+ var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
+ //var _query = _db.Query();
+ return _query.ToList();
+ }
+
+
}
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
index ca2b8b9b..2d286676 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
@@ -18,29 +18,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
- //public string 行号 { set; get; }
- //public string 客户 { set; get; }
- //public string 出库类型 { set; get; }
- //public string 结算单 { set; get; }
- //public string 物料号 { set; get; }
- //public string 通用代码号 { set; get; }
- //public string 结算数量 { set; get; }
- //public string 实际出库数量 { set; get; }
- //public string 差异数量 { set; get; }
- //public string 开票单价 { set; get; }
- //public string 结算金额 { set; get; }
- //public string WMS待出库金额 { set; get; }
- //public string 物料组编码 { set; get; }
- //public string 物料组车型 { set; get; }
- //public string 物料描述 { set; get; }
- //public string 备注 { set; get; }
-
-
-
-
-
-
-
+
@@ -63,8 +41,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//[ImporterHeader(Name = "客户代码")]
//[ExporterHeader(DisplayName = "客户代码")]
//public string 客户代码 { set; get; }
- //[ImporterHeader(Name = "结算单")]
- //[ExporterHeader(DisplayName = "结算单")]
+ [ImporterHeader(Name = "结算单")]
+ [ExporterHeader(DisplayName = "结算单")]
public string 结算单 { set; get; }
[ImporterHeader(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
@@ -110,7 +88,26 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string 备注 { set; get; }
-
+
+ //public string 行号 { set; get; }
+ //public string 客户 { set; get; }
+ //public string 出库类型 { set; get; }
+ //public string 结算单 { set; get; }
+ //public string 物料号 { set; get; }
+ //public string 通用代码号 { set; get; }
+ //public string 结算数量 { set; get; }
+ //public string 实际出库数量 { set; get; }
+ //public string 差异数量 { set; get; }
+ //public string 开票单价 { set; get; }
+ //public string 结算金额 { set; get; }
+ //public string WMS待出库金额 { set; get; }
+ //public string 物料组编码 { set; get; }
+ //public string 物料组车型 { set; get; }
+ //public string 物料描述 { set; get; }
+
+ //public string 备注 { set; get; }
+
+
@@ -908,6 +905,110 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
+ ///
+ /// 有条码的业务(可根据条码/K号/底盘号,查询是否结算过,结算期间)
+ ///
+ ///
+ ///
+ ///
+ public virtual List GetWmsSearchWithCodeReportList(string version, string state)
+ {
+ var _sql = "SELECT\n" +
+ " ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,\n" +
+ " temp1.Client 客户,\n" +
+ " temp1.Type 出库类型,\n" +
+ " temp1.BillNum 结算单,\n" +
+ " temp1.MaterialCode 物料号,\n" +
+ " temp1.CNumber 通用代码号,\n" +
+ " Isnull( temp1.Qty, 0 ) 结算数量,\n" +
+ " Isnull( temp1.OutputQty, 0 ) 实际出库数量,\n" +
+ " Isnull( temp1.Qty, 0 ) - Isnull( temp1.OutputQty, 0 ) 差异数量,\n" +
+ " temp1.Price 开票单价,\n" +
+ " Round( Isnull( temp1.Qty, 0 ) * temp1.Price, 2 ) 结算金额,\n" +
+ " Round( ( Isnull( temp1.Qty, 0 ) - Isnull( temp1.OutputQty, 0 ) ) * temp1.Price, 2 ) WMS待出库金额,\n" +
+ " temp2.EstimateType 物料组编码,\n" +
+ " temp2.EstimateTypeDesc 物料组车型,\n" +
+ " temp2.MaterialDesc 物料描述,\n" +
+ " temp1.remark 备注 \n" +
+ "FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " '大众准时化出库' AS Type,\n" +
+ " '大众' Client,\n" +
+ " BillNum,\n" +
+ " MaterialCode,\n" +
+ " Qty,\n" +
+ " 0 OutputQty,\n" +
+ " 0 IsBack,\n" +
+ " Price,\n" +
+ " ChassisNumber CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsJitOutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State = 2 UNION ALL\n" +
+ " SELECT\n" +
+ " '大众看板出库' AS Type,\n" +
+ " '大众' Client,\n" +
+ " BillNum,\n" +
+ " MaterialCode,\n" +
+ " Qty Qty,\n" +
+ " 0 OutputQty,\n" +
+ " 0 IsBack,\n" +
+ " Price,\n" +
+ " Kanban CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsKanbanOutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State = 2 UNION ALL\n" +
+ " SELECT\n" +
+ " '大众备件条码出库' AS Type,\n" +
+ " '大众' Client,\n" +
+ " BillNum,\n" +
+ " MaterialCode,\n" +
+ " Qty Qty,\n" +
+ " 0 OutPutQty,\n" +
+ " 1 IsBack,\n" +
+ " Price,\n" +
+ " OrderBillNum CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsSharePart90OutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State = 2 UNION ALL\n" +
+ " SELECT\n" +
+ " '红旗看板出库' AS Type,\n" +
+ " '红旗' Client,\n" +
+ " BillNum,\n" +
+ " MaterialCode,\n" +
+ " Qty Qty,\n" +
+ " 0 OutPutQty,\n" +
+ " 0 IsBack,\n" +
+ " Price,\n" +
+ " Kanban CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsHQHKanbanOutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State = 2 \n" +
+ " ) temp1\n" +
+ " LEFT JOIN ( SELECT MAX ( Id ) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType ) temp2 ON temp1.MaterialCode = temp2.MaterialCode";
+
+
+ _sql = string.Format(_sql, version, state);
+
+ var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
+
+ return _query.ToList();
+ }
+
+
+
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs
index 9ecff068..de28ddc2 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
+using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@@ -23,7 +24,7 @@ namespace SettleAccount.Job.Services.Report
{
_dapperRepository = dapperRepository;
}
-
+ [UnitOfWork(isTransactional: false)]
public string ExportFile(Guid id, List exportName, List property)
{
_dapperRepository.UpdateFisSettle();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
index 5446acc8..95c25bde 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
@@ -180,11 +180,11 @@ namespace SettleAccount.Job.Services
_ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
}
}
-
-
- //.Select(p => p.FirstOrDefault());
- _ls = _ls.OrderBy(p => p.SapMaterialCode).ThenBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ToList();
+
+
+ //.Select(p => p.FirstOrDefault());
+ _ls = _ls.OrderBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ThenBy(p => p.SapMaterialCode).ToList();
}
_outputService.Export(id, _filename, _ls);
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettledPartAndErpPartPriceDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettledPartAndErpPartPriceDiffExportService.cs
index 59a21ca9..60ad7617 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettledPartAndErpPartPriceDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettledPartAndErpPartPriceDiffExportService.cs
@@ -31,7 +31,7 @@ namespace SettleAccount.Job.Services.Report
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var _list= _dapper.GetDiffReport(DateTime.Now.Year.ToString(), customerCode, version);
- _outputService.Export(id,string.Format("总成定价和结算价对比_{0}.xlsx",Guid.NewGuid().ToString()), _list);
+ _outputService.Export(id,string.Format("Bom定价对比_{0}.xlsx",Guid.NewGuid().ToString()), _list);
return id.ToString();
}