@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List ;
import java.util.List ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.util.StringUtils ;
import org.springframework.web.bind.annotation.CrossOrigin ;
import org.springframework.web.bind.annotation.CrossOrigin ;
import org.springframework.web.bind.annotation.GetMapping ;
import org.springframework.web.bind.annotation.GetMapping ;
import org.springframework.web.bind.annotation.PostMapping ;
import org.springframework.web.bind.annotation.PostMapping ;
@ -38,8 +39,9 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryAssesmentcondition" )
@GetMapping ( "/queryAssesmentcondition" )
Response queryAssementCondition ( Integer staffId , Integer courseId , String className ,
Response queryAssementCondition ( @RequestParam Integer staffId , @RequestParam Integer courseId , @RequestParam String className ,
Integer assesmentState , Integer releaseType , String creationTime , String endTime , Integer month ,
@RequestParam Integer assesmentState , @RequestParam Integer releaseType ,
@RequestParam String creationTime , @RequestParam String endTime , @RequestParam Integer month ,
@RequestParam ( defaultValue = "0" ) Integer pageSize ,
@RequestParam ( defaultValue = "0" ) Integer pageSize ,
@RequestParam ( defaultValue = "0" ) Integer pageNo ) {
@RequestParam ( defaultValue = "0" ) Integer pageNo ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
@ -89,7 +91,16 @@ public class AssesmentController {
@PostMapping ( "/addAssesment" )
@PostMapping ( "/addAssesment" )
Response addAssesment ( @RequestBody AssesmentStudentVo vo ) {
Response addAssesment ( @RequestBody AssesmentStudentVo vo ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
HashMap < String , Object > ret = service . addAssesment ( vo ) ;
Assesment assesment = vo . getAssesment ( ) ;
List < Integer > studentIds = vo . getStudentIds ( ) ;
if ( StringUtils . isEmpty ( assesment ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( studentIds . isEmpty ( ) & & studentIds . size ( ) < = 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "学生信息为空" ) ;
} else {
HashMap < String , Object > ret = service . addAssesment ( assesment , studentIds ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
@ -98,6 +109,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -110,6 +122,10 @@ public class AssesmentController {
@GetMapping ( "/queryStudentisAssess" )
@GetMapping ( "/queryStudentisAssess" )
Response queryStudentisAssess ( @RequestParam List < Integer > studentIds ) {
Response queryStudentisAssess ( @RequestParam List < Integer > studentIds ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( studentIds . isEmpty ( ) & & studentIds . size ( ) < = 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "学生信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryStudentisAssess ( studentIds ) ;
HashMap < String , Object > ret = service . queryStudentisAssess ( studentIds ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -119,6 +135,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -128,8 +145,12 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryGetById" )
@GetMapping ( "/queryGetById" )
Response getByAssesmentId ( Integer id ) {
Response getByAssesmentId ( @RequestParam Integer id ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( id ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "项目信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryGetById ( id ) ;
HashMap < String , Object > ret = service . queryGetById ( id ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -139,6 +160,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -152,6 +174,13 @@ public class AssesmentController {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
Assesment assesment = vo . getAssesment ( ) ;
Assesment assesment = vo . getAssesment ( ) ;
List < Integer > studentIds = vo . getStudentIds ( ) ;
List < Integer > studentIds = vo . getStudentIds ( ) ;
if ( StringUtils . isEmpty ( assesment ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( studentIds . isEmpty ( ) & & studentIds . size ( ) < = 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "学生信息为空" ) ;
} else {
HashMap < String , Object > ret = service . updateAssesment ( assesment , studentIds ) ;
HashMap < String , Object > ret = service . updateAssesment ( assesment , studentIds ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -161,6 +190,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -170,8 +200,12 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/assessmentJudgment" )
@GetMapping ( "/assessmentJudgment" )
Response updateState ( Integer assesmentId ) {
Response updateState ( @RequestParam Integer assesmentId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else {
HashMap < String , Object > ret = service . assessmentJudgment ( assesmentId ) ;
HashMap < String , Object > ret = service . assessmentJudgment ( assesmentId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -181,18 +215,21 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
/ * *
/ * *
* 修改考核状态
* 修改考核状态
* @param id
* @param state
* @return
* @return
* /
* /
@PostMapping ( "/updateState" )
@PostMapping ( "/updateState" )
Response updateState ( @RequestBody Assesment assesment ) {
Response updateState ( @RequestBody Assesment assesment ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesment ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else {
HashMap < String , Object > ret = service . updateState ( assesment ) ;
HashMap < String , Object > ret = service . updateState ( assesment ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -202,6 +239,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -212,8 +250,12 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/getExperimentalClass" )
@GetMapping ( "/getExperimentalClass" )
Response getExperimentalClass ( Integer staffId ) {
Response getExperimentalClass ( @RequestParam Integer staffId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( staffId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "教师信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryCretionTime ( staffId ) ;
HashMap < String , Object > ret = service . queryCretionTime ( staffId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -223,6 +265,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -233,8 +276,15 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/getCreationTime" )
@GetMapping ( "/getCreationTime" )
Response getCreationTime ( String creationTime , Integer staffId ) {
Response getCreationTime ( @RequestParam String creationTime , @RequestParam Integer staffId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( staffId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "教师信息为空" ) ;
} else if ( StringUtils . isEmpty ( creationTime ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "实验班级创建时间信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryCretionTime ( creationTime , staffId ) ;
HashMap < String , Object > ret = service . queryCretionTime ( creationTime , staffId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -244,6 +294,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -254,8 +305,12 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryAssesmet" )
@GetMapping ( "/queryAssesmet" )
Response queryAssesmet ( Integer assesmentId ) {
Response queryAssesmet ( @RequestParam Integer assesmentId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryAssesment ( assesmentId ) ;
HashMap < String , Object > ret = service . queryAssesment ( assesmentId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -265,6 +320,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -277,6 +333,10 @@ public class AssesmentController {
@GetMapping ( "/getByclass" )
@GetMapping ( "/getByclass" )
Response getByclass ( Integer assesmentId ) {
Response getByclass ( Integer assesmentId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else {
HashMap < String , Object > ret = service . getByclass ( assesmentId ) ;
HashMap < String , Object > ret = service . getByclass ( assesmentId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -286,6 +346,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -299,8 +360,18 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryClassScore" )
@GetMapping ( "/queryClassScore" )
Response queryClassScore ( Integer assesmentId , Integer experimentalClassId , @RequestParam List < Integer > classId ) {
Response queryClassScore ( @RequestParam Integer assesmentId , @RequestParam Integer experimentalClassId , @RequestParam List < Integer > classId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( StringUtils . isEmpty ( experimentalClassId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "实验班级信息为空" ) ;
} else if ( classId . isEmpty ( ) & & classId . size ( ) < 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "行政信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryScore ( assesmentId , experimentalClassId , classId ) ;
HashMap < String , Object > ret = service . queryScore ( assesmentId , experimentalClassId , classId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -310,6 +381,8 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -322,9 +395,19 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryHistogram" )
@GetMapping ( "/queryHistogram" )
Response queryHistogram ( Integer assesmentId , Integer experimentalClassId ,
Response queryHistogram ( @RequestParam Integer assesmentId , @RequestParam Integer experimentalClassId ,
@RequestParam List < Integer > classId ) {
@RequestParam List < Integer > classId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( StringUtils . isEmpty ( experimentalClassId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "实验班级信息为空" ) ;
} else if ( classId . isEmpty ( ) & & classId . size ( ) < 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "行政信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryHistogram ( assesmentId , experimentalClassId , classId ) ;
HashMap < String , Object > ret = service . queryHistogram ( assesmentId , experimentalClassId , classId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -334,6 +417,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -346,9 +430,19 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/getLinechart" )
@GetMapping ( "/getLinechart" )
Response getLinechart ( Integer assesmentId , Integer experimentalClassId ,
Response getLinechart ( @RequestParam Integer assesmentId , @RequestParam Integer experimentalClassId ,
@RequestParam List < Integer > classId ) {
@RequestParam List < Integer > classId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( StringUtils . isEmpty ( experimentalClassId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "实验班级信息为空" ) ;
} else if ( classId . isEmpty ( ) & & classId . size ( ) < 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "行政信息为空" ) ;
} else {
HashMap < String , Object > ret = service . getLinechart ( assesmentId , experimentalClassId , classId ) ;
HashMap < String , Object > ret = service . getLinechart ( assesmentId , experimentalClassId , classId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -358,6 +452,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -370,9 +465,19 @@ public class AssesmentController {
* @return
* @return
* /
* /
@GetMapping ( "/queryAssesmentScore" )
@GetMapping ( "/queryAssesmentScore" )
Response queryAssesmentScore ( Integer assesmentId , Integer experimentalClassId ,
Response queryAssesmentScore ( @RequestParam Integer assesmentId , @RequestParam Integer experimentalClassId ,
@RequestParam List < Integer > classId ) {
@RequestParam List < Integer > classId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( assesmentId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "考核信息为空" ) ;
} else if ( StringUtils . isEmpty ( experimentalClassId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "实验班级信息为空" ) ;
} else if ( classId . isEmpty ( ) & & classId . size ( ) < 0 ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "行政信息为空" ) ;
} else {
HashMap < String , Object > ret = service . queryAssesmentScore ( assesmentId , experimentalClassId , classId ) ;
HashMap < String , Object > ret = service . queryAssesmentScore ( assesmentId , experimentalClassId , classId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -382,6 +487,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
@ -394,6 +500,10 @@ public class AssesmentController {
@GetMapping ( "/releaseAssesment" )
@GetMapping ( "/releaseAssesment" )
Response releaseAssesment ( @RequestParam Integer courseId ) {
Response releaseAssesment ( @RequestParam Integer courseId ) {
Response resp = new Response ( ) ;
Response resp = new Response ( ) ;
if ( StringUtils . isEmpty ( courseId ) ) {
resp . setStatus ( 300 ) ;
resp . setErrmessage ( "课程信息为空" ) ;
} else {
HashMap < String , Object > ret = service . releaseAssesment ( courseId ) ;
HashMap < String , Object > ret = service . releaseAssesment ( courseId ) ;
int status = ( int ) ret . get ( "retcode" ) ;
int status = ( int ) ret . get ( "retcode" ) ;
if ( 200 = = status ) {
if ( 200 = = status ) {
@ -403,6 +513,7 @@ public class AssesmentController {
resp . setStatus ( status ) ;
resp . setStatus ( status ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
resp . setErrmessage ( ret . get ( "retvalue" ) . toString ( ) ) ;
}
}
}
return resp ;
return resp ;
}
}
}
}