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
b2a5a33f
Commit
b2a5a33f
authored
Jun 23, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加自动任务的数据类型管理模块
parent
36abfea3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
11 deletions
+66
-11
taskcenter_datatype.cs
Bailun.DC.Models/taskcenter_datatype.cs
+15
-0
TaskCenterServices.cs
Bailun.DC.Services/TaskCenterServices.cs
+17
-0
HomeController.cs
Bailun.DC.Web/Areas/TaskCenter/Controllers/HomeController.cs
+20
-8
AddTaskTemplate.cshtml
...DC.Web/Areas/TaskCenter/Views/Home/AddTaskTemplate.cshtml
+7
-2
Templates.cshtml
Bailun.DC.Web/Areas/TaskCenter/Views/Home/Templates.cshtml
+7
-1
No files found.
Bailun.DC.Models/taskcenter_datatype.cs
0 → 100644
View file @
b2a5a33f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
taskcenter_datatype
{
public
int
id
{
get
;
set
;
}
public
int
data_type
{
get
;
set
;
}
public
string
data_type_name
{
get
;
set
;
}
}
}
Bailun.DC.Services/TaskCenterServices.cs
View file @
b2a5a33f
...
@@ -519,5 +519,22 @@ namespace Bailun.DC.Services
...
@@ -519,5 +519,22 @@ namespace Bailun.DC.Services
#
endregion
#
endregion
#
region
数据类型
public
List
<
taskcenter_datatype
>
ListDataType
()
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
return
cn
.
Query
<
taskcenter_datatype
>(
"select * from taskcenter_datatype"
).
AsList
();
}
}
#
endregion
}
}
}
}
Bailun.DC.Web/Areas/TaskCenter/Controllers/HomeController.cs
View file @
b2a5a33f
...
@@ -24,6 +24,9 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
...
@@ -24,6 +24,9 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
public
IActionResult
Templates
()
public
IActionResult
Templates
()
{
{
var
datatypes
=
new
Services
.
TaskCenterServices
().
ListDataType
();
ViewBag
.
datatypes
=
datatypes
;
return
View
();
return
View
();
}
}
...
@@ -37,11 +40,12 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
...
@@ -37,11 +40,12 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
public
string
TemplatesJson
(
BtTableParameter
parameter
,
int
?
status
,
int
?
datatype
)
public
string
TemplatesJson
(
BtTableParameter
parameter
,
int
?
status
,
int
?
datatype
)
{
{
var
total
=
0
;
var
total
=
0
;
var
_service
=
new
Services
.
TaskCenterServices
();
var
obj
=
new
Services
.
TaskCenterServices
().
List
(
parameter
,
status
,
datatype
,
ref
total
);
var
datatypes
=
_service
.
ListDataType
();
var
obj
=
_service
.
List
(
parameter
,
status
,
datatype
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
var
list
=
obj
.
Select
(
a
=>
new
{
download_type
=
Enum
.
GetName
(
typeof
(
Enum_download_type
),
a
.
download_type
)
,
download_type
=
datatypes
.
Where
(
d
=>
d
.
data_type
==
a
.
download_type
).
FirstOrDefault
()?.
data_type_name
??
""
,
lastupdatetime
=
a
.
lastupdatetime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
lastupdatetime
=
a
.
lastupdatetime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
a
.
start_frequency_day
,
a
.
start_frequency_day
,
a
.
start_frequency_hour
,
a
.
start_frequency_hour
,
...
@@ -69,6 +73,11 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
...
@@ -69,6 +73,11 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
}
}
ViewBag
.
m
=
obj
;
ViewBag
.
m
=
obj
;
var
datatypes
=
new
Services
.
TaskCenterServices
().
ListDataType
();
ViewBag
.
datatypes
=
datatypes
;
return
View
();
return
View
();
}
}
...
@@ -109,13 +118,14 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
...
@@ -109,13 +118,14 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
public
string
ListTaskJson
(
BtTableParameter
parameter
,
int
?
datatype
,
int
?
status
)
public
string
ListTaskJson
(
BtTableParameter
parameter
,
int
?
datatype
,
int
?
status
)
{
{
var
total
=
0
;
var
total
=
0
;
var
_service
=
new
Services
.
TaskCenterServices
();
var
obj
=
new
Services
.
TaskCenterServices
().
ListTask
(
parameter
,
status
,
datatype
,
ref
total
);
var
datatypes
=
_service
.
ListDataType
();
var
obj
=
_service
.
ListTask
(
parameter
,
status
,
datatype
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
account
,
a
.
account
,
createtime
=
a
.
createtime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
createtime
=
a
.
createtime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
datatype
=
Enum
.
GetName
(
typeof
(
Enum_download_type
),
a
.
datatype
)
,
datatype
=
datatypes
.
Where
(
d
=>
d
.
data_type
==
a
.
datatype
).
FirstOrDefault
()?.
data_type_name
??
""
,
lastupdatetime
=
a
.
lastupdatetime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
lastupdatetime
=
a
.
lastupdatetime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
a
.
platform_type
,
a
.
platform_type
,
status
=
Enum
.
GetName
(
typeof
(
Enum_TaskStatus
),
a
.
status
),
status
=
Enum
.
GetName
(
typeof
(
Enum_TaskStatus
),
a
.
status
),
...
@@ -154,14 +164,16 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
...
@@ -154,14 +164,16 @@ namespace Bailun.DC.Web.Areas.TaskCenter.Controllers
{
{
try
try
{
{
var
obj
=
new
Services
.
TaskCenterServices
().
ListAccount
(
datatype
);
var
_service
=
new
Services
.
TaskCenterServices
();
var
datatypes
=
_service
.
ListDataType
();
var
obj
=
_service
.
ListAccount
(
datatype
);
var
list
=
obj
.
Select
(
a
=>
new
{
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
platform
,
a
.
platform
,
a
.
platform_index
,
a
.
platform_index
,
a
.
account
,
a
.
account
,
a
.
apiurl
,
a
.
apiurl
,
data_type
=
Enum
.
GetName
(
typeof
(
Enum_download_type
),
a
.
data_type
)
,
data_type
=
datatypes
.
Where
(
d
=>
d
.
data_type
==
a
.
data_type
).
FirstOrDefault
()?.
data_type_name
??
""
,
a
.
frequency
,
a
.
frequency
,
a
.
id
,
a
.
id
,
note
=
a
.
note
??
""
,
note
=
a
.
note
??
""
,
...
...
Bailun.DC.Web/Areas/TaskCenter/Views/Home/AddTaskTemplate.cshtml
View file @
b2a5a33f
...
@@ -17,8 +17,13 @@
...
@@ -17,8 +17,13 @@
<label style="width:110px">下载类型:</label>
<label style="width:110px">下载类型:</label>
<select id="download_type" name="download_type" class="form-control" style="width:110px;display:inline">
<select id="download_type" name="download_type" class="form-control" style="width:110px;display:inline">
<option value="">请选择下载类型</option>
<option value="">请选择下载类型</option>
<option value="1">物流账单</option>
@if (ViewBag.datatypes.Count > 0)
<option value="2">税务流水</option>
{
foreach (var item in ViewBag.datatypes)
{
<option value="@(item.data_type)">@(item.data_type_name)</option>
}
}
</select>
</select>
</div>
</div>
</div>
</div>
...
...
Bailun.DC.Web/Areas/TaskCenter/Views/Home/Templates.cshtml
View file @
b2a5a33f
...
@@ -17,7 +17,13 @@
...
@@ -17,7 +17,13 @@
<label>下载类型</label>
<label>下载类型</label>
<select id="datatype" name="datatype" class="form-control" style="width:150px">
<select id="datatype" name="datatype" class="form-control" style="width:150px">
<option value="">请选择下载类型</option>
<option value="">请选择下载类型</option>
<option value="1">物流账单</option>
@if (ViewBag.datatypes.Count > 0)
{
foreach (var item in ViewBag.datatypes)
{
<option value="@(item.data_type)">@(item.data_type_name)</option>
}
}
</select>
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
...
...
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