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
aeeb1282
Commit
aeeb1282
authored
Apr 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
832d9371
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
5 deletions
+53
-5
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+2
-0
RB_Duty_PlanRepository.cs
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
+2
-0
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+49
-5
No files found.
Edu.Module.Duty/DutyPlanModule.cs
View file @
aeeb1282
...
@@ -127,6 +127,8 @@ namespace Edu.Module.Duty
...
@@ -127,6 +127,8 @@ namespace Edu.Module.Duty
{
{
{
nameof
(
RB_Duty_Plan_ViewModel
.
Date
),
model
.
Date
},
{
nameof
(
RB_Duty_Plan_ViewModel
.
Date
),
model
.
Date
},
{
nameof
(
RB_Duty_Plan_ViewModel
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Duty_Plan_ViewModel
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Duty_Plan_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Plan_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
};
flag
=
duty_PlanRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Plan_ViewModel
.
Id
),
model
.
Id
));
flag
=
duty_PlanRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Plan_ViewModel
.
Id
),
model
.
Id
));
}
}
...
...
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
View file @
aeeb1282
...
@@ -46,6 +46,7 @@ WHERE 1=1
...
@@ -46,6 +46,7 @@ WHERE 1=1
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Duty_Plan_ViewModel
.
School_Id
),
query
.
School_Id
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Duty_Plan_ViewModel
.
School_Id
),
query
.
School_Id
);
}
}
}
}
builder
.
AppendFormat
(
@" ORDER BY A.{0} ASC "
,
nameof
(
RB_Duty_Plan_ViewModel
.
Date
));
return
GetPage
<
RB_Duty_Plan_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Duty_Plan_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
...
@@ -82,6 +83,7 @@ WHERE 1=1 AND A.`Status`=0 AND B.`Status`=0
...
@@ -82,6 +83,7 @@ WHERE 1=1 AND A.`Status`=0 AND B.`Status`=0
}
}
}
}
builder
.
AppendFormat
(
" GROUP BY A.Id,A.Date "
);
builder
.
AppendFormat
(
" GROUP BY A.Id,A.Date "
);
builder
.
AppendFormat
(
" ORDER BY A.Date ASC "
);
return
GetPage
<
RB_Duty_Plan_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Duty_Plan_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
}
...
...
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
aeeb1282
...
@@ -22,7 +22,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -22,7 +22,7 @@ namespace Edu.WebApi.Controllers.Duty
[
EnableCors
(
"AllowCors"
)]
[
EnableCors
(
"AllowCors"
)]
public
class
DutyPlanController
:
BaseController
public
class
DutyPlanController
:
BaseController
{
{
private
readonly
DutyPlanModule
dutyPlanModule
=
new
DutyPlanModule
();
private
readonly
DutyPlanModule
dutyPlanModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
DutyPlanModule
>
();
/// <summary>
/// <summary>
/// 获取值班计划分页列表【管理端】
/// 获取值班计划分页列表【管理端】
...
@@ -34,7 +34,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -34,7 +34,7 @@ namespace Edu.WebApi.Controllers.Duty
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Duty_Plan_ViewModel
()
var
query
=
new
RB_Duty_Plan_ViewModel
()
{
{
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
result
=
new
List
<
object
>();
List
<
object
>
result
=
new
List
<
object
>();
...
@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.Duty
{
{
item
.
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
UpdateBy
)?.
AccountName
??
""
;
item
.
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
UpdateBy
)?.
AccountName
??
""
;
}
}
if
(
item
.
PlanDetails
!=
null
&&
item
.
PlanDetails
.
Count
>
0
)
if
(
item
.
PlanDetails
!=
null
&&
item
.
PlanDetails
.
Count
>
0
)
{
{
...
@@ -116,5 +117,48 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -116,5 +117,48 @@ namespace Edu.WebApi.Controllers.Duty
pageModel
.
PageData
=
result
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
}
}
/// <summary>
/// 新增修改排班计划
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SaveDutyPlan
()
{
var
model
=
new
RB_Duty_Plan_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Date
=
base
.
ParmJObj
.
GetDateTime
(
"Date"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
};
try
{
model
.
PlanDetails
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Duty_PlanDetails_ViewModel
>>(
base
.
ParmJObj
.
GetStringValue
(
"PlanDetails"
));
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SaveDutyPlan_PlanDetails"
);
}
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
dutyPlanModule
.
SetDutyPlanModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取排班计划详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetDutyPlan
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
dutyPlanModule
.
GetDutyPlanModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
}
}
}
}
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