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
baa931a3
Commit
baa931a3
authored
Dec 07, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
70711ef0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
318 additions
and
26 deletions
+318
-26
RB_Class_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
+10
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+254
-26
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+16
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+37
-0
Startup.cs
Edu.WebApi/Startup.cs
+1
-0
No files found.
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
View file @
baa931a3
...
...
@@ -73,5 +73,15 @@ namespace Edu.Model.ViewModel.Course
/// 班级上课计划列表
/// </summary>
public
List
<
RB_Class_Plan_ViewModel
>
ClassPlanList
{
get
;
set
;
}
/// <summary>
/// 选中的周几/或日期数组
/// </summary>
public
List
<
string
>
WeekDayList
{
get
;
set
;
}
/// <summary>
/// 默认上课时间
/// </summary>
public
List
<
RB_Class_Time_ViewModel
>
DefaultPlanTimeList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
baa931a3
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
baa931a3
...
...
@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Course;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Repository.Course
{
...
...
@@ -38,6 +39,21 @@ WHERE 1=1
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 判断是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
CheckExistsRepository
(
RB_Class_Plan_ViewModel
model
)
{
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassId
),
model
.
ClassId
),
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassDate
),
model
.
ClassDate
),
};
return
base
.
Exists
(
list
);
}
/// <summary>
/// 根据班级编号删除班级上课计划
/// </summary>
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
baa931a3
...
...
@@ -97,6 +97,7 @@ namespace Edu.WebApi.Controllers.Course
{
var
extModel
=
new
RB_Class_ViewModel
()
{
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
CreateBy
=
UserInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
UserInfo
.
Id
,
...
...
@@ -124,6 +125,42 @@ namespace Edu.WebApi.Controllers.Course
CompleteProgress
=
base
.
ParmJObj
.
GetInt
(
"CompleteProgress"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
};
try
{
string
ClassStepPriceListStr
=
base
.
ParmJObj
.
GetStringValue
(
"ClassStepPriceList"
);
if
(!
string
.
IsNullOrEmpty
(
ClassStepPriceListStr
))
{
extModel
.
ClassStepPriceList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Class_StepPrice_ViewModel
>>(
ClassStepPriceListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_ClassStepPriceList"
);
}
try
{
string
WeekDayListStr
=
base
.
ParmJObj
.
GetStringValue
(
"WeekDayList"
);
if
(!
string
.
IsNullOrEmpty
(
WeekDayListStr
))
{
extModel
.
WeekDayList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
WeekDayListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_WeekDayList"
);
}
try
{
string
DefaultPlanTimeListStr
=
base
.
ParmJObj
.
GetStringValue
(
"DefaultPlanTimeList"
);
if
(!
string
.
IsNullOrEmpty
(
DefaultPlanTimeListStr
))
{
extModel
.
DefaultPlanTimeList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Class_Time_ViewModel
>>(
DefaultPlanTimeListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_DefaultPlanTimeList"
);
}
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
Edu.WebApi/Startup.cs
View file @
baa931a3
...
...
@@ -39,6 +39,7 @@ namespace Edu.WebApi
"http://localhost:8400"
,
"http://localhost:8081"
,
"http://localhost:8080"
,
"http://localhost:8181"
,
"http://localhost:8082"
,
"http://127.0.0.1:50512"
,
"http://127.0.0.1:20224"
,
...
...
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