Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
DataCenter_Core2.1_20190520
Commits
d7b2ee85
Commit
d7b2ee85
authored
Jul 29, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加物流账单流水显示
parent
eafdc0c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
262 additions
and
1 deletion
+262
-1
Services.cs
Bailun.DC.LogicWareHouse/Services.cs
+0
-1
flowing_logistic.cs
Bailun.DC.Models/DataWareHouse/flowing_logistic.cs
+70
-0
flowing_logistic_config.cs
Bailun.DC.Models/DataWareHouse/flowing_logistic_config.cs
+34
-0
LogisticServices.cs
Bailun.DC.Services/DataWareHouse/LogisticServices.cs
+92
-0
LogisticsController.cs
...eb/Areas/DataWareHouse/Controllers/LogisticsController.cs
+64
-0
List.cshtml
...un.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
+0
-0
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+2
-0
No files found.
Bailun.DC.LogicWareHouse/Services.cs
View file @
d7b2ee85
...
@@ -156,7 +156,6 @@ namespace Bailun.DC.LogicWareHouse
...
@@ -156,7 +156,6 @@ namespace Bailun.DC.LogicWareHouse
}
}
/// <summary>
/// <summary>
/// 半成品
/// 半成品
/// </summary>
/// </summary>
...
...
Bailun.DC.Models/DataWareHouse/flowing_logistic.cs
0 → 100644
View file @
d7b2ee85
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.DataWareHouse
{
public
class
flowing_logistic
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 物流商名称
/// </summary>
public
string
platformtype
{
get
;
set
;
}
/// <summary>
/// 帐号
/// </summary>
public
string
account
{
get
;
set
;
}
/// <summary>
/// 物流数据类型
/// </summary>
public
int
datatype
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
datatypename
{
get
;
set
;
}
/// <summary>
/// json数据
/// </summary>
public
string
jsondata
{
get
;
set
;
}
/// <summary>
/// 账单上的时间
/// </summary>
public
DateTime
?
datatime
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
DateTime
?
starttime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
DateTime
?
endtime
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
createtime
{
get
;
set
;
}
public
string
col_orderno
{
get
;
set
;
}
}
}
Bailun.DC.Models/DataWareHouse/flowing_logistic_config.cs
0 → 100644
View file @
d7b2ee85
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.DataWareHouse
{
public
class
flowing_logistic_config
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
platform
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
col_datatime
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
col_orderno
{
get
;
set
;
}
}
}
Bailun.DC.Services/DataWareHouse/LogisticServices.cs
0 → 100644
View file @
d7b2ee85
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
MySql.Data.MySqlClient
;
using
Dapper
;
using
Bailun.DC.Models.DataWareHouse
;
using
System.Linq
;
namespace
Bailun.DC.Services.DataWareHouse
{
public
class
LogisticServices
{
/// <summary>
/// 获取物流流水的简单配置
/// </summary>
/// <returns></returns>
public
List
<
flowing_logistic_config
>
ListLogisticConfig
()
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
return
cn
.
Query
<
flowing_logistic_config
>(
"select * from flowing_logistic_config"
).
ToList
();
}
}
/// <summary>
/// 获取物流账单流水 json数据
/// </summary>
/// <param name="page"></param>
/// <param name="pagesize"></param>
/// <param name="platform"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="total"></param>
/// <returns></returns>
public
List
<
flowing_logistic
>
ListFlowingLogistic
(
int
page
,
int
pagesize
,
string
platform
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
ref
int
total
)
{
var
sql
=
"select * from flowing_logistic where 1=1"
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and platformtype=@platform"
;
sqlparam
.
Add
(
"platform"
,
platform
);
}
if
(
start
.
HasValue
)
{
sql
+=
$" and datatime>='
{
start
.
Value
.
ToString
(
"yyyy-MM-dd"
)}
'"
;
}
if
(
end
.
HasValue
)
{
sql
+=
$" and datatime<'
{
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
orderno
))
{
sql
+=
" and col_orderno=@no"
;
sqlparam
.
Add
(
"no"
,
orderno
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
if
(
pagesize
>
0
)
{
var
obj
=
cn
.
Page
<
flowing_logistic
>(
page
,
pagesize
,
sql
,
ref
total
,
sqlparam
).
ToList
();
return
obj
;
}
else
{
var
obj
=
cn
.
Query
<
flowing_logistic
>(
sql
).
ToList
();
total
=
obj
.
Count
;
return
obj
;
}
}
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Controllers/LogisticsController.cs
0 → 100644
View file @
d7b2ee85
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Bailun.DC.Web.Areas.DataWareHouse.Controllers
{
[
Area
(
"DataWareHouse"
)]
public
class
LogisticsController
:
Controller
{
public
IActionResult
List
(
string
platform
)
{
var
listconfig
=
new
Services
.
DataWareHouse
.
LogisticServices
().
ListLogisticConfig
();
ViewBag
.
listconfig
=
listconfig
;
ViewBag
.
platform
=
platform
;
return
View
();
}
/// <summary>
/// 获取物流账单json数据
/// </summary>
/// <param name="page"></param>
/// <param name="platform"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="orderno"></param>
/// <param name="pagesize"></param>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
ListFlowingJson
(
int
page
,
string
platform
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
int
pagesize
=
25
)
{
var
total
=
0
;
if
(
page
<=
0
)
{
page
=
1
;
}
var
obj
=
new
Services
.
DataWareHouse
.
LogisticServices
().
ListFlowingLogistic
(
page
,
pagesize
,
platform
,
start
,
end
,
orderno
,
ref
total
);
;
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
createtime
,
jsondata
=
Newtonsoft
.
Json
.
Linq
.
JRaw
.
Parse
(
a
.
jsondata
),
datatime
=
a
.
datatime
.
HasValue
?
a
.
datatime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
});
return
Json
(
new
{
success
=
true
,
msg
=
""
,
rows
=
list
,
total
=
total
,
page
=
page
,
totalpage
=
total
/
pagesize
+
(
total
%
pagesize
>
0
?
1
:
0
),
});
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
0 → 100644
View file @
d7b2ee85
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Controllers/HomeController.cs
View file @
d7b2ee85
...
@@ -419,5 +419,6 @@ namespace Bailun.DC.Web.Controllers
...
@@ -419,5 +419,6 @@ namespace Bailun.DC.Web.Controllers
return
Content
(
"OK"
);
return
Content
(
"OK"
);
}
}
}
}
}
}
\ 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