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
a5a878de
Commit
a5a878de
authored
Nov 08, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时库存新增采购员查询
parent
73471d8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
daily.cs
AutoTurnOver.DB/daily.cs
+7
-2
DailyServices.cs
AutoTurnOver.Services/DailyServices.cs
+2
-2
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+2
-2
No files found.
AutoTurnOver.DB/daily.cs
View file @
a5a878de
...
@@ -246,7 +246,7 @@ UNION ALL
...
@@ -246,7 +246,7 @@ UNION ALL
/// <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_base_stock_dto
>
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehouse_code
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
ref
int
total
,
string
warehousetype
,
int
?
warehousearea
,
bool
isSum
=
false
,
string
order
=
null
,
string
sort
=
null
,
int
?
has_tort
=
null
,
List
<
bailun_category_new_dto
>
categoryModels
=
null
)
public
static
List
<
dc_base_stock_dto
>
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehouse_code
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
ref
int
total
,
string
warehousetype
,
int
?
warehousearea
,
bool
isSum
=
false
,
string
order
=
null
,
string
sort
=
null
,
int
?
has_tort
=
null
,
List
<
bailun_category_new_dto
>
categoryModels
=
null
,
string
buyer_name
=
null
)
{
{
var
sql
=
""
;
var
sql
=
""
;
if
(
isSum
)
if
(
isSum
)
...
@@ -332,7 +332,7 @@ from
...
@@ -332,7 +332,7 @@ from
dc_base_stock as t1
dc_base_stock as t1
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
"
;
"
;
if
(
categoryModels
!=
null
&&
categoryModels
.
Count
>=
1
)
if
(
(
categoryModels
!=
null
&&
categoryModels
.
Count
>=
1
)
||
!
string
.
IsNullOrWhiteSpace
(
buyer_name
)
)
{
{
countSql
+=
" left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku "
;
countSql
+=
" left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku "
;
}
}
...
@@ -352,6 +352,11 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
...
@@ -352,6 +352,11 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
sql
+=
" and t3.category_simple_id in ( "
+
string
.
Join
(
","
,
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
sql
+=
" and t3.category_simple_id in ( "
+
string
.
Join
(
","
,
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
countSql
+=
" and t3.category_simple_id in ( "
+
string
.
Join
(
","
,
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
countSql
+=
" and t3.category_simple_id in ( "
+
string
.
Join
(
","
,
categoryModels
.
Select
(
s
=>
s
.
id
).
Distinct
())
+
")"
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
buyer_name
))
{
sql
+=
" and t3.buyer_name = @buyer_name "
;
parameters
.
Add
(
"buyer_name"
,
buyer_name
);
}
if
(
has_tort
!=
null
)
if
(
has_tort
!=
null
)
{
{
...
...
AutoTurnOver.Services/DailyServices.cs
View file @
a5a878de
...
@@ -39,14 +39,14 @@ namespace AutoTurnOver.Services
...
@@ -39,14 +39,14 @@ namespace AutoTurnOver.Services
}
}
public
List
<
dc_base_stock_dto
>
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehouse_code
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
ref
int
total
,
string
warehousetype
,
int
?
warehousearea
,
bool
isSum
=
false
,
string
order
=
null
,
string
sort
=
null
,
int
?
has_tort
=
null
,
string
categoryIds
=
null
)
public
List
<
dc_base_stock_dto
>
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehouse_code
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
ref
int
total
,
string
warehousetype
,
int
?
warehousearea
,
bool
isSum
=
false
,
string
order
=
null
,
string
sort
=
null
,
int
?
has_tort
=
null
,
string
categoryIds
=
null
,
string
buyer_name
=
null
)
{
{
List
<
bailun_category_new_dto
>
categoryModels
=
null
;
List
<
bailun_category_new_dto
>
categoryModels
=
null
;
if
(!
string
.
IsNullOrWhiteSpace
(
categoryIds
))
if
(!
string
.
IsNullOrWhiteSpace
(
categoryIds
))
{
{
categoryModels
=
ApiServices
.
GetNewClientNodesByIds
(
categoryIds
.
Split
(
','
).
Select
(
s
=>
int
.
Parse
(
s
)).
ToList
());
categoryModels
=
ApiServices
.
GetNewClientNodesByIds
(
categoryIds
.
Split
(
','
).
Select
(
s
=>
int
.
Parse
(
s
)).
ToList
());
}
}
return
DB
.
daily
.
RealtimeList
(
sku
,
bailun_sku
,
warehouse_code
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
isSum
,
order
,
sort
,
has_tort
:
has_tort
,
categoryModels
:
categoryModels
);
return
DB
.
daily
.
RealtimeList
(
sku
,
bailun_sku
,
warehouse_code
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
isSum
,
order
,
sort
,
has_tort
:
has_tort
,
categoryModels
:
categoryModels
,
buyer_name
:
buyer_name
);
}
}
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
a5a878de
...
@@ -62,14 +62,14 @@ namespace AutoTurnOver.Controllers
...
@@ -62,14 +62,14 @@ namespace AutoTurnOver.Controllers
/// <param name="offset"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="limit"></param>
/// <returns></returns>
/// <returns></returns>
public
JsonResult
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehousecode
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
string
order
,
string
sort
,
string
warehousetype
,
int
?
warehousearea
,
int
?
has_tort
=
null
,
string
categoryIds
=
null
)
public
JsonResult
RealtimeList
(
string
sku
,
string
bailun_sku
,
string
warehousecode
,
string
product_inner_code
,
string
buyer_name
,
string
sku_title_cn
,
string
supplier_name
,
int
offset
,
int
limit
,
string
order
,
string
sort
,
string
warehousetype
,
int
?
warehousearea
,
int
?
has_tort
=
null
,
string
categoryIds
=
null
)
{
{
try
try
{
{
var
services
=
new
DailyServices
();
var
services
=
new
DailyServices
();
var
total
=
0
;
var
total
=
0
;
var
list
=
services
.
RealtimeList
(
sku
,
bailun_sku
,
warehousecode
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
order
:
order
,
sort
:
sort
,
has_tort
:
has_tort
,
categoryIds
:
categoryIds
);
var
list
=
services
.
RealtimeList
(
sku
,
bailun_sku
,
warehousecode
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
order
:
order
,
sort
:
sort
,
has_tort
:
has_tort
,
categoryIds
:
categoryIds
,
buyer_name
:
buyer_name
);
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