hejinbo пре 2 година
родитељ
комит
76847fafb1

+ 2
- 2
ruoyi-admin/src/main/resources/application.yml Прегледај датотеку

@@ -143,8 +143,8 @@ elegent:
143 143
     alipay:
144 144
       appId: 2021003141676135
145 145
     callback:
146
-      domain: http://121.40.189.20:9000/
147
-      watch: false
146
+      domain: http://121.40.189.20:9001/
147
+      watch: true
148 148
       cycle: 10
149 149
 identityAuthentication:
150 150
   credentialSecretId: 123

+ 98
- 75
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/Adjudication.java Прегледај датотеку

@@ -7,47 +7,28 @@ public class Adjudication {
7 7
     /**
8 8
      * 申请人姓名
9 9
      */
10
-    private String applicantName;
10
+    private String appName;
11 11
     /**
12 12
      * 申请人性别
13 13
      */
14
-    private String applicantSex;
14
+    private String appSex;
15 15
     /**
16 16
      * 申请人身份证号码
17 17
      */
18
-    private String applicantIDNo;
18
+    private String appIDNo;
19 19
     /**
20 20
      * 申请人住所
21 21
      */
22 22
     private String appAddress;
23
-    /**
24
-     * 申请人邮编
25
-     */
26
-    private String appZipCode;
27
-    /**
28
-     * 申请人组织名称
29
-     */
30
-    private String appOrgName;
31
-    /**
32
-     * 申请人组织地址
33
-     */
34
-    private String appOrgAddress;
35
-    /**
36
-     * 申请人法人姓名
37
-     */
38
-    private String appLegalPerName;
39
-    /**
40
-     * 申请人法人职务
41
-     */
42
-    private String appLegalPerJob;
23
+
43 24
     /**
44 25
      * 申请人代理人姓名
45 26
      */
46 27
     private String appAgentName;
47 28
     /**
48
-     * 申请人代理人性别
29
+     * 申请人代理人身份证
49 30
      */
50
-    private String appAgentSex;
31
+    private String appAgentIDNo;
51 32
     /**
52 33
      * 被申请人姓名
53 34
      */
@@ -64,102 +45,144 @@ public class Adjudication {
64 45
      * 被申请人住所
65 46
      */
66 47
     private String resAddress;
48
+
67 49
     /**
68
-     * 被申请人邮编
50
+     * 被申请人代理人姓名
69 51
      */
70
-    private String resZipCode;
52
+    private String resAgentName;
71 53
     /**
72
-     * 被申请人组织名称
54
+     * 被申请人代理人身份证
73 55
      */
74
-    private String resOrgName;
56
+    private String resAgentIDNo;
57
+
75 58
     /**
76
-     * 被申请人组织地址
59
+     * 案件名称
77 60
      */
78
-    private String resOrgAddress;
61
+    private String caseName;
62
+
79 63
     /**
80
-     * 被申请人法人姓名
64
+     * 仲裁员名称
81 65
      */
82
-    private String resLegalPerName;
66
+    private String arbitratorName;
83 67
     /**
84
-     * 被申请人法人职务
68
+     * 开庭年
85 69
      */
86
-    private String resLegalPerJob;
70
+    private String hearYear;
87 71
     /**
88
-     * 被申请人代理人姓名
72
+     * 开庭月
89 73
      */
90
-    private String resAgentName;
74
+    private String hearMonths;
91 75
     /**
92
-     * 被申请人代理人性别
76
+     * 开庭日
93 77
      */
94
-    private String resAgentSex;
78
+    private String hearDay;
79
+
95 80
     /**
96
-     * 第三人姓名
81
+     * 申请人具体仲裁请求
97 82
      */
98
-    private String thirdName;
83
+    private String appArbitrationClaims;
84
+
99 85
     /**
100
-     * 第三人性别
86
+     * 申请人证据名称
101 87
      */
102
-    private String thirdSex;
88
+    private String appEvidenceName;
103 89
 
104 90
     /**
105
-     * 第三人身份证
91
+     * 申请人拟证事实
106 92
      */
107
-    private String thirdDNo;
93
+    private String appProveFacts;
108 94
     /**
109
-     * 第三人住所
95
+     * 被申请人对申请人答辩内容
110 96
      */
111
-    private String thirdAddress;
97
+    private String resDefenseContentToApp;
98
+
112 99
     /**
113
-     * 第三人邮编
100
+     * 被申请人具体仲裁请求
114 101
      */
115
-    private String thirdZipCode;
102
+    private String resArbitrationClaims;
116 103
     /**
117
-     * 第三人组织名称
104
+     * 被申请人证据名称
118 105
      */
119
-    private String thirdOrgName;
106
+    private String resEvidenceName;
120 107
     /**
121
-     * 第三人组织地址
108
+     * 被申请人拟证事实
122 109
      */
123
-    private String thirdOrgAddress;
110
+    private String resProveFacts;
124 111
     /**
125
-     * 第三人法人姓名
112
+     * 申请人对被申请人答辩内容
126 113
      */
127
-    private String thirdLegalPerName;
114
+    private String appDefenseContentToRes;
128 115
     /**
129
-     * 第三人法人职务
116
+     * 第三人答辩内容
130 117
      */
131
-    private String thirdLegalPerJob;
118
+    private String thirdDefenseContent;
132 119
     /**
133
-     * 第三人代理人姓名
120
+     * 第三人证据名称
134 121
      */
135
-    private String thirdAgentName;
122
+    private String thirdEvidenceName;
136 123
     /**
137
-     * 第三人代理人性别
124
+     * 第三人拟证事实
138 125
      */
139
-    private String thirdAgentSex;
126
+    private String thirdProveFacts;
140 127
     /**
141
-     * 案件描述
128
+     * 申请人对第三人答辩内容
142 129
      */
143
-    private String caseDescribe;
144
-
130
+    private String appDefenseContentToThird;
145 131
     /**
146
-     * 仲裁员名称
132
+     * 被申请人对第三人答辩内容
147 133
      */
148
-    private String arbitratorName;
134
+    private String resDefenseContentToThird;
149 135
     /**
150
-     * 开庭年
136
+     * 证据认定
151 137
      */
152
-    private String hearYear;
138
+    private String evidenDetermi;
153 139
     /**
154
-     * 开庭月
140
+     * 认定事实
155 141
      */
156
-    private String hearMonths;
142
+    private String factDetermi;
157 143
     /**
158
-     * 开庭日
144
+     * 综上所述
159 145
      */
160
-    private String hearDay;
161
-
162
-
163
-
146
+    private String caseSketch;
147
+    /**
148
+     * 本庭认为
149
+     */
150
+    private String arbitrateThink;
151
+    /**
152
+     * 裁决如下
153
+     */
154
+    private String rulingFollows;
155
+    /**
156
+     * 法律条款
157
+     */
158
+    private String legalProvisions;
159
+    /**
160
+     * 首席仲裁
161
+     */
162
+    private String umpire;
163
+    /**
164
+     * 仲裁员1
165
+     */
166
+    private String arbitratorName1;
167
+    /**
168
+     * 仲裁员2
169
+     */
170
+    private String arbitratorName2;
171
+    /**
172
+     * 年
173
+     */
174
+    private String year;
175
+    /**
176
+     * 月
177
+     */
178
+    private String months;
179
+    /**
180
+     * 日
181
+     */
182
+    private String day;
183
+    /**
184
+     * 书记员
185
+     */
186
+    private String clerk;
164 187
 
165 188
 }

+ 89
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Прегледај датотеку

@@ -3,8 +3,11 @@ package com.ruoyi.wisdomarbitrate.service.impl;
3 3
 import com.deepoove.poi.config.Configure;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5 5
 import com.ruoyi.common.utils.WordUtil;
6
+import com.ruoyi.wisdomarbitrate.domain.Adjudication;
7
+import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
6 8
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
7 9
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
10
+import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
8 11
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
9 12
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
10 13
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
@@ -16,9 +19,9 @@ import java.io.FileInputStream;
16 19
 import java.io.FileOutputStream;
17 20
 import java.io.IOException;
18 21
 import java.io.InputStream;
19
-import java.util.HashMap;
20
-import java.util.Map;
21
-import java.util.UUID;
22
+import java.time.LocalDate;
23
+import java.time.ZoneId;
24
+import java.util.*;
22 25
 
23 26
 @Service
24 27
 public class AdjudicationServiceImpl implements IAdjudicationService {
@@ -26,18 +29,96 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
26 29
     private CaseApplicationMapper caseApplicationMapper;
27 30
     @Autowired
28 31
     private CaseAffiliateMapper caseAffiliateMapper;
32
+    @Autowired
33
+    private ArbitrateRecordMapper arbitrateRecordMapper;
34
+
29 35
     @Override
30 36
     public AjaxResult createDocument(CaseApplication caseApplication) {
31
-        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
32
-
33 37
         try {
34 38
             Map<String, Object> datas = new HashMap<>();
35
-            datas.put("1", "张三");
36
-            String modalFilePath = "D:/develop/ceshi.docx";
39
+            Adjudication adjudication = new Adjudication();
40
+            Long id = caseApplication.getId();
41
+            if (id == null){
42
+                return null;
43
+            }
44
+            //获取案件详细信息
45
+            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
46
+            //获取仲裁记录表里的相关信息
47
+            ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
48
+            arbitrateRecord.setCaseAppliId(id);
49
+            ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
50
+
51
+            //获取案件关联人信息
52
+            CaseAffiliate caseAffiliate = new CaseAffiliate();
53
+            caseAffiliate.setCaseAppliId(id);
54
+            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
55
+            if (caseAffiliates != null && caseAffiliates.size() > 0){
56
+                for (CaseAffiliate affiliate : caseAffiliates){
57
+                    //获取身份类型
58
+                    int identityType = affiliate.getIdentityType();
59
+                    if (identityType == 1) {    //申请人
60
+                        datas.put(adjudication.getAppName(), affiliate.getName());
61
+                        datas.put(adjudication.getAppSex(), null);
62
+                        datas.put(adjudication.getAppIDNo(), affiliate.getIdentityNum());
63
+                        datas.put(adjudication.getAppAddress(), affiliate.getContactAddress());
64
+                        datas.put(adjudication.getAppAgentName(), affiliate.getNameAgent());
65
+                        datas.put(adjudication.getAppAgentIDNo(),affiliate.getIdentityNumAgent());
66
+                    }else if (identityType == 2){  //被申请人
67
+                        datas.put(adjudication.getResName(), affiliate.getName());
68
+                        datas.put(adjudication.getResSex(), null);
69
+                        datas.put(adjudication.getResIDNo(), affiliate.getIdentityNum());
70
+                        datas.put(adjudication.getResAddress(), affiliate.getContactAddress());
71
+                        datas.put(adjudication.getResAgentName(), affiliate.getNameAgent());
72
+                        datas.put(adjudication.getResAgentName(),affiliate.getIdentityNumAgent());
73
+                    }
74
+                }
75
+            }
76
+            String arbitratorName = caseApplication1.getArbitratorName();
77
+            datas.put(adjudication.getCaseName(),caseApplication1.getCaseName());
78
+            datas.put(adjudication.getArbitratorName(),arbitratorName);
79
+            LocalDate localDate = caseApplication1.getHearDate()
80
+                    .toInstant()
81
+                    .atZone(ZoneId.systemDefault())
82
+                    .toLocalDate();
83
+            datas.put(adjudication.getHearYear(),  localDate.getYear());
84
+            datas.put(adjudication.getHearMonths(),  localDate.getMonthValue());
85
+            datas.put(adjudication.getHearDay(),  localDate.getDayOfMonth());
86
+            datas.put(adjudication.getAppArbitrationClaims(), null);
87
+            datas.put(adjudication.getAppEvidenceName(), null);
88
+            datas.put(adjudication.getAppProveFacts(), null);
89
+            datas.put(adjudication.getResDefenseContentToApp(), null);
90
+            datas.put(adjudication.getResArbitrationClaims(), null);
91
+            datas.put(adjudication.getResEvidenceName(), null);
92
+            datas.put(adjudication.getResProveFacts(), null);
93
+            datas.put(adjudication.getAppDefenseContentToRes(), null);
94
+            datas.put(adjudication.getEvidenDetermi(), arbitrateRecord1.getEvidenDetermi());
95
+            datas.put(adjudication.getFactDetermi(), arbitrateRecord1.getFactDetermi());
96
+            datas.put(adjudication.getCaseSketch(), arbitrateRecord1.getCaseSketch());
97
+            datas.put(adjudication.getArbitrateThink(), arbitrateRecord1.getArbitrateThink());
98
+            datas.put(adjudication.getLegalProvisions(), null);
99
+            datas.put(adjudication.getRulingFollows(), arbitrateRecord1.getRulingFollows());
100
+            datas.put(adjudication.getUmpire(), null);
101
+            if (arbitratorName.contains(",")){
102
+                String[] nameArray = arbitratorName.split(",");
103
+                String firstName = nameArray[0];
104
+                String secondName = nameArray[1];
105
+                datas.put(adjudication.getArbitratorName1(), firstName);
106
+                datas.put(adjudication.getArbitratorName2(), secondName);
107
+            }else {
108
+                String secondName = "";
109
+                datas.put(adjudication.getArbitratorName1(), arbitratorName);
110
+                datas.put(adjudication.getArbitratorName2(), secondName);
111
+            }
112
+            LocalDate now = LocalDate.now();
113
+            datas.put(adjudication.getYear(), now.getYear());
114
+            datas.put(adjudication.getMonths(), now.getMonthValue());
115
+            datas.put(adjudication.getDay(), now.getDayOfMonth());
116
+            datas.put(adjudication.getClerk(), null);
117
+            String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
37 118
             String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
38 119
             String resultFilePath = "D:/data/" + fileName;
39 120
             String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
40
-            return AjaxResult.success("裁决书保存路径为"+docFilePath);
121
+            return AjaxResult.success("裁决书保存路径为" + docFilePath);
41 122
         } catch (IOException e) {
42 123
             e.printStackTrace();
43 124
         }

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java Прегледај датотеку

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
13 13
 public class CallBackHandleServiceImpl implements CallBackService {
14 14
     @Autowired
15 15
     private CasePaymentServiceImpl casePaymentService;
16
+    
16 17
     @Override
17 18
     public void successPay(String orderSn) {
18 19
         casePaymentService.callback(orderSn);