Prechádzať zdrojové kódy

时间类型xml修改

wangliang 4 rokov pred
rodič
commit
d9e6669002
15 zmenil súbory, kde vykonal 57 pridanie a 54 odobranie
  1. 1 1
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamActivityController.java
  2. 4 4
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java
  3. 19 17
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/ExaminationMonitorWarnMsgBean.java
  4. 7 9
      themis-business/src/main/java/com/qmth/themis/business/bean/backend/WarningNotifyBean.java
  5. 1 1
      themis-business/src/main/java/com/qmth/themis/business/dao/TEExamActivityMapper.java
  6. 4 4
      themis-business/src/main/java/com/qmth/themis/business/dao/TEExamReexamMapper.java
  7. 1 1
      themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java
  8. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/TEExamActivityService.java
  9. 4 4
      themis-business/src/main/java/com/qmth/themis/business/service/TEExamReexamService.java
  10. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamActivityServiceImpl.java
  11. 2 2
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamReexamServiceImpl.java
  12. 1 1
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java
  13. 2 0
      themis-business/src/main/resources/mapper/TEExamMapper.xml
  14. 1 1
      themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml
  15. 8 7
      themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

+ 1 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamActivityController.java

@@ -110,7 +110,7 @@ public class TEExamActivityController {
     @ApiOperation(value = "考试场次查询接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "考试场次信息", response = TEExamActivity.class)})
-    public Result query(@ApiParam(value = "主键", required = false) @RequestParam(required = false) Long id, @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId, @ApiParam(value = "考试场次编码", required = false) @RequestParam(required = false) String code, @ApiParam(value = "开始日期", required = false) @RequestParam(required = false) String startDate, @ApiParam(value = "结束日期", required = false) @RequestParam(required = false) String finishDate, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+    public Result query(@ApiParam(value = "主键", required = false) @RequestParam(required = false) Long id, @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long examId, @ApiParam(value = "考试场次编码", required = false) @RequestParam(required = false) String code, @ApiParam(value = "开始日期", required = false) @RequestParam(required = false) Long startDate, @ApiParam(value = "结束日期", required = false) @RequestParam(required = false) Long finishDate, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
         return ResultUtil.ok(teExamActivityService.examActivityQuery(new Page<>(pageNumber, pageSize), id, examId, code, startDate, finishDate));
     }
 }

+ 4 - 4
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamReexamController.java

@@ -231,8 +231,8 @@ public class TEExamReexamController {
                               @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
                               @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
                               @ApiParam(value = "申请理由", required = false) @RequestParam(required = false) String reason,
-                              @ApiParam(value = "申请开始时间", required = false) @RequestParam(required = false) String reasonStartTime,
-                              @ApiParam(value = "申请结束时间", required = false) @RequestParam(required = false) String reasonEndTime,
+                              @ApiParam(value = "申请开始时间", required = false) @RequestParam(required = false) Long reasonStartTime,
+                              @ApiParam(value = "申请结束时间", required = false) @RequestParam(required = false) Long reasonEndTime,
                               @ApiParam(value = "申请人", required = false) @RequestParam(required = false) String applyName,
                               @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                               @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
@@ -259,8 +259,8 @@ public class TEExamReexamController {
                            @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
                            @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity,
                            @ApiParam(value = "审核状态", required = false) @RequestParam(required = false) Integer auditingStatus,
-                           @ApiParam(value = "申请开始时间", required = false) @RequestParam(required = false) String reasonStartTime,
-                           @ApiParam(value = "申请结束时间", required = false) @RequestParam(required = false) String reasonEndTime,
+                           @ApiParam(value = "申请开始时间", required = false) @RequestParam(required = false) Long reasonStartTime,
+                           @ApiParam(value = "申请结束时间", required = false) @RequestParam(required = false) Long reasonEndTime,
                            @ApiParam(value = "申请人", required = false) @RequestParam(required = false) String applyName,
                            @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                            @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {

+ 19 - 17
themis-business/src/main/java/com/qmth/themis/business/bean/backend/ExaminationMonitorWarnMsgBean.java

@@ -4,22 +4,24 @@ import io.swagger.annotations.ApiModelProperty;
 
 public class ExaminationMonitorWarnMsgBean {
 
-	@ApiModelProperty(name = "时间")
-	private String time;
-	@ApiModelProperty(name = "预警信息")
-	private String content;
-	public String getTime() {
-		return time;
-	}
-	public void setTime(String time) {
-		this.time = time;
-	}
-	public String getContent() {
-		return content;
-	}
-	public void setContent(String content) {
-		this.content = content;
-	}
+    @ApiModelProperty(name = "时间")
+    private Long time;
+    @ApiModelProperty(name = "预警信息")
+    private String content;
 
-	
+    public Long getTime() {
+        return time;
+    }
+
+    public void setTime(Long time) {
+        this.time = time;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
 }

+ 7 - 9
themis-business/src/main/java/com/qmth/themis/business/bean/backend/WarningNotifyBean.java

@@ -43,7 +43,7 @@ public class WarningNotifyBean  {
     private String roomCode;//考试记录id
     
     @ApiModelProperty(name = "时间")
-    private String createTime;
+    private Long createTime;
 
     public Long getExamRecordId() {
         return examRecordId;
@@ -125,13 +125,11 @@ public class WarningNotifyBean  {
 		this.roomCode = roomCode;
 	}
 
-	public String getCreateTime() {
-		return createTime;
-	}
+    public Long getCreateTime() {
+        return createTime;
+    }
 
-	public void setCreateTime(String createTime) {
-		this.createTime = createTime;
-	}
-    
-    
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+    }
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamActivityMapper.java

@@ -73,7 +73,7 @@ public interface TEExamActivityMapper extends BaseMapper<TEExamActivity> {
      * @param finishDate
      * @return
      */
-    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, @Param("id") Long id, @Param("examId") Long examId, @Param("code") String code, @Param("startDate") String startDate, @Param("finishDate") String finishDate);
+    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, @Param("id") Long id, @Param("examId") Long examId, @Param("code") String code, @Param("startDate") Long startDate, @Param("finishDate") Long finishDate);
 
     /**
      * 获取考试待考列表

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamReexamMapper.java

@@ -67,8 +67,8 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                               @Param("name") String name,
                                                               @Param("identity") String identity,
                                                               @Param("reason") String reason,
-                                                              @Param("reasonStartTime") String reasonStartTime,
-                                                              @Param("reasonEndTime") String reasonEndTime,
+                                                              @Param("reasonStartTime") Long reasonStartTime,
+                                                              @Param("reasonEndTime") Long reasonEndTime,
                                                               @Param("applyName") String applyName,
                                                               @Param("userId") Long userId);
 
@@ -105,8 +105,8 @@ public interface TEExamReexamMapper extends BaseMapper<TEExamReexam> {
                                                         @Param("name") String name,
                                                         @Param("identity") String identity,
                                                         @Param("auditingStatus") Integer auditingStatus,
-                                                        @Param("reasonStartTime") String reasonStartTime,
-                                                        @Param("reasonEndTime") String reasonEndTime,
+                                                        @Param("reasonStartTime") Long reasonStartTime,
+                                                        @Param("reasonEndTime") Long reasonEndTime,
                                                         @Param("applyName") String applyName,
                                                         @Param("userId") Long userId);
 

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/dao/TOeExamRecordMapper.java

@@ -308,5 +308,5 @@ public interface TOeExamRecordMapper extends BaseMapper<TOeExamRecord> {
 
     public List<Map<String, Object>> getTypeDistribution();
 
-    public List<ExaminationMonitorHourWarnCountBean> getWarnTrend(@Param("startTime") Date startTime);
+    public List<ExaminationMonitorHourWarnCountBean> getWarnTrend(@Param("startTime") Long startTime);
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TEExamActivityService.java

@@ -71,7 +71,7 @@ public interface TEExamActivityService extends IService<TEExamActivity> {
      * @param finishDate
      * @return
      */
-    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, Long id, Long examId, String code, String startDate, String finishDate);
+    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, Long id, Long examId, String code, Long startDate, Long finishDate);
 
     /**
      * 获取考试待考列表

+ 4 - 4
themis-business/src/main/java/com/qmth/themis/business/service/TEExamReexamService.java

@@ -63,8 +63,8 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
                                                               String name,
                                                               String identity,
                                                               String reason,
-                                                              String reasonStartTime,
-                                                              String reasonEndTime,
+                                                              Long reasonStartTime,
+                                                              Long reasonEndTime,
                                                               String applyName,
                                                               Long userId);
 
@@ -101,8 +101,8 @@ public interface TEExamReexamService extends IService<TEExamReexam> {
                                                         String name,
                                                         String identity,
                                                         Integer auditingStatus,
-                                                        String reasonStartTime,
-                                                        String reasonEndTime,
+                                                        Long reasonStartTime,
+                                                        Long reasonEndTime,
                                                         String applyName,
                                                         Long userId);
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamActivityServiceImpl.java

@@ -98,7 +98,7 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
      * @return
      */
     @Override
-    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, Long id, Long examId, String code, String startDate, String finishDate) {
+    public IPage<TEExamActivityQueryDto> examActivityQuery(IPage<Map> iPage, Long id, Long examId, String code, Long startDate, Long finishDate) {
         return teExamActivityMapper.examActivityQuery(iPage, id, examId, code, startDate, finishDate);
     }
 

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamReexamServiceImpl.java

@@ -62,7 +62,7 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      * @return
      */
     @Override
-    public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, String reason, String reasonStartTime, String reasonEndTime, String applyName, Long userId) {
+    public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, String reason, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
         return teExamReexamMapper.reexamPageNotDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, userId);
     }
 
@@ -96,7 +96,7 @@ public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEE
      * @return
      */
     @Override
-    public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Integer auditingStatus, String reasonStartTime, String reasonEndTime, String applyName, Long userId) {
+    public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Integer auditingStatus, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
         return teExamReexamMapper.reexamPageDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, userId);
     }
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

