Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
practical_train
Commits
cd112ea9
Commit
cd112ea9
authored
Aug 03, 2026
by
wujipeng
Browse files
init
parents
Pipeline
#346
canceled with stages
Changes
327
Pipelines
2
Show whitespace changes
Inline
Side-by-side
practical-auth/src/main/resources/bootstrap.yml
0 → 100644
View file @
cd112ea9
spring
:
profiles
:
active
:
prd
practical-auth/src/main/resources/com/platform/auth/mapper/UserRoleMapper.xml
0 → 100644
View file @
cd112ea9
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.platform.auth.mapper.UserRoleMapper"
>
<select
id=
"queryUserRoleList"
resultType=
"com.platform.auth.model.vo.UserRoleVO"
>
select
ur.role_id roleId,
r.name roleName
from
sys_user_and_role ur
left join
role r
on
ur.role_id = r.id
where
ur.user_id = #{userId}
</select>
<select
id=
"queryExamType"
resultType=
"java.lang.String"
>
select IF((count(*) > 0), '考试', '演示') type
from exam_student
where student_id = #{id}
and exam_id in (SELECT
id
FROM
exam
WHERE
NOW() BETWEEN
STR_TO_DATE(TRIM(SUBSTRING_INDEX(exam_time, '-', 1)), '%Y.%m.%d %H:%i:%s')
AND
STR_TO_DATE(TRIM(SUBSTRING_INDEX(exam_time, '-', -1)), '%Y.%m.%d %H:%i:%s'));
</select>
<select
id=
"queryExamId"
resultType=
"java.lang.Integer"
>
select exam_id
from exam_student
where student_id = #{id}
and exam_id in (SELECT
id
FROM
exam
WHERE
NOW() BETWEEN
STR_TO_DATE(TRIM(SUBSTRING_INDEX(exam_time, '-', 1)), '%Y.%m.%d %H:%i:%s')
AND
STR_TO_DATE(TRIM(SUBSTRING_INDEX(exam_time, '-', -1)), '%Y.%m.%d %H:%i:%s'))
limit 1;
</select>
</mapper>
practical-business/pom.xml
0 → 100644
View file @
cd112ea9
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
practical-business
</artifactId>
<version>
1.0.0
</version>
<parent>
<groupId>
com.platform
</groupId>
<artifactId>
practical-train
</artifactId>
<version>
1.0.0
</version>
</parent>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
<version>
2.2.6.RELEASE
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId>
<version>
2.2.6.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
com.platform
</groupId>
<artifactId>
practical-business-api
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-websocket
</artifactId>
</dependency>
<!-- Apache POI for Excel handling -->
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
5.2.3
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
5.2.3
</version>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt-api
</artifactId>
<version>
0.11.5
</version>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt-impl
</artifactId>
<version>
0.11.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
<artifactId>
jjwt-jackson
</artifactId>
<version>
0.11.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-scratchpad
</artifactId>
<version>
5.2.3
</version>
</dependency>
<!-- logstash -->
<!-- <dependency>-->
<!-- <groupId>net.logstash.logback</groupId>-->
<!-- <artifactId>logstash-logback-encoder</artifactId>-->
<!-- <version>7.1.1</version>-->
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
8
</source>
<target>
8
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring.boot.version}
</version>
<configuration>
<mainClass>
com.platform.business.PracticalBusinessApplication
</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.sonarsource.scanner.maven
</groupId>
<artifactId>
sonar-maven-plugin
</artifactId>
<version>
3.9.1.2184
</version>
</plugin>
</plugins>
</build>
</project>
practical-business/src/main/java/com/platform/business/PracticalBusinessApplication.java
0 → 100644
View file @
cd112ea9
package
com.platform.business
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
@SpringBootApplication
@EnableScheduling
@ServletComponentScan
public
class
PracticalBusinessApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
PracticalBusinessApplication
.
class
,
args
);
}
}
practical-business/src/main/java/com/platform/business/config/BeanConfig.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.client.RestTemplate
;
@Configuration
public
class
BeanConfig
{
@Bean
public
RestTemplate
restTemplate
()
{
return
new
RestTemplate
();
}
}
\ No newline at end of file
practical-business/src/main/java/com/platform/business/config/WebSocketServerConfig.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.server.standard.ServerEndpointExporter
;
@Configuration
public
class
WebSocketServerConfig
{
@Bean
public
ServerEndpointExporter
serverEndpointExporter
()
{
return
new
ServerEndpointExporter
();
}
}
\ No newline at end of file
practical-business/src/main/java/com/platform/business/controller/CandidateController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.CandidateDTO
;
import
com.platform.business.service.CandidateService
;
import
com.platform.model.resp.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author : wujipeng
* @date : 2025/7/7 17:37
* @Version: 1.0
* @Desc : 描述信息
*/
@Api
(
tags
=
"考生控制层"
)
@RestController
@RequestMapping
(
"/candidate"
)
public
class
CandidateController
{
@Resource
private
CandidateService
candidateService
;
@ApiOperation
(
"新增编辑"
)
@PostMapping
(
"/saveOrUpdate"
)
public
Result
<
Boolean
>
add
(
@RequestBody
CandidateDTO
candidateDTO
)
{
return
Result
.
data
(
candidateService
.
saveOrUpdate
(
candidateDTO
));
}
}
practical-business/src/main/java/com/platform/business/controller/CertController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.StudentLevelCertDTO
;
import
com.platform.business.service.StudentLevelCertService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/cert"
)
public
class
CertController
extends
BaseController
{
@Resource
private
StudentLevelCertService
studentLevelCertService
;
@PostMapping
(
"/page"
)
public
TableDataInfo
page
(
@RequestBody
StudentLevelCertDTO
studentLevelCertDTO
)
{
startPage
(
studentLevelCertDTO
.
getPageNum
(),
studentLevelCertDTO
.
getPageSize
());
return
getDataTable
(
studentLevelCertService
.
queryList
(
studentLevelCertDTO
));
}
@ApiOperation
(
"导入excel"
)
@PostMapping
(
"/import/excel"
)
public
Result
<
Boolean
>
importExcel
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
)
{
return
studentLevelCertService
.
importExcel
(
file
);
}
@ApiOperation
(
"详情"
)
@GetMapping
(
"/detail/{id}"
)
public
Result
detail
(
@PathVariable
String
id
)
{
return
Result
.
data
(
studentLevelCertService
.
detail
(
id
));
}
@ApiOperation
(
"编辑"
)
@PostMapping
(
"/update"
)
public
Result
update
(
@RequestBody
StudentLevelCertDTO
studentLevelCertDTO
)
{
return
Result
.
data
(
studentLevelCertService
.
updateById
(
studentLevelCertDTO
));
}
}
practical-business/src/main/java/com/platform/business/controller/ClassController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.ClassDTO
;
import
com.platform.business.service.ClassService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/class"
)
public
class
ClassController
extends
BaseController
{
@Resource
private
ClassService
classService
;
@PostMapping
(
"/page"
)
public
TableDataInfo
page
(
@RequestBody
ClassDTO
classDTO
)
{
startPage
(
classDTO
.
getPageNum
(),
classDTO
.
getPageSize
());
return
getDataTable
(
classService
.
queryList
(
classDTO
));
}
@PostMapping
(
"/saveOrUpdate"
)
public
Result
<
Boolean
>
saveOrUpdate
(
@RequestBody
ClassDTO
classDTO
)
{
return
Result
.
data
(
classService
.
saveClass
(
classDTO
));
}
@GetMapping
(
"/detail/{id}"
)
public
Result
detail
(
@PathVariable
String
id
)
{
return
Result
.
data
(
classService
.
detail
(
id
));
}
@DeleteMapping
(
"/deleteStu/{studentId}"
)
public
Result
deleteStu
(
@PathVariable
String
studentId
)
{
return
toAjax
(
classService
.
deleteStu
(
studentId
));
}
@ApiOperation
(
"课程安排表"
)
@PostMapping
(
"/schedule"
)
public
Result
schedule
(
@RequestBody
ClassDTO
classDTO
)
{
return
Result
.
data
(
classService
.
schedule
(
classDTO
));
}
@ApiOperation
(
"课程安排表-教师端"
)
@PostMapping
(
"/schedule/teacher"
)
public
Result
scheduleTeacher
(
@RequestBody
ClassDTO
classDTO
)
{
return
Result
.
data
(
classService
.
scheduleTeacher
(
classDTO
));
}
@ApiOperation
(
"班级列表"
)
@GetMapping
(
"/list"
)
public
Result
list
()
{
return
Result
.
data
(
classService
.
list
());
}
}
practical-business/src/main/java/com/platform/business/controller/ClassSubjectController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.ClassSubjectDTO
;
import
com.platform.business.model.vo.SysTeacherCountVO
;
import
com.platform.business.service.ClassSubjectService
;
import
com.platform.business.utils.JwtTokenUtil
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
@RestController
@RequestMapping
(
"/class/subject"
)
public
class
ClassSubjectController
extends
BaseController
{
@Resource
private
ClassSubjectService
classSubjectService
;
@Resource
private
JwtTokenUtil
jwtTokenUtil
;
@PostMapping
(
"/saveOrUpdate"
)
public
Result
save
(
@RequestBody
ClassSubjectDTO
classSubjectDTO
)
{
return
Result
.
data
(
classSubjectService
.
saveOrUpdateSubject
(
classSubjectDTO
));
}
@PostMapping
(
"/detail"
)
public
Result
detail
(
@RequestBody
ClassSubjectDTO
classSubjectDTO
)
{
return
Result
.
data
(
classSubjectService
.
detail
(
classSubjectDTO
));
}
@PutMapping
(
"/update"
)
public
Result
update
(
@RequestBody
ClassSubjectDTO
classSubjectDTO
)
{
return
toAjax
(
classSubjectService
.
updateSubject
(
classSubjectDTO
));
}
@ApiOperation
(
"导出word"
)
@PostMapping
(
"/export"
)
public
void
export
(
@RequestBody
ClassSubjectDTO
classSubjectDTO
,
HttpServletResponse
response
)
{
try
{
classSubjectService
.
export
(
classSubjectDTO
,
response
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
@ApiOperation
(
"统计"
)
@GetMapping
(
"/count"
)
public
Result
<
SysTeacherCountVO
>
count
(
HttpServletRequest
httpServletRequest
)
{
String
token
=
httpServletRequest
.
getHeader
(
"Authorization"
);
String
userName
=
jwtTokenUtil
.
getUsernameFromToken
(
token
);
return
Result
.
data
(
classSubjectService
.
queryByTeacherUserName
(
userName
));
}
}
practical-business/src/main/java/com/platform/business/controller/ExamController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.ExamDTO
;
import
com.platform.business.model.dto.TheoreticalPaperStudentDetailDTO
;
import
com.platform.business.model.vo.ExamStudentVO
;
import
com.platform.business.model.vo.ExamVO
;
import
com.platform.business.model.vo.TheoreticalPaperStudentDetailVO
;
import
com.platform.business.service.ExamService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/exam"
)
public
class
ExamController
extends
BaseController
{
@Resource
private
ExamService
examService
;
@PostMapping
(
"/page"
)
public
TableDataInfo
page
(
@RequestBody
ExamDTO
examDTO
)
{
startPage
(
examDTO
.
getPageNum
(),
examDTO
.
getPageSize
());
return
getDataTable
(
examService
.
queryList
(
examDTO
));
}
@PostMapping
(
"/save"
)
public
Result
save
(
@RequestBody
ExamDTO
examDTO
)
{
return
toAjax
(
examService
.
saveOrUpdateExam
(
examDTO
));
}
@GetMapping
(
"/detail/{id}"
)
public
Result
detail
(
@PathVariable
int
id
)
{
return
Result
.
data
(
examService
.
detail
(
id
));
}
@PostMapping
(
"/studentGrades"
)
public
TableDataInfo
studentGrades
(
@RequestBody
ExamDTO
examDTO
)
{
startPage
(
examDTO
.
getPageNum
(),
examDTO
.
getPageSize
());
return
getDataTable
(
examService
.
studentGrades
(
examDTO
));
}
@PostMapping
(
"/classExam"
)
public
TableDataInfo
classExam
(
@RequestBody
ExamDTO
examDTO
)
{
startPage
(
examDTO
.
getPageNum
(),
examDTO
.
getPageSize
());
return
getDataTable
(
examService
.
classExam
(
examDTO
));
}
@ApiOperation
(
value
=
"班级考试成绩"
)
@PostMapping
(
"/classExamScore"
)
public
TableDataInfo
classExamScore
(
@RequestBody
ExamDTO
examDTO
)
{
startPage
(
examDTO
.
getPageNum
(),
examDTO
.
getPageSize
());
return
getDataTable
(
examService
.
classExamScore
(
examDTO
));
}
@ApiOperation
(
value
=
"未完成考试列表"
)
@GetMapping
(
"/unfinished/{id}"
)
public
Result
<
List
<
ExamVO
>>
unfinished
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
Result
.
data
(
examService
.
unfinished
(
id
));
}
@ApiOperation
(
value
=
"开始考试"
)
@PostMapping
(
"/start"
)
public
Result
<
Integer
>
startExam
(
@RequestBody
ExamDTO
examDTO
)
{
return
examService
.
startExam
(
examDTO
);
}
@ApiOperation
(
value
=
"试卷总览"
)
@GetMapping
(
"/paper/overview/{id}"
)
public
Result
<
List
<
TheoreticalPaperStudentDetailVO
>>
paperOverview
(
@PathVariable
(
name
=
"id"
)
Integer
id
)
{
return
Result
.
data
(
examService
.
paperOverview
(
id
));
}
@ApiOperation
(
value
=
"考卷详情"
)
@GetMapping
(
"/paper/detail/{id}"
)
public
Result
<
ExamStudentVO
>
paperDetail
(
@PathVariable
(
name
=
"id"
)
Integer
id
)
{
return
Result
.
data
(
examService
.
paperDetail
(
id
));
}
@ApiModelProperty
(
value
=
"考题详情"
)
@GetMapping
(
"/question/detail/{id}"
)
public
Result
<
TheoreticalPaperStudentDetailVO
>
questionDetail
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
Result
.
data
(
examService
.
questionDetail
(
id
));
}
@ApiOperation
(
value
=
"考题编辑"
)
@PutMapping
(
"/question/edit"
)
public
Result
<
Boolean
>
questionEdit
(
@RequestBody
TheoreticalPaperStudentDetailDTO
theoreticalPaperStudentDetailDTO
)
{
return
Result
.
data
(
examService
.
questionEdit
(
theoreticalPaperStudentDetailDTO
));
}
@ApiOperation
(
value
=
"交卷校验"
)
@GetMapping
(
"/submit/check/{id}"
)
public
Result
<
Map
<
String
,
String
>>
submitCheck
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
Result
.
data
(
examService
.
submitCheck
(
id
));
}
@ApiOperation
(
value
=
"交卷"
)
@GetMapping
(
"/submit/{id}"
)
public
Result
<
Boolean
>
submit
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
examService
.
submit
(
id
);
}
@ApiModelProperty
(
value
=
"成绩-考题详情"
)
@GetMapping
(
"/grades/question/detail/{id}"
)
public
Result
<
TheoreticalPaperStudentDetailVO
>
gradesQuestionDetail
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
Result
.
data
(
examService
.
gradesQuestionDetail
(
id
));
}
@ApiOperation
(
value
=
"成绩详情"
)
@GetMapping
(
"/grades/detail/{id}"
)
public
Result
<
ExamStudentVO
>
gradesDetail
(
@PathVariable
(
name
=
"id"
)
String
id
)
{
return
Result
.
data
(
examService
.
gradesDetail
(
id
));
}
}
practical-business/src/main/java/com/platform/business/controller/ExamDetailController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.ExamDetailDTO
;
import
com.platform.business.model.vo.ExamScoreDetailVO
;
import
com.platform.business.service.ExamDetailService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/score"
)
public
class
ExamDetailController
extends
BaseController
{
@Resource
private
ExamDetailService
examDetailService
;
@ApiOperation
(
value
=
"学生成绩详情"
)
@PostMapping
(
"/detail"
)
public
Result
<
ExamScoreDetailVO
>
queryDetail
(
@RequestBody
ExamDetailDTO
examDetailDTO
){
return
Result
.
data
(
examDetailService
.
queryQuestionList
(
examDetailDTO
));
}
}
practical-business/src/main/java/com/platform/business/controller/ExamStudentController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.ExamStudentDTO
;
import
com.platform.business.model.vo.ExamStudentVO
;
import
com.platform.business.service.ExamStudentService
;
import
com.platform.business.utils.JwtTokenUtil
;
import
com.platform.controller.BaseController
;
import
com.platform.page.TableDataInfo
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
@RestController
@RequestMapping
(
"/exam/student"
)
public
class
ExamStudentController
extends
BaseController
{
@Resource
private
ExamStudentService
examStudentService
;
@Resource
private
JwtTokenUtil
jwtTokenUtil
;
@PostMapping
(
"/queryByStudentId"
)
public
TableDataInfo
queryByStudentId
(
@RequestBody
ExamStudentDTO
examStudentDTO
,
HttpServletRequest
httpServletRequest
)
{
String
token
=
httpServletRequest
.
getHeader
(
"Authorization"
);
String
userName
=
jwtTokenUtil
.
getUsernameFromToken
(
token
);
startPage
(
examStudentDTO
.
getPageNum
(),
examStudentDTO
.
getPageSize
());
return
getDataTable
(
examStudentService
.
queryByStudentId
(
userName
));
}
}
practical-business/src/main/java/com/platform/business/controller/ExaminerController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author : wujipeng
* @date : 2025/7/7 17:38
* @Version: 1.0
* @Desc : 描述信息
*/
@Api
(
tags
=
"考官控制层"
)
@RestController
@RequestMapping
(
"/candidate"
)
public
class
ExaminerController
{
}
practical-business/src/main/java/com/platform/business/controller/ExportExamController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.service.ExportExamService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @author : wujipeng
* @date : 2025/10/23 15:10
* @Version: 1.0
* @Desc : 描述信息
*/
@Slf4j
@RestController
@RequestMapping
(
"/export"
)
public
class
ExportExamController
{
@Resource
private
ExportExamService
exportExamService
;
@GetMapping
(
"/exam"
)
public
void
exportFour
(
HttpServletResponse
response
,
@RequestParam
(
name
=
"name"
)
String
name
)
{
exportExamService
.
exportFour
(
response
,
name
);
}
}
\ No newline at end of file
practical-business/src/main/java/com/platform/business/controller/FileController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.entity.BsFileEntity
;
import
com.platform.business.service.BsFileService
;
import
com.platform.model.resp.Result
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/file"
)
public
class
FileController
{
@Resource
private
BsFileService
bsFileService
;
@PostMapping
(
"/upload"
)
public
Result
<
BsFileEntity
>
upload
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
return
Result
.
data
(
bsFileService
.
uploadFile
(
file
));
}
@GetMapping
(
"/download/{id}"
)
public
void
download
(
@PathVariable
Integer
id
)
{
bsFileService
.
downloadFile
(
id
);
}
}
practical-business/src/main/java/com/platform/business/controller/HomeController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.vo.HomeVO
;
import
com.platform.business.service.HomeService
;
import
com.platform.model.resp.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author : wujipeng
* @date : 2025/9/4 13:41
* @Version: 1.0
* @Desc : 描述信息
*/
@Api
(
tags
=
"首页控制层"
)
@RestController
@RequestMapping
(
"/home"
)
public
class
HomeController
{
@Resource
private
HomeService
homeService
;
@ApiOperation
(
"近期培训计划"
)
@GetMapping
(
"/recent/train/Plan"
)
private
Result
<
List
<
HomeVO
>>
recentTrainingPlan
()
{
return
Result
.
data
(
homeService
.
recentTrainingPlan
());
}
@ApiOperation
(
"年度计划完成情况"
)
@GetMapping
(
"/year/plan/complete"
)
private
Result
<
List
<
HomeVO
>>
yearPlanComplete
()
{
return
Result
.
data
(
homeService
.
yearPlanComplete
());
}
@ApiOperation
(
"当前课程情况"
)
@GetMapping
(
"/current/course/situation"
)
private
Result
<
List
<
HomeVO
>>
currentCourseSituation
()
{
return
Result
.
data
(
homeService
.
currentCourseSituation
());
}
@ApiOperation
(
"今天课程"
)
@GetMapping
(
"/today/course"
)
private
Result
<
List
<
HomeVO
>>
todayCourse
()
{
return
Result
.
data
(
homeService
.
todayCourse
());
}
}
practical-business/src/main/java/com/platform/business/controller/PaperRuleController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author : wujipeng
* @date : 2025/10/30 10:33
* @Version: 1.0
* @Desc : 描述信息
*/
@RestController
@RequestMapping
(
"/paper/rule"
)
public
class
PaperRuleController
{
}
practical-business/src/main/java/com/platform/business/controller/QuestionBankController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.QuestionBankDTO
;
import
com.platform.business.model.entity.QuestionThirdEntity
;
import
com.platform.business.service.QuestionBankService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/question/bank"
)
public
class
QuestionBankController
extends
BaseController
{
@Resource
private
QuestionBankService
questionBankService
;
@PostMapping
(
"/page"
)
public
TableDataInfo
page
(
@RequestBody
QuestionBankDTO
questionBankDTO
)
{
startPage
(
questionBankDTO
.
getPageNum
(),
questionBankDTO
.
getPageSize
());
return
getDataTable
(
questionBankService
.
queryList
(
questionBankDTO
));
}
@GetMapping
(
"/detail/{id}"
)
public
Result
detail
(
@PathVariable
int
id
)
{
return
Result
.
data
(
questionBankService
.
detail
(
id
));
}
@PutMapping
(
"/updateScore"
)
public
Result
updateScore
(
@RequestBody
QuestionThirdEntity
questionThirdEntity
)
{
return
toAjax
(
questionBankService
.
updateThirdScore
(
questionThirdEntity
));
}
@ApiOperation
(
"导入excel"
)
@GetMapping
(
"/import/excel"
)
public
Result
<
Boolean
>
importExcel
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
)
{
return
questionBankService
.
importExcel
(
file
);
}
}
practical-business/src/main/java/com/platform/business/controller/SysLevelController.java
0 → 100644
View file @
cd112ea9
package
com.platform.business.controller
;
import
com.platform.business.model.dto.SysLevelDTO
;
import
com.platform.business.service.SysLevelService
;
import
com.platform.controller.BaseController
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
@RestController
@RequestMapping
(
"/level"
)
public
class
SysLevelController
extends
BaseController
{
@Resource
private
SysLevelService
sysLevelService
;
@PostMapping
(
"/page"
)
public
TableDataInfo
page
(
@RequestBody
SysLevelDTO
sysLevelDTO
)
{
startPage
(
sysLevelDTO
.
getPageNum
(),
sysLevelDTO
.
getPageSize
());
return
getDataTable
(
sysLevelService
.
queryList
(
sysLevelDTO
));
}
@PostMapping
(
"saveOrUpdate"
)
public
Result
saveOrUpdate
(
@RequestBody
SysLevelDTO
sysLevelDTO
)
{
return
toAjax
(
sysLevelService
.
saveOrUpdate
(
sysLevelDTO
));
}
@GetMapping
(
"/detail/{id}"
)
public
Result
detail
(
@PathVariable
int
id
)
{
return
Result
.
data
(
sysLevelService
.
getById
(
id
));
}
@DeleteMapping
(
"/{id}"
)
public
Result
delete
(
@PathVariable
int
id
)
{
return
Result
.
data
(
sysLevelService
.
removeById
(
id
));
}
}
Prev
1
…
3
4
5
6
7
8
9
10
11
…
17
Next
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