Browse Source

Merge branch 'master' of https://e.coding.net/ccwin-in/PG/Win.sfs.SmartSettlementSystem.PG

# Conflicts:
#	src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220218.txt
#	src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220219.txt
#	src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
#	src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
FoShanPG
44673626 3 years ago
parent
commit
4f28481a6a
  1. BIN
      .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo
  2. 118
      src/Gateways/InternalGateway/InternalGateway.Host/appsettings.Development.json
  3. 145
      src/Gateways/InternalGateway/InternalGateway.Host/appsettings.json
  4. 435
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs
  5. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  6. 338
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
  7. 101
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs
  8. 23
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/WmsOutputSumExportService.cs

BIN
.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo

Binary file not shown.

118
src/Gateways/InternalGateway/InternalGateway.Host/appsettings.Development.json

@ -1,9 +1,127 @@
{
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
//"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
//"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;"
"Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
"Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Serilog": {
"Using": [],
"MinumumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"Settings": {
"Abp.Mailing.Smtp.Host": "149.223.116.5",
"Abp.Mailing.Smtp.Port": "25",
"Abp.Mailing.Smtp.UserName": "",
"Abp.Mailing.Smtp.Password": "",
"Abp.Mailing.Smtp.Domain": "",
"Abp.Mailing.Smtp.EnableSsl": "false",
"Abp.Mailing.Smtp.UseDefaultCredentials": "true",
"Abp.Mailing.DefaultFromAddress": "noreply@abp.io",
"Abp.Mailing.DefaultFromDisplayName": "ABP application"
},
"WriteTo": [
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": ".\\Logs\\log-.txt",
"rollingInterval": "Day", // Not currently in use.
"rollOnFileSizeLimit": true,
"fileSizeLimitBytes": 10000000,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff G} {Message}{NewLine:1}{Exception:1}"
}
},
{
"Name": "MSSqlServer",
"Args": {
"connectionString": "Default",
"tableName": "Logs",
"autoCreateSqlTable": true,
"restrictedToMinimumLevel": "Information",
"batchPostingLimit": 1000,
"period": "0.00:00:30"
}
}
]
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "149.223.116.5"
}
},
"EventBus": {
"ClientName": "MyClientName",
"ExchangeName": "MyExchangeName"
}
},
"AuthServer": {
"Authority": "http://149.223.116.5:8066",
"AlwaysAllowAuthorization": false
},
"Redis": {
"Configuration": "127.0.0.1"
},
"DefaultBranchId": "3FA85F64-5717-4562-B3FC-2C963F66AFA6",
"AllowedHosts": "*",
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"RemoteServices": {
"Default": {
"BaseUrl": "http://149.223.116.5:8091/",
"UseCurrentAccessToken": "true"
}
},
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "business-app",
"ClientSecret": "1q2w3e*",
"Authority": "http://149.223.116.5:8066",
"Scope": "InternalGateway IdentityService SettleAccount"
}
}
}

145
src/Gateways/InternalGateway/InternalGateway.Host/appsettings.json

