浏览代码

Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

wangqiong123 2 年前
父节点
当前提交
9d166377cb

+ 1
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java 查看文件

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
19 19
 import com.ruoyi.common.utils.poi.ExcelUtil;
20 20
 import org.springframework.web.multipart.MultipartFile;
21 21
 
22
+import javax.annotation.security.PermitAll;
22 23
 import javax.servlet.http.HttpServletResponse;
23 24
 import java.io.IOException;
24 25
 import java.util.List;

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SendRoomNoMessageVO.java 查看文件

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.domain.vo;
3 3
 import lombok.Data;
4 4
 
5 5
 import javax.validation.constraints.NotEmpty;
6
+import javax.validation.constraints.NotNull;
6 7
 import java.io.Serializable;
7 8
 
8 9
 /**
@@ -13,7 +14,7 @@ import java.io.Serializable;
13 14
 @Data
14 15
 public class SendRoomNoMessageVO implements Serializable {
15 16
     private static final long serialVersionUID = 1L;
16
-    @NotEmpty(message = "案件id不能为空")
17
+    @NotNull(message = "案件id不能为空")
17 18
     private Long id;
18 19
     @NotEmpty(message = "房间号不能为空")
19 20
     private String roomNo;

+ 0
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java 查看文件

@@ -8,12 +8,4 @@ import java.util.List;
8 8
 public interface ArbitratorMapper {
9 9
     List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
10 10
 
11
-    /**
12
-     * 根据案件id和身份类型查询案件关联人
13
-     * @param caseAppliId
14
-     * @param identityType
15
-     * @return
16
-     */
17
-    Arbitrator selectArbitratorById(@Param("caseAppliId") Long caseAppliId,@Param("identityType") Integer identityType);
18
-
19 11
 }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java 查看文件

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 
@@ -15,6 +16,7 @@ public interface CaseAffiliateMapper {
15 16
 
16 17
 
17 18
     List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
19
+    CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
18 20
 
19 21
     int updataCaseAffiliate(CaseAffiliate caseAffiliate);
20 22
 }

+ 5
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java 查看文件

@@ -461,8 +461,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
461 461
      */
462 462
     @Override
463 463
     public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
464
-        Arbitrator arbitrator = arbitratorMapper.selectArbitratorById(messageVO.getId(), 2);
465
-        if(null==arbitrator){
464
+        CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2);
465
+        if(null==caseAffiliate){
466 466
             return "被申请人不存在";
467 467
         }
468 468
         CaseApplication caseApplication = new CaseApplication();
@@ -473,9 +473,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
473 473
         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
474 474
         request.setTemplateId("1948332");
475 475
         // 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
476
-        request.setPhone(arbitrator.getTelephone());
477
-        request.setTemplateParamSet(new String[]{arbitrator.getArbitratorName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
478
-
476
+        request.setPhone(caseAffiliate.getContactTelphone());
477
+        request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
478
+        SmsUtils.sendSms(request);
479 479
 
480 480
         return "短信发送成功";
481 481
     }

+ 0
- 16
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitratorMapper.xml 查看文件

@@ -36,21 +36,5 @@
36 36
 
37 37
         </where>
38 38
     </select>
39
-    <select id="selectArbitratorById" resultMap="ArbitratorResult">
40
-        select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
41
-        a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
42
-        from arbitrator a
43
-        <where>
44
-            <if test="caseAppliId != null and caseAppliId != ''">
45
-                AND ca.ase_appliId=#{caseAppliId}
46
-            </if>
47
-
48
-            <if test="identityType != null and identityType != ''">
49
-                a.identity_type=#{identityType}
50
-            </if>
51
-
52
-        </where>
53
-    </select>
54
-
55 39
 
56 40
 </mapper>

+ 14
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml 查看文件

@@ -33,6 +33,20 @@
33 33
             </if>
34 34
         </where>
35 35
     </select>
36
+    <select id="selectCaseAffiliateByIdentityType"  resultMap="CaseAffiliateResult">
37
+        select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
38
+        c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
39
+        c.track_num
40
+        from case_affiliate c
41
+        <where>
42
+            <if test="caseAppliId != null ">
43
+                AND c.case_appli_id = #{caseAppliId}
44
+            </if>
45
+            <if test="caseAppliId != null ">
46
+                AND c.identity_type = #{identityType}
47
+            </if>
48
+        </where>
49
+    </select>
36 50
 
37 51
 
38 52
     <insert id="batchCaseAffiliate">