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
5f24d5c7
Commit
5f24d5c7
authored
Aug 01, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中午1点的服装那次推送,由特地站点改完未全推送
parent
10807c1c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
14 deletions
+12
-14
GeneratePurchaseAdviseBackgroundService.cs
...PurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
+1
-10
dc_auto_stock_monitor_dao.cs
AutoTurnOver.DB/dc_auto_stock_monitor_dao.cs
+7
-2
listing_status_view_dto.cs
AutoTurnOver.Models/listing_status_view_dto.cs
+1
-0
Program.cs
AutoTurnOver.Purchase.AverageTarget/Program.cs
+1
-1
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+2
-1
No files found.
AutoGeneratePurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
View file @
5f24d5c7
...
@@ -89,20 +89,11 @@ namespace AutoGeneratePurchaseAdvise
...
@@ -89,20 +89,11 @@ namespace AutoGeneratePurchaseAdvise
// 要上班才推
// 要上班才推
if
(
ApiServices
.
GetSchedulings
())
if
(
ApiServices
.
GetSchedulings
())
{
{
if
(
now
.
Year
==
2019
&&
now
.
Month
==
11
&&
now
.
Day
==
28
)
{
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.AutoPushBuySys(5);
PurchaseAdviseServices
.
AutoPushBuySys
(
2
);
PurchaseAdviseServices
.
AutoPushBuySys
(
2
);
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"
)}
"
);
}
}
else
{
Console
.
WriteLine
(
$"开始推送 服装采购建议任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
AutoPushBuySys
(
5
);
Console
.
WriteLine
(
$"结束推送 服装采购建议任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
}
}
}
...
...
AutoTurnOver.DB/dc_auto_stock_monitor_dao.cs
View file @
5f24d5c7
...
@@ -164,17 +164,22 @@ where tdb.usable_stock>0 ";
...
@@ -164,17 +164,22 @@ where tdb.usable_stock>0 ";
sql
+=
" and t1.source =@source "
;
sql
+=
" and t1.source =@source "
;
parameters
.
Add
(
"source"
,
search
.
source
);
parameters
.
Add
(
"source"
,
search
.
source
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
search
.
product_code
))
{
sql
+=
" and t1.product_code =@product_code "
;
parameters
.
Add
(
"product_code"
,
search
.
product_code
);
}
if
(
search
.
listing_status
==
1
)
if
(
search
.
listing_status
==
1
)
{
{
// 可上架
// 可上架
var
fields
=
GetShowField
(
search
.
warehouse_code
);
var
fields
=
GetShowField
(
search
.
warehouse_code
);
sql
+=
$"and tdb.usable_stock>0 and (
{
string
.
Join
(
" or "
,
fields
.
Select
(
v
=>
"t11.{v} <= 0 "
))}
)"
;
sql
+=
$"and tdb.usable_stock>0 and (
{
string
.
Join
(
" or "
,
fields
.
Select
(
v
=>
$
"t11.
{
v
}
<= 0 "
))}
)"
;
}
}
if
(
search
.
listing_status
==
2
)
if
(
search
.
listing_status
==
2
)
{
{
// 无在线
// 无在线
var
fields
=
GetShowField
(
search
.
warehouse_code
);
var
fields
=
GetShowField
(
search
.
warehouse_code
);
sql
+=
$"and tdb.usable_stock>0 and (
{
string
.
Join
(
" and "
,
fields
.
Select
(
v
=>
"t11.{v} <= 0 "
))}
)"
;
sql
+=
$"and tdb.usable_stock>0 and (
{
string
.
Join
(
" and "
,
fields
.
Select
(
v
=>
$
"t11.
{
v
}
<= 0 "
))}
)"
;
}
}
}
}
return
_connection
.
Page
<
listing_status_view_dto
>(
sql
,
search
,
parameters
);
return
_connection
.
Page
<
listing_status_view_dto
>(
sql
,
search
,
parameters
);
...
...
AutoTurnOver.Models/listing_status_view_dto.cs
View file @
5f24d5c7
...
@@ -128,5 +128,6 @@ namespace AutoTurnOver.Models
...
@@ -128,5 +128,6 @@ namespace AutoTurnOver.Models
/// 品牌
/// 品牌
/// </summary>
/// </summary>
public
string
brand
{
get
;
set
;
}
public
string
brand
{
get
;
set
;
}
public
string
product_code
{
get
;
set
;
}
}
}
}
}
AutoTurnOver.Purchase.AverageTarget/Program.cs
View file @
5f24d5c7
...
@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
...
@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
Console
.
WriteLine
(
"采购平均值计算任务启动..."
);
Console
.
WriteLine
(
"采购平均值计算任务启动..."
);
// 创建采购计划
// 创建采购计划
//Console.WriteLine($"开始同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
//Console.WriteLine($"开始同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
daily
.
SynchroPPSSkuStatus
();
//
daily.SynchroPPSSkuStatus();
//Console.WriteLine($"结束同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
//Console.WriteLine($"结束同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
5f24d5c7
...
@@ -228,7 +228,7 @@ namespace AutoTurnOver.Controllers
...
@@ -228,7 +228,7 @@ namespace AutoTurnOver.Controllers
}
}
public
JsonResult
GetListingStatusPage
(
int
offset
,
int
limit
,
string
order
,
string
sort
,
public
JsonResult
GetListingStatusPage
(
int
offset
,
int
limit
,
string
order
,
string
sort
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
brand
,
int
?
has_tort
,
int
?
listing_status
,
int
?
warehousearea
,
int
?
source
,
string
warehousetype
,
string
warehouse_code
,
int
?
product_type
)
DateTime
?
end_date
,
DateTime
?
start_date
,
string
brand
,
int
?
has_tort
,
int
?
listing_status
,
int
?
warehousearea
,
int
?
source
,
string
warehousetype
,
string
warehouse_code
,
int
?
product_type
,
string
product_code
)
{
{
try
try
{
{
...
@@ -236,6 +236,7 @@ namespace AutoTurnOver.Controllers
...
@@ -236,6 +236,7 @@ namespace AutoTurnOver.Controllers
var
page_data
=
services
.
GetListingStatusPage
(
new
listing_status_view_search_dto
var
page_data
=
services
.
GetListingStatusPage
(
new
listing_status_view_search_dto
{
{
product_type
=
product_type
,
product_type
=
product_type
,
product_code
=
product_code
,
source
=
source
,
source
=
source
,
warehouse_code
=
warehouse_code
,
warehouse_code
=
warehouse_code
,
warehousetype
=
warehousetype
,
warehousetype
=
warehousetype
,
...
...
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