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
359d3d0d
Commit
359d3d0d
authored
Mar 11, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
利润最大化分析,把周转表的筛选全部同步过来
parent
f89940f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
278 additions
and
71 deletions
+278
-71
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+265
-62
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+10
-6
TaskDownloadServices.cs
AutoTurnOver.Services/TaskDownloadServices.cs
+1
-1
SkuAutoTurnController.cs
AutoTurnOver/Controllers/SkuAutoTurnController.cs
+2
-2
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
359d3d0d
...
@@ -150,8 +150,6 @@ from dc_auto_turnover as dat
...
@@ -150,8 +150,6 @@ from dc_auto_turnover as dat
}
}
sqlCount
+=
" where 1=1 "
;
sqlCount
+=
" where 1=1 "
;
if
(
m
.
has_tort
!=
null
)
if
(
m
.
has_tort
!=
null
)
{
{
if
(
m
.
has_tort
==
0
)
if
(
m
.
has_tort
==
0
)
...
@@ -2027,113 +2025,318 @@ order by t1.gmt_modified asc
...
@@ -2027,113 +2025,318 @@ order by t1.gmt_modified asc
/// <param name="sku">sku</param>
/// <param name="sku">sku</param>
/// <param name="warehouse_code">仓库编码</param>
/// <param name="warehouse_code">仓库编码</param>
/// <returns></returns>
/// <returns></returns>
public
static
List
<
dc_report_profit_analysis
>
ProfitAnalysis
(
dc_base_stock_search_dto
search_data
,
ref
int
total
)
public
static
List
<
dc_report_profit_analysis
>
ProfitAnalysis
(
Condition_AutoTurnOver
m
,
int
offset
,
int
limit
,
ref
int
total
,
string
order
=
""
,
string
sort
=
""
,
bool
isSum
=
false
)
{
{
DynamicParameters
parameters
=
new
DynamicParameters
();
DynamicParameters
parameters
=
new
DynamicParameters
();
var
sql
=
""
;
var
sql
=
""
;
sql
=
@" select * from dc_report_profit_analysis as t1
sql
=
@" select ta.* from dc_report_profit_analysis as ta
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and dat.bailun_sku = ta.bailun_sku
where 1=1
"
;
"
;
var
sqlCount
=
@"
var
countSql
=
@"
select
select
count(1)
count(1)
from dc_report_profit_analysis as t1
from dc_report_profit_analysis as ta
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and dat.bailun_sku = ta.bailun_sku
where 1=1
"
;
"
;
if
(!
string
.
IsNullOrWhiteSpace
(
search_data
.
warehousetype
))
if
(
string
.
IsNullOrWhiteSpace
(
m
.
sku_label
))
{
sqlCount
+=
" left join dc_auto_config_sku_label as t11 on dat.bailun_sku = t11.bailun_sku "
;
sql
+=
" left join dc_auto_config_sku_label as t11 on dat.bailun_sku = t11.bailun_sku "
;
}
if
(
m
.
warehousearea
>
0
)
{
sqlCount
+=
" left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code "
;
sql
+=
" left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code "
;
}
if
(
m
.
categoryModels
!=
null
||
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
)))
{
sqlCount
+=
" left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku "
;
sql
+=
" left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku "
;
}
if
(
m
.
monitor_status
!=
null
)
{
sqlCount
+=
" left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code "
;
sql
+=
" left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code "
;
}
if
(
m
.
returngoodspush_state
!=
null
)
{
sqlCount
+=
" left join dc_return_goods_not_push as t12 on dat.bailun_sku = t12.bailun_sku and dat.warehouse_code = t12.warehouse_code "
;
sql
+=
" left join dc_return_goods_not_push as t12 on dat.bailun_sku = t12.bailun_sku and dat.warehouse_code = t12.warehouse_code "
;
}
if
(
m
.
has_tort
!=
null
)
{
sqlCount
+=
" left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku "
;
sql
+=
" left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku "
;
}
if
(
m
.
oneday_sales_min
>
0
||
m
.
oneday_sales_max
>
0
)
{
sqlCount
+=
" left join dc_auto_sales as t2 on t2.bailun_sku=dat.bailun_sku and dat.warehouse_code = t2.warehouse_code "
;
sql
+=
" left join dc_auto_sales as t2 on t2.bailun_sku=dat.bailun_sku and dat.warehouse_code = t2.warehouse_code "
;
}
if
(
m
.
not_trans_count_max
>
0
||
m
.
not_trans_count_min
>
0
)
{
sqlCount
+=
" left join not_trans_view as t15 on dat.bailun_sku = t15.bailun_sku and dat.warehouse_code = t15.warehouse_code "
;
sql
+=
" left join not_trans_view as t15 on dat.bailun_sku = t15.bailun_sku and dat.warehouse_code = t15.warehouse_code "
;
}
sqlCount
+=
" where 1=1 "
;
sql
+=
" where 1=1 "
;
if
(
m
.
has_tort
!=
null
)
{
if
(
m
.
has_tort
==
0
)
{
sql
+=
" and t8.id is null "
;
sqlCount
+=
" and t8.id is null "
;
}
else
if
(
m
.
has_tort
==
1
)
{
sql
+=
" and t8.id is not null "
;
sqlCount
+=
" and t8.id is not null "
;
}
}
if
(
m
.
categoryModels
!=
null
)
{
sql
+=
" and t4.category_simple_id in ( "
+
string
.
Join
(
","
,
m
.
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
sqlCount
+=
" and t4.category_simple_id in ( "
+
string
.
Join
(
","
,
m
.
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
sku_label
))
{
sql
+=
" and t11.label = "
+
$"'
{
m
.
sku_label
}
'"
;
sqlCount
+=
" and t11.label = "
+
$"'
{
m
.
sku_label
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
buyer_name
))
{
sql
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sqlCount
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
))
{
sql
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
sqlCount
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
}
if
(
m
.
monitor_status
==
1
)
{
sql
+=
" and t5.`status`=1 "
;
sqlCount
+=
" and t5.`status`=1 "
;
}
if
(
m
.
monitor_status
==
0
)
{
{
sql
+=
" and t1.warehouse_type = @hq_type "
;
sql
+=
" and ( t5.`status`=0 or t5.`status` is null ) "
;
countSql
+=
" and t1.warehouse_type = @hq_type "
;
sqlCount
+=
" and ( t5.`status`=0 or t5.`status` is null ) "
;
}
parameters
.
Add
(
"hq_type"
,
search_data
.
warehousetype
);
if
(
m
.
returngoodspush_state
==
1
)
{
sql
+=
" and t12.`status`=1 "
;
sqlCount
+=
" and t12.`status`=1 "
;
}
}
if
(
search_data
.
warehousearea
>
0
)
if
(
m
.
returngoodspush_state
==
0
)
{
{
sql
+=
" and t2.area_id = @area_id "
;
sql
+=
" and ( t12.`status`=0 or t12.`status` is null ) "
;
countSql
+=
" and t2.area_id = @area_id "
;
sqlCount
+=
" and ( t12.`status`=0 or t12.`status` is null ) "
;
}
parameters
.
Add
(
"area_id"
,
search_data
.
warehousearea
);
if
(
m
.
hasAadvise
==
true
)
{
sql
+=
" and dat.quantity_final_advise>0 "
;
sqlCount
+=
" and dat.quantity_final_advise>0 "
;
}
}
if
(
search_data
.
searchType
>
0
&&
!
string
.
IsNullOrWhiteSpace
(
search_data
.
key_words
)
)
if
(
m
.
hasAadvise
==
false
)
{
{
switch
(
search_data
.
searchType
)
sql
+=
" and dat.quantity_final_advise<=0 "
;
sqlCount
+=
" and dat.quantity_final_advise<=0 "
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
key_words
)
&&
m
.
searchType
>
0
)
{
switch
(
m
.
searchType
.
Value
)
{
{
case
1
:
case
1
:
sql
+=
" and
t1
.bailun_sku in @bailun_skus "
;
sql
+=
" and
dat
.bailun_sku in @bailun_skus "
;
countSql
+=
" and t1
.bailun_sku in @bailun_skus "
;
sqlCount
+=
" and dat
.bailun_sku in @bailun_skus "
;
parameters
.
Add
(
"bailun_skus"
,
search_data
.
key_words
.
Split
(
','
));
parameters
.
Add
(
"bailun_skus"
,
m
.
key_words
.
Split
(
','
).
ToArray
(
));
break
;
break
;
case
2
:
case
2
:
sql
+=
" and t1.bailun_sku like @bailun_sku "
;
sql
+=
" and dat.bailun_sku like "
+
$"'%
{
m
.
key_words
}
%'"
;
countSql
+=
" and t1.bailun_sku like @bailun_sku "
;
sqlCount
+=
" and dat.bailun_sku ="
+
$"'%
{
m
.
key_words
}
%'"
;
parameters
.
Add
(
"bailun_sku"
,
$"%
{
search_data
.
key_words
}
%"
);
break
;
case
3
:
sql
+=
" and dat.product_inner_code in @product_inner_code "
;
sqlCount
+=
" and dat.product_inner_code in @product_inner_code "
;
parameters
.
Add
(
"product_inner_code"
,
m
.
key_words
.
Split
(
','
).
ToList
());
break
;
break
;
case
4
:
sql
+=
" and dat.product_inner_code like "
+
$"'%
{
m
.
key_words
}
%'"
;
sqlCount
+=
" and dat.product_inner_code like"
+
$"'%
{
m
.
key_words
}
%'"
;
break
;
case
5
:
sql
+=
" and dat.product_code ="
+
$"'
{
m
.
key_words
}
'"
;
sqlCount
+=
" and dat.product_code ="
+
$"'
{
m
.
key_words
}
'"
;
break
;
case
6
:
sql
+=
" and dat.product_code like "
+
$"'%
{
m
.
key_words
}
%'"
;
sqlCount
+=
" and dat.product_code like"
+
$"'%
{
m
.
key_words
}
%'"
;
break
;
case
7
:
sql
+=
" and dat.sku_title like "
+
$"'%
{
m
.
key_words
}
%'"
;
sqlCount
+=
" and dat.sku_title like"
+
$"'%
{
m
.
key_words
}
%'"
;
break
;
default
:
break
;
}
}
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
search_data
.
warehousecode
))
if
(
m
.
hasDefectConfig
==
true
)
{
{
sql
+=
" and t1.warehouse_code=@warehouse_code "
;
sql
+=
" and ( dat.abroad_inbound_delivery <=0 or dat.transfer_bale_delivery <=0 or dat.transfer_delivery <=0 ) "
;
countSql
+=
" and t1.warehouse_code=@warehouse_code "
;
sqlCount
+=
" and ( dat.abroad_inbound_delivery <=0 or dat.transfer_bale_delivery <=0 or dat.transfer_delivery <=0 ) "
;
parameters
.
Add
(
"warehouse_code"
,
search_data
.
warehousecode
);
}
}
if
(
search_data
.
isSum
)
if
(
m
.
hasDefectConfig
==
false
)
{
{
total
=
0
;
sql
+=
" and ( dat.abroad_inbound_delivery >0 and dat.transfer_bale_delivery >0 and dat.transfer_delivery >0 ) "
;
sqlCount
+=
" and ( dat.abroad_inbound_delivery >0 and dat.transfer_bale_delivery >0 and dat.transfer_delivery >0 ) "
;
}
if
(!
string
.
IsNullOrEmpty
(
m
.
warehouse_code
))
{
sql
+=
" and dat.warehouse_code='"
+
m
.
warehouse_code
+
"'"
;
sqlCount
+=
" and dat.warehouse_code='"
+
m
.
warehouse_code
+
"'"
;
}
}
else
else
{
{
if
(
search_data
.
is_warehouse_sum
)
if
(
!
string
.
IsNullOrWhiteSpace
(
m
.
warehousetype
)
)
{
{
countSql
+=
" group by t1.warehouse_code "
;
sql
+=
" and dat.hq_type="
+
$"'
{
m
.
warehousetype
}
'"
;
sql
+=
" group by t1.warehouse_code "
;
sqlCount
+=
" and dat.hq_type="
+
$"'
{
m
.
warehousetype
}
'"
;
total
=
_connection
.
Query
<
int
>(
countSql
,
parameters
,
commandTimeout
:
0
).
Count
();
}
}
else
if
(
m
.
warehousearea
>
0
)
{
{
if
(
search_data
.
limit
>
1000
)
sql
+=
" and t3.area_id="
+
m
.
warehousearea
;
{
sqlCount
+=
" and t3.area_id="
+
m
.
warehousearea
;
total
=
0
;
}
}
if
(
m
.
out_of_stock
.
HasValue
)
{
sql
+=
" and dat.status=1"
;
sqlCount
+=
" and dat.status=1"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
supplier_name
))
{
sql
+=
" and dat.suppliers_name = '"
+
m
.
supplier_name
+
"'"
;
sqlCount
+=
" and dat.suppliers_name = '"
+
m
.
supplier_name
+
"'"
;
}
if
(
m
.
quantity_inventory_min
!=
null
)
{
sql
+=
" and dat.quantity_inventory>=@quantity_inventory_min "
;
sqlCount
+=
" and dat.quantity_inventory>=@quantity_inventory_min "
;
parameters
.
Add
(
"quantity_inventory_min"
,
m
.
quantity_inventory_min
);
}
if
(
m
.
quantity_inventory_max
!=
null
)
{
sql
+=
" and dat.quantity_inventory<=@quantity_inventory_max "
;
sqlCount
+=
" and dat.quantity_inventory<=@quantity_inventory_max "
;
parameters
.
Add
(
"quantity_inventory_max"
,
m
.
quantity_inventory_max
);
}
if
(
m
.
not_trans_count_min
!=
null
)
{
sql
+=
" and t15.count>=@not_trans_count_min "
;
sqlCount
+=
" and t15.count>=@not_trans_count_min "
;
parameters
.
Add
(
"not_trans_count_min"
,
m
.
not_trans_count_min
);
}
if
(
m
.
quantity_out_stock_max
!=
null
)
{
sql
+=
" and dat.quantity_out_stock>=@quantity_out_stock_max "
;
sqlCount
+=
" and dat.quantity_out_stock>=@quantity_out_stock_max "
;
parameters
.
Add
(
"quantity_out_stock_max"
,
m
.
quantity_out_stock_max
);
}
if
(
m
.
oneday_sales_min
!=
null
)
{
sql
+=
" and t2.oneday_sales>=@oneday_sales_min "
;
sqlCount
+=
" and t2.oneday_sales>=@oneday_sales_min "
;
parameters
.
Add
(
"oneday_sales_min"
,
m
.
oneday_sales_min
);
}
if
(
m
.
oneday_sales_max
!=
null
)
{
sql
+=
" and t2.oneday_sales<=@oneday_sales_max "
;
sqlCount
+=
" and t2.oneday_sales<=@oneday_sales_max "
;
parameters
.
Add
(
"oneday_sales_max"
,
m
.
oneday_sales_max
);
}
if
(
m
.
avg_type
>
0
)
{
var
field_str
=
""
;
switch
(
m
.
avg_type
)
{
case
1
:
field_str
=
"dat.history_sevenday_sales"
;
break
;
case
2
:
field_str
=
"dat.history_fourteenday_sales"
;
break
;
case
3
:
field_str
=
"dat.history_thirtyday_sales"
;
break
;
case
4
:
field_str
=
"dat.forecast_sevenday_sales"
;
break
;
case
5
:
field_str
=
"dat.forecast_fourteenday_sales"
;
break
;
case
7
:
field_str
=
"dat.history_sevenday_sales_ebay"
;
break
;
case
8
:
field_str
=
"dat.history_fourteenday_sales_ebay"
;
break
;
case
9
:
field_str
=
"dat.history_thirtyday_sales_ebay"
;
break
;
case
10
:
field_str
=
"dat.history_sevenday_sales_aliexpress"
;
break
;
case
11
:
field_str
=
"dat.history_fourteenday_sales_aliexpress"
;
break
;
case
12
:
field_str
=
"dat.history_thirtyday_sales_aliexpress"
;
break
;
case
13
:
field_str
=
"dat.history_sevenday_sales_amazon"
;
break
;
case
14
:
field_str
=
"dat.history_fourteenday_sales_amazon"
;
break
;
case
15
:
field_str
=
"dat.history_thirtyday_sales_amazon"
;
break
;
default
:
break
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
field_str
))
{
if
(
m
.
avg_sales_min
!=
null
)
{
sql
+=
$" and
{
field_str
}
>=@avg_sales_min "
;
sqlCount
+=
$" and
{
field_str
}
>=@avg_sales_min "
;
parameters
.
Add
(
"avg_sales_min"
,
m
.
avg_sales_min
);
}
}
else
if
(
m
.
avg_sales_max
!=
null
)
{
{
total
=
_connection
.
QueryFirstOrDefault
<
int
>(
countSql
,
parameters
,
commandTimeout
:
0
);
sql
+=
$" and
{
field_str
}
<=@avg_sales_max "
;
sqlCount
+=
$" and
{
field_str
}
<=@avg_sales_max "
;
parameters
.
Add
(
"avg_sales_max"
,
m
.
avg_sales_max
);
}
}
}
}
}
if
(
limit
>
1000
)
{
total
=
0
;
}
else
{
total
=
_connection
.
QueryFirstOrDefault
<
int
>(
sqlCount
,
parameters
,
commandTimeout
:
0
);
}
if
(
string
.
IsNullOrWhiteSpace
(
search_data
.
sort
))
if
(
string
.
IsNullOrWhiteSpace
(
sort
))
{
sort
=
" ta.`ocean_purchase_amount` "
;
order
=
"desc"
;
}
if
(!
string
.
IsNullOrEmpty
(
sort
)
&&
!
string
.
IsNullOrEmpty
(
order
))
{
sql
+=
" order by "
+
sort
;
if
(!
string
.
IsNullOrEmpty
(
order
))
{
{
search_data
.
sort
=
" t1.`ocean_purchase_amount` "
;
sql
+=
" "
+
order
;
search_data
.
order
=
"desc"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
search_data
.
sort
)
&&
!
string
.
IsNullOrEmpty
(
search_data
.
order
))
else
{
{
sql
+=
" order by "
+
search_data
.
sort
;
sql
+=
" asc"
;
if
(!
string
.
IsNullOrEmpty
(
search_data
.
order
))
{
sql
+=
" "
+
search_data
.
order
;
}
else
{
sql
+=
" asc"
;
}
}
}
sql
+=
" limit "
+
search_data
.
offset
+
","
+
search_data
.
limit
;
}
}
sql
+=
" limit "
+
offset
+
","
+
limit
;
var
obj
=
_connection
.
Query
<
dc_report_profit_analysis
>(
sql
,
parameters
,
buffered
:
false
,
commandTimeout
:
0
).
AsList
();
var
obj
=
_connection
.
Query
<
dc_report_profit_analysis
>(
sql
,
parameters
,
buffered
:
false
,
commandTimeout
:
0
).
AsList
();
return
obj
;
return
obj
;
}
}
...
...
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
359d3d0d
...
@@ -689,9 +689,13 @@ namespace AutoTurnOver.Services
...
@@ -689,9 +689,13 @@ namespace AutoTurnOver.Services
return
DB
.
dc_auto_turnover
.
TransferProfitList
(
bailun_sku
,
warehouse_code
);
return
DB
.
dc_auto_turnover
.
TransferProfitList
(
bailun_sku
,
warehouse_code
);
}
}
public
List
<
dc_report_profit_analysis
>
ProfitAnalysis
(
dc_base_stock_search_dto
search_data
,
ref
int
total
)
public
List
<
dc_report_profit_analysis
>
ProfitAnalysis
(
Condition_AutoTurnOver
m
,
int
offset
,
int
limit
,
ref
int
total
,
string
order
=
""
,
string
sort
=
""
)
{
{
return
DB
.
dc_auto_turnover
.
ProfitAnalysis
(
search_data
,
ref
total
);
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
categoryIds
))
{
m
.
categoryModels
=
ApiServices
.
GetNewClientNodesByIds
(
m
.
categoryIds
.
Split
(
','
).
Select
(
s
=>
int
.
Parse
(
s
)).
ToList
());
}
return
DB
.
dc_auto_turnover
.
ProfitAnalysis
(
m
,
offset
,
limit
,
ref
total
,
order
,
sort
);
}
}
public
void
BatchPushPurchaseAdvise
(
string
ids
,
UserData
user
)
public
void
BatchPushPurchaseAdvise
(
string
ids
,
UserData
user
)
{
{
...
@@ -699,7 +703,7 @@ namespace AutoTurnOver.Services
...
@@ -699,7 +703,7 @@ namespace AutoTurnOver.Services
}
}
public
string
ProfitAnalysisExport
(
dc_base_stock_search_dto
search_data
)
public
string
ProfitAnalysisExport
(
Condition_AutoTurnOver
m
)
{
{
try
try
{
{
...
@@ -711,9 +715,9 @@ namespace AutoTurnOver.Services
...
@@ -711,9 +715,9 @@ namespace AutoTurnOver.Services
while
(
true
)
while
(
true
)
{
{
int
total
=
0
;
int
total
=
0
;
search_data
.
offset
=
(
page
-
1
)
*
rows
;
var
offset
=
(
page
-
1
)
*
rows
;
search_data
.
limit
=
rows
;
var
limit
=
rows
;
var
list
=
ProfitAnalysis
(
search_data
,
ref
total
);
var
list
=
ProfitAnalysis
(
m
,
offset
,
limit
,
ref
total
,
""
,
""
);
if
(
list
==
null
||
list
.
Count
<=
0
)
break
;
if
(
list
==
null
||
list
.
Count
<=
0
)
break
;
...
...
AutoTurnOver.Services/TaskDownloadServices.cs
View file @
359d3d0d
...
@@ -145,7 +145,7 @@ namespace AutoTurnOver.Services
...
@@ -145,7 +145,7 @@ namespace AutoTurnOver.Services
public
async
Task
<
string
>
DownloadProfitAnalysis
(
string
par_json
,
dc_task_download
download_data
)
public
async
Task
<
string
>
DownloadProfitAnalysis
(
string
par_json
,
dc_task_download
download_data
)
{
{
dc_base_stock_search_dto
search_data
=
par_json
.
ToObject
<
dc_base_stock_search_dto
>();
Condition_AutoTurnOver
search_data
=
par_json
.
ToObject
<
Condition_AutoTurnOver
>();
Console
.
WriteLine
(
"DownloadStock - 开始生成文件"
);
Console
.
WriteLine
(
"DownloadStock - 开始生成文件"
);
var
memory
=
new
SkuAutoTurnServices
().
ProfitAnalysisExport
(
search_data
);
var
memory
=
new
SkuAutoTurnServices
().
ProfitAnalysisExport
(
search_data
);
Console
.
WriteLine
(
"DownloadStock - 开始生成上传文件"
);
Console
.
WriteLine
(
"DownloadStock - 开始生成上传文件"
);
...
...
AutoTurnOver/Controllers/SkuAutoTurnController.cs
View file @
359d3d0d
...
@@ -67,14 +67,14 @@ namespace AutoTurnOver.Controllers
...
@@ -67,14 +67,14 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <param name="limit"></param>
/// <returns></returns>
/// <returns></returns>
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【自动下单管理】->【利润最大化分析】->【搜索】页面"
,
0
)]
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【自动下单管理】->【利润最大化分析】->【搜索】页面"
,
0
)]
public
JsonResult
ProfitAnalysis
([
FromQuery
]
dc_base_stock_search_dto
search_data
)
public
JsonResult
ProfitAnalysis
([
FromQuery
]
Condition_AutoTurnOver
m
,
[
FromQuery
]
int
offset
,
[
FromQuery
]
int
limit
,
[
FromQuery
]
string
order
,
[
FromQuery
]
string
sort
)
{
{
try
try
{
{
var
services
=
new
SkuAutoTurnServices
();
var
services
=
new
SkuAutoTurnServices
();
var
total
=
0
;
var
total
=
0
;
var
list
=
services
.
ProfitAnalysis
(
search_data
,
ref
total
);
var
list
=
services
.
ProfitAnalysis
(
m
,
offset
,
limit
,
ref
total
,
order
,
sort
);
return
new
JsonResult
(
new
return
new
JsonResult
(
new
{
{
...
...
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