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
020cba0c
Commit
020cba0c
authored
Oct 27, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增供应商地址的抓取
parent
4ba39c6c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
202 additions
and
1 deletion
+202
-1
dc_auto_return_goods_config_dao.cs
AutoTurnOver.DB/dc_auto_return_goods_config_dao.cs
+84
-0
dc_base_supplier_dao.cs
AutoTurnOver.DB/dc_base_supplier_dao.cs
+4
-1
api_supplier_dto.cs
AutoTurnOver.Models/ApiDto/api_supplier_dto.cs
+3
-0
dc_auto_return_goods_sku.cs
AutoTurnOver.Models/dc_auto_return_goods_sku.cs
+58
-0
dc_base_supplier.cs
AutoTurnOver.Models/dc_base_supplier.cs
+3
-0
ConfigServices.cs
AutoTurnOver.Services/ConfigServices.cs
+2
-0
ReturnGoodsConfigServices.cs
AutoTurnOver.Services/ReturnGoodsConfigServices.cs
+15
-0
ReturnGoodsController.cs
AutoTurnOver/Controllers/ReturnGoodsController.cs
+33
-0
No files found.
AutoTurnOver.DB/dc_auto_return_goods_config_dao.cs
View file @
020cba0c
...
@@ -164,6 +164,90 @@ and bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ";
...
@@ -164,6 +164,90 @@ and bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ";
return
conn
.
Query
<
order_dto
>(
sql
,
parameters
).
AsList
();
return
conn
.
Query
<
order_dto
>(
sql
,
parameters
).
AsList
();
}
}
public
static
List
<
dc_auto_return_goods_sku_dto
>
SkuPage
(
dc_auto_return_goods_sku_search_dto
m
,
int
offset
,
int
limit
,
ref
int
total
)
{
var
list
=
new
List
<
dc_auto_return_goods_sku_dto
>();
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 dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.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 "
;
parameters
.
Add
(
"btime"
,
m
.
btime
.
Value
.
ToDayHome
());
}
if
(
m
.
etime
!=
null
)
{
sql
+=
" and t1.create_date<=@etime "
;
parameters
.
Add
(
"etime"
,
m
.
etime
.
Value
.
ToDayEnd
());
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
warehousetype
))
{
sql
+=
" and t2.hq_type=@warehousetype"
;
parameters
.
Add
(
"warehousetype"
,
m
.
warehousetype
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
sku
))
{
sql
+=
" and t1.bailun_sku=@bailun_sku"
;
parameters
.
Add
(
"bailun_sku"
,
m
.
sku
);
}
if
(
m
.
warehousearea
>
0
)
{
sql
+=
" and t2.area_id="
+
m
.
warehousearea
;
}
if
(
m
.
warehouse_code
!=
null
)
{
sql
+=
$" and t1.warehouse_code=@warehouse_code "
;
parameters
.
Add
(
"warehouse_code"
,
m
.
warehouse_code
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
m
.
supplier_name
))
{
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
);
var
obj
=
_connection
.
Query
<
dc_auto_return_goods_sku_dto
>(
sql
+
" limit "
+
offset
+
","
+
limit
,
parameters
);
return
obj
.
AsList
();
}
catch
(
Exception
)
{
return
list
;
}
}
public
class
order_dto
public
class
order_dto
{
{
public
DateTime
paid_time
{
get
;
set
;
}
public
DateTime
paid_time
{
get
;
set
;
}
...
...
AutoTurnOver.DB/dc_base_supplier_dao.cs
View file @
020cba0c
...
@@ -54,7 +54,10 @@ namespace AutoTurnOver.DB
...
@@ -54,7 +54,10 @@ namespace AutoTurnOver.DB
name
=
item
.
name
,
name
=
item
.
name
,
nostock
=
item
.
nostock
??
0
,
nostock
=
item
.
nostock
??
0
,
sup_id
=
item
.
id
,
sup_id
=
item
.
id
,
sup_value
=
item
.
value
sup_value
=
item
.
value
,
companyaddress
=
item
.
companyaddress
,
contactname
=
item
.
contactname
,
contactphone
=
item
.
contactphone
,
};
};
...
...
AutoTurnOver.Models/ApiDto/api_supplier_dto.cs
View file @
020cba0c
...
@@ -15,6 +15,9 @@ namespace AutoTurnOver.Models.ApiDto
...
@@ -15,6 +15,9 @@ namespace AutoTurnOver.Models.ApiDto
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
public
string
name
{
get
;
set
;
}
public
string
name
{
get
;
set
;
}
public
string
companyaddress
{
get
;
set
;
}
public
string
contactname
{
get
;
set
;
}
public
string
contactphone
{
get
;
set
;
}
public
int
value
{
get
;
set
;
}
public
int
value
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 是否无库
/// 是否无库
...
...
AutoTurnOver.Models/dc_auto_return_goods_sku.cs
View file @
020cba0c
...
@@ -70,4 +70,62 @@ namespace AutoTurnOver.Models
...
@@ -70,4 +70,62 @@ namespace AutoTurnOver.Models
/// </summary>
/// </summary>
public
int
no_library_sys_out_status
{
get
;
set
;
}
public
int
no_library_sys_out_status
{
get
;
set
;
}
}
}
public
class
dc_auto_return_goods_sku_dto
:
dc_auto_return_goods_sku
{
public
string
monitor_status_str
{
get
;
set
;
}
public
string
status_str
{
get
{
return
((
dc_auto_return_goods_sku_status_enum
)
status
).
ToString
();
}
}
public
string
push_status_str
{
get
{
var
str
=
""
;
if
(
oms_push_status
==
1
)
{
str
+=
"已推送"
;
}
else
{
str
+=
"未推送"
;
}
if
(
oms_out_status
==
1
)
{
str
+=
"已出库"
;
}
else
{
str
+=
"未出库"
;
}
return
str
;
}
}
}
public
class
dc_auto_return_goods_sku_search_dto
{
public
int
?
offset
{
get
;
set
;
}
public
int
?
limit
{
get
;
set
;
}
public
int
?
monitor_status
{
get
;
set
;
}
public
int
?
status
{
get
;
set
;
}
public
int
?
oms_out_status
{
get
;
set
;
}
public
int
?
no_library_sys_push_status
{
get
;
set
;
}
public
string
supplier_name
{
get
;
set
;
}
public
string
warehouse_code
{
get
;
set
;
}
public
string
warehousetype
{
get
;
set
;
}
public
int
?
warehousearea
{
get
;
set
;
}
public
string
sku
{
get
;
set
;
}
public
DateTime
?
btime
{
get
;
set
;
}
public
DateTime
?
etime
{
get
;
set
;
}
}
public
enum
dc_auto_return_goods_sku_status_enum
{
待审核
=
0
,
已审核
=
1
,
驳回
=
-
1
}
}
}
AutoTurnOver.Models/dc_base_supplier.cs
View file @
020cba0c
...
@@ -23,5 +23,8 @@ namespace AutoTurnOver.Models
...
@@ -23,5 +23,8 @@ namespace AutoTurnOver.Models
/// 是否自提
/// 是否自提
/// </summary>
/// </summary>
public
int
isdaytakeinstore
{
get
;
set
;
}
public
int
isdaytakeinstore
{
get
;
set
;
}
public
string
companyaddress
{
get
;
set
;
}
public
string
contactname
{
get
;
set
;
}
public
string
contactphone
{
get
;
set
;
}
}
}
}
}
AutoTurnOver.Services/ConfigServices.cs
View file @
020cba0c
...
@@ -893,6 +893,8 @@ namespace AutoTurnOver.Services
...
@@ -893,6 +893,8 @@ namespace AutoTurnOver.Services
return
DB
.
db_config
.
GetReturnGoodsConfigById
(
id
);
return
DB
.
db_config
.
GetReturnGoodsConfigById
(
id
);
}
}
#
endregion
#
endregion
}
}
}
}
AutoTurnOver.Services/ReturnGoodsConfigServices.cs
0 → 100644
View file @
020cba0c
using
AutoTurnOver.Models
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Services
{
public
class
ReturnGoodsConfigServices
{
public
List
<
dc_auto_return_goods_sku_dto
>
SkuPage
(
dc_auto_return_goods_sku_search_dto
m
,
int
offset
,
int
limit
,
ref
int
total
)
{
return
DB
.
dc_auto_return_goods_config_dao
.
SkuPage
(
m
,
offset
,
limit
,
ref
total
);
}
}
}
AutoTurnOver/Controllers/ReturnGoodsController.cs
0 → 100644
View file @
020cba0c
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
AutoTurnOver.Models
;
using
AutoTurnOver.Utility
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
namespace
AutoTurnOver.Controllers
{
[
Route
(
"api/[controller]"
)]
[
ApiController
]
public
class
ReturnGoodsController
:
ControllerBase
{
[
HttpGet
]
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【自动下单管理】->【退货汇总】->【搜索】页面"
,
0
)]
public
JsonResult
SkuPage
([
FromQuery
]
dc_auto_return_goods_sku_search_dto
search
)
{
var
total
=
0
;
var
service
=
new
Services
.
ReturnGoodsConfigServices
();
var
list
=
service
.
SkuPage
(
search
,
search
.
offset
??
0
,
search
.
limit
??
0
,
ref
total
);
return
new
JsonResult
(
new
{
rows
=
list
,
total
=
total
,
});
}
}
}
\ No newline at end of file
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