Просмотр исходного кода

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb

hejinbo 2 лет назад
Родитель
Сommit
f5aa2d9d06

+ 10
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Просмотреть файл

123
 
123
 
124
         return adjudicationService.getArchivesDetail(id);
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 Просмотреть файл

84
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
84
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
85
 
85
 
86
         caseApplication.setUpdateBy(getUsername());
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 Просмотреть файл

31
      * 法定代表人
31
      * 法定代表人
32
      */
32
      */
33
     private String compLegalPerson;
33
     private String compLegalPerson;
34
+    /**
35
+     * 邮箱
36
+     */
37
+    private String email;
34
     /**
38
     /**
35
      * 法定代表人职位
39
      * 法定代表人职位
36
      */
40
      */
45
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
49
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
46
     private Date responBirth;
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
     public Date getResponBirth() {
60
     public Date getResponBirth() {
49
         return responBirth;
61
         return responBirth;
50
     }
62
     }

+ 23
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Просмотреть файл

631
     @Excel(name = "申请人主体信息-住所",width = 26)
631
     @Excel(name = "申请人主体信息-住所",width = 26)
632
     private String residenAffiliAppli;
632
     private String residenAffiliAppli;
633
 
633
 
634
+    /** 申请人邮箱 */
635
+    @Excel(name = "申请人主体信息-邮箱",width = 26)
636
+    private String email;
637
+
634
 
638
 
635
     /** 代理人姓名 */
639
     /** 代理人姓名 */
636
     @Excel(name = "申请人主体信息-代理人姓名",width = 26)
640
     @Excel(name = "申请人主体信息-代理人姓名",width = 26)
739
     /** 单位地址 */
743
     /** 单位地址 */
740
     @Excel(name = "被申请人主体信息-单位地址",width = 26)
744
     @Excel(name = "被申请人主体信息-单位地址",width = 26)
741
     private String debtorWorkAddress;
745
     private String debtorWorkAddress;
746
+    /** 邮箱 */
747
+    @Excel(name = "被申请人主体信息-邮箱",width = 26)
748
+    private String debtorEmail;
742
 
749
 
743
     /** 代理人姓名 */
750
     /** 代理人姓名 */
744
     @Excel(name = "被申请人主体信息-代理人姓名",width = 26)
751
     @Excel(name = "被申请人主体信息-代理人姓名",width = 26)
757
      */
764
      */
758
     private String applicationOrganId;
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
     public String getApplicationOrganId() {
783
     public String getApplicationOrganId() {
761
         return applicationOrganId;
784
         return applicationOrganId;
762
     }
785
     }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Просмотреть файл

3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
6
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
7
 
8
 
8
 import java.util.List;
9
 import java.util.List;
21
     CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
22
     CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
22
 
23
 
23
     int updataCaseAffiliate(CaseAffiliate caseAffiliate);
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 Просмотреть файл

25
     AjaxResult getArchivesDetail(Long id);
25
     AjaxResult getArchivesDetail(Long id);
26
 
26
 
27
     AjaxResult regenerationDocument(CaseApplication caseApplication);
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 Просмотреть файл

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
+import cn.hutool.core.collection.CollectionUtil;
3
 import com.alibaba.fastjson.JSON;
4
 import com.alibaba.fastjson.JSON;
4
 import com.alibaba.fastjson.JSONObject;
5
 import com.alibaba.fastjson.JSONObject;
5
 import com.deepoove.poi.data.PictureRenderData;
6
 import com.deepoove.poi.data.PictureRenderData;
7
 import com.ruoyi.common.core.domain.AjaxResult;
8
 import com.ruoyi.common.core.domain.AjaxResult;
8
 import com.ruoyi.common.core.redis.RedisCache;
9
 import com.ruoyi.common.core.redis.RedisCache;
9
 import com.ruoyi.common.utils.DateUtils;
10
 import com.ruoyi.common.utils.DateUtils;
11
+import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
10
 import com.ruoyi.wisdomarbitrate.mapper.*;
12
 import com.ruoyi.wisdomarbitrate.mapper.*;
