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
d7185534
Commit
d7185534
authored
Mar 03, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3838d5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
PurchaseAdviseServices.cs
AutoTurnOver.Services/PurchaseAdviseServices.cs
+21
-0
No files found.
AutoTurnOver.Services/PurchaseAdviseServices.cs
View file @
d7185534
...
...
@@ -380,6 +380,27 @@ namespace AutoTurnOver.Services
data
.
logistics_code
=
logisticsData
.
Line_Code
;
}
}
//空运则自动选择一个最便宜的渠道
if
(
data
.
bp_sendtype
==
3
)
{
var
base_wa
=
_connection
.
QueryFirstOrDefault
<
string
>(
" select t2.`code` from dc_base_warehouse as t1 left join dc_base_country as t2 on t1.area_name = t2.`name` where warehouse_code=@warehouse_code "
,
new
{
warehouse_code
=
item
.
Key
.
warehouse_code
});
// 查询物流方案
var
logisticsData
=
ApiUtility
.
RealTimeShipLogisticsList
(
new
Models
.
ApiDto
.
LmsShipLogisticsRequstDto
{
endCountries
=
base_wa
,
character_skus
=
item
.
FirstOrDefault
().
bailun_sku
,
startPoint
=
"3"
,
transport_type
=
3
,
has_min_freight_unit_price
=
true
,
has_history_order
=
30
}).
Where
(
s
=>
s
.
min_freight_unit_price
>
10
).
OrderBy
(
s
=>
s
.
min_freight_unit_price
).
FirstOrDefault
();
if
(
logisticsData
!=
null
)
{
data
.
logistics_code
=
logisticsData
.
Line_Code
;
}
}
data
.
bi_buyplandetail
=
item
.
GroupBy
(
s
=>
s
.
bailun_sku
).
Select
(
s
=>
new
bi_buyplandetail
{
bd_count
=
s
.
Sum
(
g
=>
g
.
quantity_actual
>
0
?
g
.
quantity_actual
:
g
.
quantity_final_advise
),
...
...
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