@ -1,38 +1,129 @@
{
"AuthServer": {
"Authority": "http://localhost:10100",
"ApiName": "InternalGateway"
{
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
"Default": "Server=localhost;Database=ABP;Trusted_Connection=True;"
//"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
//"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;"
"Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
"Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;"
},
"ElasticSearch": {
"Url": "http://localhost:9200"
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Serilog": {
"Using": [],
"MinumumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"Settings": {
"Abp.Mailing.Smtp.Host": "149.223.116.5",
"Abp.Mailing.Smtp.Port": "25",
"Abp.Mailing.Smtp.UserName": "",
"Abp.Mailing.Smtp.Password": "",
"Abp.Mailing.Smtp.Domain": "",
"Abp.Mailing.Smtp.EnableSsl": "false",
"Abp.Mailing.Smtp.UseDefaultCredentials": "true",
"Abp.Mailing.DefaultFromAddress": "noreply@abp.io",
"Abp.Mailing.DefaultFromDisplayName": "ABP application"
},
"WriteTo": [
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": ".\\Logs\\log-.txt",
"rollingInterval": "Day", // Not currently in use.
"rollOnFileSizeLimit": true,
"fileSizeLimitBytes": 10000000,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff G} {Message}{NewLine:1}{Exception:1}"
}
},
{
"Name": "MSSqlServer",
"Args": {
"connectionString": "Default",
"tableName": "Logs",
"autoCreateSqlTable": true,
"restrictedToMinimumLevel": "Information",
"batchPostingLimit": 1000,
"period": "0.00:00:30"
}
}
]
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "149.223.116.5"
}
},
"EventBus": {
"ClientName": "MyClientName",
"ExchangeName": "MyExchangeName"
}
},
"AuthServer": {
"Authority": "http://149.223.116.5:8066",
"AlwaysAllowAuthorization": false
},
"Redis": {
"Configuration": "127.0.0.1"
},
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 10130
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}
],
"GlobalConfiguration": {
"BaseUrl": "http://localhost:10110"
"DefaultBranchId": "3FA85F64-5717-4562-B3FC-2C963F66AFA6",
"AllowedHosts": "*",
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"Logging": {
"LogLevel": {
"Default": "Warning"
"RemoteServices": {
"Default": {
"BaseUrl": "http://149.223.116.5:8091/",
"UseCurrentAccessToken": "true"
}
},
"AllowedHosts": "*"
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "business-app",
"ClientSecret": "1q2w3e*",
"Authority": "http://149.223.116.5:8066",
"Scope": "InternalGateway IdentityService SettleAccount"
}
}
}

435
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs

