Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f548eb7fa1
|
|
@ -59,8 +59,8 @@ spring:
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 30MB
|
max-file-size: 300MB
|
||||||
max-request-size: 30MB
|
max-request-size: 300MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,23 @@
|
||||||
// 初始化表格参数
|
// 初始化表格参数
|
||||||
init: function(options) {
|
init: function(options) {
|
||||||
$.table._option = options;
|
$.table._option = options;
|
||||||
$.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
|
|
||||||
|
//和search查询时条件保持一直
|
||||||
|
var currentId = $.common.isEmpty(options.formId) ? $('form').attr('id') : options.formId;
|
||||||
|
$.table._params = function(params) {
|
||||||
|
var search = {};
|
||||||
|
$.each($("#" + currentId).serializeArray(), function(i, field) {
|
||||||
|
search[field.name] = field.value;
|
||||||
|
});
|
||||||
|
search.pageSize = params.limit;
|
||||||
|
search.pageNum = params.offset / params.limit + 1;
|
||||||
|
search.searchValue = params.search;
|
||||||
|
search.orderByColumn = params.sort;
|
||||||
|
search.isAsc = params.order;
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
|
||||||
_sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
|
_sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
|
||||||
_sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName;
|
_sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName;
|
||||||
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
||||||
|
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
|
||||||
<component name="FacetManager">
|
|
||||||
<facet type="Spring" name="Spring">
|
|
||||||
<configuration />
|
|
||||||
</facet>
|
|
||||||
</component>
|
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
|
||||||
<output url="file://$MODULE_DIR$/target/classes" />
|
|
||||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="module" module-name="ruoyi-framework" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.34" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.34" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.12.Final" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.4.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.1.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.4.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.11" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.theborakompanioni:thymeleaf-extras-shiro:2.0.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.19" level="project" />
|
|
||||||
<orderEntry type="module" module-name="ruoyi-common" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.2.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.4.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.oshi:oshi-core:3.9.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.5.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: net.java.dev.jna:jna-platform:4.5.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.9.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
|
|
@ -20,7 +20,7 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
@Api("练习")
|
@Api("练习")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1/practice")
|
@RequestMapping("/api")
|
||||||
public class ApiPracticeController extends BaseController {
|
public class ApiPracticeController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -36,44 +36,43 @@ public class ApiPracticeController extends BaseController {
|
||||||
private IExamUserErrorQuestionService examUserErrorQuestionService;
|
private IExamUserErrorQuestionService examUserErrorQuestionService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/v1/practice/list")
|
||||||
public AjaxResult list(ExamPractice examPractice) {
|
public AjaxResult list(ExamPractice examPractice) {
|
||||||
|
|
||||||
List<ExamPractice> list = examPracticeService.selectListFromWeb(examPractice);
|
List<ExamPractice> list = examPracticeService.selectListFromWeb(examPractice);
|
||||||
AjaxResult success = success("查询成功");
|
AjaxResult success = success("查询成功");
|
||||||
success.put("data",list);
|
success.put("data", list);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询练习具体的问题列表
|
* 查询练习具体的问题列表
|
||||||
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/info")
|
@GetMapping("/v1/practice/info")
|
||||||
public AjaxResult queryOne(@RequestParam Map<String,Object> map) {
|
public AjaxResult queryOne(@RequestParam Map<String, Object> map) {
|
||||||
List<ExamQuestionVO> result = examQuestionService.selectQuestionListByPracticeId(map);
|
List<ExamQuestionVO> result = examQuestionService.selectQuestionListByPracticeId(map);
|
||||||
if(map.containsKey("disorder")&&map.get("disorder").toString().equals("1")){
|
if (map.containsKey("disorder") && map.get("disorder").toString().equals("1")) {
|
||||||
Collections.shuffle(result);
|
Collections.shuffle(result);
|
||||||
}
|
}
|
||||||
AjaxResult success = success("查询成功");
|
AjaxResult success = success("查询成功");
|
||||||
success.put("data",result);
|
success.put("data", result);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回答问题
|
* 保存错题记录
|
||||||
* @param answers
|
*
|
||||||
|
* @param questionId
|
||||||
* @return
|
* @return
|
||||||
|
* @description 练习时答错题就保存到错题记录中
|
||||||
|
* 传入问题id
|
||||||
*/
|
*/
|
||||||
@PostMapping("/answer")
|
@PostMapping("/v1/practice/answer")
|
||||||
public AjaxResult answer(@RequestBody List<Map<String,Object>> answers) {
|
public AjaxResult answer(String questionId) {
|
||||||
int error = 0;
|
|
||||||
for (Map<String, Object> answer : answers) {
|
|
||||||
String questionId = answer.get("questionId").toString();
|
|
||||||
String userAnswer = answer.get("userAnswer").toString();
|
|
||||||
ExamQuestion examQuestion = examQuestionService.selectById(questionId);
|
|
||||||
if(!examQuestion.getAnswer().equals(userAnswer)){
|
|
||||||
ExamUserErrorQuestion examUserErrorQuestion = new ExamUserErrorQuestion();
|
ExamUserErrorQuestion examUserErrorQuestion = new ExamUserErrorQuestion();
|
||||||
examUserErrorQuestion.setExamQuestionId(Integer.parseInt(questionId));
|
examUserErrorQuestion.setExamQuestionId(Integer.parseInt(questionId));
|
||||||
examUserErrorQuestion.setVipUserId(Integer.parseInt(ShiroUtils.getUserId().toString()));
|
examUserErrorQuestion.setVipUserId(Integer.parseInt(ShiroUtils.getUserId().toString()));
|
||||||
|
|
@ -81,37 +80,37 @@ public class ApiPracticeController extends BaseController {
|
||||||
examUserErrorQuestion.setCreateDate(new Date());
|
examUserErrorQuestion.setCreateDate(new Date());
|
||||||
examUserErrorQuestion.setDelFlag("0");
|
examUserErrorQuestion.setDelFlag("0");
|
||||||
examUserErrorQuestionService.insert(examUserErrorQuestion);
|
examUserErrorQuestionService.insert(examUserErrorQuestion);
|
||||||
error++;
|
|
||||||
}
|
AjaxResult success = success("插入错题本成功");
|
||||||
}
|
|
||||||
AjaxResult success = success(error+"题进入错题本");
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询错题本列表
|
* 查询我的错题列表
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/queryerror")
|
@GetMapping("/v1/practice/{userId}/error")
|
||||||
public AjaxResult answer() {
|
public AjaxResult queryError(@PathVariable("userId") String userId) {
|
||||||
ExamUserErrorQuestion examUserErrorQuestion = new ExamUserErrorQuestion();
|
ExamUserErrorQuestion examUserErrorQuestion = new ExamUserErrorQuestion();
|
||||||
examUserErrorQuestion.setVipUserId(Integer.parseInt(ShiroUtils.getUserId().toString()));
|
examUserErrorQuestion.setVipUserId(Integer.parseInt(ShiroUtils.getUserId().toString()));
|
||||||
List<ExamUserErrorQuestionVO> list = examUserErrorQuestionService.selectExamUserErrorQuestionDetailPage(examUserErrorQuestion);
|
List<ExamUserErrorQuestionVO> list = examUserErrorQuestionService.selectExamUserErrorQuestionDetailPage(examUserErrorQuestion);
|
||||||
AjaxResult success = success("查询成功");
|
AjaxResult success = success("查询成功");
|
||||||
success.put("data",list);
|
success.put("data", list);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询问题详情
|
* 查询问题详情
|
||||||
* @param questionId
|
*
|
||||||
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/queryquestion/{id}")
|
@GetMapping("/v1/practice/question/{id}")
|
||||||
public AjaxResult queryQuestion(@PathVariable("id") String questionId) {
|
public AjaxResult queryQuestion(@PathVariable("id") String id) {
|
||||||
ExamQuestionVO result = examQuestionService.selectQuestionDetail(questionId);
|
ExamQuestionVO result = examQuestionService.selectQuestionDetail(id);
|
||||||
AjaxResult success = success("查询成功");
|
AjaxResult success = success("查询成功");
|
||||||
success.put("data",result);
|
success.put("data", result);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">考试类型</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<head th:include="include :: header"></head>
|
<head th:include="include :: header"></head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-examExamination-edit" th:object="${examExamination}">
|
<form class="form-horizontal m" id="form-examExamination-edit" th:object="${examExamination}">
|
||||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||||
<input id="paperId" name="paperId" th:value="${examExamination.examPaperId}" type="hidden">
|
<input id="paperId" name="paperId" th:value="${examExamination.examPaperId}" type="hidden">
|
||||||
|
|
@ -19,20 +19,34 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">考试试卷:</label>
|
<label class="col-sm-3 control-label">考试试卷:</label>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<input id="treeName" name="treeName" value="试卷分类" onclick="selectExamPaperCategoryTree()" class="form-control" type="text" readonly="true">
|
<input id="treeName" name="treeName" value="试卷分类" onclick="selectExamPaperCategoryTree()"
|
||||||
|
class="form-control" type="text" readonly="true">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
<select id="examPaperId" name="examPaperId" class="form-control m-b" >
|
<select id="examPaperId" name="examPaperId" class="form-control m-b">
|
||||||
<option value="">---请选择---</option>
|
<option value="">---请选择---</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">考试类型</label>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select id="type" name="type" class="form-control m-b" th:field="*{type}" th:with="type=${@dict.getType('exam_ination_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
<label class="col-sm-3 control-label">是否控制开始结束时间:</label>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="enableControlTime" name="enableControlTime" th:field="*{enableControlTime}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_enableControlTime')}">
|
<select id="enableControlTime" name="enableControlTime" th:field="*{enableControlTime}"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
class="form-control m-b" th:with="type=${@dict.getType('exam_ination_enableControlTime')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -69,32 +83,41 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">题目乱序:</label>
|
<label class="col-sm-3 control-label">题目乱序:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="questionDisorder" name="questionDisorder" th:field="*{questionDisorder}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_questionDisorder')}">
|
<select id="questionDisorder" name="questionDisorder" th:field="*{questionDisorder}"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
class="form-control m-b" th:with="type=${@dict.getType('exam_ination_questionDisorder')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">交卷后:</label>
|
<label class="col-sm-3 control-label">交卷后:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="finishedPaper" name="finishedPaper" th:field="*{finishedPaper}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_finishedPaper')}">
|
<select id="finishedPaper" name="finishedPaper" th:field="*{finishedPaper}" class="form-control m-b"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
th:with="type=${@dict.getType('exam_ination_finishedPaper')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">考试结束后:</label>
|
<label class="col-sm-3 control-label">考试结束后:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="examEnd" name="examEnd" class="form-control m-b" th:field="*{examEnd}" th:with="type=${@dict.getType('exam_ination_examEnd')}">
|
<select id="examEnd" name="examEnd" class="form-control m-b" th:field="*{examEnd}"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
th:with="type=${@dict.getType('exam_ination_examEnd')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">考试对象:</label>
|
<label class="col-sm-3 control-label">考试对象:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="examinationUserLimit" name="examinationUserLimit" th:field="*{examinationUserLimit}" class="form-control m-b" th:with="type=${@dict.getType('exam_ination_examinationUserLimit')}">
|
<select id="examinationUserLimit" name="examinationUserLimit" th:field="*{examinationUserLimit}"
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
class="form-control m-b"
|
||||||
|
th:with="type=${@dict.getType('exam_ination_examinationUserLimit')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -105,24 +128,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "exam/examExamination"
|
var prefix = ctx + "exam/examExamination"
|
||||||
$(function () {
|
$(function () {
|
||||||
var config = {
|
var config = {
|
||||||
url: ctx + "exam/examPaper"+ "/list",
|
url: ctx + "exam/examPaper" + "/list",
|
||||||
type: "post",
|
type: "post",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: {examPaperCategoryId:1},
|
data: {examPaperCategoryId: 1},
|
||||||
// contentType:"application/json",
|
// contentType:"application/json",
|
||||||
success: function(result) {
|
success: function (result) {
|
||||||
debugger
|
debugger
|
||||||
var id = $("#paperId").val();
|
var id = $("#paperId").val();
|
||||||
$("#examPaperId").html("<option value=''>---请选择---</option>");
|
$("#examPaperId").html("<option value=''>---请选择---</option>");
|
||||||
var rows =result.rows;
|
var rows = result.rows;
|
||||||
for(var i in rows){
|
for (var i in rows) {
|
||||||
$("#examPaperId").append("<option value='"+rows[i].id+"'>"+rows[i].name+"</option>");
|
$("#examPaperId").append("<option value='" + rows[i].id + "'>" + rows[i].name + "</option>");
|
||||||
}
|
}
|
||||||
$("#examPaperId").val(id);
|
$("#examPaperId").val(id);
|
||||||
}
|
}
|
||||||
|
|
@ -132,24 +155,24 @@
|
||||||
|
|
||||||
|
|
||||||
$("#form-examExamination-edit").validate({
|
$("#form-examExamination-edit").validate({
|
||||||
rules:{
|
rules: {
|
||||||
name:{
|
name: {
|
||||||
required:true,
|
required: true,
|
||||||
},
|
},
|
||||||
examPaperId:{
|
examPaperId: {
|
||||||
required:true,
|
required: true,
|
||||||
},
|
},
|
||||||
startTime:{
|
startTime: {
|
||||||
required:true,
|
required: true,
|
||||||
},
|
},
|
||||||
endTime:{
|
endTime: {
|
||||||
required:true,
|
required: true,
|
||||||
},
|
},
|
||||||
passMark:{
|
passMark: {
|
||||||
required:true,
|
required: true,
|
||||||
},
|
},
|
||||||
timeLength:{
|
timeLength: {
|
||||||
required:true
|
required: true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -166,35 +189,35 @@
|
||||||
var options = {
|
var options = {
|
||||||
title: '分类选择',
|
title: '分类选择',
|
||||||
width: "380",
|
width: "380",
|
||||||
url: ctx + "exam/examPaperCategory" + "/selectExamPaperCategoryTree/"+id,
|
url: ctx + "exam/examPaperCategory" + "/selectExamPaperCategoryTree/" + id,
|
||||||
callBack: doSubmit
|
callBack: doSubmit
|
||||||
};
|
};
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function doSubmit(index, layero){
|
function doSubmit(index, layero) {
|
||||||
var body = layer.getChildFrame('body', index);
|
var body = layer.getChildFrame('body', index);
|
||||||
id = body.find('#treeId').val()
|
id = body.find('#treeId').val()
|
||||||
$("#treeName").val(body.find('#treeName').val());
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
url: ctx + "exam/examPaper"+ "/list",
|
url: ctx + "exam/examPaper" + "/list",
|
||||||
type: "post",
|
type: "post",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: {examPaperCategoryId:id},
|
data: {examPaperCategoryId: id},
|
||||||
// contentType:"application/json",
|
// contentType:"application/json",
|
||||||
success: function(result) {
|
success: function (result) {
|
||||||
$("#examPaperId").html("<option>---请选择---</option>");
|
$("#examPaperId").html("<option>---请选择---</option>");
|
||||||
var rows =result.rows;
|
var rows = result.rows;
|
||||||
for(var i in rows){
|
for (var i in rows) {
|
||||||
$("#examPaperId").append("<option value='"+rows[i].id+"'>"+rows[i].name+"</option>");
|
$("#examPaperId").append("<option value='" + rows[i].id + "'>" + rows[i].name + "</option>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$.ajax(config)
|
$.ajax(config)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public abstract class AbstractBaseServiceImpl<M extends MyMapper<T>, T> implemen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertSelective(T entity) {
|
public int insertSelective(T entity) {
|
||||||
EntityUtils.setUpdatedInfo(entity);
|
EntityUtils.setCreateAndUpdateInfo(entity);
|
||||||
return mapper.insertSelective(entity);
|
return mapper.insertSelective(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ public class FileUploadUtils {
|
||||||
FileUploadUtils.DEFAULT_FILE_NAME_LENGTH );
|
FileUploadUtils.DEFAULT_FILE_NAME_LENGTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
assertAllowed( file );
|
// assertAllowed( file );
|
||||||
|
|
||||||
String fileName = extension;
|
String fileName = extension;
|
||||||
if(needDatePathAndRandomName){
|
if(needDatePathAndRandomName){
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,6 @@
|
||||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourse:remove">
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourse:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourse:export">
|
|
||||||
<i class="fa fa-download"></i> 导出
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-trainCourseSection-add">
|
<form class="form-horizontal m" id="form-trainCourseSection-add">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">课程ID:</label>
|
<label class="col-sm-3 control-label">课程名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input id="trainCourseId" name="trainCourseId" th:value="${trainCourse.id}" class="form-control" type="hidden">
|
<input id="trainCourseId" name="trainCourseId" th:value="${trainCourse.id}" class="form-control" type="hidden">
|
||||||
<input th:value="${trainCourse.name}" class="form-control" type="text">
|
<input th:value="${trainCourse.name}" class="form-control" type="text" disabled="disabled">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
<input id="trainCourseId" name="trainCourseId" th:value="${trainCourse.id}" class="form-control" type="hidden">
|
<input id="trainCourseId" name="trainCourseId" th:value="${trainCourse.id}" class="form-control" type="hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">课程ID:</label>
|
<label class="col-sm-3 control-label">课程名称:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input th:value="${trainCourse.name}" class="form-control" type="text">
|
<input th:value="${trainCourse.name}" class="form-control" type="text" disabled="disabled">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@
|
||||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseSection:remove">
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseSection:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourseSection:export">
|
|
||||||
<i class="fa fa-download"></i> 导出
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue