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
5267f74e
Commit
5267f74e
authored
May 18, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【张莹霞/张莹霞1/黄静洁】&& 【BLGBPX】的sku 不用改在线
parent
a412b85c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
report.cs
AutoTurnOver.DB/report.cs
+4
-2
dc_return_goods_push.cs
AutoTurnOver.Models/dc_return_goods_push.cs
+1
-0
ReportServices.cs
AutoTurnOver.Services/ReportServices.cs
+15
-2
No files found.
AutoTurnOver.DB/report.cs
View file @
5267f74e
...
...
@@ -905,7 +905,8 @@ now() as 'push_time',
when t_db.warehouse_code in ( 'GZBLWH', 'QYBLZZ' ) and t2.buyer_name not in ('张莹霞','张莹霞1') then IFNULL(t4.sum_usable_stock, 0) - IFNULL(t5.sum_unshipped_quantity, 0)
else t_stock.usable_stock - ifnull(t3.quantity_unshipped,0)
end
) as 'stocks'
) as 'stocks',
t2.buyer_name
from dc_auto_shortage_push as t1
left join dc_base_sku as t2 on t1.bailun_sku = t2.bailun_sku
left join dc_mid_transit as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
...
...
@@ -920,7 +921,8 @@ when t_db.warehouse_code in ( 'GZBLWH', 'QYBLZZ' ) and t2.buyer_name not in ('
when(t3.quantity_out_stock is null or t3.quantity_out_stock <= 0) and ifnull(t_stock.usable_stock,0)> ifnull(t3.quantity_unshipped, 0) then 1
else 0
end
) = 1"
;
) = 1
"
;
shortage_list
.
AddRange
(
conn
.
Query
<
dc_return_goods_push
>(
sql
,
new
{
platform
=
platform
},
commandTimeout
:
0
));
return
shortage_list
;
...
...
AutoTurnOver.Models/dc_return_goods_push.cs
View file @
5267f74e
...
...
@@ -11,6 +11,7 @@ namespace AutoTurnOver.Models
public
int
shortage_push_id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
...
...
AutoTurnOver.Services/ReportServices.cs
View file @
5267f74e
...
...
@@ -534,15 +534,28 @@ namespace AutoTurnOver.Services
}
public
void
PlatformReturnGoodsPush
(
string
platform
)
{
var
datas
=
report
.
ReturnGoodsPush
(
platform
);
var
err_datas
=
ApiServices
.
ReturnGoodsPush
(
datas
,
platform
);
// 先走一遍过滤条件,把数据过滤一遍
var
filter_datas
=
ReturnGoodsPushFilter
(
datas
);
var
err_datas
=
ApiServices
.
ReturnGoodsPush
(
filter_datas
,
platform
);
// 记录推送状态
report
.
AddReturnGoodsPush
(
datas
.
Where
(
s
=>
!
err_datas
.
Any
(
e
=>
e
.
warehouseCode
==
s
.
warehouse_code
&&
s
.
bailun_sku
==
e
.
sku
)));
report
.
AddReturnGoodsPush
(
filter_
datas
.
Where
(
s
=>
!
err_datas
.
Any
(
e
=>
e
.
warehouseCode
==
s
.
warehouse_code
&&
s
.
bailun_sku
==
e
.
sku
)));
// 移除缺货改零记录 (如果以后再没有库存,继续改零)
report
.
removeShortagePush
(
datas
.
Where
(
s
=>
!
err_datas
.
Any
(
e
=>
e
.
warehouseCode
==
s
.
warehouse_code
&&
s
.
bailun_sku
==
e
.
sku
)).
Select
(
s
=>
s
.
shortage_push_id
));
}
/// <summary>
/// 过滤掉一部分不需要改在线的数据
/// </summary>
public
List
<
dc_return_goods_push
>
ReturnGoodsPushFilter
(
List
<
dc_return_goods_push
>
datas
)
{
var
buyers
=
new
List
<
string
>
{
"张莹霞"
,
"张莹霞1"
,
"黄静洁"
};
var
warehouse_codes
=
new
List
<
string
>
{
"BLGBPX"
};
return
datas
.
Where
(
s
=>
!(
buyers
.
Any
(
v
=>
s
.
buyer_name
==
v
)
&&
warehouse_codes
.
Any
(
v
=>
s
.
warehouse_code
==
v
))).
ToList
();
}
public
List
<
dynamic
>
GetSkuWebsiteSales
(
bailun_sku_website_sales_search_dto
search_data
)
{
var
order_list
=
report
.
GetSkuWebsiteSales
(
search_data
);
...
...
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