@@ -434,7 +434,7 @@ public class TIeReportServiceImpl implements TIeReportService {
         start = DateUtils.setMinutes(start, 0);
         start = DateUtils.setSeconds(start, 0);
         start = DateUtils.setMilliseconds(start, 0);
-        List<ExaminationMonitorHourWarnCountBean> list = tOeExamRecordMapper.getWarnTrend(start);
+        List<ExaminationMonitorHourWarnCountBean> list = tOeExamRecordMapper.getWarnTrend(start.getTime());
         if (list != null && list.size() > 0) {
             Map<String, Long> map = list.stream().collect(Collectors.toMap(ExaminationMonitorHourWarnCountBean::getHour,
                     ExaminationMonitorHourWarnCountBean::getCount, (key1, key2) -> key2));

+ 2 - 0
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -113,6 +113,8 @@
             select
             distinct tee.id, teea.id as examActivityId,tee.name, tee.mode, tee.pre_notice as preNotice, tee.pre_notice_stay_seconds as
             preNoticeStaySeconds, tee.post_notice as postNotice,
+            <!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
+            FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
             datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
             datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) -
             datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime

+ 1 - 1
themis-business/src/main/resources/mapper/TIeInvigilateWarnInfoMapper.xml

@@ -72,7 +72,7 @@
 					t.remark,
 					t.exam_id AS examId,
 					t.exam_record_id AS examRecordId,
-					DATE_FORMAT(t.create_time,"%Y-%m-%d %H:%i") createTime
+					t.create_time createTime
 				FROM
 					t_ie_invigilate_warn_info t
 				ORDER BY

+ 8 - 7
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -178,7 +178,7 @@
         <include refid="invigilatePageHead"/>
         ,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and
         tiiwi.approve_status = 0) as warningNew