11
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
13
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
12
 import com.ruoyi.common.utils.EmailOutUtil;
14
 import com.ruoyi.common.utils.EmailOutUtil;
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
     public String getNewEquipmentNo() {
959
     public String getNewEquipmentNo() {
940
         Object awardNum = redisCache.getCacheObject("awardNum");
960
         Object awardNum = redisCache.getCacheObject("awardNum");
941
         if (awardNum == null) {
961
         if (awardNum == null) {

+ 20
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

119
 
119
 
120
     // 手机号正则
120
     // 手机号正则
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}$");
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
         } else if (caseApplication.getResponBirth().after(new Date())) {
1416
         } else if (caseApplication.getResponBirth().after(new Date())) {
1415
             failureMsg.append("【被申请人主体信息-出生年月日】字段不合法,不能超过当前日期;");
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
         } else if (caseApplication.getWorkAddress().length() > 50) {
1522
         } else if (caseApplication.getWorkAddress().length() > 50) {
1515
             failureMsg.append("【申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
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
 
2470
 
2457
         caseAffiliate.setResidenAffili(caseApplication.getResidenAffiliAppli());
2471
         caseAffiliate.setResidenAffili(caseApplication.getResidenAffiliAppli());
2458
         caseAffiliate.setAppliAgentTitle(caseApplication.getAppliAgentTitle());
2472
         caseAffiliate.setAppliAgentTitle(caseApplication.getAppliAgentTitle());
2473
+        caseAffiliate.setEmail(caseApplication.getEmail());
2459
         return caseAffiliate;
2474
         return caseAffiliate;
2460
 
2475
 
2461
 
2476
 
2520
         debtorCaseAffiliate.setResponSex(caseApplication.getResponSex());
2535
         debtorCaseAffiliate.setResponSex(caseApplication.getResponSex());
2521
         debtorCaseAffiliate.setResponBirth(caseApplication.getResponBirth());
2536
         debtorCaseAffiliate.setResponBirth(caseApplication.getResponBirth());
2522
         debtorCaseAffiliate.setResidenAffili(caseApplication.getResidenAffiliRespon());
2537
         debtorCaseAffiliate.setResidenAffili(caseApplication.getResidenAffiliRespon());
2538
+        debtorCaseAffiliate.setEmail(caseApplication.getDebtorEmail());
2523
 
2539
 
2524
         return debtorCaseAffiliate;
2540
         return debtorCaseAffiliate;
2525
     }
2541
     }
2609
 
2625
 
2610
                     // 新增预约会议表
2626
                     // 新增预约会议表
2611
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2627
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2612
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
2628
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2613
                     reservedConferenceMapper.insert(conference);
2629
                     reservedConferenceMapper.insert(conference);
2614
                     return AjaxResult.success("预约会议成功");
2630
                     return AjaxResult.success("预约会议成功");
2615
 
2631
 
2637
         String roomId = generateRoomId();
2653
         String roomId = generateRoomId();
2638
         // 新增预约会议表
2654
         // 新增预约会议表
2639
         ReservedConference conference = new ReservedConference(caseId, roomId,
2655
         ReservedConference conference = new ReservedConference(caseId, roomId,
2640
-                null, null, 0);
2656
+                null, null,0);
2641
         reservedConferenceMapper.insert(conference);
2657
         reservedConferenceMapper.insert(conference);
2642
         return roomId;
2658
         return roomId;
2643
     }
2659
     }
2651
         // 查询最大房间号
2667
         // 查询最大房间号
2652
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2668
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2653
 
2669
 
2654
-        if (null == maxRoomId || maxRoomId > 999999) {
2670
+        if (null == maxRoomId || maxRoomId >999999) {
2655
             return "000001";
2671
             return "000001";
2656
         } else {
2672
         } else {
2657
             return String.format("%06d", maxRoomId);
2673
             return String.format("%06d", maxRoomId);
2699
     @Override
2715
     @Override
2700
     public AjaxResult deleteRoom(String roomId) {
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 Просмотреть файл

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