Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Finances.Addons.V4.5
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Finances.Addons.V4.5
Commits
d3fb5eb8
Commit
d3fb5eb8
authored
Jul 18, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供嵌入模板资源下载接口
parent
483177ca
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
83 additions
and
16 deletions
+83
-16
.gitignore
.gitignore
+1
-0
Configs.cs
Src/Configs.cs
+16
-0
InvoiceTitle.xlsx
Src/Content/Templates/InvoiceTitle.xlsx
+0
-0
Payment.Receipt.ICBC.xlsx
Src/Content/Templates/Payment.Receipt.ICBC.xlsx
+0
-0
Payment.Receipt.xlsx
Src/Content/Templates/Payment.Receipt.xlsx
+0
-0
Kivii.Finances.Addons.V4.5.csproj
Src/Kivii.Finances.Addons.V4.5.csproj
+16
-11
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+3
-1
RequestService.cs
Src/RequestService.cs
+25
-0
TemplateRequest.cs
Src/TemplateRequest.cs
+17
-0
packages.config
Src/packages.config
+5
-4
No files found.
.gitignore
View file @
d3fb5eb8
...
...
@@ -7,3 +7,4 @@
/Src/obj/Debug
/Src/obj/Release
/Src/bin/Release
/Src/.vs
Src/Configs.cs
0 → 100644
View file @
d3fb5eb8
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Kivii.Finances.Addons
{
internal
class
Configs
{
/// <summary>
/// 所有静态资源的路径
/// </summary>
public
const
string
RouteAllPath
=
"/Kivii/Finances/Template/{Path*}"
;
}
}
Src/Content/Templates/
Finances.
InvoiceTitle.xlsx
→
Src/Content/Templates/InvoiceTitle.xlsx
View file @
d3fb5eb8
File moved
Src/Content/Templates/
Finances.
Payment.Receipt.ICBC.xlsx
→
Src/Content/Templates/Payment.Receipt.ICBC.xlsx
View file @
d3fb5eb8
File moved
Src/Content/Templates/
Finances.
Payment.Receipt.xlsx
→
Src/Content/Templates/Payment.Receipt.xlsx
View file @
d3fb5eb8
File moved
Src/Kivii.Finances.Addons.V4.5.csproj
View file @
d3fb5eb8
...
...
@@ -31,17 +31,17 @@
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.6.2024.
11
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Common.5.6.2024.11
00\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.6.2024.
52
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Common.5.6.2024.52
00\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.202
3.90
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Core.5.6.2023.90
00\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.202
4.52
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Core.5.6.2024.52
00\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.202
3.100
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Linq.5.6.2023.100
00\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.202
4.52
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Linq.5.6.2024.52
00\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Office.OpenXml.V4.5, Version=5.6.202
3.1216
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
..\packages\Kivii.Office.OpenXml.5.6.2023.1216
0\lib\net45\Kivii.Office.OpenXml.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Office.OpenXml.V4.5, Version=5.6.202
4.500
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\
packages\Kivii.Office.OpenXml.5.6.2024.500
0\lib\net45\Kivii.Office.OpenXml.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
...
...
@@ -53,8 +53,11 @@
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Configs.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"RequestService.cs"
/>
<Compile
Include=
"RestfulReadExcel.cs"
/>
<Compile
Include=
"TemplateRequest.cs"
/>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\Kivii.Biz.Finances\Src\Kivii.Biz.Finances.V4.5.csproj"
>
...
...
@@ -63,11 +66,13 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"Content\Templates\Finances.Payment.Receipt.xlsx"
/>
<EmbeddedResource
Include=
"Content\Templates\Finances.InvoiceTitle.xlsx"
/>
<EmbeddedResource
Include=
"Content\Templates\Payment.Receipt.xlsx"
/>
<EmbeddedResource
Include=
"Content\Templates\InvoiceTitle.xlsx"
/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"Content\Templates\Payment.Receipt.ICBC.xlsx"
/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"Content\Templates\Finances.Payment.Receipt.ICBC.xlsx"
/>
<None
Include=
"packages.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
...
...
Src/Properties/AssemblyInfo.cs
View file @
d3fb5eb8
using
System.Reflection
;
using
Kivii.Finances.Addons
;
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
...
...
@@ -19,5 +20,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("Kivii,K5")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyLoadService(typeof(RequestService))]
[assembly: AssemblyVersion("5.4.2024.1110")]
[assembly: AssemblyFileVersion("5.4.2024.1110")]
Src/RequestService.cs
0 → 100644
View file @
d3fb5eb8
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Kivii.Finances.Addons
{
public
class
RequestService
:
Service
{
public
object
Get
(
TemplateRequest
request
)
{
try
{
var
file
=
HostContext
.
VirtualFileSources
.
GetFile
(
$"/Content/Templates/
{
request
.
Path
}
"
);
if
(
file
==
null
)
throw
HttpError
.
NotFound
(
request
.
Path
);
return
new
HttpResult
(
file
,
false
);
}
catch
(
Exception
ex
)
{
throw
ex
;
}
}
}
}
Src/TemplateRequest.cs
0 → 100644
View file @
d3fb5eb8
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Kivii.Finances.Addons
{
/// <summary>
/// 资源下载
/// </summary>
[
Route
(
Configs
.
RouteAllPath
)]
public
class
TemplateRequest
{
public
string
Path
{
get
;
set
;
}
}
}
Src/packages.config
View file @
d3fb5eb8
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.
11
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.202
3.90
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.202
3.100
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Office.OpenXml"
version
=
"5.6.202
3.1216
0"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.
52
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.202
4.52
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.202
4.52
00"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Office.OpenXml"
version
=
"5.6.202
4.500
0"
targetFramework
=
"net45"
/>
</
packages
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment