Parcourir la source

组庭确认开发

qitz il y a 2 ans
Parent
révision
9eae44bc89

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

@@ -141,13 +141,24 @@ public class CaseApplicationController  extends BaseController {
141 141
      * 组庭审核
142 142
      */
143 143
     @PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
144
-    @Log(title = "组庭", businessType = BusinessType.UPDATE)
144
+    @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
145 145
     @PostMapping("/pendTralCheck")
146 146
     public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
147 147
     {
148 148
         return toAjax(caseApplicationService.pendTralCheck(caseApplication));
149 149
     }
150 150
 
151
+    /**
152
+     * 组庭确认
153
+     */
154
+    @PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
155
+    @Log(title = "组庭确认", businessType = BusinessType.UPDATE)
156
+    @PostMapping("/pendTralSure")
157
+    public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
158
+    {
159
+        return toAjax(caseApplicationService.pendTralSure(caseApplication));
160
+    }
161
+
151 162
 
152 163
 
153 164
     /**

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

@@ -2,6 +2,8 @@ package com.ruoyi.wisdomarbitrate.domain;
2 2
 
3 3
 import com.ruoyi.common.core.domain.BaseEntity;
4 4
 
5
+import java.util.List;
6
+
5 7
 public class Arbitrator    extends BaseEntity {
6 8
     private static final long serialVersionUID = 1L;
7 9
 
@@ -22,6 +24,16 @@ public class Arbitrator    extends BaseEntity {
22 24
     /** 联系电话 */
23 25
     private String telephone;
24 26
 
27
+    List<Long> idList;
28
+
29
+    public List<Long> getIdList() {
30
+        return idList;
31
+    }
32
+
33
+    public void setIdList(List<Long> idList) {
34
+        this.idList = idList;
35
+    }
36
+
25 37
     public String getArbitratorName() {
26 38
         return arbitratorName;
27 39
     }

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

@@ -80,6 +80,37 @@ public class CaseApplication  extends BaseEntity {
80 80
     private int objectionAddEviden;
81 81
     /** 是否需要开庭审理 */
82 82
     private int openCourtHear;
83
+    /** 案件状态名称 */
84
+    private String caseStatusName;
85
+
86
+    public String getCaseStatusName() {
87
+        return caseStatusName;
88
+    }
89
+
90
+    public void setCaseStatusName(String caseStatusName) {
91
+        this.caseStatusName = caseStatusName;
92
+    }
93
+
94
+    /** 申请人名称 */
95
+    private String applicantName;
96
+    /** 被申请人名称 */
97
+    private String respondentName;
98
+
99
+    public String getApplicantName() {
100
+        return applicantName;
101
+    }
102
+
103
+    public void setApplicantName(String applicantName) {
104
+        this.applicantName = applicantName;
105
+    }
106
+
107
+    public String getRespondentName() {
108
+        return respondentName;
109
+    }
110
+
111
+    public void setRespondentName(String respondentName) {
112
+        this.respondentName = respondentName;
113
+    }
83 114
 
84 115
     public int getObjectionAddEviden() {
85 116
         return objectionAddEviden;

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

@@ -27,4 +27,6 @@ public interface ICaseApplicationService {
27 27
     int pendingAppointArbotrar(CaseApplication caseApplication);
28 28
 
29 29
     int pendTralCheck(CaseApplication caseApplication);
30
+
31
+    int pendTralSure(CaseApplication caseApplication);
30 32
 }

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

@@ -2,11 +2,14 @@ package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import com.ruoyi.common.constant.CaseApplicationConstants;
4 4
 import com.ruoyi.common.exception.ServiceException;
5
+import com.ruoyi.common.utils.DateUtils;
6
+import com.ruoyi.common.utils.SmsUtils;
5 7
 import com.ruoyi.common.utils.StringUtils;
6 8
 import com.ruoyi.common.utils.bean.BeanUtils;
7 9
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
8 10
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
9 11
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
12
+import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
10 13
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
11 14
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
12 15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -15,10 +18,8 @@ import org.springframework.stereotype.Service;
15 18
 import org.springframework.transaction.annotation.Transactional;
16 19
 
17 20
 import java.lang.reflect.Field;
18
-import java.util.ArrayList;
19
-import java.util.Comparator;
20
-import java.util.List;
21
-import java.util.TreeSet;
21
+import java.text.SimpleDateFormat;
22
+import java.util.*;
22 23
 import java.util.stream.Collectors;
23 24
 
24 25
 import static com.ruoyi.common.core.domain.AjaxResult.error;
@@ -33,6 +34,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
33 34
     @Autowired
34 35
     private CaseAffiliateMapper caseAffiliateMapper;
35 36
 
37
+    @Autowired
38
+    private ArbitratorMapper arbitratorMapper;
39
+
36 40
 
37 41
     @Override
38 42
     public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
@@ -99,7 +103,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
99 103
         CaseAffiliate caseAffiliate = new CaseAffiliate();
100 104
         caseAffiliate.setCaseAppliId(caseApplication.getId());
101 105
         List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
102
-        if(caseApplicationselect!=null){
106
+        if(caseAffiliatListeselect!=null){
107
+            StringBuffer applicantName = new StringBuffer();
108
+            StringBuffer respondentName = new StringBuffer();
109
+            for (int i = 0; i < caseAffiliatListeselect.size(); i++){
110
+                CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
111
+                int identityType = caseAffiliateselect.getIdentityType();
112
+                if(identityType==1){
113
+                    applicantName.append(caseAffiliateselect.getName()).append(",");;
114
+                }else if(identityType==2){
115
+                    respondentName.append(caseAffiliateselect.getName()).append(",");;
116
+                }
117
+            }
118
+            caseApplicationselect.setApplicantName(applicantName.toString());
119
+            caseApplicationselect.setRespondentName(respondentName.toString());
103 120
             caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
104 121
         }
105 122
         return caseApplicationselect;
@@ -231,6 +248,66 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
231 248
         return rows;
232 249
     }
233 250
 
251
+    @Override
252
+    @Transactional
253
+    public int pendTralSure(CaseApplication caseApplication) {
254
+        caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
255
+        int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
256
+
257
+        //发送短信通知
258
+        SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
259
+        request.setTemplateId("1931000");
260
+
261
+        CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
262
+        String caseNum = caseApplicationselect.getCaseNum();
263
+        Date hearDate = caseApplicationselect.getHearDate();
264
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
265
+        String hearDatestr = dateFormat.format(hearDate);
266
+
267
+        String arbitratorId = caseApplicationselect.getArbitratorId();
268
+        List<Arbitrator> arbitratorList = new ArrayList<>();
269
+        if(StringUtils.isNotEmpty(arbitratorId)){
270
+            String[] idStrList  = arbitratorId.split(",");
271
+            List<Long> idList = new ArrayList<>();
272
+            for(int i = 0;i < idStrList.length;i ++ ){
273
+                idList.add(Long.parseLong(idStrList[i]));
274
+            }
275
+            Arbitrator arbitrator = new Arbitrator();
276
+            arbitrator.setIdList(idList);
277
+            arbitratorList = arbitratorMapper.selectArbitratorList(arbitrator);
278
+            if(arbitratorList!=null) {
279
+                for (int i = 0; i < arbitratorList.size(); i++) {
280
+                    Arbitrator arbitratorselect = arbitratorList.get(i);
281
+                    //给仲裁员发送短信通知
282
+                    request.setPhone(arbitratorselect.getTelephone());
283
+                    // 1931000 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
284
+                    String name = arbitratorselect.getArbitratorName();
285
+                    request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
286
+                    SmsUtils.sendSms(request);
287
+                }
288
+            }
289
+        }
290
+
291
+        CaseAffiliate caseAffiliate = new CaseAffiliate();
292
+        caseAffiliate.setCaseAppliId(caseApplication.getId());
293
+        List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
294
+        if(caseAffiliatListeselect!=null) {
295
+            for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
296
+                CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
297
+                int identityType = caseAffiliateselect.getIdentityType();
298
+                //给申请人、被申请人发送短信通知
299
+                request.setPhone(caseAffiliateselect.getContactTelphone());
300
+                // 1931000 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
301
+                String name = caseAffiliateselect.getName();
302
+                request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
303
+                SmsUtils.sendSms(request);
304
+            }
305
+        }
306
+
307
+        return rows;
308
+
309
+    }
310
+
234 311
     @Override
235 312
     @Transactional
236 313
     public int pendingAppointArbotrar(CaseApplication caseApplication) {

+ 8
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitratorMapper.xml Voir le fichier

@@ -26,6 +26,14 @@
26 26
             <if test="arbitratorName != null and arbitratorName != ''">
27 27
                 AND a.arbitrator_name like concat('%', #{arbitratorName}, '%')
28 28
             </if>
29
+
30
+            <if test="idList != null and idList.size() > 0">
31
+                AND a.id in
32
+                <foreach item="id" collection="idList" open="(" separator="," close=")">
33
+                    #{id}
34
+                </foreach>
35
+            </if>
36
+
29 37
         </where>
30 38
     </select>
31 39
 

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

@@ -24,7 +24,7 @@
24 24
         <result property="beginVideoDate"     column="begin_video_date"     />
25 25
         <result property="onlineVideoPerson"       column="online_video_person"       />
26 26
         <result property="contractNumber"      column="contract_number"     />
27
-
27
+        <result property="caseStatusName"      column="caseStatusName"     />
28 28
         <result property="createBy"     column="create_by"    />
29 29
         <result property="createTime"   column="create_time"  />
30 30
         <result property="updateBy"     column="update_by"    />
@@ -34,7 +34,16 @@
34 34
 
35 35
 
36 36
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
37
-        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,c.hear_date ,c.arbitrat_claims ,
37
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,
38
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
39
+                            when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
40
+                            when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
41
+                            when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
42
+                            when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
43
+                            when 15 then '待仲裁文书送达' when 16 then '待案件归档'
44
+                            ELSE '无案件状态'
45
+                            END caseStatusName,
46
+        c.hear_date ,c.arbitrat_claims ,
38 47
         c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
39 48
         c.paid_expenses ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
40 49
         c.update_by ,c.update_time
@@ -152,6 +161,7 @@
152 161
             <if test="isAgreePendTral != null">is_agree_pend_tral = #{isAgreePendTral},</if>
153 162
             <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
154 163
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
164
+            <if test="hearDate != null">hear_date = #{hearDate},</if>
155 165
         </set>
156 166
         where id = #{id}
157 167
     </update>