|
@@ -15,6 +15,7 @@ import cn.com.qmth.examcloud.core.print.common.utils.Check;
|
|
|
import cn.com.qmth.examcloud.core.print.entity.PrintingProject;
|
|
|
import cn.com.qmth.examcloud.core.print.repository.PrintingProjectRepository;
|
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.OrgExamInfo;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.PrintingProjectConvert;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.PrintingProjectInfo;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.PrintingProjectQuery;
|
|
@@ -143,18 +144,18 @@ public class PrintingProjectServiceImpl implements PrintingProjectService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void dataInit() {
|
|
|
- //查询数据记录
|
|
|
+ public void initAllData() {
|
|
|
+ //查询所有传统考试记录(实际数据未超过100条)
|
|
|
String selectSql = "SELECT em.id as examId,em.name as examName,em.root_org_id as orgId,org.name as orgName FROM ec_e_exam em "
|
|
|
+ "INNER JOIN ec_b_org org ON org.id = em.root_org_id WHERE em.exam_type = 'TRADITION' ORDER BY em.id ASC";
|
|
|
- List<PrintingProject> list = jdbcTemplate.query(selectSql, new BeanPropertyRowMapper(PrintingProject.class));
|
|
|
+ List<OrgExamInfo> list = jdbcTemplate.query(selectSql, new BeanPropertyRowMapper(OrgExamInfo.class));
|
|
|
|
|
|
//批量保存数据
|
|
|
String insertSql = "INSERT INTO ec_prt_project(exam_id,exam_name,org_id,org_name,creation_time,update_time) VALUES (?,?,?,?,NOW(),NOW())";
|
|
|
jdbcTemplate.batchUpdate(insertSql, new BatchPreparedStatementSetter() {
|
|
|
@Override
|
|
|
public void setValues(PreparedStatement ps, int i) throws SQLException {
|
|
|
- PrintingProject row = list.get(i);
|
|
|
+ OrgExamInfo row = list.get(i);
|
|
|
ps.setLong(1, row.getExamId());
|
|
|
ps.setString(2, row.getExamName());
|
|
|
ps.setLong(3, row.getOrgId());
|