Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Biz.Finances.V2.0
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.Biz.Finances.V2.0
Commits
037febc1
Commit
037febc1
authored
Mar 24, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
b6ebcc10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
Kivii.Biz.Finances.V2.0.csproj
Src/Kivii.Biz.Finances.V2.0.csproj
+9
-1
RestfulSettlement.Statistic.cs
Src/Transforms/Statistics/RestfulSettlement.Statistic.cs
+4
-1
RestfulStatistic.cs
Src/Transforms/Statistics/RestfulStatistic.cs
+1
-1
No files found.
Src/Kivii.Biz.Finances.V2.0.csproj
View file @
037febc1
...
...
@@ -25,7 +25,7 @@
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release
\
</OutputPath>
<OutputPath>
..\..\Kivii%27s Releases
\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
...
...
@@ -276,4 +276,11 @@
<None
Include=
"packages.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<PropertyGroup>
<PostBuildEvent>
if "$(ConfigurationName)"=="Release" if exist "$(TargetDir)Reactor\dotNET_Reactor.exe" (call "$(TargetDir)Reactor\dotNET_Reactor.exe" -file "$(TargetPath)" -targetfile "$(TargetDir)Release\$(TargetFileName)" -stringencryption 0 -antitamp 1 -suppressildasm 1)
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
Src/Transforms/Statistics/RestfulSettlement.Statistic.cs
View file @
037febc1
...
...
@@ -22,6 +22,7 @@ namespace Kivii.Finances.Transforms
public
DateTime
EndTime
{
get
;
set
;
}
public
List
<
string
>
Types
{
get
;
set
;
}
public
bool
IsOperated
{
get
;
set
;
}
//如果True则查询OperateTime否则默认CreateTime
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
...
...
@@ -39,7 +40,9 @@ namespace Kivii.Finances.Transforms
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Settlement
>();
var
sqlExpress
=
conn
.
From
<
Settlement
>();
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
);
sqlExpress
.
And
(
o
=>
o
.
CreateTime
>=
beginTime
&&
o
.
CreateTime
<
endTime
);
if
(
IsOperated
)
sqlExpress
.
And
(
o
=>
o
.
OperateTime
>=
beginTime
&&
o
.
OperateTime
<
endTime
);
else
sqlExpress
.
And
(
o
=>
o
.
CreateTime
>=
beginTime
&&
o
.
CreateTime
<
endTime
);
//sqlExpress.And(o => o.CreateTime >= beginTime && o.CreateTime < endTime);
if
(!
OwnerKvids
.
IsNullOrEmpty
())
sqlExpress
.
And
(
o
=>
Sql
.
In
(
o
.
OwnerKvid
,
OwnerKvids
));
#
region
如果是
GroupByOwner
的处理情况
...
...
Src/Transforms/Statistics/RestfulStatistic.cs
View file @
037febc1
...
...
@@ -565,7 +565,7 @@ namespace Kivii.Finances.Transforms
sqlExpress
.
And
(
o
=>
o
.
OperateTime
>=
BeginTime
&&
o
.
OperateTime
<
EndTime
);
sqlExpress
.
And
(
o
=>
(
Sql
.
In
(
o
.
ParentKvid
,
querySplits
)
||
Sql
.
In
(
o
.
OwnerKvid
,
OwnerKvids
)));
sqlExpress
.
OrderBy
(
o
=>
o
.
OwnerName
);
sqlExpress
.
Select
(
o
=>
new
{
o
.
OwnerKvid
,
o
.
OwnerName
,
o
.
Amount
,
o
.
AmountInvoice
,
o
.
AmountUsed
,
o
.
OperateTime
,
o
.
CreateTime
,
o
.
Type
,
o
.
Kvid
});
//
sqlExpress.Select(o => new { o.OwnerKvid, o.OwnerName, o.Amount, o.AmountInvoice, o.AmountUsed, o.OperateTime, o.CreateTime, o.Type, o.Kvid });
sqlExpress
.
GroupBy
(
o
=>
o
.
OwnerName
);
sqlExpress
.
Select
(
o
=>
new
...
...
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