Bladeren bron

视频会议优化

18792927508 2 jaren geleden
bovenliggende
commit
e646b00333

+ 8
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java Bestand weergeven

7
 import com.ruoyi.common.config.RuoYiConfig;
7
 import com.ruoyi.common.config.RuoYiConfig;
8
 import com.ruoyi.common.core.controller.BaseController;
8
 import com.ruoyi.common.core.controller.BaseController;
9
 import com.ruoyi.common.core.domain.AjaxResult;
9
 import com.ruoyi.common.core.domain.AjaxResult;
10
+import com.ruoyi.common.enums.AnnexTypeEnum;
10
 import com.ruoyi.common.utils.SecurityUtils;
11
 import com.ruoyi.common.utils.SecurityUtils;
11
 import com.ruoyi.common.utils.file.FileUploadUtils;
12
 import com.ruoyi.common.utils.file.FileUploadUtils;
12
 import com.ruoyi.common.utils.file.FileUtils;
13
 import com.ruoyi.common.utils.file.FileUtils;
24
 
25
 
25
 import javax.servlet.http.HttpServletRequest;
26
 import javax.servlet.http.HttpServletRequest;
26
 import javax.validation.Valid;
27
 import javax.validation.Valid;
28
+import java.util.Objects;
27
 
29
 
28
 /**
30
 /**
29
  * 视频会议控制层
31
  * 视频会议控制层
31
  * @Date 2024/01/8
33
  * @Date 2024/01/8
32
  * @Version V1.0
34
  * @Version V1.0
33
  */
35
  */
36
+@CrossOrigin(origins = "*")
34
 @RestController
37
 @RestController
35
 @RequestMapping("/video")
38
 @RequestMapping("/video")
