Parcourir la source

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

wangqiong123 il y a 2 ans
Parent
révision
e06c159759

+ 10
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Voir le fichier

@@ -123,5 +123,15 @@ public class AdjudicationController extends BaseController {
123 123
 
124 124
         return adjudicationService.getArchivesDetail(id);
125 125
     }
126
+    /**
127
+     * 根据案件id获取邮箱
128
+     * @param id 案件id
129
+     * @return
130
+     */
131
+    @GetMapping("/emailByCaseId")
132
+    public AjaxResult emailByCaseId(@RequestParam("id") Long id){
133
+
134
+        return adjudicationService.emailByCaseId(id);
135
+    }
126 136
 
127 137
 }

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Voir le fichier

@@ -84,7 +84,7 @@ public class CaseApplicationController extends BaseController {
84 84
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
85 85
 
86 86
         caseApplication.setUpdateBy(getUsername());
87
-        return toAjax(caseApplicationService.editCaseApplication(caseApplication));
87
+        return success(caseApplicationService.editCaseApplication(caseApplication));
88 88
     }
89 89
 
90 90
     /**

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java Voir le fichier

@@ -31,6 +31,10 @@ public class CaseAffiliate   extends BaseEntity {
31 31
      * 法定代表人
32 32
      */
33 33
     private String compLegalPerson;
34
+    /**
35
+     * 邮箱
36
+     */
37
+    private String email;
34 38
     /**
35 39
      * 法定代表人职位
36 40
      */
