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
b7f01199
Commit
b7f01199
authored
Jun 16, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
张莹霞1的缺货,无需 EB+WISH
parent
88894eff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
Program.cs
AutoGeneratePurchaseAdvise/Program.cs
+1
-1
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+20
-3
PurchaseAdviseServices.cs
AutoTurnOver.Services/PurchaseAdviseServices.cs
+1
-1
No files found.
AutoGeneratePurchaseAdvise/Program.cs
View file @
b7f01199
...
...
@@ -20,7 +20,7 @@ namespace AutoGeneratePurchaseAdvise
//PurchaseAdviseServices.AutoPushBuySys(2);
//dc_auto_first_order_sku_dao.GeneratePurchaseAdvise();
//PurchaseAdviseServices.AutoPushBuySys(2);
//PurchaseAdviseServices.AutoPushBuySys(
1
);
//PurchaseAdviseServices.AutoPushBuySys(
4
);
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
{
services
.
AddHostedService
<
GeneratePurchaseAdviseBackgroundService
>();
...
...
AutoTurnOver.DB/purchase_advise.cs
View file @
b7f01199
...
...
@@ -745,14 +745,22 @@ where ( t5.`status`=0 or t5.`status` is null ) and t1.quantity_begin_advise>0 an
}
}
public
class
shortage_sku_list_dto
{
public
string
bailun_sku
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
}
/// <summary>
/// 特定平台的缺货sku
/// </summary>
/// <param name="platform_types">平台</param>
/// <param name="not_buyer_names">过滤掉指定采购员</param>
/// <returns></returns>
public
static
List
<
string
>
ShortageSkuList
(
List
<
string
>
platform_types
)
public
static
List
<
string
>
ShortageSkuList
(
List
<
string
>
platform_types
,
List
<
string
>
not_buyer_names
)
{
return
_connection
.
Query
<
string
>(
@"
select bailun_sku from dc_base_oms_sku as t1
var
datas
=
_connection
.
Query
<
shortage_sku_list_dto
>(
@"
select t1.bailun_sku,t2.buyer_name from dc_base_oms_sku as t1
left join dc_base_sku as t2 on t1.bailun_sku = t2.bailun_sku
where 1=1
and t1.company_id=1
and t1.has_innersale=0
...
...
@@ -766,6 +774,15 @@ and t1.has_platsku_remark = 0
and t1.bailun_interception_status not in ('Success','Part') and t1.platform_type!='FBA'
and platform_type in @platform_types
"
,
new
{
platform_types
=
platform_types
},
commandTimeout
:
0
).
AsList
();
if
(
not_buyer_names
!=
null
&&
not_buyer_names
.
Count
>=
1
)
{
return
datas
.
Where
(
s
=>
!
not_buyer_names
.
Any
(
v
=>
v
==
s
.
buyer_name
)).
Select
(
s
=>
s
.
bailun_sku
).
ToList
();
}
else
{
return
datas
.
Select
(
s
=>
s
.
bailun_sku
).
ToList
();
}
}
/// <summary>
...
...
AutoTurnOver.Services/PurchaseAdviseServices.cs
View file @
b7f01199
...
...
@@ -274,7 +274,7 @@ namespace AutoTurnOver.Services
var
other_datas
=
new
List
<
dc_auto_purchase_advise_detailed_dto
>();
// 查询当前有缺货的sku
var
shortageSkuList
=
purchase_advise
.
ShortageSkuList
(
new
List
<
string
>
{
"ebay"
,
"wish"
});
var
shortageSkuList
=
purchase_advise
.
ShortageSkuList
(
new
List
<
string
>
{
"ebay"
,
"wish"
}
,
new
List
<
string
>
{
"张莹霞1"
}
);
alone_datas
=
datas
.
Where
(
s
=>
shortageSkuList
.
Any
(
v
=>
v
==
s
.
bailun_sku
)).
ToList
();
other_datas
=
datas
.
Where
(
s
=>
!
shortageSkuList
.
Any
(
v
=>
v
==
s
.
bailun_sku
)).
ToList
();
...
...
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