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
2badd1d8
Commit
2badd1d8
authored
Mar 14, 2022
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周转表查询、导出,支持品牌搜索
parent
ab088c58
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
+43
-0
common.cs
AutoTurnOver.DB/common.cs
+18
-0
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+10
-0
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+2
-0
CommonServices.cs
AutoTurnOver.Services/CommonServices.cs
+4
-0
CommonController.cs
AutoTurnOver/Controllers/CommonController.cs
+9
-0
No files found.
AutoTurnOver.DB/common.cs
View file @
2badd1d8
...
@@ -128,5 +128,23 @@ namespace AutoTurnOver.DB
...
@@ -128,5 +128,23 @@ namespace AutoTurnOver.DB
}
}
}
}
/// <summary>
/// 查询品牌
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public
static
List
<
string
>
SearchBrand
(
string
name
)
{
if
(
string
.
IsNullOrWhiteSpace
(
name
))
{
return
new
List
<
string
>();
}
else
{
var
sql
=
" select brand as 'name' from dc_base_sku where brand like @brand_name GROUP BY brand "
;
return
_connection
.
Query
<
string
>(
sql
,
new
{
brand_name
=
$"%
{
name
}
%"
}).
AsList
();
}
}
}
}
}
}
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
2badd1d8
...
@@ -190,6 +190,11 @@ from dc_auto_turnover as dat
...
@@ -190,6 +190,11 @@ from dc_auto_turnover as dat
whereSql
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
whereSql
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sqlCount
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sqlCount
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
brand_name
))
{
whereSql
+=
" and t4.brand = "
+
$"'
{
m
.
brand_name
}
'"
;
sqlCount
+=
" and t4.brand = "
+
$"'
{
m
.
brand_name
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
))
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
))
{
{
whereSql
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
whereSql
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
...
@@ -2282,6 +2287,11 @@ left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and
...
@@ -2282,6 +2287,11 @@ left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and
sql
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sql
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sqlCount
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
sqlCount
+=
" and dat.buyer_name = "
+
$"'
{
m
.
buyer_name
}
'"
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
brand_name
))
{
sql
+=
" and t4.brand = "
+
$"'
{
m
.
brand_name
}
'"
;
sqlCount
+=
" and t4.brand = "
+
$"'
{
m
.
brand_name
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
))
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
product_type
))
{
{
sql
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
sql
+=
" and t4.product_type = "
+
$"'
{
m
.
product_type
}
'"
;
...
...
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
2badd1d8
...
@@ -647,6 +647,8 @@ namespace AutoTurnOver.Models
...
@@ -647,6 +647,8 @@ namespace AutoTurnOver.Models
public
bool
isSum
{
get
;
set
;
}
public
bool
isSum
{
get
;
set
;
}
[
Description
(
"sku标签"
)]
[
Description
(
"sku标签"
)]
public
string
sku_label
{
get
;
set
;
}
public
string
sku_label
{
get
;
set
;
}
[
Description
(
"品牌"
)]
public
string
brand_name
{
get
;
set
;
}
[
Description
(
"待调拨数量(最小)"
)]
[
Description
(
"待调拨数量(最小)"
)]
public
int
?
not_trans_count_min
{
get
;
set
;
}
public
int
?
not_trans_count_min
{
get
;
set
;
}
...
...
AutoTurnOver.Services/CommonServices.cs
View file @
2badd1d8
...
@@ -37,6 +37,10 @@ namespace AutoTurnOver.Services
...
@@ -37,6 +37,10 @@ namespace AutoTurnOver.Services
{
{
return
DB
.
common
.
SearchPurchaseUser
(
name
);
return
DB
.
common
.
SearchPurchaseUser
(
name
);
}
}
public
List
<
string
>
SearchBrand
(
string
name
)
{
return
DB
.
common
.
SearchBrand
(
name
);
}
public
List
<
string
>
BrandList
()
public
List
<
string
>
BrandList
()
{
{
...
...
AutoTurnOver/Controllers/CommonController.cs
View file @
2badd1d8
...
@@ -119,6 +119,15 @@ namespace AutoTurnOver.Controllers
...
@@ -119,6 +119,15 @@ namespace AutoTurnOver.Controllers
text
=
p
.
name
text
=
p
.
name
}));
}));
}
}
public
JsonResult
SearchBrand
(
string
name
)
{
var
list
=
new
CommonServices
().
SearchBrand
(
name
);
return
new
JsonResult
(
list
.
Select
(
p
=>
new
{
id
=
p
,
text
=
p
}));
}
public
JsonResult
AccountList
(
string
name
)
public
JsonResult
AccountList
(
string
name
)
{
{
...
...
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