考试安排登录画面展示

main
sunhonglei 4 months ago
parent a98509f3a5
commit 824b170a72
  1. 10
      ccic-entity/src/main/java/com/ccic/safeliab/entity/ExamSchedule.java
  2. 3
      ccic-exam/src/main/java/com/ccic/safeliab/dao/ExamScheduleMapper.java
  3. 6
      ccic-exam/src/main/java/com/ccic/safeliab/service/ExamScheduleService.java
  4. 16
      ccic-exam/src/main/java/com/ccic/safeliab/service/ExamScheduleServiceImpl.java
  5. 16
      ccic-exam/src/main/java/com/ccic/safeliab/web/ExamScheduleController.java
  6. 17
      ccic-exam/src/main/resources/mappers/ExamScheduleMapper.xml

@ -14,7 +14,7 @@ import java.sql.Timestamp;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ex_exam_info")
public class ExamSchedule{
public class ExamSchedule extends BaseEntity{
private static final long serialVersionUID = 1L;
/**
@ -31,12 +31,4 @@ public class ExamSchedule{
private String validTo;
private Integer publishStatus;
private String remark;
private Long createUser;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Timestamp createTime;
private Long updateUser;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Timestamp updateTime;
private Integer status;
private Integer isDeleted;
}

@ -2,6 +2,7 @@ package com.ccic.safeliab.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ccic.safeliab.entity.ExamSchedule;
import com.ccic.safeliab.entity.Industry;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,4 +11,6 @@ import java.util.Map;
@Mapper
public interface ExamScheduleMapper extends BaseMapper<ExamSchedule> {
List<ExamSchedule> selectExamSchedule(Map<String, Object> param);
List<Map<String,Object>> getIndustry();
List<Map<String,Object>> getPaper();
}

@ -2,10 +2,14 @@ package com.ccic.safeliab.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ccic.safeliab.entity.ExamSchedule;
import com.ccic.safeliab.entity.Industry;
import com.ccic.safeliab.support.BaseService;
import java.util.List;
import java.util.Map;
public interface ExamScheduleService extends IService<ExamSchedule> {
public interface ExamScheduleService extends BaseService<ExamSchedule> {
public List<ExamSchedule> selectExamSchedule(Map<String, Object> param);
public List<Map<String,Object>> getIndustry();
public List<Map<String,Object>> getPaper();
}

@ -1,16 +1,30 @@
package com.ccic.safeliab.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ccic.safeliab.dao.ExamScheduleMapper;
import com.ccic.safeliab.entity.ExamSchedule;
import com.ccic.safeliab.entity.Industry;
import com.ccic.safeliab.support.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class ExamScheduleServiceImpl extends ServiceImpl<ExamScheduleMapper, ExamSchedule> implements ExamScheduleService {
public class ExamScheduleServiceImpl extends BaseServiceImpl<ExamScheduleMapper, ExamSchedule> implements ExamScheduleService {
public List<ExamSchedule> selectExamSchedule(Map<String, Object> param){
return baseMapper.selectExamSchedule(param);
}
public List<Map<String,Object>> getIndustry(){
return baseMapper.getIndustry();
}
public List<Map<String,Object>> getPaper(){
return baseMapper.getPaper();
}
}

@ -15,7 +15,7 @@ import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/exam-schedule")
@RequestMapping("/ex/exam-schedule")
public class ExamScheduleController {
@Autowired
private ExamScheduleService service;
@ -54,15 +54,29 @@ public class ExamScheduleController {
}
@PostMapping("/update")
public R update(@RequestBody ExamScheduleVO examSchedule) {
examSchedule.setPublishStatus(0);
boolean result = service.saveOrUpdate(examSchedule);
return R.ok().data("success.");
}
@PostMapping("/insert")
public R insert(@RequestBody ExamScheduleVO examSchedule) {
examSchedule.setPublishStatus(0);
boolean result = service.save(examSchedule);
return R.ok().data("success.");
}
@GetMapping("/getIndustry")
public R getIndustry(){
return R.ok().data(service.getIndustry());
}
@GetMapping("/getPaper")
public R getPaper(){
List<Map<String,Object>> results = new ArrayList<>();
results.addAll(service.getPaper());
return R.ok().data(results);
}
@GetMapping("/show")
public R show() {

@ -30,4 +30,21 @@
AND #{date} BETWEEN info.valid_from AND info.valid_to
</if>
</select>
<select id="getIndustry" resultType="java.util.Map">
select
industry_id,
industry_name
from tbl_industry
where status = 1
</select>
<select id="getPaper" resultType="java.util.Map">
select
paper_id,
paper_name,
total_score,
exam_duration,
entity_id as regulatory_industry
from ex_exam_papers
where is_deleted = 0
</select>
</mapper>
Loading…
Cancel
Save