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
859dc56b
Commit
859dc56b
authored
Oct 29, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周转表新增标签查询
parent
35267f65
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
6 deletions
+43
-6
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+14
-4
dc_auto_config_sku_label.cs
AutoTurnOver.Models/dc_auto_config_sku_label.cs
+15
-0
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+3
-1
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+6
-1
SkuAutoTurnController.cs
AutoTurnOver/Controllers/SkuAutoTurnController.cs
+5
-0
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
859dc56b
...
...
@@ -55,7 +55,8 @@ t4.bailun_category_name,
( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status',t4.suppliers_link,
(t4.supplier_delivery - t6.virtual_delivery_days) as 'delivery_days_error',t4.weight,t4.unit_price,t7.usable_stock,t7.shipped_stock,
t4.develop_time,(case when t8.id is null then '未侵权' else '侵权' end) as 'has_tort',
( case when t5.`status`=0 or t5.`status` is null then null else t5.gmt_create end ) as 'stop_monitor_create'
( case when t5.`status`=0 or t5.`status` is null then null else t5.gmt_create end ) as 'stop_monitor_create',
t11.label as 'sku_label'
-- ,t10.`name` as 'group_name'
from dc_auto_turnover as dat
left join dc_auto_sales as t2 on t2.bailun_sku=dat.bailun_sku and dat.warehouse_code = t2.warehouse_code
...
...
@@ -67,6 +68,7 @@ left join dc_base_stock as t7 on dat.bailun_sku = t7.bailun_sku and dat.warehous
left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
-- left join dc_auto_stock_up_range as t9 on dat.bailun_sku = t9.bailun_sku and dat.warehouse_code = t9.warehouse_code
-- left join dc_auto_jit_tag_group as t10 on t9.group_id = t10.id
left join dc_auto_config_sku_label as t11 on dat.bailun_sku = t11.bailun_sku
where 1=1 "
;
}
...
...
@@ -76,10 +78,9 @@ from dc_auto_turnover as dat
"
;
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(
m
.
warehousearea
>
0
)
if
(
string
.
IsNullOrWhiteSpace
(
m
.
sku_label
))
{
sqlCount
+=
" left join dc_
base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
"
;
sqlCount
+=
" left join dc_
auto_config_sku_label as t11 on dat.bailun_sku = t11.bailun_sku
"
;
}
if
(
m
.
categoryModels
!=
null
)
{
...
...
@@ -114,6 +115,11 @@ from dc_auto_turnover as dat
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
}
'"
;
...
...
@@ -261,6 +267,10 @@ from dc_auto_turnover as dat
}
public
static
IEnumerable
<
string
>
GetLabelList
()
{
return
_connection
.
Query
<
string
>(
" select DISTINCT label from dc_auto_config_sku_label "
);
}
#
region
特殊销售设置
...
...
AutoTurnOver.Models/dc_auto_config_sku_label.cs
0 → 100644
View file @
859dc56b
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models
{
public
class
dc_auto_config_sku_label
{
public
int
id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
label
{
get
;
set
;
}
}
}
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
859dc56b
...
...
@@ -271,7 +271,7 @@ namespace AutoTurnOver.Models
public
class
Condition_AutoTurnOver
{
public
string
sku_label
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
buyer_name
{
get
;
set
;
}
...
...
@@ -721,5 +721,7 @@ namespace AutoTurnOver.Models
public
decimal
history_sevenday_sales_aliexpress
{
get
;
set
;
}
public
decimal
history_fourteenday_sales_aliexpress
{
get
;
set
;
}
public
decimal
history_thirtyday_sales_aliexpress
{
get
;
set
;
}
public
string
sku_label
{
get
;
set
;
}
}
}
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
859dc56b
...
...
@@ -33,6 +33,10 @@ namespace AutoTurnOver.Services
return
DB
.
dc_auto_turnover
.
List
(
m
,
offset
,
limit
,
ref
total
,
order
,
sort
,
isSum
);
}
public
IEnumerable
<
string
>
GetLabelList
()
{
return
DB
.
dc_auto_turnover
.
GetLabelList
();
}
#
region
特殊销售设置
/// <summary>
...
...
@@ -297,7 +301,7 @@ namespace AutoTurnOver.Services
"实际库存"
,
"安全库存"
,
"周转天数"
,
"供应商交期"
,
"质检入库天数"
,
"调拨头程天数"
,
"预测是否断货"
,
"缺货数量"
,
"监控状态"
,
"供应商"
,
"采购员"
,
"交期异常"
,
"过去7天日均"
,
"过去14天日均"
,
"过去30天日均"
,
"重量"
,
"单价"
,
"实时库存"
,
"ebay最近7天日均销量"
,
"ebay最近14天日均销量"
,
"ebay最近30天日均销量"
,
"速卖通最近7天日均销量"
,
"速卖通最近14天日均销量"
,
"速卖通最近30天日均销量"
,
"已发货库存"
,
"开发时间"
,
"是否侵权"
,
"停止监控时间"
,
"已发货库存"
,
"开发时间"
,
"是否侵权"
,
"停止监控时间"
,
"标签"
};
foreach
(
var
item
in
cols
)
{
...
...
@@ -352,6 +356,7 @@ namespace AutoTurnOver.Services
row
[
"是否侵权"
]
=
itemData
.
has_tort
;
row
[
"停止监控时间"
]
=
itemData
.
stop_monitor_create
==
null
?
""
:
itemData
.
stop_monitor_create
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
//row["动态备货规则组"] = itemData.group_name;
row
[
"标签"
]
=
itemData
.
sku_label
;
table
.
Rows
.
Add
(
row
);
}
...
...
AutoTurnOver/Controllers/SkuAutoTurnController.cs
View file @
859dc56b
...
...
@@ -72,6 +72,11 @@ namespace AutoTurnOver.Controllers
}
public
JsonResult
GetLabelList
()
{
return
new
JsonResult
(
new
Services
.
SkuAutoTurnServices
().
GetLabelList
());
}
public
JsonResult
ListSumFooter
(
string
supplier_name
,
int
limit
,
int
offset
,
string
order
,
string
sort
,
int
?
searchType
,
string
key_words
,
string
buyer_name
,
string
sku_prefix
,
int
?
IsRedundant
,
int
?
IsStockOut
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
,
bool
?
hasDefectConfig
,
bool
?
hasAadvise
=
null
,
string
categoryIds
=
null
,
int
?
monitor_status
=
null
,
int
?
has_tort
=
null
)
{
var
m
=
new
Condition_AutoTurnOver
...
...
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