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
3661807f
Commit
3661807f
authored
Jun 10, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增缺货推送轨迹
parent
d7795723
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
11 deletions
+89
-11
daily.cs
AutoTurnOver.DB/daily.cs
+33
-4
dc_auto_shortage_push_route_dto.cs
AutoTurnOver.Models/dc_auto_shortage_push_route_dto.cs
+20
-0
DailyServices.cs
AutoTurnOver.Services/DailyServices.cs
+5
-0
PurchaseAdviseServices.cs
AutoTurnOver.Services/PurchaseAdviseServices.cs
+0
-4
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+31
-3
No files found.
AutoTurnOver.DB/daily.cs
View file @
3661807f
...
...
@@ -366,7 +366,6 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
countSql
+=
" and t3.buyer_name = @buyer_name "
;
parameters
.
Add
(
"buyer_name"
,
buyer_name
);
}
if
(
monitor_status
==
1
)
{
sql
+=
" and t7.`status`=1 "
;
...
...
@@ -377,7 +376,6 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
sql
+=
" and ( t7.`status`=0 or t7.`status` is null ) "
;
countSql
+=
" and ( t7.`status`=0 or t7.`status` is null ) "
;
}
if
(
has_tort
!=
null
)
{
if
(
has_tort
==
0
)
...
...
@@ -440,7 +438,6 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
warehouse_code
))
{
sql
+=
" and t1.warehouse_code=@warehouse_code "
;
...
...
@@ -452,7 +449,6 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
sql
+=
" and t1.suppliers_name =@suppliers_name "
;
parameters
.
Add
(
"suppliers_name"
,
supplier_name
);
}
if
(
isSum
)
{
total
=
0
;
...
...
@@ -488,6 +484,39 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
return
obj
.
AsList
();
}
/// <summary>
/// 缺货推送记录
/// </summary>
/// <returns></returns>
public
static
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
)
{
var
sql
=
@"select t1.id, t1.platform, t1.bailun_sku,t3.warehouse_name, t1.warehouse_code, t1.push_date,t2.push_time from dc_auto_shortage_push as t1
left join dc_return_goods_push as t2 on t1.id =t2.shortage_push_id
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
where 1=1 "
;
var
countSql
=
" select count(1) from dc_auto_shortage_push as t1 where 1=1 "
;
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrWhiteSpace
(
platform
))
{
sql
+=
" t1.platform=@platform "
;
countSql
+=
" t1.platform=@platform "
;
parameters
.
Add
(
"platform"
,
platform
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
bailun_sku
))
{
sql
+=
" t1.bailun_sku=@bailun_sku "
;
countSql
+=
" t1.bailun_sku=@bailun_sku "
;
parameters
.
Add
(
"bailun_sku"
,
bailun_sku
);
}
sql
+=
" order by t1.id desc "
;
total
=
_connection
.
QueryFirst
<
int
>(
countSql
,
parameters
,
commandTimeout
:
0
);
sql
+=
" limit "
+
offset
+
","
+
limit
;
var
obj
=
_connection
.
Query
<
dc_auto_shortage_push_route_dto
>(
sql
,
parameters
,
buffered
:
false
,
commandTimeout
:
0
);
return
obj
.
AsList
();
}
public
static
string
MapField
(
string
sort
)
{
sort
=
sort
.
Replace
(
"-"
,
""
);
...
...
AutoTurnOver.Models/dc_auto_shortage_push_route_dto.cs
0 → 100644
View file @
3661807f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models
{
/// <summary>
/// 缺货推送路径
/// </summary>
public
class
dc_auto_shortage_push_route_dto
{
public
int
id
{
get
;
set
;
}
public
string
platform
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
string
warehouse_name
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
DateTime
push_date
{
get
;
set
;
}
public
DateTime
?
push_time
{
get
;
set
;
}
}
}
AutoTurnOver.Services/DailyServices.cs
View file @
3661807f
...
...
@@ -49,6 +49,11 @@ namespace AutoTurnOver.Services
return
DB
.
daily
.
RealtimeList
(
monitor_status
,
searchType
,
key_words
,
warehouse_code
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
isSum
,
order
,
sort
,
has_tort
:
has_tort
,
categoryModels
:
categoryModels
,
buyer_name
:
buyer_name
);
}
public
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
)
{
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
);
}
/// <summary>
/// 在途数据
...
...
AutoTurnOver.Services/PurchaseAdviseServices.cs
View file @
3661807f
...
...
@@ -34,10 +34,6 @@ namespace AutoTurnOver.Services
}
/// <summary>
/// 获取采购建议列表
/// </summary>
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
3661807f
...
...
@@ -52,8 +52,6 @@ namespace AutoTurnOver.Controllers
});
}
/// <summary>
/// 实时库存
/// </summary>
...
...
@@ -99,7 +97,37 @@ namespace AutoTurnOver.Controllers
return
new
JsonResult
(
list
==
null
||
list
.
Count
<=
0
?
new
dc_base_stock_dto
()
:
list
[
0
]);
}
/// <summary>
/// 缺货推送记录
/// </summary>
/// <param name="platform"></param>
/// <param name="bailun_sku"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="total"></param>
/// <returns></returns>
public
JsonResult
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
)
{
try
{
var
services
=
new
DailyServices
();
var
total
=
0
;
var
list
=
services
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
);
return
new
JsonResult
(
new
{
rows
=
list
,
total
=
total
,
});
}
catch
(
Exception
ex
)
{
return
new
JsonResult
(
new
{
message
=
ex
.
Message
,
stack_trace
=
ex
.
StackTrace
});
}
}
/// <summary>
/// 预计到货
...
...
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