wangliang 4 年之前
父节点
当前提交
f2f831a3ca

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

@@ -66,10 +66,14 @@ public class TIeInvigilateCallMobileController {
     @ApiOperation(value = "监考监控通话查询接口")
     @RequestMapping(value = "/call/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = TIeExamInvigilateCall.class)})
-    public Result callList(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = true) Long examId, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+    public Result callList(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = true) Long examId, @ApiParam(value = "通话状态", required = false) @RequestParam(required = false) String callStatus, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
         if (Objects.isNull(examId) || Objects.equals(examId, "")) {
             throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
         }
+        if (Objects.nonNull(callStatus) && !Objects.equals(callStatus, "")) {
+            MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
+            callStatus = callStatusEnum.name();
+        }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
@@ -77,7 +81,7 @@ public class TIeInvigilateCallMobileController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        IPage<TIeExamInvigilateCall> tIeExamInvigilateCallIPage = tIeExamInvigilateCallService.examInvigilateCallQuery(new Page<>(pageNumber, pageSize), examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name());
+        IPage<TIeExamInvigilateCall> tIeExamInvigilateCallIPage = tIeExamInvigilateCallService.examInvigilateCallQuery(new Page<>(pageNumber, pageSize), examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name(), callStatus);
         BasePage basePage = new BasePage(tIeExamInvigilateCallIPage.getRecords(), tIeExamInvigilateCallIPage.getCurrent(), tIeExamInvigilateCallIPage.getSize(), tIeExamInvigilateCallIPage.getTotal());
         return ResultUtil.ok(basePage);
     }
@@ -85,10 +89,14 @@ public class TIeInvigilateCallMobileController {
     @ApiOperation(value = "监考监控通话提醒接口")
     @RequestMapping(value = "/call/count", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = Integer.class)})
-    public Result callCount(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId) {
+    public Result callCount(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId, @ApiParam(value = "通话状态", required = false) @RequestParam(required = false) String callStatus) {
         if (Objects.isNull(examId) || Objects.equals(examId, "")) {
             throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
         }
+        if (Objects.nonNull(callStatus) && !Objects.equals(callStatus, "")) {
+            MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
+            callStatus = callStatusEnum.name();
+        }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
         //如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
@@ -96,7 +104,7 @@ public class TIeInvigilateCallMobileController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
             userId = tbUser.getId();
         }
-        int count = tIeExamInvigilateCallService.examInvigilateCallQueryCount(examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name());
+        int count = tIeExamInvigilateCallService.examInvigilateCallQueryCount(examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name(), callStatus);
         return ResultUtil.ok(Collections.singletonMap("count", count));
     }
 

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

@@ -26,9 +26,10 @@ public interface TIeExamInvigilateCallMapper extends BaseMapper<TIeExamInvigilat
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
-    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status);
+    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status, @Param("callStatus") String callStatus);
 
     /**
      * 监考监控通话count查询
@@ -37,7 +38,8 @@ public interface TIeExamInvigilateCallMapper extends BaseMapper<TIeExamInvigilat
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
-    public Integer examInvigilateCallQueryCount(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status);
+    public Integer examInvigilateCallQueryCount(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status, @Param("callStatus") String callStatus);
 }

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

@@ -23,9 +23,10 @@ public interface TIeExamInvigilateCallService extends IService<TIeExamInvigilate
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
-    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, Long examId, Long userId, Long orgId, String status);
+    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, Long examId, Long userId, Long orgId, String status, String callStatus);
 
     /**
      * 监考监控通话count查询
@@ -34,7 +35,8 @@ public interface TIeExamInvigilateCallService extends IService<TIeExamInvigilate
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
-    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status);
+    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, String callStatus);
 }

+ 6 - 5
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeExamInvigilateCallServiceImpl.java

@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * @Description: 监考监控通话申请 服务实现类
@@ -32,11 +31,12 @@ public class TIeExamInvigilateCallServiceImpl extends ServiceImpl<TIeExamInvigil
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
     @Override
-    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, Long examId, Long userId, Long orgId, String status) {
-        return tIeExamInvigilateCallMapper.examInvigilateCallQuery(iPage, examId, userId, orgId, status);
+    public IPage<TIeExamInvigilateCall> examInvigilateCallQuery(IPage<Map> iPage, Long examId, Long userId, Long orgId, String status, String callStatus) {
+        return tIeExamInvigilateCallMapper.examInvigilateCallQuery(iPage, examId, userId, orgId, status, callStatus);
     }
 
     /**
@@ -46,10 +46,11 @@ public class TIeExamInvigilateCallServiceImpl extends ServiceImpl<TIeExamInvigil
      * @param userId
      * @param orgId
      * @param status
+     * @param callStatus
      * @return
      */
     @Override
-    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status) {
-        return tIeExamInvigilateCallMapper.examInvigilateCallQueryCount(examId, userId, orgId, status);
+    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, String callStatus) {
+        return tIeExamInvigilateCallMapper.examInvigilateCallQueryCount(examId, userId, orgId, status, callStatus);
     }
 }

+ 6 - 0
themis-business/src/main/resources/mapper/TIeExamInvigilateCallMapper.xml

@@ -25,6 +25,9 @@
             <if test="status != null and status != ''">
                 and tieic.status = #{status}
             </if>
+            <if test="callStatus != null and callStatus != ''">
+                and tieic.call_status = #{callStatus}
+            </if>
         </where>
     </select>
 
@@ -51,6 +54,9 @@
             <if test="status != null and status != ''">
                 and tieic.status = #{status}
             </if>
+            <if test="callStatus != null and callStatus != ''">
+                and tieic.call_status = #{callStatus}
+            </if>
         </where>
     </select>
 </mapper>