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
45345f12
Commit
45345f12
authored
Jul 08, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改借支单的服务
parent
41f84d37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
Program.cs
Bailun.DC.DailyBorrowFee/Program.cs
+16
-16
Services.cs
Bailun.DC.DailyBorrowFee/Services.cs
+4
-1
No files found.
Bailun.DC.DailyBorrowFee/Program.cs
View file @
45345f12
...
@@ -12,27 +12,27 @@ namespace Bailun.DC.DailyBorrowFee
...
@@ -12,27 +12,27 @@ namespace Bailun.DC.DailyBorrowFee
/// </summary>
/// </summary>
/// <param name="args"></param>
/// <param name="args"></param>
/// <returns></returns>
/// <returns></returns>
//
static async Task Main(string[] args)
static
async
Task
Main
(
string
[]
args
)
//
{
{
//
Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
Console
.
WriteLine
(
"启动服务 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
//
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
//
{
{
//
services.AddHostedService<Services>();
services
.
AddHostedService
<
Services
>();
//
});
});
//
await builder.RunConsoleAsync();
await
builder
.
RunConsoleAsync
();
//
}
}
static
void
Main
(
string
[]
args
)
//
static void Main(string[] args)
{
//
{
var
_services
=
new
Services
();
//
var _services = new Services();
var
start
=
DateTime
.
Now
;
//
var start = DateTime.Now;
start
=
DateTime
.
Parse
(
start
.
AddDays
(-
1
).
ToShortDateString
());
//
start = DateTime.Parse(start.AddDays(-1).ToShortDateString());
_services
.
Init
(
start
);
//
_services.Init(start);
}
//
}
}
}
}
}
Bailun.DC.DailyBorrowFee/Services.cs
View file @
45345f12
...
@@ -25,7 +25,7 @@ namespace Bailun.DC.DailyBorrowFee
...
@@ -25,7 +25,7 @@ namespace Bailun.DC.DailyBorrowFee
{
{
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
if
(
now
.
Hour
==
0
&&
now
.
Minute
==
01
)
//凌晨0:01
分启动
if
(
now
.
Hour
==
0
&&
now
.
Minute
==
30
)
//凌晨0:30
分启动
{
{
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
var
start
=
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToShortDateString
());
var
start
=
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToShortDateString
());
...
@@ -73,6 +73,9 @@ namespace Bailun.DC.DailyBorrowFee
...
@@ -73,6 +73,9 @@ namespace Bailun.DC.DailyBorrowFee
bj_create, bj_modified, '
{
day
.
ToString
(
"yyyy-MM-dd"
)}
' from dc_base_finance_fee where is_lend = 1 and cost_form = 3 and lend_status in (1, 2)"
;
bj_create, bj_modified, '
{
day
.
ToString
(
"yyyy-MM-dd"
)}
' from dc_base_finance_fee where is_lend = 1 and cost_form = 3 and lend_status in (1, 2)"
;
cn
.
Execute
(
sql
);
cn
.
Execute
(
sql
);
var
count
=
cn
.
QueryFirstOrDefault
<
int
?>(
"select count(id) from dc_daily_fee where recoed_time='"
+
day
.
ToString
(
"yyyy-MM-dd"
)+
"'"
);
Console
.
WriteLine
(
"借支单待还的订单数量:"
+(
count
??
0
));
}
}
...
...
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