From 372ec8892f5ed3d11736e75abdd7f33ea34e0d2d Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 03 Aug 2021 10:40:09 +0800
Subject: [PATCH] 个人考试信息查询接口修改
---
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java | 46 ++++++++++++++++++++++++++++++++++++++++------
1 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
index e72c2e7..18da928 100644
--- a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
+++ b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
@@ -9,8 +9,10 @@
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
+import org.springblade.common.utils.arg;
import org.springblade.modules.apply.entity.Apply;
import org.springblade.modules.apply.excel.ApplyExcel;
+import org.springblade.modules.apply.excel.ApplyInfoExcel;
import org.springblade.modules.apply.mapper.ApplyMapper;
import org.springblade.modules.apply.service.ApplyService;
import org.springblade.modules.apply.vo.ApplyPaPerVO;
@@ -94,6 +96,12 @@
apply.setApplyCode(getApplyCode(apply));
//插入数据
this.save(apply);
+ //内网新增
+ try {
+ arg.test01(arg.url+"/apply/save",apply);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
});
}
@@ -239,12 +247,38 @@
*/
@Override
public ApplyPaPerVO getApplyInfo(Apply apply) {
- ApplyPaPerVO applyPaPerVO = baseMapper.getApplyInfo(apply);
+ //正式考试
+ if (apply.getApplyExamType()==1){
+ ApplyPaPerVO applyPaPerVO = baseMapper.getApplyInfo(apply);
+ String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0];
+ String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1];
+ String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1];
+ applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3));
+ return applyPaPerVO;
+ }
- String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0];
- String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1];
- String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1];
- applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3));
- return applyPaPerVO;
+ //模拟考试
+ if (apply.getApplyExamType()==2){
+ ApplyPaPerVO applyPaPerVO = baseMapper.getTrainApplyInfo(apply);
+ String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[0];
+ String startTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getStartTime()).split(" ")[1];
+ String endTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(applyPaPerVO.getEndTime()).split(" ")[1];
+ applyPaPerVO.setStringTime(time+" "+startTime.substring(0,startTime.length()-3) +"-"+ endTime.substring(0,endTime.length()-3));
+ return applyPaPerVO;
+ }
+
+
+
+ return null;
+ }
+
+ /**
+ * 导出报名数数据
+ * @param apply 报名对象
+ * @return
+ */
+ @Override
+ public List<ApplyInfoExcel> getApplyExcelList(Apply apply) {
+ return baseMapper.getApplyExcelList(apply);
}
}
--
Gitblit v1.9.3