@ -7889,7 +7889,6 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)");
b.Property<string>("DeliveryOrderNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -8086,7 +8085,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("Set_WMSSparePart_Version");
b.ToTable("Set_SparePart_Version");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsHQCarOutPut", b =>
@ -8170,6 +8169,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
@ -8225,6 +8227,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<string>("IsSparePart")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
@ -8250,10 +8255,16 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("OutPutQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ParentMaterialCode")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -8771,6 +8782,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
@ -8860,6 +8874,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -9575,6 +9592,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
@ -9668,6 +9688,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -9782,6 +9805,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
@ -9867,6 +9893,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -9896,6 +9925,213 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_WmsKanbanOutPutDetial");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPut", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<string>("Creator")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id");
b.HasIndex("BillNum");
b.ToTable("Set_WmsSharePart90OutPut");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsSharePart90OutPutDetial", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("Extend1")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("Extend2")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("InPut")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("MaterialCode")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("MaterialDesc")
.HasColumnType("nvarchar(max)");
b.Property<string>("MaterialGroup")
.HasColumnType("nvarchar(max)");
b.Property<string>("OrderBillNum")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("OutPut")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("OutPutQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ParentMaterialCode")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<int>("State")
.HasColumnType("int");
b.Property<decimal>("StockQty")
.HasColumnType("decimal(18,2)");
b.Property<Guid>("TaskId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("WmsBillNum")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id");
b.HasIndex("BillNum");
b.ToTable("Set_WmsSharePart90OutPutDetial");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPut", b =>
{
b.Property<Guid>("Id")
@ -9977,6 +10213,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
@ -10058,10 +10297,16 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("OutPutQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ParentMaterialCode")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -10071,6 +10316,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<int>("State")
.HasColumnType("int");
b.Property<decimal>("StockQty")
.HasColumnType("decimal(18,2)");
b.Property<Guid>("TaskId")
.HasColumnType("uniqueidentifier");
@ -10091,6 +10339,189 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_WmsSharePartOutPutDetial");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsWithOutKanbanOutPut", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<string>("Creator")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id");
b.HasIndex("BillNum");
b.ToTable("Set_WmsWithOutKanbanOutPut");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS.WmsWithOutKanbanOutPutDetial", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BillNum")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("Extend")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("IsBack")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("MaterialDesc")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("OutputQty")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("RealityNumber")
.HasColumnType("decimal(18,2)");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<string>("SapMaterialCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("SockQty")
.HasColumnType("decimal(18,2)");
b.Property<int>("State")
.HasColumnType("int");
b.Property<string>("Type")
.HasColumnType("nvarchar(max)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id");
b.HasIndex("BillNum");
b.ToTable("Set_WmsWithOutKanbanOutPutDetial");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanSettle", b =>
{
b.Property<Guid>("Id")

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -33,11 +33,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string str = " ";
if (!string.IsNullOrEmpty(begin))
{
str += string.Format(" and beginTime>'{0}' ", begin);
str += string.Format(" and beginTime>='{0}' ", begin);
}
if (!string.IsNullOrEmpty(end))
{
str += string.Format(" and beginTime<'{0}' ", end);
str += string.Format(" and beginTime<='{0}' ", end);
}
//if (!string.IsNullOrEmpty(materialCode))
//{

338
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

@ -33,6 +33,30 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
public class WmsOutPutSumExtend
{
[ExporterHeader(DisplayName = "客户 ")]
public string {set;get;}
[ExporterHeader(DisplayName = "出库类型")]
public string {set;get;}
[ExporterHeader(DisplayName = "出库单")]
public string {set;get;}
[ExporterHeader(DisplayName = "物料号")]
public string {set;get;}
[ExporterHeader(DisplayName = "物料描述")]
public string {set;get;}
[ExporterHeader(DisplayName = "出库单号")]
public string {set;get;}
[ExporterHeader(DisplayName = "物料组")]
public string {set;get;}
[ExporterHeader(DisplayName = "待出库")]
public string {set;get;}
[ExporterHeader(DisplayName = "已出库")]
public string { set; get; }
}
public class WmsOutputSumDapperRepository: DapperRepository<SettleAccountDbContext>, ITransientDependency
{
@ -40,6 +64,320 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
: base(dbContextProvider)
{
}
public virtual List<WmsOutPutSumExtend> GetWmsSumExtendList(string version)
{
var str = "SELECT\n" +
" Client 客户,\n" +
" [Type] 出库类型,\n" +
" BillNum 出库单,\n" +
" MaterialCode 物料号,\n" +
" MaterialDesc 物料描述,\n" +
" BillNum 出库单号,\n" +
" MaterialGroup 物料组,\n" +
" [1] 待出库,\n" +
" ISNULL([2], 0 ) 已出库 \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" * \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" temp.Client,\n" +
" temp.Type,\n" +
" temp.BillNum,\n" +
" temp.MaterialCode,\n" +
" temp2.MaterialDesc,\n" +
" temp.Qty,\n" +
" 1 STATE,\n" +
" EstimateTypeDesc MaterialGroup,\n" +
" EstimateType \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" '大众准时化出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsJitOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众看板出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众无看板出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" SapMaterialCode MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众备件汇总出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsSharePartOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众备件条码出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsSharePart90OutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗看板出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQHKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗看板出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQHKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗一轿手工出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" SapMaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode UNION ALL\n" +
" SELECT\n" +
" '一汽奔腾轿车出库' AS Type,\n" +
" '奔腾' Client,\n" +
" BillNum,\n" +
" SapMaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 1 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode \n" +
" ) temp\n" +
" LEFT JOIN ( SELECT max( Id ) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType ) temp2 ON temp.MaterialCode = temp2.MaterialCode \n" +
" ) t1 UNION ALL\n" +
" SELECT\n" +
" * \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" temp.Client ,\n" +
" temp.Type,\n" +
" temp.BillNum,\n" +
" temp.MaterialCode,\n" +
" temp2.MaterialDesc,\n" +
" temp.Qty,\n" +
" 2 STATE,\n" +
" EstimateTypeDesc MaterialGroup,\n" +
" EstimateType \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" '大众准时化出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsJitOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众看板出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众无看板出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" SapMaterialCode MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众备件汇总出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsSharePartOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '大众备件条码出库' AS Type,\n" +
" '大众' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsSharePart90OutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗看板出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQHKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗看板出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" MaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQHKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" MaterialCode UNION ALL\n" +
" SELECT\n" +
" '红旗一轿手工出库' AS Type,\n" +
" '红旗' Client,\n" +
" BillNum,\n" +
" SapMaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode UNION ALL\n" +
" SELECT\n" +
" '一汽奔腾轿车出库' AS Type,\n" +
" '奔腾' Client,\n" +
" BillNum,\n" +
" SapMaterialCode,\n" +
" SUM( Qty ) Qty \n" +
" FROM\n" +
" Set_WmsHQWithOutKanbanOutPutDetial \n" +
" WHERE\n" +
" State = 2 \n" +
" AND VERSION = '{0}' \n" +
" GROUP BY\n" +
" BillNum,\n" +
" SapMaterialCode \n" +
" ) temp\n" +
" LEFT JOIN ( SELECT max( Id ) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType ) temp2 ON temp.MaterialCode = temp2.MaterialCode \n" +
" ) t2 \n" +
" ) TEMP PIVOT ( SUM( QTY ) FOR STATE IN ([1],[2]) ) A order by 客户,出库类型,出库单";
string _sql = string.Format(str, version);
var _query = DbConnection.Query<WmsOutPutSumExtend>(_sql, null, null, true, 1200, null);
return _query.ToList();
}
public virtual List<WmsOutputSum> GetWmsSumReportList(string version,string state)
{

101
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs

@ -46,6 +46,9 @@ namespace SettleAccount.Job.Services
private readonly UnInvoiceSettledDetailDiffDapperRepository _dapperRepository;
private readonly InvoiceSettledDetailDiffDapperRepository _dapperRepository1;
private readonly UnSettledDetailDapperRepository _dapperRepository2;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
@ -59,7 +62,8 @@ namespace SettleAccount.Job.Services
UnInvoiceSettledDetailDiffDapperRepository dapperRepository,
InvoiceSettledDetailDiffDapperRepository dapperRepository1,
OutputService outputService,
InputService inputService
InputService inputService,
UnSettledDetailDapperRepository dapperRepository2
)
{
_fileContainer = fileContainer;
@ -70,6 +74,7 @@ namespace SettleAccount.Job.Services
//_versionRepository = versionRepository;
_dapperRepository =dapperRepository;
_dapperRepository1 = dapperRepository1;
_dapperRepository2 = dapperRepository2;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
@ -174,11 +179,12 @@ namespace SettleAccount.Job.Services
var report2List = _ls1.Where(p => p.DiffPrice != 0).Select(p => new { p.MaterialGroup, DiffAmt = p.DiffPrice * p.Qty }).GroupBy(p => new { p.MaterialGroup }).Select(p => new SettleDoorPanelSumExport { MaterialGroup = p.Key.MaterialGroup, InvoiceDiffPrice = p.Sum(itm => itm.DiffAmt), Version = version }); ;
var report2List = _ls1.Where(p => p.DiffPrice != 0).Select(p => new { p.MaterialGroup, DiffAmt = p.DiffPrice * p.Qty }).GroupBy(p => new { p.MaterialGroup }).Select(p => new SettleDoorPanelSumExport { MaterialGroup = p.Key.MaterialGroup, InvoiceDiffPrice = p.Sum(itm => itm.DiffAmt), Version = version });
var list1= LSettleSum(id, exportName, p_list);
var report1 = report2List.ToList();
report1.AddRange(list1);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
@ -189,7 +195,7 @@ namespace SettleAccount.Job.Services
.SeparateBySheet()
.Append(report1List, "按物料价格差异明细表")
.SeparateBySheet()
.Append(report2List.ToList(), "差异汇总验证表")
.Append(report1, "差异汇总验证表")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);
@ -319,20 +325,87 @@ namespace SettleAccount.Job.Services
_ls = _ls.OrderBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ThenBy(p => p.SapMaterialCode).ToList();
}
return _ls;
}
public List<SettleDoorPanelSumExport> LSettleSum(Guid id, List<string> exportName, List<CustomCondition> p_list)
{
var _first = exportName.FirstOrDefault();
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var materailCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value;
var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value;
var sapcode = p_list.Where(p => p.Name == "SapMaterialCode").FirstOrDefault().Value;
var begin = p_list.Where(p => p.Name == "Begin").FirstOrDefault().Value;
var end = p_list.Where(p => p.Name == "End").FirstOrDefault().Value;
var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value;
var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value;
var sapCode = p_list.Where(p => p.Name == "SapCode").FirstOrDefault().Value;
//ExcelExporter _exporter = new ExcelExporter();//导出Excel
//var result = _exporter.Append(report1List.ToList(), "按物料价格差异明细表")
//.SeparateBySheet()
//.Append(report2List.ToList(), "差异汇总验证表")
//.ExportAppendDataAsByteArray();
//result.ShouldNotBeNull();
//_fileContainer.SaveAsync(_filename, result.Result, true);
// _outputService.Export<SettleDoorPanelExport>(id, string.Format("大众准时化结算门板价格差异比对报表_{0}.xlsx", Guid.NewGuid().ToString()), _list);
//var cp7begin = p_list.Where(p => p.Name == "CP7Begin").FirstOrDefault().Value;
//var cp7end = p_list.Where(p => p.Name == "CP7End").FirstOrDefault().Value;
begin = version.Substring(0, 4) + "-" + version.Substring(version.Length - 2) + "-01 00:00:00";
var _beginstr = version.Substring(0, 4) + "-" + version.Substring(version.Length - 2) + "-01";
var _end = DateTime.Parse(_beginstr).AddMonths(1).AddDays(-1);
end=_end.ToString("yyyy-MM-dd")+" 23:59:59";
var _list = _dapperRepository2.GetDiffReport(DateTime.Now.Year.ToString(), begin, end, customerCode, version, materailCode, materialGroup, sapcode);
var _ls = _list.Where(p => p.Flag == "L").Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.KENNCode, p.ChassisNumber, p.ParentSapMaterialCode }).Select(p => p.FirstOrDefault()).ToList();
//var _lst = _erpDapper.GetSapList(_ls, version, false);
//_lst.ForEach(p =>
//{
// p.Qty = 1;
// p.DiffAMT = Math.Round(p.Qty * p.Price, 2);
// p.DiffQty = 1;
//}
//);
//_list.AddRange(_lst);
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_list = _list.Where(p => _groupList.Contains(p.MaterialGroup)).ToList();
}
}
if (!string.IsNullOrEmpty(kenncode))
{
var _groupList = kenncode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_list = _list.Where(p => _groupList.Contains(p.KENNCode)).ToList();
}
}
if (!string.IsNullOrEmpty(chassisNumber))
{
var _groupList = chassisNumber.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_list = _list.Where(p => _groupList.Contains(p.ChassisNumber)).ToList();
}
}
if (!string.IsNullOrEmpty(sapCode))
{
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
}
}
if (!string.IsNullOrEmpty(materailCode))
{
var _groupList = materailCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
}
}
_list = _list.OrderBy(p => p.ChassisNumber).ThenBy(p => p.SapMaterialCode).ThenBy(p => p.Flag).ToList();
var report2List = _list.Select(p => new { p.MaterialGroup, DiffAmt = p.Price * p.Qty }).GroupBy(p => new { p.MaterialGroup }).Select(p => new SettleDoorPanelSumExport { MaterialGroup = p.Key.MaterialGroup, InvoiceDiffPrice = p.Sum(itm => itm.DiffAmt), Version = version });
return report2List.ToList();
}