-		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds,
+		,date_format(date_sub(date_add(FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s'), interval IFNULL(teea.max_duration_seconds,
 		tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds
 		minute),'%H:%i:%s') as remainTime
         <include refid="invigilatePageMiddle"/>
@@ -200,7 +200,7 @@
 		<include refid="invigilatePageHead" />
 		,t.monitor_live_url as monitorLiveUrl
 		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
-		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
+		,date_format(date_sub(date_add(FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s'), interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
 		<include refid="invigilatePageMiddle" />
 		<include refid="invigilatePageFoot" />
 		<if test="paperDownload != null and paperDownload != ''">
@@ -215,7 +215,7 @@
 		<include refid="invigilatePageHead" />
 		,t.monitor_live_url as monitorLiveUrl
 		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
-		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
+		,date_format(date_sub(date_add(FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s'), interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
 		<include refid="invigilatePageMiddle" />
 		<if test="examId != null and examId != ''">
 			and t.exam_id = #{examId}
@@ -228,7 +228,7 @@
 		,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = t.id) as exceptionCount
 		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.`type` =
 		'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
-		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds,
+		,date_format(date_sub(date_add(FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s'), interval IFNULL(teea.max_duration_seconds,
 		tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds
 		minute),'%H:%i:%s') as remainTime
 		<include refid="invigilatePageMiddle" />
@@ -503,7 +503,8 @@
 	</select>
 
 	<select id="getDoneCountByDay" resultType="java.util.Map">
-		select DATE_FORMAT(f.first_prepare_time, '%Y-%m-%d') AS day,
+		select
+		FROM_UNIXTIME(f.first_prepare_time / 1000,'%Y-%m-%d') AS day
 		count(DISTINCT(f.exam_student_id)) count from t_oe_exam_record f
 		left join t_e_exam_student t on f.exam_student_id=t.id
 		where f.exam_id = #{examId}
@@ -703,11 +704,11 @@
 	</select>
 	<select id="getWarnTrend" resultType="com.qmth.themis.business.bean.backend.ExaminationMonitorHourWarnCountBean">
 			SELECT
-			DATE_FORMAT(w.create_time,'%H') hour,
+			FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
 			count(1) count
 		FROM  t_ie_invigilate_warn_info w 
 		WHERE w.type!='NONE' and w.create_time&gt;=#{startTime}
 		GROUP BY
-			DATE_FORMAT(w.create_time,'%H')
+			FROM_UNIXTIME(w.create_time / 1000,'%H')
 	</select>
 </mapper>