Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
DataCenter_Core2.1_20190520
Commits
bd159178
Commit
bd159178
authored
Jun 24, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新获取平台帐号余额服务
parent
2ca47cbe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
Program.cs
Bailun.DC.DailyPlatformAccountBalance/Program.cs
+1
-1
Services.cs
Bailun.DC.DailyPlatformAccountBalance/Services.cs
+38
-2
No files found.
Bailun.DC.DailyPlatformAccountBalance/Program.cs
View file @
bd159178
...
...
@@ -26,7 +26,7 @@ namespace Bailun.DC.DailyPlatformAccountBalance
//{
// var _services = new Services();
// _services.Init(DateTime.Parse("2020-0
2-01"), DateTime.Parse("2020-06-24 10
:30"));
// _services.Init(DateTime.Parse("2020-0
1-01"), DateTime.Parse("2020-06-24 15
:30"));
//}
}
}
Bailun.DC.DailyPlatformAccountBalance/Services.cs
View file @
bd159178
...
...
@@ -30,7 +30,7 @@ namespace Bailun.DC.DailyPlatformAccountBalance
{
var
now
=
DateTime
.
Now
;
if
(
now
.
Hour
==
7
&&
now
.
Minute
==
03
)
//每天7点03
分启动跑一次
if
(
now
.
Hour
==
9
&&
now
.
Minute
==
01
)
//每天9点01
分启动跑一次
{
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
var
end
=
DateTime
.
Now
;
...
...
@@ -44,6 +44,9 @@ namespace Bailun.DC.DailyPlatformAccountBalance
Console
.
WriteLine
(
"开始启动每日记录保存 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
SaveDaily
();
Console
.
WriteLine
(
"结束每日记录保存 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
...
...
@@ -56,7 +59,7 @@ namespace Bailun.DC.DailyPlatformAccountBalance
public
void
Init
(
DateTime
start
,
DateTime
end
)
{
url
+=
"?StartDate="
+
start
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)+
"&EndDate="
+
end
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)+
"&page=1&
limit
=100000"
;
url
+=
"?StartDate="
+
start
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)+
"&EndDate="
+
end
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)+
"&page=1&
pagesize
=100000"
;
var
str
=
Common
.
HttpHelper
.
NetHelper
.
Request
(
url
);
...
...
@@ -106,6 +109,15 @@ namespace Bailun.DC.DailyPlatformAccountBalance
}
/// <summary>
/// 更新资产负债表余额
/// </summary>
/// <param name="day"></param>
private
void
UpdateBalanceSheet
(
DateTime
day
)
{
//platformBalanceUpdate
}
/// <summary>
/// 保存每日余额
/// </summary>
private
void
SaveDaily
()
...
...
@@ -126,5 +138,29 @@ namespace Bailun.DC.DailyPlatformAccountBalance
}
/// <summary>
/// 更新资产负债表的物流应付款额
/// </summary>
/// <param name="day">日期</param>
/// <param name="amount">金额</param>
/// <param name="paramname">参数名</param>
/// <returns></returns>
public
string
UpdateLogisticsEndAmount
(
DateTime
day
,
decimal
amount
,
string
paramname
)
{
var
url
=
"http://fee.bailuntec.com/balanceSheet/updateSheetLogisticsSupplier?date="
+
day
.
ToString
(
"yyyy-MM-dd"
)
+
"&"
+
paramname
+
"="
+
amount
;
var
result
=
Common
.
HttpHelper
.
NetHelper
.
Request
(
url
);
var
json
=
Newtonsoft
.
Json
.
Linq
.
JObject
.
Parse
(
result
);
if
(
json
[
"success"
].
ToString
().
ToLower
()
==
"true"
)
{
return
""
;
}
else
{
return
json
[
"message"
].
ToString
();
}
}
}
}
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