20220313 3张表格 导出excel功能
This commit is contained in:
12
20220313_Excel/TempTask.WebEntry/.config/dotnet-tools.json
Normal file
12
20220313_Excel/TempTask.WebEntry/.config/dotnet-tools.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "6.0.3",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
107
20220313_Excel/TempTask.WebEntry/ApiController/Dto/DtoInput.cs
Normal file
107
20220313_Excel/TempTask.WebEntry/ApiController/Dto/DtoInput.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using static TempTask.WebEntry.Tools.NumZjHelper;
|
||||
|
||||
namespace TempTask.WebEntry.ApiController.Dto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DtoInput
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjConfig
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<NumZjExcel> numZjExcels { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjExcel
|
||||
{
|
||||
/// <summary>
|
||||
/// sheet编号 从1开始
|
||||
/// </summary>
|
||||
public ExcelType excel_no { get; set; }
|
||||
/// <summary>
|
||||
/// sheet名称
|
||||
/// </summary>
|
||||
public string excel_name { get; set; }
|
||||
/// <summary>
|
||||
/// sheet集合
|
||||
/// </summary>
|
||||
public List<NumZjConfigSheet> sheets { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjConfigSheet
|
||||
{
|
||||
/// <summary>
|
||||
/// sheet编号,从1开始
|
||||
/// </summary>
|
||||
public int sheet_no { get; set; }
|
||||
/// <summary>
|
||||
/// shee名称
|
||||
/// </summary>
|
||||
public string sheet_name { get; set; }
|
||||
/// <summary>
|
||||
/// 开始行数 Excel中行号
|
||||
/// </summary>
|
||||
public int start_row { get; set; }
|
||||
/// <summary>
|
||||
/// 空行数
|
||||
/// </summary>
|
||||
public int null_row_count { get; set; }
|
||||
/// <summary>
|
||||
/// 开始列字母, A B C
|
||||
/// </summary>
|
||||
public string start_cell { get; set; }
|
||||
/// <summary>
|
||||
/// 空列数
|
||||
/// </summary>
|
||||
public int null_cell_count { get; set; }
|
||||
/// <summary>
|
||||
/// 接口地址
|
||||
/// </summary>
|
||||
public string url { get; set; }
|
||||
/// <summary>
|
||||
/// 跳过行 集合 行留空
|
||||
/// </summary>
|
||||
public List<int> skip_rows { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjDownloadInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Excel类型 1是总表,2是城市更新,3是房地产业
|
||||
/// </summary>
|
||||
public int type { get; set; }
|
||||
/// <summary>
|
||||
/// 年
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int year { get; set; }
|
||||
/// <summary>
|
||||
/// 月
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int month { get; set; }
|
||||
/// <summary>
|
||||
/// 周
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int week { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Furion;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TempTask.WebEntry.ApiController.Dto;
|
||||
using TempTask.WebEntry.Tools;
|
||||
|
||||
namespace TempTask.WebEntry.ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjController : IDynamicApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<dynamic> Download([FromBody] NumZjDownloadInput numZjDownloadInput)
|
||||
{
|
||||
//var asd = ExcelHelper.ToColumnIndex("C");
|
||||
//return null;
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
var configs = App.GetConfig<NumZjConfig>("NumZjConfig");
|
||||
var current = configs.numZjExcels.Find(a => (int)a.excel_no == numZjDownloadInput.type);
|
||||
//var sheet_names = new Dictionary<int, string> { { 4, "房地产业分行业(项目信息)" }, { 5, "分地区(项目信息)" } };
|
||||
var filepath = NumZjHelper.WriteTemplate(numZjDownloadInput.year, numZjDownloadInput.month, numZjDownloadInput.week, current.excel_no, current.sheets);
|
||||
return new FileStreamResult(new FileStream(filepath, FileMode.Open), "application/octet-stream") { FileDownloadName = current.excel_name };
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry.ApiController
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
[DynamicApiController]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
var rng = new Random();
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateTime.Now.AddDays(index),
|
||||
TemperatureC = rng.Next(-20, 55),
|
||||
Summary = Summaries[rng.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TempTask.WebEntry.Tools;
|
||||
|
||||
namespace TempTask.WebEntry.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class HomeController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
26
20220313_Excel/TempTask.WebEntry/Program.cs
Normal file
26
20220313_Excel/TempTask.WebEntry/Program.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.Inject().UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<ProjectGuid>fee63a88-1ce0-4b0c-bcd3-e831c3187d78</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>D:\temp_task\20220313\code\TempTask.WebEntry\bin\Release\net5.0\publish\</_PublishTargetUrl>
|
||||
<History>True|2022-03-13T14:48:44.4636058Z;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:12259",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"TempTask.WebEntry": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
59
20220313_Excel/TempTask.WebEntry/Startup.cs
Normal file
59
20220313_Excel/TempTask.WebEntry/Startup.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
|
||||
services.AddControllersWithViews().AddInject();
|
||||
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
app.UseHsts();
|
||||
}
|
||||
app.UseRouting();
|
||||
//app.UseCorsAccessor();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseInject();
|
||||
//app.UseSwagger();
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
//endpoints.MapControllers();\
|
||||
endpoints.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
35
20220313_Excel/TempTask.WebEntry/TempTask.WebEntry.csproj
Normal file
35
20220313_Excel/TempTask.WebEntry/TempTask.WebEntry.csproj
Normal file
@@ -0,0 +1,35 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DocumentationFile>D:\temp_task\20220313\code\TempTask.WebEntry\TempTask.WebEntry.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Furion" Version="2.20.7" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>bin\Debug\net5.0\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>bin\Debug\net5.0\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML">
|
||||
<HintPath>bin\Debug\net5.0\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net">
|
||||
<HintPath>bin\Debug\net5.0\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats">
|
||||
<HintPath>bin\Debug\net5.0\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
<View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID>
|
||||
<View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath>
|
||||
<NameOfLastUsedPublishProfile>D:\temp_task\20220313\code\TempTask.WebEntry\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
254
20220313_Excel/TempTask.WebEntry/TempTask.WebEntry.xml
Normal file
254
20220313_Excel/TempTask.WebEntry/TempTask.WebEntry.xml
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>TempTask.WebEntry</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.DtoInput">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjConfig">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfig.numZjExcels">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjExcel">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.excel_no">
|
||||
<summary>
|
||||
sheet编号 从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.excel_name">
|
||||
<summary>
|
||||
sheet名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.sheets">
|
||||
<summary>
|
||||
sheet集合
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.sheet_no">
|
||||
<summary>
|
||||
sheet编号,从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.sheet_name">
|
||||
<summary>
|
||||
shee名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.start_row">
|
||||
<summary>
|
||||
开始行数 Excel中行号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.null_row_count">
|
||||
<summary>
|
||||
空行数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.start_cell">
|
||||
<summary>
|
||||
开始列字母, A B C
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.null_cell_count">
|
||||
<summary>
|
||||
空列数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.url">
|
||||
<summary>
|
||||
接口地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.skip_rows">
|
||||
<summary>
|
||||
跳过行 集合 行留空
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.type">
|
||||
<summary>
|
||||
Excel类型 1是总表,2是城市更新,3是房地产业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.year">
|
||||
<summary>
|
||||
年
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.month">
|
||||
<summary>
|
||||
月
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.week">
|
||||
<summary>
|
||||
周
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.NumZjController">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.ApiController.NumZjController.Download(TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Controllers.HomeController">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Controllers.HomeController.Index">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.EnumHelper.GetEnumDescription``1(System.Object)">
|
||||
<summary>
|
||||
得到枚举的DescriptionAttribute值。
|
||||
</summary>
|
||||
<typeparam name="TEnum"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.ExcelHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.GetIsCompatible(System.String)">
|
||||
<summary>
|
||||
判断是否为兼容模式
|
||||
</summary>
|
||||
<param name="filePath"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.CreateWorkbook(System.Boolean)">
|
||||
<summary>
|
||||
创建工作薄
|
||||
</summary>
|
||||
<param name="isCompatible"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.CreateWorkbook(System.Boolean,System.Object)">
|
||||
<summary>
|
||||
创建工作薄(依据文件流)
|
||||
</summary>
|
||||
<param name="isCompatible"></param>
|
||||
<param name="stream"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.ToExcelColumnIndex(System.String)">
|
||||
<summary>
|
||||
列名字母转索引
|
||||
</summary>
|
||||
<param name="columnName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.ToExcelColumnName(System.Int32)">
|
||||
<summary>
|
||||
列索引转字母
|
||||
</summary>
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.Extension">
|
||||
<summary>
|
||||
扩展
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.Extension.ToInt(System.String,System.Int32)">
|
||||
<summary>
|
||||
将字符串转换为整数
|
||||
</summary>
|
||||
<param name="str"></param>
|
||||
<param name="defaultValue">转换失败时的默认值</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.HttpHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.HttpHelper.CallUrl(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
请求网页地址
|
||||
</summary>
|
||||
<param name="url">网页地址</param>
|
||||
<param name="method"></param>
|
||||
<param name="param">参数</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.HttpHelper.CallUrl(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="url"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.NumZjHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.NumZjHelper.ExcelType">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.总表">
|
||||
<summary>
|
||||
总表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.城市更新">
|
||||
<summary>
|
||||
城市更新
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.房地产业">
|
||||
<summary>
|
||||
房地产业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.NumZjHelper.WriteTemplate(System.Int32,System.Int32,System.Int32,TempTask.WebEntry.Tools.NumZjHelper.ExcelType,System.Collections.Generic.List{TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet})">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="year"></param>
|
||||
<param name="month"></param>
|
||||
<param name="week"></param>
|
||||
<param name="excelType"></param>
|
||||
<param name="sheets"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
32
20220313_Excel/TempTask.WebEntry/Tools/EnumHelper.cs
Normal file
32
20220313_Excel/TempTask.WebEntry/Tools/EnumHelper.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry.Tools
|
||||
{
|
||||
public class EnumHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 得到枚举的DescriptionAttribute值。
|
||||
/// </summary>
|
||||
/// <typeparam name="TEnum"></typeparam>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
static public string GetEnumDescription<TEnum>(object value)
|
||||
{
|
||||
Type enumType = typeof(TEnum);
|
||||
if (!enumType.IsEnum)
|
||||
throw new ArgumentException("不是枚举类型");
|
||||
var name = Enum.GetName(enumType, value);
|
||||
if (name == null)
|
||||
return string.Empty;
|
||||
object[] objs = enumType.GetField(name).GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
if (objs == null || objs.Length == 0)
|
||||
return string.Empty;
|
||||
DescriptionAttribute attr = objs[0] as DescriptionAttribute;
|
||||
return attr.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
101
20220313_Excel/TempTask.WebEntry/Tools/ExcelHelper.cs
Normal file
101
20220313_Excel/TempTask.WebEntry/Tools/ExcelHelper.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry.Tools
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ExcelHelper
|
||||
{
|
||||
static ExcelHelper()
|
||||
{
|
||||
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断是否为兼容模式
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns></returns>
|
||||
public static bool GetIsCompatible(string filePath)
|
||||
{
|
||||
return filePath.EndsWith(".xls", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
/// <summary>
|
||||
/// 创建工作薄
|
||||
/// </summary>
|
||||
/// <param name="isCompatible"></param>
|
||||
/// <returns></returns>
|
||||
public static IWorkbook CreateWorkbook(bool isCompatible)
|
||||
{
|
||||
if (isCompatible)
|
||||
{
|
||||
return new HSSFWorkbook();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new XSSFWorkbook();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建工作薄(依据文件流)
|
||||
/// </summary>
|
||||
/// <param name="isCompatible"></param>
|
||||
/// <param name="stream"></param>
|
||||
/// <returns></returns>
|
||||
public static IWorkbook CreateWorkbook(bool isCompatible, dynamic stream)
|
||||
{
|
||||
if (isCompatible)
|
||||
{
|
||||
return new HSSFWorkbook(stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new XSSFWorkbook(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 列名字母转索引
|
||||
/// </summary>
|
||||
/// <param name="columnName"></param>
|
||||
/// <returns></returns>
|
||||
public static int ToExcelColumnIndex(this string columnName)
|
||||
{
|
||||
if (!Regex.IsMatch(columnName.ToUpper(), @"[A-Z]+")) { throw new Exception("invalid parameter"); }
|
||||
int index = 0;
|
||||
char[] chars = columnName.ToUpper().ToCharArray();
|
||||
for (int i = 0; i < chars.Length; i++)
|
||||
{
|
||||
index += ((int)chars[i] - (int)'A' + 1) * (int)Math.Pow(26, chars.Length - i - 1);
|
||||
}
|
||||
return index - 1;
|
||||
}
|
||||
/// <summary>
|
||||
/// 列索引转字母
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToExcelColumnName(this int index)
|
||||
{
|
||||
if (index < 0) { throw new Exception("invalid parameter"); }
|
||||
List<string> chars = new List<string>();
|
||||
do
|
||||
{
|
||||
if (chars.Count > 0) index--;
|
||||
chars.Insert(0, ((char)(index % 26 + (int)'A')).ToString());
|
||||
index = (int)((index - index % 26) / 26);
|
||||
} while (index > 0);
|
||||
return String.Join(string.Empty, chars.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
24
20220313_Excel/TempTask.WebEntry/Tools/Extension.cs
Normal file
24
20220313_Excel/TempTask.WebEntry/Tools/Extension.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry.Tools
|
||||
{
|
||||
/// <summary>
|
||||
/// 扩展
|
||||
/// </summary>
|
||||
public static class Extension
|
||||
{
|
||||
/// <summary>
|
||||
/// 将字符串转换为整数
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="defaultValue">转换失败时的默认值</param>
|
||||
/// <returns></returns>
|
||||
public static int ToInt(this string str, int defaultValue = int.MinValue)
|
||||
{
|
||||
return int.TryParse(str, out int i) ? i : defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
68
20220313_Excel/TempTask.WebEntry/Tools/HttpHelper.cs
Normal file
68
20220313_Excel/TempTask.WebEntry/Tools/HttpHelper.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TempTask.WebEntry.Tools
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class HttpHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 请求网页地址
|
||||
/// </summary>
|
||||
/// <param name="url">网页地址</param>
|
||||
/// <param name="method"></param>
|
||||
/// <param name="param">参数</param>
|
||||
/// <returns></returns>
|
||||
public static string CallUrl(string url, string method, string param)
|
||||
{
|
||||
//创建一个HTTP请求
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
//Post请求方式
|
||||
request.Method = method;
|
||||
//内容类型
|
||||
request.ContentType = "application/json";
|
||||
|
||||
//byte[] bs = Encoding.ASCII.GetBytes(param); //参数转化为ascii码
|
||||
byte[] bs = Encoding.UTF8.GetBytes(param);
|
||||
request.ContentLength = bs.Length;
|
||||
using (Stream reqStream = request.GetRequestStream())
|
||||
{
|
||||
reqStream.Write(bs, 0, bs.Length);
|
||||
}
|
||||
|
||||
String strValue = "";//strValue为http响应所返回的字符流
|
||||
HttpWebResponse response;
|
||||
try
|
||||
{
|
||||
//获得响应流
|
||||
response = (HttpWebResponse)request.GetResponse();
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
response = ex.Response as HttpWebResponse;
|
||||
}
|
||||
using Stream s = response.GetResponseStream();
|
||||
using StreamReader sr = new StreamReader(s);
|
||||
strValue = sr.ReadToEnd();
|
||||
return strValue;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static string CallUrl(string url)
|
||||
{
|
||||
WebClient webClient = new WebClient();
|
||||
return webClient.DownloadString(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
146
20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs
Normal file
146
20220313_Excel/TempTask.WebEntry/Tools/NumZjHelper.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
using Furion;
|
||||
using Furion.FriendlyException;
|
||||
using Furion.LinqBuilder;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using TempTask.WebEntry.ApiController.Dto;
|
||||
|
||||
namespace TempTask.WebEntry.Tools
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NumZjHelper
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ExcelType
|
||||
{
|
||||
/// <summary>
|
||||
/// 总表
|
||||
/// </summary>
|
||||
[Description("总表(样表).xls")]
|
||||
总表 = 1,
|
||||
/// <summary>
|
||||
/// 城市更新
|
||||
/// </summary>
|
||||
[Description("住建系统抓投资情况通报(城市更新)样表.xlsx")]
|
||||
城市更新 = 2,
|
||||
/// <summary>
|
||||
/// 房地产业
|
||||
/// </summary>
|
||||
[Description("住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx")]
|
||||
房地产业 = 3
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="year"></param>
|
||||
/// <param name="month"></param>
|
||||
/// <param name="week"></param>
|
||||
/// <param name="excelType"></param>
|
||||
/// <param name="sheets"></param>
|
||||
/// <returns></returns>
|
||||
public static string WriteTemplate(int year, int month, int week, ExcelType excelType, List<NumZjConfigSheet> sheets)
|
||||
{
|
||||
try
|
||||
{
|
||||
var _month = month.ToString().Length == 1 ? ("0" + month) : month.ToString();
|
||||
int excelTypeInt = (int)excelType;
|
||||
string template_name = EnumHelper.GetEnumDescription<ExcelType>(excelType);
|
||||
string excelFilePath = $"{App.WebHostEnvironment.WebRootPath}\\ExcelTemplate\\{template_name}";
|
||||
string outputPath = string.Empty;
|
||||
if (!string.IsNullOrEmpty(excelFilePath))
|
||||
{
|
||||
using (FileStream excelFileStream = System.IO.File.OpenRead(excelFilePath))
|
||||
{
|
||||
bool isCompatible = ExcelHelper.GetIsCompatible(excelFilePath);
|
||||
IWorkbook workbook = ExcelHelper.CreateWorkbook(isCompatible, excelFileStream);
|
||||
foreach (var sheet_item in sheets)
|
||||
{
|
||||
if (sheet_item.url.IsNullOrEmpty())
|
||||
continue;
|
||||
ISheet sheet = null;
|
||||
//if (int.TryParse(sheet_name.sheet_no, out sheetIndex))
|
||||
//{
|
||||
sheet = workbook.GetSheetAt(sheet_item.sheet_no - 1);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// sheet = workbook.GetSheet(sheet_name.Value);
|
||||
//}
|
||||
var api_result = HttpHelper.CallUrl($"{sheet_item.url}?months={year}{_month}&w={week}");
|
||||
var obj = JObject.Parse(api_result);
|
||||
var datas = obj["data"] as JArray;
|
||||
//从第几行开始 , 比如 行号是4 , 就写3
|
||||
var startRowIndex = sheet_item.start_row - 1;
|
||||
//当前已经跳了几行
|
||||
int current_skip_count = 0;
|
||||
for (int i = 0; i < sheet_item.null_row_count; i++)
|
||||
{
|
||||
if (i >= datas.Count + (sheet_item.skip_rows?.Count ?? 0))
|
||||
break;
|
||||
var c_rowindex = startRowIndex + i;
|
||||
if (sheet_item.skip_rows != null && sheet_item.skip_rows.Contains(c_rowindex + 1))
|
||||
{
|
||||
current_skip_count++;
|
||||
continue;
|
||||
}
|
||||
int cell_start_index = sheet_item.start_cell.ToExcelColumnIndex();
|
||||
for (int x = cell_start_index; x < cell_start_index + sheet_item.null_cell_count; x++)
|
||||
{
|
||||
var column_letter = App.Configuration[$"column_name_match_{excelTypeInt}_{sheet_item.sheet_no}:{ x.ToExcelColumnName()}"];
|
||||
if (string.IsNullOrWhiteSpace(column_letter))
|
||||
continue;
|
||||
var jtoken = datas[i - current_skip_count][column_letter];
|
||||
var cellvalue = string.Empty;
|
||||
if (jtoken.Type == JTokenType.Null)
|
||||
cellvalue = "/";
|
||||
else
|
||||
cellvalue = jtoken.ToString();
|
||||
sheet.GetRow(c_rowindex).GetCell(x).SetCellValue(cellvalue);
|
||||
}
|
||||
//var x = 0;
|
||||
//foreach (var cell in cells)
|
||||
//{
|
||||
// if (x < sheet_item.skip)
|
||||
// {
|
||||
// x++;
|
||||
// continue;
|
||||
// }
|
||||
// //if (cell.Value.ToString().StartsWith("3302"))
|
||||
// // continue;
|
||||
// if (x >= sheet_item.null_cell_count)
|
||||
// continue;
|
||||
// sheet.GetRow(c_rowindex).GetCell(sheet_item.start_cell.ToExcelColumnIndex() - 1 + x - sheet_item.skip).SetCellValue(cell.Value.ToString());
|
||||
// x++;
|
||||
//}
|
||||
}
|
||||
}
|
||||
var file = new FileInfo(excelFilePath);
|
||||
var savePath = file.DirectoryName + "\\OutPut\\";
|
||||
if (!Directory.Exists(savePath))
|
||||
Directory.CreateDirectory(savePath);
|
||||
outputPath = savePath + year + "_" + _month + "_" + week + "_" + template_name;
|
||||
using (var filess = new FileStream(outputPath, FileMode.Create, FileAccess.Write, FileShare.Read))
|
||||
{
|
||||
workbook.Write(filess);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outputPath;
|
||||
}
|
||||
catch (System.IO.IOException ioex)
|
||||
{
|
||||
throw Oops.Oh("文件被占用,请检查文件模板");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
123
20220313_Excel/TempTask.WebEntry/Views/Home/Index.cshtml
Normal file
123
20220313_Excel/TempTask.WebEntry/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,123 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="http://lib.baomitu.com/qs/6.10.3/qs.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div>
|
||||
<el-input-number v-model="year" :min="1970" :max="2100" label="选择年"></el-input-number>年
|
||||
<el-input-number v-model="month" :min="1" :max="12" label="选择月"></el-input-number>月 第
|
||||
<el-input-number v-model="week" :min="1" :max="5" label="选择周"></el-input-number>周
|
||||
</div>
|
||||
<div style="margin-top:15px;">
|
||||
<el-button @@click="downloadfile_zongbiao" :loading="loading_zongbiao">下载文件-总表</el-button>
|
||||
<el-button @@click="downloadfile_chengshigengxin" :loading="loading_chengshigengxin">下载文件-城市更新</el-button>
|
||||
<el-button @@click="downloadfile_fangdichan" :loading="loading_fangdichan">下载文件-房地产业</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
loading_zongbiao: false,
|
||||
loading_chengshigengxin: false,
|
||||
loading_fangdichan: false,
|
||||
year: '',
|
||||
month: '',
|
||||
week: ''
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
var now = new Date();
|
||||
this.year = now.getFullYear();
|
||||
this.month = now.getMonth() + 1;
|
||||
this.week = this.getMonthWeek(now);
|
||||
},
|
||||
methods: {
|
||||
|
||||
//总表
|
||||
loading_zongbiao_false() { this.loading_zongbiao = false },
|
||||
downloadfile_zongbiao() {
|
||||
this.loading_zongbiao = true;
|
||||
let url = '/api/num-zj/download';
|
||||
this.download(url, 1, "总表.xlsx", this.loading_zongbiao_false);
|
||||
},
|
||||
//城市更新
|
||||
loading_chengshigengxin_false() { this.loading_chengshigengxin = false },
|
||||
downloadfile_chengshigengxin() {
|
||||
this.loading_chengshigengxin = true;
|
||||
let url = '/api/num-zj/download';
|
||||
this.download(url, 2, "住建系统抓投资情况通报(城市更新).xlsx", this.loading_chengshigengxin_false);
|
||||
},
|
||||
//房地产业
|
||||
loading_fangdichan_false() { this.loading_fangdichan = false },
|
||||
downloadfile_fangdichan() {
|
||||
this.loading_fangdichan = true;
|
||||
let url = '/api/num-zj/download';
|
||||
this.download(url, 3, "住建系统抓投资情况通报(房地产业+GDP支撑性指标).xlsx", this.loading_fangdichan_false);
|
||||
},
|
||||
download(url, type, filename, callback) {
|
||||
let _this = this;
|
||||
axios({
|
||||
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
|
||||
method: 'post',
|
||||
url: url,
|
||||
data: { type: type, year: _this.year, month: _this.month, week: _this.week },
|
||||
responseType: "blob",
|
||||
}).then(function (response) {
|
||||
console.log(response);
|
||||
//解析文件充blod中解析
|
||||
const url = window.URL.createObjectURL(
|
||||
new Blob([response.data], { type: "application/vnd.ms-excel" })
|
||||
);
|
||||
const link = document.createElement("a");
|
||||
link.style.display = "none";
|
||||
link.href = url;
|
||||
link.setAttribute("download", filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
callback();
|
||||
}).catch(function (error) {
|
||||
callback();
|
||||
console.log(error)
|
||||
_this.$message({
|
||||
type: 'error',
|
||||
message: error.message
|
||||
})
|
||||
})
|
||||
},
|
||||
getMonthWeek(now) {
|
||||
var a = now.getYear();
|
||||
var b = now.getMonth() + 1;
|
||||
var c = now.getDate();
|
||||
/*
|
||||
a = d = 当前日期
|
||||
b = 6 - w = 当前周的还有几天过完(不算今天)
|
||||
a + b 的和在除以7 就是当天是当前月份的第几周
|
||||
*/
|
||||
var date = new Date(a, parseInt(b) - 1, c), w = date.getDay(), d = date.getDate();
|
||||
return Math.ceil(
|
||||
(d + 6 - w) / 7
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
15
20220313_Excel/TempTask.WebEntry/WeatherForecast.cs
Normal file
15
20220313_Excel/TempTask.WebEntry/WeatherForecast.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace TempTask.WebEntry
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string Summary { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
10
20220313_Excel/TempTask.WebEntry/appsettings.json
Normal file
10
20220313_Excel/TempTask.WebEntry/appsettings.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/Furion.dll
Normal file
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/Furion.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/NPOI.OOXML.dll
Normal file
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/NPOI.OOXML.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/NPOI.dll
Normal file
BIN
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/NPOI.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"additionalProbingPaths": [
|
||||
"C:\\Users\\z1303\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\z1303\\.nuget\\packages",
|
||||
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net5.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.AspNetCore.App",
|
||||
"version": "5.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.GC.Server": true,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>TempTask.WebEntry</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.DtoInput">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjConfig">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfig.numZjExcels">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjExcel">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.excel_no">
|
||||
<summary>
|
||||
sheet编号 从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.excel_name">
|
||||
<summary>
|
||||
sheet名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjExcel.sheets">
|
||||
<summary>
|
||||
sheet集合
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.sheet_no">
|
||||
<summary>
|
||||
sheet编号,从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.sheet_name">
|
||||
<summary>
|
||||
shee名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.start_row">
|
||||
<summary>
|
||||
开始行数 Excel中行号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.null_row_count">
|
||||
<summary>
|
||||
空行数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.start_cell">
|
||||
<summary>
|
||||
开始列字母, A B C
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.null_cell_count">
|
||||
<summary>
|
||||
空列数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.url">
|
||||
<summary>
|
||||
接口地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet.skip_rows">
|
||||
<summary>
|
||||
跳过行 集合 行留空
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.type">
|
||||
<summary>
|
||||
Excel类型 1是总表,2是城市更新,3是房地产业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.year">
|
||||
<summary>
|
||||
年
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.month">
|
||||
<summary>
|
||||
月
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput.week">
|
||||
<summary>
|
||||
周
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.ApiController.NumZjController">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.ApiController.NumZjController.Download(TempTask.WebEntry.ApiController.Dto.NumZjDownloadInput)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Controllers.HomeController">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Controllers.HomeController.Index">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.EnumHelper.GetEnumDescription``1(System.Object)">
|
||||
<summary>
|
||||
得到枚举的DescriptionAttribute值。
|
||||
</summary>
|
||||
<typeparam name="TEnum"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.ExcelHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.GetIsCompatible(System.String)">
|
||||
<summary>
|
||||
判断是否为兼容模式
|
||||
</summary>
|
||||
<param name="filePath"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.CreateWorkbook(System.Boolean)">
|
||||
<summary>
|
||||
创建工作薄
|
||||
</summary>
|
||||
<param name="isCompatible"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.CreateWorkbook(System.Boolean,System.Object)">
|
||||
<summary>
|
||||
创建工作薄(依据文件流)
|
||||
</summary>
|
||||
<param name="isCompatible"></param>
|
||||
<param name="stream"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.ToExcelColumnIndex(System.String)">
|
||||
<summary>
|
||||
列名字母转索引
|
||||
</summary>
|
||||
<param name="columnName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.ExcelHelper.ToExcelColumnName(System.Int32)">
|
||||
<summary>
|
||||
列索引转字母
|
||||
</summary>
|
||||
<param name="index"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.Extension">
|
||||
<summary>
|
||||
扩展
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.Extension.ToInt(System.String,System.Int32)">
|
||||
<summary>
|
||||
将字符串转换为整数
|
||||
</summary>
|
||||
<param name="str"></param>
|
||||
<param name="defaultValue">转换失败时的默认值</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.HttpHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.HttpHelper.CallUrl(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
请求网页地址
|
||||
</summary>
|
||||
<param name="url">网页地址</param>
|
||||
<param name="method"></param>
|
||||
<param name="param">参数</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.HttpHelper.CallUrl(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="url"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.NumZjHelper">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TempTask.WebEntry.Tools.NumZjHelper.ExcelType">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.总表">
|
||||
<summary>
|
||||
总表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.城市更新">
|
||||
<summary>
|
||||
城市更新
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:TempTask.WebEntry.Tools.NumZjHelper.ExcelType.房地产业">
|
||||
<summary>
|
||||
房地产业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TempTask.WebEntry.Tools.NumZjHelper.WriteTemplate(System.Int32,System.Int32,System.Int32,TempTask.WebEntry.Tools.NumZjHelper.ExcelType,System.Collections.Generic.List{TempTask.WebEntry.ApiController.Dto.NumZjConfigSheet})">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="year"></param>
|
||||
<param name="month"></param>
|
||||
<param name="week"></param>
|
||||
<param name="excelType"></param>
|
||||
<param name="sheets"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"column_name_match_1_2": {
|
||||
"B": "PROJECT",
|
||||
"C": "PROJ_NO",
|
||||
"D": "PROJ_NO_RATE",
|
||||
"E": "PERMIT_NO",
|
||||
"F": "PERMIT_NO_RATE",
|
||||
"G": "INTE_PROJ_NO",
|
||||
"H": "INTE_PROJ_NO_RATE",
|
||||
"I": "INVALID_NUM",
|
||||
"J": "DEPT",
|
||||
"K": "DEPT_RATE",
|
||||
"L": "WEEK_PROCESS",
|
||||
"M": "WEEK_PROCESS_RATE",
|
||||
"N": "GPS_ADDRESS",
|
||||
"O": "GPS_ADDRESS_RATE",
|
||||
"P": "IS_IMPORTANT",
|
||||
"Q": "IS_IMPORTANT_RATE",
|
||||
"R": "VIDEO",
|
||||
"S": "VIDEO_RATE",
|
||||
"T": "REPORT"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"column_name_match_2_1": {
|
||||
"D": "XDND",
|
||||
"E": "JHND",
|
||||
"F": "JHNDFJ",
|
||||
"G": "SJLJWC",
|
||||
"H": "YOY",
|
||||
"I": "WCLJWCL",
|
||||
"J": "",
|
||||
"K": "",
|
||||
"L": "",
|
||||
"M": "XDJD",
|
||||
"N": "JHND",
|
||||
"O": "JHJDFJ",
|
||||
"P": "",
|
||||
"Q": "",
|
||||
"R": "",
|
||||
"S": "",
|
||||
"T": "",
|
||||
"U": "",
|
||||
"V": "REBUILDPROJECT",
|
||||
"W": "REBUILDNUM",
|
||||
"X": "REBUILDRATE",
|
||||
"Y": "WORKPROJECT",
|
||||
"Z": "WORKNUM",
|
||||
"AA": "WORKRATE",
|
||||
"AB": "FGWNEWPROJECT",
|
||||
"AC": "FGWNEWNUMS",
|
||||
"AD": "IMPORTANT_FGWRATE"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"column_name_match_2_3": {
|
||||
"C": "PROJECT",
|
||||
"D": "PROJ_NO",
|
||||
"E": "PROJ_NO_RATE",
|
||||
"F": "PERMIT_NO",
|
||||
"G": "PERMIT_NO_RATE",
|
||||
"H": "INTE_PROJ_NO",
|
||||
"I": "INTE_PROJ_NO_RATE",
|
||||
"J": "INVALID_NUM",
|
||||
"K": "DEPT",
|
||||
"L": "DEPT_RATE",
|
||||
"M": "WEEK_PROCESS",
|
||||
"N": "WEEK_PROCESS_RATE",
|
||||
"O": "GPS_ADDRESS",
|
||||
"P": "GPS_ADDRESS_RATE",
|
||||
"Q": "IS_IMPORTANT",
|
||||
"R": "IS_IMPORTANT_RATE",
|
||||
"S": "VIDEO",
|
||||
"T": "VIDEO_RATE",
|
||||
"U": "REPORT"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"column_name_match_2_4": {
|
||||
"B": "PROJECT",
|
||||
"C": "PROJ_NO",
|
||||
"D": "PROJ_NO_RATE",
|
||||
"E": "PERMIT_NO",
|
||||
"F": "PERMIT_NO_RATE",
|
||||
"G": "INTE_PROJ_NO",
|
||||
"H": "INTE_PROJ_NO_RATE",
|
||||
"I": "INVALID_NUM",
|
||||
"J": "DEPT",
|
||||
"K": "DEPT_RATE",
|
||||
"L": "WEEK_PROCESS",
|
||||
"M": "WEEK_PROCESS_RATE",
|
||||
"N": "GPS_ADDRESS",
|
||||
"O": "GPS_ADDRESS_RATE",
|
||||
"P": "IS_IMPORTANT",
|
||||
"Q": "IS_IMPORTANT_RATE",
|
||||
"R": "VIDEO",
|
||||
"S": "VIDEO_RATE",
|
||||
"T": "REPORT"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"column_name_match_3_1": {
|
||||
"D": "XDND",
|
||||
"E": "JHND",
|
||||
"F": "JHNDFJ",
|
||||
"G": "SJLJWC",
|
||||
"H": "YOY",
|
||||
"I": "WCLJWCL",
|
||||
"J": "",
|
||||
"K": "",
|
||||
"L": "",
|
||||
"M": "XDJD",
|
||||
"N": "JHND",
|
||||
"O": "JHJDFJ",
|
||||
"P": "",
|
||||
"Q": "",
|
||||
"R": "",
|
||||
"S": "",
|
||||
"T": "",
|
||||
"U": "",
|
||||
"V": "REBUILDPROJECT",
|
||||
"W": "REBUILDNUM",
|
||||
"X": "REBUILDRATE",
|
||||
"Y": "WORKPROJECT",
|
||||
"Z": "WORKNUM",
|
||||
"AA": "WORKRATE",
|
||||
"AB": "FGWNEWPROJECT",
|
||||
"AC": "FGWNEWNUMS",
|
||||
"AD": "IMPORTANT_FGWRATE"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"column_name_match_3_2": {
|
||||
"B": "XDND",
|
||||
"C": "JHND",
|
||||
"D": "JHNDFJ",
|
||||
"E": "SJLJWC",
|
||||
"F": "YOY",
|
||||
"G": "WCLJWCL",
|
||||
"H": "",
|
||||
"I": "",
|
||||
"J": "",
|
||||
"K": "XDJD",
|
||||
"L": "JHND",
|
||||
"M": "JHJDFJ",
|
||||
"N": "SJLJWC",
|
||||
"O": "YOY",
|
||||
"P": "WCLJWCL",
|
||||
"Q": "",
|
||||
"R": "",
|
||||
"S": "",
|
||||
"T": "REBUILDPROJECT",
|
||||
"U": "REBUILDNUM",
|
||||
"V": "REBUILDRATE",
|
||||
"W": "WORKPROJECT",
|
||||
"X": "WORKNUM",
|
||||
"Y": "WORKRATE"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"column_name_match_3_5": {
|
||||
"B": "XDND",
|
||||
"C": "JHND",
|
||||
"D": "JHNDFJ",
|
||||
"E": "SJLJWC",
|
||||
"F": "YOY",
|
||||
"G": "WCLJWCL",
|
||||
"H": "XDJD",
|
||||
"I": "JHND",
|
||||
"J": "JHJDFJ",
|
||||
"K": "SJLJWC",
|
||||
"L": "YOY",
|
||||
"M": "WCLJWCL"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"column_name_match_3_6": {
|
||||
"B": "XDNDMJ",
|
||||
"C": "JHNDMJ",
|
||||
"D": "JHNDFJMJ",
|
||||
"E": "SJLJWCMJ",
|
||||
"F": "YOYMJ",
|
||||
"G": "WCLJWCLMJ",
|
||||
"H": "XDJDMJ",
|
||||
"I": "JHNDMJ",
|
||||
"J": "JHJDFJMJ",
|
||||
"K": "SJLJWCMJ",
|
||||
"L": "YOYMJ",
|
||||
"M": "WCLJWCLMJ"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"column_name_match_3_7": {
|
||||
"B": "XDNDGZ",
|
||||
"C": "JHNDGZ",
|
||||
"D": "JHNDFJGZ",
|
||||
"E": "SJLJWCGZ",
|
||||
"F": "YOYGZ",
|
||||
"G": "WCLJWCLGZ",
|
||||
"H": "XDJDGZ",
|
||||
"I": "JHNDGZ",
|
||||
"J": "JHJDFJGZ",
|
||||
"K": "SJLJWCGZ",
|
||||
"L": "YOYGZ",
|
||||
"M": "WCLJWCLGZ"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"column_name_match_3_8": {
|
||||
"C": "PROJECT",
|
||||
"D": "PROJ_NO",
|
||||
"E": "PROJ_NO_RATE",
|
||||
"F": "PERMIT_NO",
|
||||
"G": "PERMIT_NO_RATE",
|
||||
"H": "INTE_PROJ_NO",
|
||||
"I": "INTE_PROJ_NO_RATE",
|
||||
"J": "INVALID_NUM",
|
||||
"K": "DEPT",
|
||||
"L": "DEPT_RATE",
|
||||
"M": "WEEK_PROCESS",
|
||||
"N": "WEEK_PROCESS_RATE",
|
||||
"O": "GPS_ADDRESS",
|
||||
"P": "GPS_ADDRESS_RATE",
|
||||
"Q": "IS_IMPORTANT",
|
||||
"R": "IS_IMPORTANT_RATE",
|
||||
"S": "VIDEO",
|
||||
"T": "VIDEO_RATE",
|
||||
"U": "REPORT"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"column_name_match_3_9": {
|
||||
"B": "PROJECT",
|
||||
"C": "PROJ_NO",
|
||||
"D": "PROJ_NO_RATE",
|
||||
"E": "PERMIT_NO",
|
||||
"F": "PERMIT_NO_RATE",
|
||||
"G": "INTE_PROJ_NO",
|
||||
"H": "INTE_PROJ_NO_RATE",
|
||||
"I": "INVALID_NUM",
|
||||
"J": "DEPT",
|
||||
"K": "DEPT_RATE",
|
||||
"L": "WEEK_PROCESS",
|
||||
"M": "WEEK_PROCESS_RATE",
|
||||
"N": "GPS_ADDRESS",
|
||||
"O": "GPS_ADDRESS_RATE",
|
||||
"P": "IS_IMPORTANT",
|
||||
"Q": "IS_IMPORTANT_RATE",
|
||||
"R": "VIDEO",
|
||||
"S": "VIDEO_RATE",
|
||||
"T": "REPORT"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
141
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/urlconfig.json
Normal file
141
20220313_Excel/TempTask.WebEntry/bin/Debug/net5.0/urlconfig.json
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"NumZjConfig": {
|
||||
//"start_row": 6, 开始行数 Excel中行号
|
||||
//"null_row_count": 6, 空行数
|
||||
//"start_cell": 3, 开始列数, A是1,B是2,以此类推
|
||||
//"null_cell_count": 17, 空列数
|
||||
//"url": "接口URL",
|
||||
"numZjExcels": [
|
||||
{
|
||||
"excel_no": 1,
|
||||
"excel_name": "总表(样表).xls",
|
||||
"sheets": [
|
||||
{
|
||||
"sheet_no": 1,
|
||||
"sheet_name": "关键信息",
|
||||
"start_row": 5,
|
||||
"null_row_count": 11,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 27,
|
||||
"url": "",
|
||||
"skip_rows": [ 10, 12 ]
|
||||
},
|
||||
{
|
||||
"sheet_no": 2,
|
||||
"sheet_name": "项目信息",
|
||||
"start_row": 6,
|
||||
"null_row_count": 4,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 19,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/projectByALL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excel_no": 2,
|
||||
"excel_name": "住建系统抓投资情况通报(城市更新)样表.xlsx",
|
||||
"sheets": [
|
||||
{
|
||||
"sheet_no": 1,
|
||||
"sheet_name": "城市更新-分行业(关键指标)"
|
||||
},
|
||||
{
|
||||
"sheet_no": 2,
|
||||
"sheet_name": "分地区(关键指标)"
|
||||
},
|
||||
{
|
||||
"sheet_no": 3,
|
||||
"sheet_name": "城市更新-分行业(项目信息)",
|
||||
"start_row": 5,
|
||||
"null_row_count": 6,
|
||||
"start_cell": "C",
|
||||
"null_cell_count": 20,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByInd"
|
||||
},
|
||||
{
|
||||
"sheet_no": 4,
|
||||
"sheet_name": "分地区(项目信息)",
|
||||
"start_row": 5,
|
||||
"null_row_count": 14,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 20,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/cityProjectByArea"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"excel_no": 3,
|
||||
"excel_name": "住建系统抓投资情况通报(房地产业+GDP支撑性指标)样表.xlsx",
|
||||
"sheets": [
|
||||
{
|
||||
"sheet_no": 1,
|
||||
"sheet_name": "房地产业-分行业",
|
||||
"start_row": 5,
|
||||
"null_row_count": 7,
|
||||
"start_cell": "D",
|
||||
"null_cell_count": 21,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseInvestKeyRate"
|
||||
},
|
||||
{
|
||||
"sheet_no": 2,
|
||||
"sheet_name": "房地产业-分地区",
|
||||
"start_row": 5,
|
||||
"null_row_count": 13,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 18,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseInvestAreaKeyRate"
|
||||
},
|
||||
{
|
||||
"sheet_no": 3,
|
||||
"sheet_name": "GDP支撑指标-分地区、分行业(关键指标)"
|
||||
},
|
||||
{
|
||||
"sheet_no": 5,
|
||||
"sheet_name": "建筑业总产值-分地区",
|
||||
"start_row": 6,
|
||||
"null_row_count": 13,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 12,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/indexGDPArea"
|
||||
},
|
||||
{
|
||||
"sheet_no": 6,
|
||||
"sheet_name": "商品房销售面积-分地区",
|
||||
"start_row": 6,
|
||||
"null_row_count": 13,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 12,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/indexGDPArea"
|
||||
},
|
||||
{
|
||||
"sheet_no": 7,
|
||||
"sheet_name": "工资总额-分地区",
|
||||
"start_row": 6,
|
||||
"null_row_count": 13,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 12,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/indexGDPArea"
|
||||
},
|
||||
{
|
||||
"sheet_no": 8,
|
||||
"sheet_name": "房地产业分行业(项目信息)",
|
||||
"start_row": 6,
|
||||
"null_row_count": 4,
|
||||
"start_cell": "C",
|
||||
"null_cell_count": 20,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByInd"
|
||||
},
|
||||
{
|
||||
"sheet_no": 9,
|
||||
"sheet_name": "分地区(项目信息)",
|
||||
"start_row": 5,
|
||||
"null_row_count": 13,
|
||||
"start_cell": "B",
|
||||
"null_cell_count": 20,
|
||||
"url": "http://10.19.94.196:81/data-system/api/bigScreen/house/houseProjectByArea"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user