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
...
@@ -319,6 +319,33 @@ namespace Edu.Module.User
CheckType
=
CheckType
CheckType
=
CheckType
});
});
var
typeList
=
GetAssessmentTypeListModule
(
new
RB_Assessment_Type_Extend
()
{
});
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
>();
List
<
object
>
list
=
new
List
<
object
>();
foreach
(
var
item
in
typeList
)
foreach
(
var
item
in
typeList
)
...
@@ -402,6 +429,32 @@ namespace Edu.Module.User
...
@@ -402,6 +429,32 @@ namespace Edu.Module.User
TeacherAssessmentId
=
(
extModel
?.
Id
??
0
),
TeacherAssessmentId
=
(
extModel
?.
Id
??
0
),
});
});
var
typeList
=
GetAssessmentTypeListModule
(
new
RB_Assessment_Type_Extend
()
{
});
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
>();
List
<
object
>
list
=
new
List
<
object
>();
DateTime
?
S_JiaoWu_Time
=
null
;
DateTime
?
S_JiaoWu_Time
=
null
;
DateTime
?
S_JiaoXue_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
...
@@ -42,7 +42,77 @@ namespace Edu.WebApi.Controllers.DataService
};
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
result
=
teacherAssessmentModule
.
GetAssessmentTypeListModule
(
query
);
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>
/// <summary>
...
@@ -195,7 +265,7 @@ namespace Edu.WebApi.Controllers.DataService
...
@@ -195,7 +265,7 @@ namespace Edu.WebApi.Controllers.DataService
item
.
Other
,
item
.
Other
,
TeacherSignDate
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
TeacherSignDate
),
TeacherSignDate
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
TeacherSignDate
),
item
.
AuditStatus
,
item
.
AuditStatus
,
AuditStatusName
=
item
.
AuditStatus
.
ToName
(),
AuditStatusName
=
item
.
AuditStatus
.
ToName
(),
item
.
IsTeacherFinish
,
item
.
IsTeacherFinish
,
item
.
IsJiaoWuFinish
,
item
.
IsJiaoWuFinish
,
});
});
...
@@ -216,7 +286,7 @@ namespace Edu.WebApi.Controllers.DataService
...
@@ -216,7 +286,7 @@ namespace Edu.WebApi.Controllers.DataService
int
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
);
int
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
);
int
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
);
int
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
);
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
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
);
return
ApiResult
.
Success
(
data
:
obj
);
}
}
...
@@ -227,7 +297,6 @@ namespace Edu.WebApi.Controllers.DataService
...
@@ -227,7 +297,6 @@ namespace Edu.WebApi.Controllers.DataService
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetTeacherAssessmentDetail
()
public
ApiResult
GetTeacherAssessmentDetail
()
{
{
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
int
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
teacherAssessmentModule
.
GetTeacherAssessmentDetailModule
(
Id
);
var
model
=
teacherAssessmentModule
.
GetTeacherAssessmentDetailModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
return
ApiResult
.
Success
(
data
:
model
);
...
@@ -377,7 +446,7 @@ namespace Edu.WebApi.Controllers.DataService
...
@@ -377,7 +446,7 @@ namespace Edu.WebApi.Controllers.DataService
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
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
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
}
#
endregion
#
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