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
722ab9f9
Commit
722ab9f9
authored
Jan 18, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a514d05e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
GeneratePurchaseAdviseBackgroundService.cs
...PurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
+1
-1
Program.cs
AutoGeneratePurchaseAdvise/Program.cs
+1
-1
appsettings.prod.json
AutoGeneratePurchaseAdvise/appsettings.prod.json
+5
-4
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+5
-1
No files found.
AutoGeneratePurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
View file @
722ab9f9
...
@@ -74,7 +74,7 @@ namespace AutoGeneratePurchaseAdvise
...
@@ -74,7 +74,7 @@ namespace AutoGeneratePurchaseAdvise
Console
.
WriteLine
(
$"结束 检查周转任务状态 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"结束 检查周转任务状态 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
}
if
(
now
.
Hour
==
08
&&
now
.
Minute
==
5
0
)
if
(
now
.
Hour
==
08
&&
now
.
Minute
==
4
0
)
{
{
Console
.
WriteLine
(
$"开始 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
Console
.
WriteLine
(
$"开始 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
Generate
(
DateTime
.
Parse
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd 00:00:00"
)));
PurchaseAdviseServices
.
Generate
(
DateTime
.
Parse
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd 00:00:00"
)));
...
...
AutoGeneratePurchaseAdvise/Program.cs
View file @
722ab9f9
...
@@ -39,7 +39,7 @@ namespace AutoGeneratePurchaseAdvise
...
@@ -39,7 +39,7 @@ namespace AutoGeneratePurchaseAdvise
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
//report.PurchaseWeekBackUp();
//report.PurchaseWeekBackUp();
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
//
PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
PurchaseAdviseServices
.
Generate
(
DateTime
.
Parse
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd 00:00:00"
)));
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
AutoGeneratePurchaseAdvise/appsettings.prod.json
View file @
722ab9f9
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
"Url"
:
"http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo"
,
"Url"
:
"http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo"
,
"CanLog"
:
"yes"
"CanLog"
:
"yes"
},
},
"Lms_GetLogistics"
:
"http://
lms.bailuntec.com
/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://
10.0.8.36
/api/DataInfo/ApiLogistics/GetLogistics"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
,
"api_lms_order_transfer_sku"
:
"http://
lms.bailuntec.com
/api/order/transfer/list"
,
"api_lms_order_transfer_sku"
:
"http://
10.0.8.36
/api/order/transfer/list"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://
lms.bailuntec.com
/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://
10.0.8.36
/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"api_lms_order_transfer_sku_avg"
:
"http://
lms.bailuntec.com
/api/order/transfer/avglist"
"api_lms_order_transfer_sku_avg"
:
"http://
10.0.8.36
/api/order/transfer/avglist"
}
}
\ No newline at end of file
AutoTurnOver.DB/purchase_advise.cs
View file @
722ab9f9
...
@@ -44,14 +44,17 @@ namespace AutoTurnOver.DB
...
@@ -44,14 +44,17 @@ namespace AutoTurnOver.DB
/// </summary>
/// </summary>
public
static
void
ReplaceLogistics
(
DateTime
date
,
string
bailun_sku
=
null
,
string
warehouse_code
=
null
)
public
static
void
ReplaceLogistics
(
DateTime
date
,
string
bailun_sku
=
null
,
string
warehouse_code
=
null
)
{
{
Console
.
WriteLine
(
"查询需要切换的数据"
);
// 查询需要切换的数据
// 查询需要切换的数据
List
<
replace_logistics_outofstock_dto
>
ouDatas
=
GetOutOfStock
(
bailun_sku
,
warehouse_code
);
List
<
replace_logistics_outofstock_dto
>
ouDatas
=
GetOutOfStock
(
bailun_sku
,
warehouse_code
);
Console
.
WriteLine
(
$" 查询需要切换的数据 :共:
{
ouDatas
.
Count
}
条 "
);
int
count
=
1
;
// 寻找有没有满足条件的物流方案
// 寻找有没有满足条件的物流方案
foreach
(
var
item
in
ouDatas
)
foreach
(
var
item
in
ouDatas
)
{
{
try
try
{
{
Console
.
WriteLine
(
$"要切换的数据:第
{
count
}
条
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
// 查询物流方案
// 查询物流方案
var
logisticsDatas
=
ApiUtility
.
GetFilterLogisticsAssignLineList
(
new
Models
.
ApiDto
.
api_logistic_query_input_dto
()
var
logisticsDatas
=
ApiUtility
.
GetFilterLogisticsAssignLineList
(
new
Models
.
ApiDto
.
api_logistic_query_input_dto
()
{
{
...
@@ -112,6 +115,7 @@ namespace AutoTurnOver.DB
...
@@ -112,6 +115,7 @@ namespace AutoTurnOver.DB
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
Console
.
WriteLine
(
"查询需要切换的数据 : "
+
ex
.
Message
);
_connection
.
Insert
(
new
dc_task_error_log
{
_connection
.
Insert
(
new
dc_task_error_log
{
date
=
DateTime
.
Now
,
date
=
DateTime
.
Now
,
message
=
item
.
ToJson
()
+
" --- "
+
ex
.
Message
,
message
=
item
.
ToJson
()
+
" --- "
+
ex
.
Message
,
...
...
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