36
 public class MsVideoConferenceController extends BaseController {
39
 public class MsVideoConferenceController extends BaseController {
71
                 // officeFlag,fileName为annexPath
74
                 // officeFlag,fileName为annexPath
72
                 JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(fileName,caseId);
75
                 JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(fileName,caseId);
73
                 if(jsonArray!=null && jsonArray.size() > 0) {
76
                 if(jsonArray!=null && jsonArray.size() > 0) {
77
+                    // 先删除之前的附件
78
+                    if(Objects.equals(annexType, AnnexTypeEnum.MEDIATE_BOOK.getCode())) {
79
+                        msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
80
+                    }
74
                     MsCaseAttach caseAttach=null;
81
                     MsCaseAttach caseAttach=null;
75
                     for (Object obj : jsonArray) {
82
                     for (Object obj : jsonArray) {
76
                         JSONObject jsonObject = (JSONObject) obj;
83
                         JSONObject jsonObject = (JSONObject) obj;
125
                 .useId(SecurityUtils.getUserId())
132
                 .useId(SecurityUtils.getUserId())
126
                 .useAccount(SecurityUtils.getUsername())
133
                 .useAccount(SecurityUtils.getUsername())
127
                 .build();
134
                 .build();
128
-        // 先删除之前的附件
129
-        msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId,annexType);
135
+
130
         msCaseAttachMapper.save(caseAttach);
136
         msCaseAttachMapper.save(caseAttach);
131
         return caseAttach.getAnnexId();
137
         return caseAttach.getAnnexId();
132
     }
138
     }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java Bestand weergeven

120
      */
120
      */
121
     private Integer roleType;
121
     private Integer roleType;
122
     private Long userId;
122
     private Long userId;
123
+    /**
124
+     * 案件id
125
+     */
126
+    private Long caseId;
123
     /**
127
     /**
124
      * 是否需要用印,0-不需要,1-需要
128
      * 是否需要用印,0-不需要,1-需要
125
      */
129
      */

+ 9
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Bestand weergeven

1710
         sendMailRecord.setMailContent(sendContent);
1710
         sendMailRecord.setMailContent(sendContent);
1711
         sendMailRecord.setMailName(subject);
1711
         sendMailRecord.setMailName(subject);
1712
         sendMailRecord.setSendTime(new Date());
1712
         sendMailRecord.setSendTime(new Date());
1713
-        sendMailRecord.setCreateBy(SecurityUtils.getUsername());
1713
+//        sendMailRecord.setCreateBy(SecurityUtils.getUsername());
1714
         sendMailRecord.setCreateTime(new Date());
1714
         sendMailRecord.setCreateTime(new Date());
1715
         sendMailRecord.setMailSubject(subject);
1715
         sendMailRecord.setMailSubject(subject);
1716
         sendMailRecord.setMailFromAddress(emailFrom);
1716
         sendMailRecord.setMailFromAddress(emailFrom);
2132
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
2132
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);
2133
         // 根据案件id查询案件
2133
         // 根据案件id查询案件
2134
         MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(application.getId());
2134
         MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(application.getId());
2135
+        caseApplication.setHearDate(application.getHearDate());
2135
         long l = System.currentTimeMillis();
2136
         long l = System.currentTimeMillis();
2136
         ExecutorService executor = ThreadUtil.createThreadPool();
2137
         ExecutorService executor = ThreadUtil.createThreadPool();
2137
         CompletableFuture.runAsync(() -> {
2138
         CompletableFuture.runAsync(() -> {
2138
                     // 发送开庭短信
2139
                     // 发送开庭短信
2139
                     if (CollectionUtil.isNotEmpty(vo.getHerDates())) {
2140
                     if (CollectionUtil.isNotEmpty(vo.getHerDates())) {
2140
-                        List<MsCaseAffiliate> affiliates = selectAffliatesByCaseId(application.getId());
2141
-                        caseApplication.setHearDate(application.getHearDate());
2141
+                        List<MsCaseAffiliate> affiliates = selectAffliatesByCaseId(caseApplication.getId());
2142
+
2142
                         // 申请人发送开庭日期短信
2143
                         // 申请人发送开庭日期短信
2143
                         sendHearDateSms(caseApplication, affiliates);
2144
                         sendHearDateSms(caseApplication, affiliates);
2144
 
2145
 
2157
             meditorAffliate.setEmail(sysUser.getEmail());
2158
             meditorAffliate.setEmail(sysUser.getEmail());
2158
             String roomUuid = null;
2159
             String roomUuid = null;
2159
             // 线上调解
2160
             // 线上调解
2160
-            if (StrUtil.isNotEmpty(application.getMediationMethod()) && application.getMediationMethod().equals("1")) {
2161
+            if (StrUtil.isNotEmpty(caseApplication.getMediationMethod()) && caseApplication.getMediationMethod().equals("1")) {
2161
                 // 获取短信链接uuid
2162
                 // 获取短信链接uuid
2162
-                MeetingInfoVO meetingInfoVO = MeetingInfoVO.builder().userId(sysUser.getUserId()).userName(sysUser.getUserName()).caseId(application.getId()).roomId(application.getRoomId()).build();
2163
+                MeetingInfoVO meetingInfoVO = MeetingInfoVO.builder().userId(sysUser.getUserId()).userName(sysUser.getUserName()).caseId(caseApplication.getId()).roomId(caseApplication.getRoomId()).build();
2163
                 roomUuid = shortMessageService.buildMeetingInfoRecord(meetingInfoVO);
2164
                 roomUuid = shortMessageService.buildMeetingInfoRecord(meetingInfoVO);
2164
                 // 短信模板:2130103 线上调解时间和会议通知  尊敬的用户,您的{2}线上开庭时间为{3},会议链接https://txroom.xayunmei.com/#/home?{4},请点击链接参加会议,如非本人操作,请忽略本短信.
2165
                 // 短信模板:2130103 线上调解时间和会议通知  尊敬的用户,您的{2}线上开庭时间为{3},会议链接https://txroom.xayunmei.com/#/home?{4},请点击链接参加会议,如非本人操作,请忽略本短信.
2165
 
2166
 
3196
                             affiliateBase = new MsCaseAffiliateBase();
3197
                             affiliateBase = new MsCaseAffiliateBase();
3197
                         }
3198
                         }
3198
                         affiliateBase.setApplicant(affiliate);
3199
                         affiliateBase.setApplicant(affiliate);
3199
-                        applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
3200
+                        if(!applicantName.toString().contains(affiliate.getName()+Constants.CN_SPLIT_COMMA)) {
3201
+                            applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
3202
+                        }
3200
                         break;
3203
                         break;
3201
                     case 2:
3204
                     case 2:
3202
                         if(affiliateBase==null){
3205
                         if(affiliateBase==null){

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Bestand weergeven

1176
         sendMailRecord.setSendTime(new Date());
1176
         sendMailRecord.setSendTime(new Date());
1177
         sendMailRecord.setMailSubject("签署后的调解书");
1177
         sendMailRecord.setMailSubject("签署后的调解书");
1178
         sendMailRecord.setFileIds(fileId!=null?fileId.toString():null);
1178
         sendMailRecord.setFileIds(fileId!=null?fileId.toString():null);
1179
-        sendMailRecord.setCreateBy(SecurityUtils.getUsername());
1179
+//        sendMailRecord.setCreateBy(SecurityUtils.getUsername());
1180
         sendMailRecord.setCreateTime(new Date());
1180
         sendMailRecord.setCreateTime(new Date());
1181
         sendMailRecord.setMailFromAddress(emailFrom);
1181
         sendMailRecord.setMailFromAddress(emailFrom);
1182
 
1182
 

+ 3
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SmsUtils.java Bestand weergeven

5
 import cn.hutool.extra.spring.SpringUtil;
5
 import cn.hutool.extra.spring.SpringUtil;
6
 import cn.hutool.json.JSONObject;
6
 import cn.hutool.json.JSONObject;
7
 import com.ruoyi.common.enums.SMSStatusEnum;
7
 import com.ruoyi.common.enums.SMSStatusEnum;
8
-import com.ruoyi.common.utils.SecurityUtils;
9
 import com.ruoyi.common.utils.ThreadUtil;
8
 import com.ruoyi.common.utils.ThreadUtil;
10
 import com.ruoyi.system.domain.entity.sms.MsSmsSendRecordParam;
9
 import com.ruoyi.system.domain.entity.sms.MsSmsSendRecordParam;
11
 import com.ruoyi.system.domain.entity.sms.MsSmsTemplate;
10
 import com.ruoyi.system.domain.entity.sms.MsSmsTemplate;
122
         smsSendRecord.setSendTime(new Date());
121
         smsSendRecord.setSendTime(new Date());
123
         smsSendRecord.setPhone(phone);
122
         smsSendRecord.setPhone(phone);
124
         smsSendRecord.setCreateTime(new Date());
123
         smsSendRecord.setCreateTime(new Date());
125
-        smsSendRecord.setCreateBy(SecurityUtils.getUsername());
124
+//        smsSendRecord.setCreateBy(SecurityUtils.getUsername());
126
         //    SendSmsRequest request = new SendSmsRequest(phone, template.getTemplateId(), templateParamSet, application.getId());
125
         //    SendSmsRequest request = new SendSmsRequest(phone, template.getTemplateId(), templateParamSet, application.getId());
127
         req.setPhoneNumberSet(new String[]{"+86" + phone});
126
         req.setPhoneNumberSet(new String[]{"+86" + phone});
128
         req.setTemplateId(template.getTemplateId());
127
         req.setTemplateId(template.getTemplateId());
151
                 recordParam.setParamValue(paramValue);
150
                 recordParam.setParamValue(paramValue);
152
                 recordParams.add(recordParam);
151
                 recordParams.add(recordParam);
153
             }
152
             }
153
+//            recordParamMapper.batchInsert(recordParams);
154
+//            shortMessageService.insertShortMessageHistoryRecord(smsSendRecord,recordParams);
154
             ExecutorService executor = ThreadUtil.createThreadPool();
155
             ExecutorService executor = ThreadUtil.createThreadPool();
155
             CompletableFuture.runAsync(() -> {
156
             CompletableFuture.runAsync(() -> {
156
                 recordParamMapper.batchInsert(recordParams);
157
                 recordParamMapper.batchInsert(recordParams);

+ 6
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseApplicationMapper.xml Bestand weergeven

70
       <if test = 'req.caseFlowId != null'>
70
       <if test = 'req.caseFlowId != null'>
71
         AND c.case_flow_id = #{req.caseFlowId}
71
         AND c.case_flow_id = #{req.caseFlowId}
72
       </if>
72
       </if>
73
+      <if test = 'req.caseId != null'>
74
+        AND c.id = #{req.caseId}
75
+      </if>
73
       <!--  案件编号-->
76
       <!--  案件编号-->
74
       <if test = 'req.caseNum != null and req.caseNum != "" '>
77
       <if test = 'req.caseNum != null and req.caseNum != "" '>
75
         AND c.case_num = #{req.caseNum}
78
         AND c.case_num = #{req.caseNum}
141
       <if test = 'req.caseFlowId != null'>
144
       <if test = 'req.caseFlowId != null'>
142
         AND c.case_flow_id = #{req.caseFlowId}
145
         AND c.case_flow_id = #{req.caseFlowId}
143
       </if>
146
       </if>
147
+      <if test = 'req.caseId != null'>
148
+        AND c.id = #{req.caseId}
149
+      </if>
144
       <!--  案件编号-->
150
       <!--  案件编号-->
145
       <if test = 'req.caseNum != null and req.caseNum != "" '>
151
       <if test = 'req.caseNum != null and req.caseNum != "" '>
146
         AND c.case_num = #{req.caseNum}
152
         AND c.case_num = #{req.caseNum}