Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
58b29509
Commit
58b29509
authored
Apr 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a5ffe5da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
38 deletions
+21
-38
RB_Duty_Config.cs
Edu.Model/Entity/Duty/RB_Duty_Config.cs
+8
-4
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+1
-1
DutyController.cs
Edu.WebApi/Controllers/Duty/DutyController.cs
+12
-33
No files found.
Edu.Model/Entity/Duty/RB_Duty_Config.cs
View file @
58b29509
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Duty
...
...
@@ -33,7 +31,6 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public
string
MachineCode
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
...
...
@@ -49,7 +46,6 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
...
...
@@ -65,6 +61,14 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 突发事件抄送人员
/// </summary>
public
string
SendEmployeeIds
{
get
;
set
;
}
}
}
Edu.Module.Duty/DutyPlanModule.cs
View file @
58b29509
...
...
@@ -353,7 +353,7 @@ namespace Edu.Module.Duty
WorkList
=
pList
,
//突发事项列表
EmergenciesList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
3
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>(),
//交接事项
列表
//交接事项
HandoverList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
2
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>(),
ReciveMan
=
nextModel
?.
DutyManName
??
""
,
GiveMan
=
previousModel
?.
DutyManName
??
""
,
...
...
Edu.WebApi/Controllers/Duty/DutyController.cs
View file @
58b29509
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Linq
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
...
...
@@ -10,7 +7,6 @@ using Edu.Module.Duty;
using
Edu.Module.User
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
namespace
Edu.WebApi.Controllers.Duty
...
...
@@ -21,7 +17,14 @@ namespace Edu.WebApi.Controllers.Duty
[
EnableCors
(
"AllowCors"
)]
public
class
DutyController
:
BaseController
{
/// <summary>
/// 值班配置处理类对象
/// </summary>
public
readonly
DutyModule
dutyModule
=
new
DutyModule
();
/// <summary>
/// 校区处理类对象
/// </summary>
public
readonly
SchoolModule
schoolModule
=
new
SchoolModule
();
#
region
班次管理
...
...
@@ -35,11 +38,9 @@ namespace Edu.WebApi.Controllers.Duty
{
var
query
=
new
RB_Duty_Frequency_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
};
var
list
=
dutyModule
.
GetDutyFrequencyRepository
(
query
);
var
list
=
dutyModule
.
GetDutyFrequencyModule
(
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
...
...
@@ -61,7 +62,6 @@ namespace Edu.WebApi.Controllers.Duty
{
var
query
=
new
RB_Duty_Frequency_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
};
...
...
@@ -69,7 +69,7 @@ namespace Edu.WebApi.Controllers.Duty
{
return
ApiResult
.
Failed
(
"请传入班次Id"
);
}
var
model
=
dutyModule
.
GetDutyFrequency
Repository
(
query
).
FirstOrDefault
();
var
model
=
dutyModule
.
GetDutyFrequency
Module
(
query
).
FirstOrDefault
();
if
(
model
==
null
||
model
.
Id
<=
0
)
{
return
ApiResult
.
Failed
(
"数据不存在"
);
...
...
@@ -82,8 +82,6 @@ namespace Edu.WebApi.Controllers.Duty
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 获取班次列表
/// </summary>
...
...
@@ -123,14 +121,10 @@ namespace Edu.WebApi.Controllers.Duty
}
query
.
UpdateBy
=
base
.
UserInfo
.
Id
;
query
.
UpdateTime
=
System
.
DateTime
.
Now
;
bool
retult
=
dutyModule
.
SetFrequencyModel
(
query
);
bool
retult
=
dutyModule
.
SetFrequencyModule
(
query
);
return
retult
?
ApiResult
.
Success
(
"新增/修改班次成功"
)
:
ApiResult
.
Failed
(
"新增/修改班次失败"
);
}
/// <summary>
/// 删除班次
/// </summary>
...
...
@@ -155,10 +149,8 @@ namespace Edu.WebApi.Controllers.Duty
{
var
query
=
new
RB_Duty_Item_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
};
var
list
=
dutyModule
.
GetDutyItemRepository
(
query
);
foreach
(
var
item
in
list
)
{
...
...
@@ -316,8 +308,6 @@ namespace Edu.WebApi.Controllers.Duty
#
endregion
#
region
值班设置管理
/// <summary>
/// 获取设置列表
...
...
@@ -328,11 +318,9 @@ namespace Edu.WebApi.Controllers.Duty
{
var
query
=
new
RB_Duty_Config_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
};
var
list
=
dutyModule
.
GetDutyConfigRepository
(
query
);
foreach
(
var
item
in
list
)
{
...
...
@@ -375,8 +363,6 @@ namespace Edu.WebApi.Controllers.Duty
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 获取设置列表
/// </summary>
...
...
@@ -409,7 +395,6 @@ namespace Edu.WebApi.Controllers.Duty
{
return
ApiResult
.
Failed
(
"请输入值班机器码"
);
}
var
oldList
=
dutyModule
.
GetDutyConfigList
(
new
RB_Duty_Config_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
MachineCode
=
query
.
MachineCode
});
if
(
oldList
!=
null
&&
oldList
.
Any
(
x
=>
x
.
Id
!=
query
.
Id
))
{
...
...
@@ -422,14 +407,10 @@ namespace Edu.WebApi.Controllers.Duty
}
query
.
UpdateBy
=
base
.
UserInfo
.
Id
;
query
.
UpdateTime
=
System
.
DateTime
.
Now
;
bool
retult
=
dutyModule
.
SetDutyConfigModel
(
query
);
return
retult
?
ApiResult
.
Success
(
"新增/修改值班设置成功"
)
:
ApiResult
.
Failed
(
"新增/修改值班设置失败"
);
}
/// <summary>
/// 删除值班设置
/// </summary>
...
...
@@ -441,8 +422,6 @@ namespace Edu.WebApi.Controllers.Duty
var
flag
=
dutyModule
.
RemoveConfigModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
}
\ 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