瀏覽代碼

通话申请新加cancel状态

wangliang 2 年之前
父節點
當前提交
e64af9f492

+ 9 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateCallMobileController.java

@@ -135,9 +135,15 @@ public class TIeInvigilateCallMobileController {
         if (Objects.isNull(examId) || Objects.equals(examId, "")) {
             throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
         }
+        List<String> callStatusList = new ArrayList<>();
         if (Objects.nonNull(callStatus) && !Objects.equals(callStatus, "")) {
-            MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
-            callStatus = callStatusEnum.name();
+            if (callStatus.contains(",")) {
+                String[] callStatusStrs = callStatus.split(",");
+                callStatusList = Arrays.asList(callStatusStrs);
+            } else {
+                MonitorCallStatusSourceEnum callStatusEnum = MonitorCallStatusSourceEnum.valueOf(callStatus);
+                callStatusList.add(callStatusEnum.name());
+            }
         }
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
@@ -148,7 +154,7 @@ public class TIeInvigilateCallMobileController {
         }
         int count = tIeExamInvigilateCallService
                 .examInvigilateCallQueryCount(examId, userId, tbUser.getOrgId(), MonitorStatusSourceEnum.START.name(),
-                        callStatus, roomCode);
+                        callStatusList, roomCode, callStatus);
         return ResultUtil.ok(Collections.singletonMap("count", count));
     }
 

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

@@ -42,9 +42,10 @@ public interface TIeExamInvigilateCallMapper extends BaseMapper<TIeExamInvigilat
      * @param userId
      * @param orgId
      * @param status
-     * @param callStatus
+     * @param callStatusList
      * @param roomCode
+     * @param callStatus
      * @return
      */
-    public Integer examInvigilateCallQueryCount(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status, @Param("callStatus") String callStatus, @Param("roomCode") String roomCode);
+    public Integer examInvigilateCallQueryCount(@Param("examId") Long examId, @Param("userId") Long userId, @Param("orgId") Long orgId, @Param("status") String status, @Param("callStatusList") List<String> callStatusList, @Param("roomCode") String roomCode, @Param("callStatus") String callStatus);
 }

+ 13 - 13
themis-business/src/main/java/com/qmth/themis/business/entity/TBOrg.java

@@ -24,19 +24,6 @@ public class TBOrg extends BaseEntity {
     @TableField(value = "code")
     private String code;
 
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        TBOrg tbOrg = (TBOrg) o;
-        return code.equals(tbOrg.code) && name.equals(tbOrg.name) && logo.equals(tbOrg.logo) && enable.equals(tbOrg.enable) && enableSimulate.equals(tbOrg.enableSimulate) && simulatePaperId.equals(tbOrg.simulatePaperId) && accessKey.equals(tbOrg.accessKey) && accessSecret.equals(tbOrg.accessSecret) && contactName.equals(tbOrg.contactName) && contactPhone.equals(tbOrg.contactPhone) && enableLiveness.equals(tbOrg.enableLiveness) && enableMonitorRecord.equals(tbOrg.enableMonitorRecord);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(code, name, logo, enable, enableSimulate, simulatePaperId, accessKey, accessSecret, contactName, contactPhone, enableLiveness, enableMonitorRecord);
-    }
-
     @ApiModelProperty(value = "名称")
     @TableField(value = "name")
     private String name;
@@ -190,4 +177,17 @@ public class TBOrg extends BaseEntity {
     public void setAccessSecret(String accessSecret) {
         this.accessSecret = accessSecret;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TBOrg tbOrg = (TBOrg) o;
+        return code.equals(tbOrg.code) && name.equals(tbOrg.name) && logo.equals(tbOrg.logo) && enable.equals(tbOrg.enable) && enableSimulate.equals(tbOrg.enableSimulate) && simulatePaperId.equals(tbOrg.simulatePaperId) && accessKey.equals(tbOrg.accessKey) && accessSecret.equals(tbOrg.accessSecret) && contactName.equals(tbOrg.contactName) && contactPhone.equals(tbOrg.contactPhone) && enableLiveness.equals(tbOrg.enableLiveness) && enableMonitorRecord.equals(tbOrg.enableMonitorRecord);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(code, name, logo, enable, enableSimulate, simulatePaperId, accessKey, accessSecret, contactName, contactPhone, enableLiveness, enableMonitorRecord);
+    }
 }

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

@@ -39,9 +39,10 @@ public interface TIeExamInvigilateCallService extends IService<TIeExamInvigilate
      * @param userId
      * @param orgId
      * @param status
-     * @param callStatus
+     * @param callStatusList
      * @param roomCode
+     * @param callStatus
      * @return
      */
-    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, String callStatus, String roomCode);
+    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, List<String> callStatusList, String roomCode, String callStatus);
 }

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

@@ -52,10 +52,11 @@ public class TIeExamInvigilateCallServiceImpl extends ServiceImpl<TIeExamInvigil
      * @param status
      * @param callStatus
      * @param roomCode
+     * @param callStatus
      * @return
      */
     @Override
-    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, String callStatus, String roomCode) {
-        return tIeExamInvigilateCallMapper.examInvigilateCallQueryCount(examId, userId, orgId, status, callStatus, roomCode);
+    public Integer examInvigilateCallQueryCount(Long examId, Long userId, Long orgId, String status, List<String> callStatusList, String roomCode, String callStatus) {
+        return tIeExamInvigilateCallMapper.examInvigilateCallQueryCount(examId, userId, orgId, status, callStatusList, roomCode, callStatus);
     }
 }

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

@@ -31,7 +31,6 @@
             <if test="status != null and status != ''">
                 and tieic.status = #{status}
             </if>
-
             <if test="callStatusList != null and callStatusList != ''">
                 and tieic.call_status in
                 <foreach collection="callStatusList" item="status" index="index" open="(" close=")" separator=",">
@@ -75,14 +74,17 @@
             <if test="status != null and status != ''">
                 and tieic.status = #{status}
             </if>
-            <if test="callStatus != null and callStatus != ''">
-                and tieic.call_status = #{callStatus}
+            <if test="callStatusList != null and callStatusList != ''">
+                and tieic.call_status in
+                <foreach collection="callStatusList" item="status" index="index" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
             </if>
             <if test="roomCode != null and roomCode != ''">
                 and tees.room_code = #{roomCode}
             </if>
         </where>
-        <if test="callStatus != null and callStatus != '' and callStatus == 'START'">
+        <if test="callStatus != null and callStatus != '' and (callStatus == 'START' or callStatus == 'START,CANCEL')">
             and (toer.status = 'FIRST_PREPARE' or toer.status = 'ANSWERING' or toer.status = 'BREAK_OFF' or toer.status = 'RESUME_PREPARE')
         </if>
     </select>