Browse Source

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

hejinbo 2 years ago
parent
commit
428d69383a

+ 9
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java View File

@@ -110,7 +110,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
110 110
                             datas.put("resDateOfBirth", responBirthStr);
111 111
 
112 112
                         }
113
-
114 113
                         datas.put("resContactAddress", affiliate.getContactAddress());
115 114
                         nameAgentList.add(affiliate.getNameAgent());
116 115
                     }
@@ -266,10 +265,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
266 265
             datas.put("year", year);
267 266
             String month = String.format("%02d", now.getMonthValue());
268 267
             String day = String.format("%02d", now.getDayOfMonth());
269
-            //String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
270
-            String modalFilePath = "D:/develop/新裁决书模板.docx";
271
-            //String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
272
-            String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
268
+            String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
269
+            //String modalFilePath = "D:/develop/新裁决书模板.docx";
270
+            String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
271
+            //String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
273 272
             String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
274 273
             String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
275 274
             String resultFilePath = saveFolderPath + "/" + fileName;
@@ -297,9 +296,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
297 296
                     .build();
298 297
             //保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
299 298
             List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
300
-            if (caseAttachList != null ) {
299
+            if (caseAttachList != null && caseAttachList.size()>0) {
301 300
                 //之前已经生成过了,更新
302
-                caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
301
+                int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
303 302
             }else {
304 303
                 //之前没生成过,新增
305 304
                 int i = caseAttachMapper.save(caseAttach);
@@ -312,6 +311,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
312 311
                     }
313 312
                 }
314 313
             }
314
+            //修改案件状态
315
+            caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
316
+            caseApplicationMapper.submitCaseApplication(caseApplication1);
315 317
             return AjaxResult.success("裁决书已生成");
316 318
         } catch (IOException e) {
317 319
             return AjaxResult.error(e + "请检查文件路径是否有误");

+ 2
- 23
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java View File

@@ -178,26 +178,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
178 178
                 CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
179 179
             }
180 180
         }
181
-
182
-
183
-        //根据仲裁方式决定生成裁决书还是庭审笔录
184
-        Integer arbitratMethod = caseApplication1.getArbitratMethod();
185
-        if (arbitratMethod == 1) {
186
-            //开庭审理,需要生成裁决书和庭审笔录
187
-            Boolean aBoolean = generateTrialTranscripts(arbitrateRecord);
188 181
             Boolean aBoolean1 = generateAward(arbitrateRecord);
189
-            if (aBoolean && aBoolean1) {
190
-                //修改案件状态
191
-                caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
192
-                int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
193
-                if (i > 0) {
194
-                    return AjaxResult.success("审理成功");
195
-                }
196
-            }
197
-        } else if (arbitratMethod == 2) {
198
-            //书面审理,只生成裁决书
199
-            Boolean aBoolean = generateAward(arbitrateRecord);
200
-            if (aBoolean) {
182
+            if (aBoolean1) {
201 183
                 //修改案件状态
202 184
                 caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
203 185
                 int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
@@ -205,10 +187,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
205 187
                     return AjaxResult.success("审理成功");
206 188
                 }
207 189
             }
208
-        } else {
209
-            return AjaxResult.error("请确认仲裁方式");
210
-        }
211
-        return null;
190
+        return AjaxResult.error("裁决书生成有误");
212 191
     }
213 192
 
214 193