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
ee3591f0
Commit
ee3591f0
authored
Jan 26, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加交运时间
parent
429a0d85
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
11 deletions
+37
-11
AllotInfo.cs
Bailun.DC.AllotOrderDetail/Models/AllotInfo.cs
+5
-0
dc_base_transfer_info.cs
Bailun.DC.AllotOrderDetail/Models/dc_base_transfer_info.cs
+2
-0
Program.cs
Bailun.DC.AllotOrderDetail/Program.cs
+8
-1
Services.cs
Bailun.DC.AllotOrderDetail/Services.cs
+22
-10
No files found.
Bailun.DC.AllotOrderDetail/Models/AllotInfo.cs
View file @
ee3591f0
...
@@ -166,6 +166,11 @@ namespace Bailun.DC.AllotOrderDetail.Models
...
@@ -166,6 +166,11 @@ namespace Bailun.DC.AllotOrderDetail.Models
/// </summary>
/// </summary>
public
DateTime
?
CompletionDate
{
get
;
set
;
}
public
DateTime
?
CompletionDate
{
get
;
set
;
}
/// <summary>
/// 交运确认时间
/// </summary>
public
DateTime
?
DeliveryTime
{
get
;
set
;
}
}
}
public
class
AllotOrderProductItemOutputDto
public
class
AllotOrderProductItemOutputDto
...
...
Bailun.DC.AllotOrderDetail/Models/dc_base_transfer_info.cs
View file @
ee3591f0
...
@@ -92,5 +92,7 @@ namespace Bailun.DC.AllotOrderDetail.Models
...
@@ -92,5 +92,7 @@ namespace Bailun.DC.AllotOrderDetail.Models
public
DateTime
dc_createtime
{
get
;
set
;
}
public
DateTime
dc_createtime
{
get
;
set
;
}
public
DateTime
?
finishtime
{
get
;
set
;
}
public
DateTime
?
finishtime
{
get
;
set
;
}
public
DateTime
?
deliverytime
{
get
;
set
;
}
}
}
}
}
Bailun.DC.AllotOrderDetail/Program.cs
View file @
ee3591f0
...
@@ -22,7 +22,14 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -22,7 +22,14 @@ namespace Bailun.DC.AllotOrderDetail
//static void Main(string[] args)
//static void Main(string[] args)
//{
//{
// var service = new Services();
// var service = new Services();
// service.Init();
// //service.Init();
// var day = DateTime.Parse("2020-06-24");
// while(day<DateTime.Now)
// {
// service.GetData(day, day.AddHours(1));
// day = day.AddHours(1);
// }
//}
//}
}
}
}
}
Bailun.DC.AllotOrderDetail/Services.cs
View file @
ee3591f0
...
@@ -47,8 +47,7 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -47,8 +47,7 @@ namespace Bailun.DC.AllotOrderDetail
public
void
Init
()
public
void
Init
()
{
{
var
page
=
1
;
var
rows
=
1000
;
var
starttime
=
DateTime
.
Now
;
var
starttime
=
DateTime
.
Now
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
...
@@ -72,7 +71,7 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -72,7 +71,7 @@ namespace Bailun.DC.AllotOrderDetail
endtime
=
DateTime
.
Now
;
endtime
=
DateTime
.
Now
;
starttime
=
starttime
.
AddMinutes
(-
3
);
starttime
=
starttime
.
AddMinutes
(-
3
);
var
total
=
-
1
;
//测试
//测试
#if DEBUG
#if DEBUG
...
@@ -80,21 +79,31 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -80,21 +79,31 @@ namespace Bailun.DC.AllotOrderDetail
endtime
=
starttime
.
AddSeconds
(
10
);
endtime
=
starttime
.
AddSeconds
(
10
);
#endif
#endif
GetData
(
starttime
,
endtime
);
}
public
void
GetData
(
DateTime
starttime
,
DateTime
end
)
{
var
page
=
1
;
var
rows
=
1000
;
var
total
=
-
1
;
while
(
total
==
-
1
||
total
>
((
page
-
1
)
*
rows
))
while
(
total
==
-
1
||
total
>
((
page
-
1
)
*
rows
))
{
{
total
=
0
;
total
=
0
;
var
data
=
new
var
data
=
new
{
{
Data
=
new
{
Data
=
new
Page
=
new
{
{
Page
=
new
{
page
=
page
,
page
=
page
,
rows
=
rows
rows
=
rows
},
},
StartTime
=
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
StartTime
=
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndTime
=
end
time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndTime
=
end
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
},
},
};
};
...
@@ -110,13 +119,13 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -110,13 +119,13 @@ namespace Bailun.DC.AllotOrderDetail
//保存数据
//保存数据
Save
(
json
.
data
.
items
);
Save
(
json
.
data
.
items
);
Console
.
WriteLine
(
"时间:"
+
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
"-"
+
end
time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
",页码:"
+
page
+
",请求记录数:"
+
json
.
data
.
items
.
Count
+
",总记录数:"
+
total
);
Console
.
WriteLine
(
"时间:"
+
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
"-"
+
end
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
",页码:"
+
page
+
",请求记录数:"
+
json
.
data
.
items
.
Count
+
",总记录数:"
+
total
);
page
++;
page
++;
}
}
else
else
{
{
Console
.
WriteLine
(
"时间:"
+
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
"-"
+
end
time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
",页码:"
+
page
+
",请求记录数:0"
);
Console
.
WriteLine
(
"时间:"
+
starttime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
"-"
+
end
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
",页码:"
+
page
+
",请求记录数:0"
);
}
}
}
}
}
}
...
@@ -184,8 +193,11 @@ namespace Bailun.DC.AllotOrderDetail
...
@@ -184,8 +193,11 @@ namespace Bailun.DC.AllotOrderDetail
skuweight
=
0
,
skuweight
=
0
,
skuweightStr
=
""
,
skuweightStr
=
""
,
finishtime
=
item
.
CompletionDate
finishtime
=
item
.
CompletionDate
,
deliverytime
=
item
.
DeliveryTime
,
};
};
cn
.
Insert
<
Models
.
dc_base_transfer_info
>(
m
);
cn
.
Insert
<
Models
.
dc_base_transfer_info
>(
m
);
...
...
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