Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
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
bltdc
data-center-auto
Commits
38f71a92
Commit
38f71a92
authored
Jul 24, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
cb319105
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
1 deletion
+93
-1
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+0
-0
dc_report_cash_flow_log.cs
AutoTurnOver.Models/dc_report_cash_flow_log.cs
+23
-0
CashFlowServices.cs
AutoTurnOver.Services/CashFlowServices.cs
+36
-0
AutoTurnOver.csproj
AutoTurnOver/AutoTurnOver.csproj
+1
-1
CashFlowController.cs
AutoTurnOver/Controllers/CashFlowController.cs
+33
-0
No files found.
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
38f71a92
This diff is collapsed.
Click to expand it.
AutoTurnOver.Models/dc_report_cash_flow_log.cs
View file @
38f71a92
...
@@ -130,4 +130,27 @@ namespace AutoTurnOver.Models
...
@@ -130,4 +130,27 @@ namespace AutoTurnOver.Models
{
{
public
string
data_type
{
get
;
set
;
}
public
string
data_type
{
get
;
set
;
}
}
}
public
class
report_cash_flow_view_dto
{
public
string
remarks
{
get
;
set
;
}
public
string
date_type_str
{
get
;
set
;
}
public
int
date_type
{
get
;
set
;
}
public
List
<
date_dto
>
dates
{
get
;
set
;
}
public
class
date_dto
{
public
string
date_title
{
get
;
set
;
}
public
DateTime
btime
{
get
;
set
;
}
public
DateTime
etime
{
get
;
set
;
}
public
decimal
occur_val
{
get
;
set
;
}
public
decimal
pay_val
{
get
;
set
;
}
}
}
public
class
report_cash_flow_view_search_dto
{
public
DateTime
?
btime
{
get
;
set
;
}
public
DateTime
?
etime
{
get
;
set
;
}
}
}
}
AutoTurnOver.Services/CashFlowServices.cs
0 → 100644
View file @
38f71a92
using
AutoTurnOver.DB
;
using
AutoTurnOver.Models
;
using
System
;
using
System.Collections.Generic
;
using
System.Dynamic
;
using
System.Text
;
namespace
AutoTurnOver.Services
{
public
class
CashFlowServices
{
public
List
<
dynamic
>
GetView
(
report_cash_flow_view_search_dto
search_data
)
{
var
order_list
=
report_cash_flow_dao
.
GetView
(
search_data
);
List
<
dynamic
>
datas
=
new
List
<
dynamic
>();
foreach
(
var
item
in
order_list
)
{
dynamic
o
=
new
ExpandoObject
();
o
.
date_type
=
item
.
date_type
;
o
.
date_type_str
=
item
.
date_type_str
;
o
.
remarks
=
item
.
remarks
;
foreach
(
var
dat_item
in
item
.
dates
)
{
var
dic
=
(
IDictionary
<
string
,
object
>)
o
;
dic
[
"occur_"
+
(
dat_item
.
date_title
)]
=
new
{
val
=
Math
.
Round
(
dat_item
.
occur_val
,
2
),
btime
=
dat_item
.
btime
,
etime
=
dat_item
.
etime
,
data_type
=
item
.
date_type
};
dic
[
"pay_"
+
(
dat_item
.
date_title
)]
=
new
{
val
=
Math
.
Round
(
dat_item
.
pay_val
,
2
),
btime
=
dat_item
.
btime
,
etime
=
dat_item
.
etime
,
data_type
=
item
.
date_type
};
}
datas
.
Add
(
o
);
}
return
datas
;
}
}
}
AutoTurnOver/AutoTurnOver.csproj
View file @
38f71a92
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1
0
" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
...
...
AutoTurnOver/Controllers/CashFlowController.cs
0 → 100644
View file @
38f71a92
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
AutoTurnOver.Models
;
using
AutoTurnOver.Services
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
namespace
AutoTurnOver.Controllers
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiController
]
public
class
CashFlowController
:
ControllerBase
{
public
JsonResult
GetView
(
DateTime
?
btime
,
DateTime
?
etime
)
{
report_cash_flow_view_search_dto
search_data
=
new
report_cash_flow_view_search_dto
{
etime
=
etime
,
btime
=
btime
,
};
var
list
=
new
CashFlowServices
().
GetView
(
search_data
);
return
new
JsonResult
(
new
{
rows
=
list
,
total
=
0
,
});
}
}
}
\ 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