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
1651da2e
Commit
1651da2e
authored
Apr 27, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
82d79b2b
7f84fccd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
5 deletions
+127
-5
TeacherAssessmentModule.cs
Edu.Module.User/TeacherAssessmentModule.cs
+53
-0
TeacherAssessmentController.cs
...pi/Controllers/DataService/TeacherAssessmentController.cs
+74
-5
No files found.
Edu.Module.User/TeacherAssessmentModule.cs
View file @
1651da2e
...
...
@@ -319,6 +319,33 @@ namespace Edu.Module.User
CheckType
=
CheckType
});
var
typeList
=
GetAssessmentTypeListModule
(
new
RB_Assessment_Type_Extend
()
{
});
var
maxOptionList
=
new
List
<
SubtypeItem
>();
int
maxLength
=
0
;
foreach
(
var
item
in
typeList
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
>
maxLength
)
{
maxOptionList
=
subItem
.
OptionList
;
maxLength
=
subItem
.
OptionList
.
Count
;
}
});
}
foreach
(
var
item
in
typeList
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
<
maxOptionList
.
Count
)
{
for
(
var
j
=
subItem
.
OptionList
.
Count
;
j
<
maxOptionList
.
Count
;
j
++)
{
subItem
.
OptionList
.
Add
(
new
SubtypeItem
());
}
}
});
}
List
<
object
>
list
=
new
List
<
object
>();
foreach
(
var
item
in
typeList
)
...
...
@@ -402,6 +429,32 @@ namespace Edu.Module.User
TeacherAssessmentId
=
(
extModel
?.
Id
??
0
),
});
var
typeList
=
GetAssessmentTypeListModule
(
new
RB_Assessment_Type_Extend
()
{
});
var
maxOptionList
=
new
List
<
SubtypeItem
>();
int
maxLength
=
0
;
foreach
(
var
item
in
typeList
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
>
maxLength
)
{
maxOptionList
=
subItem
.
OptionList
;
maxLength
=
subItem
.
OptionList
.
Count
;
}
});
}
foreach
(
var
item
in
typeList
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
<
maxOptionList
.
Count
)
{
for
(
var
j
=
subItem
.
OptionList
.
Count
;
j
<
maxOptionList
.
Count
;
j
++)
{
subItem
.
OptionList
.
Add
(
new
SubtypeItem
());
}
}
});
}
List
<
object
>
list
=
new
List
<
object
>();
DateTime
?
S_JiaoWu_Time
=
null
;
DateTime
?
S_JiaoXue_Time
=
null
;
...
...
Edu.WebApi/Controllers/DataService/TeacherAssessmentController.cs
View file @
1651da2e
...
...
@@ -42,7 +42,77 @@ namespace Edu.WebApi.Controllers.DataService
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
result
=
teacherAssessmentModule
.
GetAssessmentTypeListModule
(
query
);
return
ApiResult
.
Success
(
data
:
result
);
List
<
object
>
list
=
new
List
<
object
>();
List
<
object
>
header
=
new
List
<
object
>();
header
.
Add
(
new
{
name
=
"TypeName"
,
label
=
"类别"
,
field
=
"TypeName"
,
align
=
"left"
});
header
.
Add
(
new
{
name
=
"SubtypeList"
,
label
=
"内容"
,
field
=
"SubtypeList"
,
align
=
"left"
});
if
(
result
!=
null
&&
result
.
Count
>
0
)
{
var
optionList
=
new
List
<
SubtypeItem
>();
int
maxLength
=
0
;
foreach
(
var
item
in
result
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
>
maxLength
)
{
optionList
=
subItem
.
OptionList
;
maxLength
=
subItem
.
OptionList
.
Count
;
}
});
}
//添加表头
foreach
(
var
hItem
in
optionList
)
{
header
.
Add
(
new
{
name
=
hItem
.
LevelTitle
,
label
=
hItem
.
LevelTitle
,
field
=
hItem
.
LevelTitle
,
align
=
"left"
});
}
foreach
(
var
item
in
result
)
{
item
.
SubtypeList
.
ForEach
(
subItem
=>
{
if
(
subItem
.
OptionList
.
Count
<
optionList
.
Count
)
{
for
(
var
j
=
subItem
.
OptionList
.
Count
;
j
<
optionList
.
Count
;
j
++)
{
subItem
.
OptionList
.
Add
(
new
SubtypeItem
());
}
}
});
}
header
.
Add
(
new
{
name
=
"Id"
,
label
=
"操作"
,
field
=
"Id"
});
}
return
ApiResult
.
Success
(
data
:
new
{
header
,
result
});
}
/// <summary>
...
...
@@ -195,7 +265,7 @@ namespace Edu.WebApi.Controllers.DataService
item
.
Other
,
TeacherSignDate
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
TeacherSignDate
),
item
.
AuditStatus
,
AuditStatusName
=
item
.
AuditStatus
.
ToName
(),
AuditStatusName
=
item
.
AuditStatus
.
ToName
(),
item
.
IsTeacherFinish
,
item
.
IsJiaoWuFinish
,
});
...
...
@@ -216,7 +286,7 @@ namespace Edu.WebApi.Controllers.DataService
int
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
);
int
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
);
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
obj
=
teacherAssessmentModule
.
GetTeacherAssessmentModule
(
Id
,
TeacherAccountId
,
YearStr
,
MonthStr
,
base
.
UserInfo
);
var
obj
=
teacherAssessmentModule
.
GetTeacherAssessmentModule
(
Id
,
TeacherAccountId
,
YearStr
,
MonthStr
,
base
.
UserInfo
);
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
@@ -227,7 +297,6 @@ namespace Edu.WebApi.Controllers.DataService
[
HttpPost
]
public
ApiResult
GetTeacherAssessmentDetail
()
{
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
teacherAssessmentModule
.
GetTeacherAssessmentDetailModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
...
...
@@ -377,7 +446,7 @@ namespace Edu.WebApi.Controllers.DataService
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
};
bool
flag
=
teacherAssessmentModule
.
SubmitTeacherAssessmentApprovalModule
(
base
.
UserInfo
,
model
.
Id
,
out
string
message
);
bool
flag
=
teacherAssessmentModule
.
SubmitTeacherAssessmentApprovalModule
(
base
.
UserInfo
,
model
.
Id
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
#
endregion
...
...
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