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
ebdcf81c
Commit
ebdcf81c
authored
Jun 23, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d8c37074
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
35 deletions
+70
-35
Program.cs
AutoGeneratePurchaseAdvise/Program.cs
+0
-24
daily.cs
AutoTurnOver.DB/daily.cs
+44
-3
report.cs
AutoTurnOver.DB/report.cs
+3
-1
dc_auto_shortage_push_route_dto.cs
AutoTurnOver.Models/dc_auto_shortage_push_route_dto.cs
+3
-0
dc_return_goods_push.cs
AutoTurnOver.Models/dc_return_goods_push.cs
+1
-0
ApiServices.cs
AutoTurnOver.Services/ApiServices.cs
+14
-3
DailyServices.cs
AutoTurnOver.Services/DailyServices.cs
+2
-2
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+2
-2
Program.cs
ShortagePush/Program.cs
+1
-0
No files found.
AutoGeneratePurchaseAdvise/Program.cs
View file @
ebdcf81c
...
@@ -21,31 +21,7 @@ namespace AutoGeneratePurchaseAdvise
...
@@ -21,31 +21,7 @@ namespace AutoGeneratePurchaseAdvise
try
try
{
{
//PurchaseAdviseServices.AutoPushBuySys(2);
//PurchaseAdviseServices.Generate($"早上的全量周转 {DateTime.Now.ToString("HH: mm")}", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")), is_clear_data: true);
//PurchaseAdviseServices.Generate($"早上的全量周转 {DateTime.Now.ToString("HH: mm")}", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")), is_clear_data: false);
//PurchaseAdviseServices.Generate($"下午的补充周转 {DateTime.Now.ToString("HH: mm")}", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 12:00:00")));
//PurchaseAdviseServices.AutoPushBuySys(4);
//PurchaseAdviseServices.AutoPushBuySys(4);
//{
// PurchaseAdviseServices.AutoPushBuySys(1);
// Console.WriteLine($"开始推送 服装采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
// 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")}");
// PurchaseAdviseServices.AutoPushBuySys(3);
// 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(6);
// 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(7);
// Console.WriteLine($"结束推送 独立站采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
//}
}
}
...
...
AutoTurnOver.DB/daily.cs
View file @
ebdcf81c
...
@@ -1020,18 +1020,27 @@ left join dc_base_warehouse as t4 on t1.warehouse_code = t4.warehouse_code
...
@@ -1020,18 +1020,27 @@ left join dc_base_warehouse as t4 on t1.warehouse_code = t4.warehouse_code
/// 缺货推送记录
/// 缺货推送记录
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
static
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
public
static
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
,
int
type
=
0
)
{
{
var
sql
=
@"select t1.id, t1.platform, t1.bailun_sku,t3.warehouse_name, t1.warehouse_code, t1.push_date,t2.push_time from dc_auto_shortage_push as t1
var
sql
=
@"select t1.id, t1.platform, t1.bailun_sku,t3.warehouse_name, t1.warehouse_code, t1.push_date,t2.push_time from dc_auto_shortage_push as t1
left join dc_return_goods_push as t2 on t1.id =t2.shortage_push_id
left join dc_return_goods_push as t2 on t1.id =t2.shortage_push_id
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
where 1=1 "
;
where 1=1 "
;
var
countSql
=
" select count(1) from dc_auto_shortage_push as t1 left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code where 1=1 "
;
var
countSql
=
" select count(1) from dc_auto_shortage_push as t1 left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code where 1=1 "
;
if
(
type
==
1
)
{
sql
=
@"select t2.id, t2.platform, t2.bailun_sku,t3.warehouse_name, t2.warehouse_code,t2.push_time
from dc_return_goods_push as t2
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
where 1=1 "
;
countSql
=
" select count(1) from dc_return_goods_push as t2 left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code where 1=1 "
;
}
DynamicParameters
parameters
=
new
DynamicParameters
();
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrWhiteSpace
(
warehousecode
))
if
(!
string
.
IsNullOrWhiteSpace
(
warehousecode
))
{
{
sql
+=
" and t
1
.warehouse_code=@warehouse_code "
;
sql
+=
" and t
3
.warehouse_code=@warehouse_code "
;
countSql
+=
" and t
1
.warehouse_code=@warehouse_code "
;
countSql
+=
" and t
3
.warehouse_code=@warehouse_code "
;
parameters
.
Add
(
"warehouse_code"
,
warehousecode
);
parameters
.
Add
(
"warehouse_code"
,
warehousecode
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
warehousetype
))
if
(!
string
.
IsNullOrWhiteSpace
(
warehousetype
))
...
@@ -1048,10 +1057,20 @@ where 1=1 ";
...
@@ -1048,10 +1057,20 @@ where 1=1 ";
}
}
if
(
start_date
!=
null
)
if
(
start_date
!=
null
)
{
{
if
(
type
==
0
)
{
sql
+=
" and t1.push_date>=@btime "
;
sql
+=
" and t1.push_date>=@btime "
;
countSql
+=
" and t1.push_date>=@btime "
;
countSql
+=
" and t1.push_date>=@btime "
;
parameters
.
Add
(
"btime"
,
start_date
);
parameters
.
Add
(
"btime"
,
start_date
);
}
}
else
{
sql
+=
" and t2.push_time>=@btime "
;
countSql
+=
" and t2.push_time>=@btime "
;
parameters
.
Add
(
"btime"
,
start_date
);
}
}
if
(
end_date
!=
null
)
if
(
end_date
!=
null
)
{
{
sql
+=
" and t1.push_date<=@etime "
;
sql
+=
" and t1.push_date<=@etime "
;
...
@@ -1060,15 +1079,37 @@ where 1=1 ";
...
@@ -1060,15 +1079,37 @@ where 1=1 ";
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
platform
))
if
(!
string
.
IsNullOrWhiteSpace
(
platform
))
{
{
if
(
type
==
0
)
{
sql
+=
" and t1.platform=@platform "
;
sql
+=
" and t1.platform=@platform "
;
countSql
+=
" and t1.platform=@platform "
;
countSql
+=
" and t1.platform=@platform "
;
parameters
.
Add
(
"platform"
,
platform
);
parameters
.
Add
(
"platform"
,
platform
);
}
else
{
sql
+=
" and t2.platform=@platform "
;
countSql
+=
" and t2.platform=@platform "
;
parameters
.
Add
(
"platform"
,
platform
);
}
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
bailun_sku
))
if
(!
string
.
IsNullOrWhiteSpace
(
bailun_sku
))
{
{
if
(
type
==
0
)
{
sql
+=
" and t1.bailun_sku in @bailun_sku "
;
sql
+=
" and t1.bailun_sku in @bailun_sku "
;
countSql
+=
" and t1.bailun_sku in @bailun_sku "
;
countSql
+=
" and t1.bailun_sku in @bailun_sku "
;
parameters
.
Add
(
"bailun_sku"
,
bailun_sku
.
Split
(
','
));
parameters
.
Add
(
"bailun_sku"
,
bailun_sku
.
Split
(
','
));
}
else
{
sql
+=
" and t2.bailun_sku in @bailun_sku "
;
countSql
+=
" and t2.bailun_sku in @bailun_sku "
;
parameters
.
Add
(
"bailun_sku"
,
bailun_sku
.
Split
(
','
));
}
}
}
sql
+=
" order by t1.id desc "
;
sql
+=
" order by t1.id desc "
;
...
...
AutoTurnOver.DB/report.cs
View file @
ebdcf81c
...
@@ -1136,6 +1136,7 @@ end
...
@@ -1136,6 +1136,7 @@ end
// 回货速改推送
// 回货速改推送
string
sql
=
@"select
string
sql
=
@"select
t1.id as 'shortage_push_id',
t1.id as 'shortage_push_id',
@platform as 'platform',
t1.bailun_sku,
t1.bailun_sku,
t1.warehouse_code,
t1.warehouse_code,
now() as 'push_time',
now() as 'push_time',
...
@@ -1216,7 +1217,8 @@ end
...
@@ -1216,7 +1217,8 @@ end
var
shortage_list
=
new
List
<
dc_return_goods_push
>();
var
shortage_list
=
new
List
<
dc_return_goods_push
>();
// 回货速改推送
// 回货速改推送
string
sql
=
@"select
string
sql
=
@"select
t1.id as 'shortage_push_id',
0 as 'shortage_push_id',
@platform as 'platform',
t1.sku_code as 'bailun_sku',
t1.sku_code as 'bailun_sku',
t1.warehouse_code,
t1.warehouse_code,
now() as 'push_time',
now() as 'push_time',
...
...
AutoTurnOver.Models/dc_auto_shortage_push_route_dto.cs
View file @
ebdcf81c
...
@@ -38,5 +38,8 @@ namespace AutoTurnOver.Models
...
@@ -38,5 +38,8 @@ namespace AutoTurnOver.Models
[
Description
(
"仓库国家"
)]
[
Description
(
"仓库国家"
)]
public
int
?
warehousearea
{
get
;
set
;
}
public
int
?
warehousearea
{
get
;
set
;
}
[
Description
(
"数据类型"
)]
public
int
?
type
{
get
;
set
;
}
}
}
}
}
AutoTurnOver.Models/dc_return_goods_push.cs
View file @
ebdcf81c
...
@@ -9,6 +9,7 @@ namespace AutoTurnOver.Models
...
@@ -9,6 +9,7 @@ namespace AutoTurnOver.Models
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
public
int
shortage_push_id
{
get
;
set
;
}
public
int
shortage_push_id
{
get
;
set
;
}
public
string
platform
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
...
...
AutoTurnOver.Services/ApiServices.cs
View file @
ebdcf81c
...
@@ -513,6 +513,8 @@ namespace AutoTurnOver.Services
...
@@ -513,6 +513,8 @@ namespace AutoTurnOver.Services
int
totalPage
=
(
int
)
Math
.
Ceiling
(
datas
.
Count
()
*
1.0
/
rows
);
int
totalPage
=
(
int
)
Math
.
Ceiling
(
datas
.
Count
()
*
1.0
/
rows
);
while
(
page
<=
totalPage
)
while
(
page
<=
totalPage
)
{
{
try
{
var
result
=
ShortagePushApi
(
new
ShortagePush_RequestDto
var
result
=
ShortagePushApi
(
new
ShortagePush_RequestDto
{
{
platform
=
platform
,
platform
=
platform
,
...
@@ -529,6 +531,13 @@ namespace AutoTurnOver.Services
...
@@ -529,6 +531,13 @@ namespace AutoTurnOver.Services
err_datas
.
AddRange
(
result
.
objData
);
err_datas
.
AddRange
(
result
.
objData
);
}
}
page
++;
page
++;
}
catch
(
Exception
ex
)
{
throw
;
}
}
}
...
@@ -541,12 +550,14 @@ namespace AutoTurnOver.Services
...
@@ -541,12 +550,14 @@ namespace AutoTurnOver.Services
/// </summary>
/// </summary>
private
static
ShortagePush_ResponseDto
ShortagePushApi
(
ShortagePush_RequestDto
data
)
private
static
ShortagePush_ResponseDto
ShortagePushApi
(
ShortagePush_RequestDto
data
)
{
{
try
{
//string url = ConfigHelper.GetValue("PPS_ShortagePush");
//string url = ConfigHelper.GetValue("PPS_ShortagePush");
string
url
=
ConfigHelper
.
GetValue
(
"PPS_ShortagePush2"
);
string
url
=
ConfigHelper
.
GetValue
(
"PPS_ShortagePush2"
);
//string resultStr1 = HttpHelper.Request(url2, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
//string resultStr1 = HttpHelper.Request(url2, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
string
resultStr
=
HttpHelper
.
Request
(
url
,
RequestType
.
POST
,
data
.
ToJson
(),
timeout
:
1000
*
60
*
60
*
24
,
entype
:
"application/json"
);
var
parJson
=
data
.
ToJson
();
try
{
string
resultStr
=
HttpHelper
.
Request
(
url
,
RequestType
.
POST
,
parJson
,
timeout
:
1000
*
60
*
60
*
24
,
entype
:
"application/json"
);
var
result
=
resultStr
.
ToObj
<
ShortagePush_ResponseDto
>();
var
result
=
resultStr
.
ToObj
<
ShortagePush_ResponseDto
>();
if
(
result
==
null
)
if
(
result
==
null
)
{
{
...
...
AutoTurnOver.Services/DailyServices.cs
View file @
ebdcf81c
...
@@ -102,9 +102,9 @@ namespace AutoTurnOver.Services
...
@@ -102,9 +102,9 @@ namespace AutoTurnOver.Services
return
DB
.
daily
.
RealtimeFbaList
(
search_data
,
categoryModels
,
ref
total
);
return
DB
.
daily
.
RealtimeFbaList
(
search_data
,
categoryModels
,
ref
total
);
}
}
public
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
public
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
,
int
type
=
0
)
{
{
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
,
type
);
}
}
public
List
<
dc_aims_transfer_warehouse_log_dto
>
TransferWarehouseLogList
(
dc_aims_transfer_warehouse_log_search_dto
search_data
,
int
offset
,
int
limit
,
ref
int
total
)
public
List
<
dc_aims_transfer_warehouse_log_dto
>
TransferWarehouseLogList
(
dc_aims_transfer_warehouse_log_search_dto
search_data
,
int
offset
,
int
limit
,
ref
int
total
)
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
ebdcf81c
...
@@ -321,13 +321,13 @@ namespace AutoTurnOver.Controllers
...
@@ -321,13 +321,13 @@ namespace AutoTurnOver.Controllers
/// <param name="total"></param>
/// <param name="total"></param>
/// <returns></returns>
/// <returns></returns>
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【实时数据】->【修改在线数量日志】->【搜索】页面"
,
0
)]
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【实时数据】->【修改在线数量日志】->【搜索】页面"
,
0
)]
public
JsonResult
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
public
JsonResult
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
,
int
type
=
0
)
{
{
try
try
{
{
var
services
=
new
DailyServices
();
var
services
=
new
DailyServices
();
var
total
=
0
;
var
total
=
0
;
var
list
=
services
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
var
list
=
services
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
,
type
);
return
new
JsonResult
(
new
return
new
JsonResult
(
new
{
{
rows
=
list
,
rows
=
list
,
...
...
ShortagePush/Program.cs
View file @
ebdcf81c
...
@@ -26,6 +26,7 @@ namespace ShortagePush
...
@@ -26,6 +26,7 @@ namespace ShortagePush
//new ReportServices().PPSReturnGoodsPush("walmart");
//new ReportServices().PPSReturnGoodsPush("walmart");
//new ReportServices().ShortagePushEbay(true);
//new ReportServices().ShortagePushEbay(true);
//new ReportServices().PPSReturnGoodsPush("walmart");
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
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