@@ -45,6 +49,14 @@ public class CaseAffiliate   extends BaseEntity {
45 49
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
46 50
     private Date responBirth;
47 51
 
52
+    public String getEmail() {
53
+        return email;
54
+    }
55
+
56
+    public void setEmail(String email) {
57
+        this.email = email;
58
+    }
59
+
48 60
     public Date getResponBirth() {
49 61
         return responBirth;
50 62
     }

+ 23
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Voir le fichier

@@ -631,6 +631,10 @@ public class CaseApplication  extends BaseEntity {
631 631
     @Excel(name = "申请人主体信息-住所",width = 26)
632 632
     private String residenAffiliAppli;
633 633
 
634
+    /** 申请人邮箱 */
635
+    @Excel(name = "申请人主体信息-邮箱",width = 26)
636
+    private String email;
637
+
634 638
 
635 639
     /** 代理人姓名 */
636 640
     @Excel(name = "申请人主体信息-代理人姓名",width = 26)
@@ -739,6 +743,9 @@ public class CaseApplication  extends BaseEntity {
739 743
     /** 单位地址 */
740 744
     @Excel(name = "被申请人主体信息-单位地址",width = 26)
741 745
     private String debtorWorkAddress;
746
+    /** 邮箱 */
747
+    @Excel(name = "被申请人主体信息-邮箱",width = 26)
748
+    private String debtorEmail;
742 749
 
743 750
     /** 代理人姓名 */
744 751
     @Excel(name = "被申请人主体信息-代理人姓名",width = 26)
@@ -757,6 +764,22 @@ public class CaseApplication  extends BaseEntity {
757 764
      */
758 765
     private String applicationOrganId;
759 766
 
767
+    public String getEmail() {
768
+        return email;
769
+    }
770
+
771
+    public void setEmail(String email) {
772
+        this.email = email;
773
+    }
774
+
775
+    public String getDebtorEmail() {
776
+        return debtorEmail;
777
+    }
778
+
779
+    public void setDebtorEmail(String debtorEmail) {
780
+        this.debtorEmail = debtorEmail;
781
+    }
782
+
760 783
     public String getApplicationOrganId() {
761 784
         return applicationOrganId;
762 785
     }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Voir le fichier

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
3 3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
6 7
 import org.apache.ibatis.annotations.Param;
7 8
 
8 9
 import java.util.List;
@@ -21,4 +22,11 @@ public interface CaseAffiliateMapper {
21 22
     CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
22 23
 
23 24
     int updataCaseAffiliate(CaseAffiliate caseAffiliate);
25
+
26
+    /**
27
+     * 根据案件查询邮箱
28
+     * @param id
29
+     * @return
30
+     */
31
+    List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
24 32
 }

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java Voir le fichier

@@ -25,4 +25,11 @@ public interface IAdjudicationService {
25 25
     AjaxResult getArchivesDetail(Long id);
26 26
 
27 27
     AjaxResult regenerationDocument(CaseApplication caseApplication);
28
+
29
+    /**
30
+     * 根据案件id查询邮箱
31
+     * @param id
32
+     * @return
33
+     */
34
+    AjaxResult emailByCaseId(Long id);
28 35
 }

+ 20
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Voir le fichier

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3
+import cn.hutool.core.collection.CollectionUtil;
3 4
 import com.alibaba.fastjson.JSON;
4 5
 import com.alibaba.fastjson.JSONObject;
5 6
 import com.deepoove.poi.data.PictureRenderData;
@@ -7,6 +8,7 @@ import com.ruoyi.common.constant.CaseApplicationConstants;
7 8
 import com.ruoyi.common.core.domain.AjaxResult;
8 9
 import com.ruoyi.common.core.redis.RedisCache;
9 10
 import com.ruoyi.common.utils.DateUtils;
11
+import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
10 12
 import com.ruoyi.wisdomarbitrate.mapper.*;
11 13
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
12 14
 import com.ruoyi.common.utils.EmailOutUtil;
@@ -936,6 +938,24 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
936 938
         }
937 939
     }
938 940
 
941
+    @Override
942
+    public AjaxResult emailByCaseId(Long id) {
943
+        List<CaseAffiliate> list = caseAffiliateMapper.emailByCaseId(id);
944
+        BookSendVO bookSendVO = new BookSendVO();
945
+        if (CollectionUtil.isNotEmpty(list)) {
946
+            for (CaseAffiliate caseAffiliate : list) {
947
+                // 申请人邮箱
948
+                if (caseAffiliate.getIdentityType() == 1) {
949
+                    bookSendVO.setAppEmail(caseAffiliate.getEmail());
950
+                } else {
951
+                    // 被申请人邮箱
952
+                    bookSendVO.setResEmail(caseAffiliate.getEmail());
953
+                }
954
+            }
955
+        }
956
+        return AjaxResult.success(bookSendVO);
957
+    }
958
+
939 959
     public String getNewEquipmentNo() {
940 960
         Object awardNum = redisCache.getCacheObject("awardNum");
941 961
         if (awardNum == null) {

+ 20
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Voir le fichier

@@ -119,6 +119,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
119 119
 
120 120
     // 手机号正则
121 121
     private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
122
+   // 邮箱正则
123
+    private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
122 124
 
123 125
 
124 126
     /**
@@ -1414,6 +1416,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1414 1416
         } else if (caseApplication.getResponBirth().after(new Date())) {
1415 1417
             failureMsg.append("【被申请人主体信息-出生年月日】字段不合法,不能超过当前日期;");
1416 1418
         }
1419
+        if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1420
+            failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1421
+        } else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
1422
+
1423
+            failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1424
+        }
1417 1425
     }
1418 1426
 
1419 1427
     /**
@@ -1514,6 +1522,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1514 1522
         } else if (caseApplication.getWorkAddress().length() > 50) {
1515 1523
             failureMsg.append("【申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
1516 1524
         }
1525
+        if (StrUtil.isEmpty(caseApplication.getEmail())) {
1526
+            failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1527
+        } else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
1528
+
1529
+            failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1530
+        }
1517 1531
     }
1518 1532
 
1519 1533
     /**
@@ -2456,6 +2470,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2456 2470
 
2457 2471
         caseAffiliate.setResidenAffili(caseApplication.getResidenAffiliAppli());
2458 2472
         caseAffiliate.setAppliAgentTitle(caseApplication.getAppliAgentTitle());
2473
+        caseAffiliate.setEmail(caseApplication.getEmail());
2459 2474
         return caseAffiliate;
2460 2475
 
2461 2476
 
@@ -2520,6 +2535,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2520 2535
         debtorCaseAffiliate.setResponSex(caseApplication.getResponSex());
2521 2536
         debtorCaseAffiliate.setResponBirth(caseApplication.getResponBirth());
2522 2537
         debtorCaseAffiliate.setResidenAffili(caseApplication.getResidenAffiliRespon());
2538
+        debtorCaseAffiliate.setEmail(caseApplication.getDebtorEmail());
2523 2539
 
2524 2540
         return debtorCaseAffiliate;
2525 2541
     }
@@ -2609,7 +2625,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2609 2625
 
2610 2626
                     // 新增预约会议表
2611 2627
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2612
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
2628
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2613 2629
                     reservedConferenceMapper.insert(conference);
2614 2630
                     return AjaxResult.success("预约会议成功");
2615 2631
 
@@ -2637,7 +2653,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2637 2653
         String roomId = generateRoomId();
2638 2654
         // 新增预约会议表
2639 2655
         ReservedConference conference = new ReservedConference(caseId, roomId,
2640
-                null, null, 0);
2656
+                null, null,0);
2641 2657
         reservedConferenceMapper.insert(conference);
2642 2658
         return roomId;
2643 2659
     }
@@ -2651,7 +2667,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2651 2667
         // 查询最大房间号
2652 2668
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2653 2669
 
2654
-        if (null == maxRoomId || maxRoomId > 999999) {
2670
+        if (null == maxRoomId || maxRoomId >999999) {
2655 2671
             return "000001";
2656 2672
         } else {
2657 2673
             return String.format("%06d", maxRoomId);
@@ -2699,7 +2715,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2699 2715
     @Override
2700 2716
     public AjaxResult deleteRoom(String roomId) {
2701 2717
 
2702
-        return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
2718
+        return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
2703 2719
     }
2704 2720
 }
2705 2721
 

+ 9
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Voir le fichier

@@ -61,6 +61,11 @@
61 61
             </if>
62 62
         </where>
63 63
     </select>
64
+    <select id="emailByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate">
65
+        select c.identity_type identityType,c.email
66
+        from case_affiliate c
67
+        where c.case_appli_id=#{caseAppliId}
68
+    </select>
64 69
 
65 70
 
66 71
     <insert id="batchCaseAffiliate">
@@ -68,13 +73,14 @@
68 73
         contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
69 74
         comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
70 75
         residen_affili,appli_agent_title,
71
-        contact_address_agent ) values
76
+        contact_address_agent,email ) values
72 77
         <foreach item="item" index="index" collection="list" separator=",">
73 78
             (#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
74 79
             #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
75 80
             #{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex},  #{item.responBirth},
76 81
             #{item.residenAffili},#{item.appliAgentTitle},
77
-            #{item.contactAddressAgent})
82
+            #{item.contactAddressAgent},
83
+            #{item.email})
78 84
         </foreach>
79 85
     </insert>
80 86
 
@@ -100,6 +106,7 @@
100 106
         contact_address_agent = #{contactAddressAgent},
101 107
         send_email = #{sendEmail},
102 108
         residen_affili = #{residenAffili},
109
+        email= #{email},
103 110
         track_num = #{trackNum}
104 111
 
105 112
         where id = #{id}