23
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/WmsOutputSumExportService.cs

@ -1,4 +1,6 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
@ -6,7 +8,9 @@ using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs;
using Win.Sfs.SettleAccount.Repository.SettleAccount;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob;
@ -39,15 +43,19 @@ namespace SettleAccount.Job.Services.Report
private readonly WmsOutputSumDapperRepository _dapperRepository;
private readonly OutputService _outputService;
private readonly InputService _inputService;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
public WmsOutputSumExportService(
WmsOutputSumDapperRepository dapperRepository,
OutputService outputService,
InputService inputService
InputService inputService,
IBlobContainer<MyFileContainer> fileContainer
)
{
_inputService = inputService;
_outputService = outputService;
_dapperRepository = dapperRepository;
_fileContainer = fileContainer;
}
@ -58,6 +66,9 @@ namespace SettleAccount.Job.Services.Report
var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value;
var state = p_list.Where(p => p.Name == "State").FirstOrDefault().Value;
var _ls= _dapperRepository.GetWmsSumReportList(version, state);
var _lst = _dapperRepository.GetWmsSumExtendList(version);
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
@ -74,8 +85,16 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
}
}
var _first = exportName.FirstOrDefault();
_outputService.Export<WmsOutputSum>(id,_first, _ls);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "汇总表")
.SeparateBySheet()
.Append(_lst.ToList(), "完成清单表")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_first, result.Result, true);
return id.ToString(); ;
}

Loading…
Cancel
Save