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
f48ee5f9
Commit
f48ee5f9
authored
Nov 06, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提货单新增字段
parent
0123aa37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
33 deletions
+28
-33
dc_auto_pick_up_goods_order_dao.cs
AutoTurnOver.DB/dc_auto_pick_up_goods_order_dao.cs
+23
-33
dc_auto_pick_up_goods_order.cs
AutoTurnOver.Models/dc_auto_pick_up_goods_order.cs
+5
-0
No files found.
AutoTurnOver.DB/dc_auto_pick_up_goods_order_dao.cs
View file @
f48ee5f9
...
...
@@ -49,7 +49,9 @@ namespace AutoTurnOver.DB
pick_up_goods_time
=
dc_base_supplier_data
.
laster_pockup_time
??
""
,
purchase_id
=
itemP
.
Key
,
warehouse_code
=
item
.
Max
(
v
=>
v
.
warehouse_code
),
warehouse_name
=
item
.
Max
(
v
=>
v
.
warehouse_name
)
warehouse_name
=
item
.
Max
(
v
=>
v
.
warehouse_name
),
suppliers_id
=
item
.
Key
.
supplier_id
??
0
,
suppliers_name
=
item
.
Key
.
supplier_name
};
// 查询是否已经存在
...
...
@@ -99,37 +101,36 @@ namespace AutoTurnOver.DB
try
{
var
sql
=
@"select
t1.*,
( case when t5.`status`=0 or t5.`status` is null then '监控中' else '停止监控' end ) as 'monitor_status_str'
from dc_auto_return_goods_sku as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
t2.`no` as 'no',
t2.`date` as 'date',
t2.pay_time,
t2.order_1688_time,
t2.pick_up_goods_time,
t2.purchase_id,
t2.warehouse_code,
t2.warehouse_name,
t1.bailun_sku,
t1.price,
t1.quantity,
t1.amount
from dc_auto_pick_up_goods_order_sku as t1
left join dc_auto_pick_up_goods_order as t2 on t1.main_id = t2.id
left join dc_base_warehouse as t3 on t1.warehouse_code = t2.warehouse_code
where 1 = 1 "
;
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(
m
.
monitor_status
!=
null
)
{
if
(
m
.
monitor_status
==
1
)
{
sql
+=
" and t5.`status`=1 "
;
}
else
if
(
m
.
monitor_status
==
2
)
{
sql
+=
" and ( t5.`status`=0 or t5.`status` is null ) "
;
}
}
if
(
m
.
btime
!=
null
)
{
sql
+=
" and t1.
create_
date>=@btime "
;
sql
+=
" and t1.date>=@btime "
;
parameters
.
Add
(
"btime"
,
m
.
btime
.
Value
.
ToDayHome
());
}
if
(
m
.
etime
!=
null
)
{
sql
+=
" and t1.
create_
date<=@etime "
;
sql
+=
" and t1.date<=@etime "
;
parameters
.
Add
(
"etime"
,
m
.
etime
.
Value
.
ToDayEnd
());
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
warehousetype
))
{
sql
+=
" and t
2
.hq_type=@warehousetype"
;
sql
+=
" and t
3
.hq_type=@warehousetype"
;
parameters
.
Add
(
"warehousetype"
,
m
.
warehousetype
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
sku
))
...
...
@@ -139,7 +140,7 @@ where 1 = 1 ";
}
if
(
m
.
warehousearea
>
0
)
{
sql
+=
" and t
2
.area_id="
+
m
.
warehousearea
;
sql
+=
" and t
3
.area_id="
+
m
.
warehousearea
;
}
if
(
m
.
warehouse_code
!=
null
)
{
...
...
@@ -151,18 +152,7 @@ where 1 = 1 ";
sql
+=
" and t1.suppliers_name =@suppliers_name "
;
parameters
.
Add
(
"suppliers_name"
,
m
.
supplier_name
);
}
if
(
m
.
status
!=
null
)
{
sql
+=
" and t1.status="
+
m
.
status
;
}
if
(
m
.
oms_out_status
!=
null
)
{
sql
+=
" and t1.oms_out_status="
+
m
.
oms_out_status
;
}
if
(
m
.
no_library_sys_push_status
>
0
)
{
sql
+=
" and t1.no_library_sys_push_status="
+
m
.
no_library_sys_push_status
;
}
total
=
_connection
.
ExecuteScalar
<
int
>(
"select count(0) from ("
+
sql
+
") tb1"
,
parameters
);
...
...
AutoTurnOver.Models/dc_auto_pick_up_goods_order.cs
View file @
f48ee5f9
...
...
@@ -15,6 +15,8 @@ namespace AutoTurnOver.Models
public
string
purchase_id
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
string
warehouse_name
{
get
;
set
;
}
public
int
suppliers_id
{
get
;
set
;
}
public
string
suppliers_name
{
get
;
set
;
}
}
public
class
dc_auto_pick_up_goods_order_sku
...
...
@@ -40,10 +42,13 @@ namespace AutoTurnOver.Models
public
int
id
{
get
;
set
;
}
public
string
no
{
get
;
set
;
}
public
DateTime
date
{
get
;
set
;
}
public
string
date_str
{
get
{
return
date
.
ToString
(
"yyyy-MM-dd"
);
}
}
public
DateTime
?
pay_time
{
get
;
set
;
}
public
DateTime
?
order_1688_time
{
get
;
set
;
}
public
string
pick_up_goods_time
{
get
;
set
;
}
public
string
purchase_id
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
string
warehouse_name
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
decimal
price
{
get
;
set
;
}
public
int
quantity
{
get
;
set
;
}
...
...
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