Bläddra i källkod

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

bgy 2 år sedan
förälder
incheckning
01d86180a9

+ 4
- 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Visa fil

@@ -25,7 +25,6 @@ public class AdjudicationController extends BaseController {
25 25
      * @return
26 26
      */
27 27
     @PostMapping("/document")
28
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:createaward')")
29 28
     public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
30 29
         return adjudicationService.createDocument(caseApplication);
31 30
     }
@@ -58,7 +57,7 @@ public class AdjudicationController extends BaseController {
58 57
      * @return
59 58
      */
60 59
     @PostMapping("/signature")
61
-    @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
60
+//    @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
62 61
     public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
63 62
         return adjudicationService.signature(caseApplication);
64 63
     }
@@ -69,7 +68,7 @@ public class AdjudicationController extends BaseController {
69 68
      * @return
70 69
      */
71 70
     @PostMapping("/caseFile")
72
-    @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
71
+//    @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
73 72
     public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
74 73
         return adjudicationService.caseFile(caseApplication);
75 74
     }
@@ -80,7 +79,7 @@ public class AdjudicationController extends BaseController {
80 79
      * @return
81 80
      */
82 81
     @PostMapping("/service")
83
-    @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
82
+//    @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
84 83
     public AjaxResult service(@RequestBody BookSendVO bookSendVO){
85 84
         return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
86 85
     }
@@ -90,7 +89,7 @@ public class AdjudicationController extends BaseController {
90 89
      * @return
91 90
      */
92 91
     @PostMapping("/stamp")
93
-    @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
92
+//    @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
94 93
     public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
95 94
         return adjudicationService.stamp(caseApplication);
96 95
     }

+ 16
- 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Visa fil

@@ -44,7 +44,7 @@ public class CaseApplicationController extends BaseController {
44 44
     /**
45 45
      * 新增立案数据
46 46
      */
47
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
47
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
48 48
     @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
49 49
     @PostMapping("/addCaseApplication")
50 50
     public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
@@ -57,7 +57,7 @@ public class CaseApplicationController extends BaseController {
57 57
     /**
58 58
      * 修改立案数据
59 59
      */
60
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
60
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
61 61
     @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
62 62
     @PostMapping("/editCaseApplication")
63 63
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -69,7 +69,7 @@ public class CaseApplicationController extends BaseController {
69 69
     /**
70 70
      * 提交立案申请
71 71
      */
72
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
72
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
73 73
     @Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
74 74
     @PostMapping("/submitCaseApplication")
75 75
     public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -80,7 +80,7 @@ public class CaseApplicationController extends BaseController {
80 80
     /**
81 81
      * 删除立案数据
82 82
      */
83
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
83
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
84 84
     @Log(title = "删除立案数据", businessType = BusinessType.DELETE)
85 85
     @PostMapping("/removeCaseApplication")
86 86
     public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -91,7 +91,7 @@ public class CaseApplicationController extends BaseController {
91 91
     /**
92 92
      * 查询立案信息
93 93
      */
94
-     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
94
+//     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
95 95
     @PostMapping("/selectCaseApplication")
96 96
     public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
97 97
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
@@ -101,7 +101,7 @@ public class CaseApplicationController extends BaseController {
101 101
     /**
102 102
      * 查询签名链接
103 103
      */
104
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
104
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
105 105
     @PostMapping("/selectSignUrl")
106 106
     public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
107 107
         SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
@@ -111,7 +111,7 @@ public class CaseApplicationController extends BaseController {
111 111
     /**
112 112
      * 查询用印链接
113 113
      */
114
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
114
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
115 115
     @PostMapping("/selectSealUrl")
116 116
     public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
117 117
         SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
@@ -128,7 +128,7 @@ public class CaseApplicationController extends BaseController {
128 128
     }
129 129
 
130 130
     @Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
131
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
131
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
132 132
     @PostMapping("/importData")
133 133
     public AjaxResult importData(MultipartFile file) throws Exception {
134 134
         if(file==null){
@@ -144,7 +144,7 @@ public class CaseApplicationController extends BaseController {
144 144
     /**
145 145
      * 组庭
146 146
      */
147
-    @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
147
+//    @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
148 148
     @Log(title = "组庭", businessType = BusinessType.UPDATE)
149 149
     @PostMapping("/pendTral")
150 150
     public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
@@ -154,7 +154,7 @@ public class CaseApplicationController extends BaseController {
154 154
     /**
155 155
      * 组庭审核
156 156
      */
157
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
157
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
158 158
     @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
159 159
     @PostMapping("/pendTralCheck")
160 160
     public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -164,7 +164,7 @@ public class CaseApplicationController extends BaseController {
164 164
     /**
165 165
      * 组庭确认
166 166
      */
167
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
167
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
168 168
     @Log(title = "组庭确认", businessType = BusinessType.UPDATE)
169 169
     @PostMapping("/pendTralSure")
170 170
     public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
@@ -174,7 +174,7 @@ public class CaseApplicationController extends BaseController {
174 174
     /**
175 175
      * 核验裁决书
176 176
      */
177
-    @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
177
+//    @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
178 178
     @Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
179 179
     @PostMapping("/verificationArbitrateRecord")
180 180
     public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -184,7 +184,7 @@ public class CaseApplicationController extends BaseController {
184 184
     /**
185 185
      * 审核裁决书
186 186
      */
187
-    @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
187
+//    @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
188 188
     @Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
189 189
     @PostMapping("/checkArbitrateRecord")
190 190
     public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -195,7 +195,7 @@ public class CaseApplicationController extends BaseController {
195 195
     /**
196 196
      * 是否指派仲裁员
197 197
      */
198
-    @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
198
+//    @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
199 199
     @Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
200 200
     @PostMapping("/pendingAppointArbotrar")
201 201
     public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
@@ -205,7 +205,7 @@ public class CaseApplicationController extends BaseController {
205 205
     /**
206 206
      * 提交立案审查
207 207
      */
208
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
208
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
209 209
     @Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
210 210
     @PostMapping("/submitCaseApplicationCheck")
211 211
     public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -216,7 +216,7 @@ public class CaseApplicationController extends BaseController {
216 216
     /**
217 217
      * 确认缴费查询立案信息
218 218
      */
219
-    @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
219
+//    @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
220 220
     @PostMapping("/selectCaseApplicationConfirm")
221 221
     public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
222 222
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);

+ 1
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java Visa fil

@@ -23,7 +23,7 @@ public class CaseArbitrateController extends BaseController {
23 23
      * @return
24 24
      */
25 25
     @PutMapping("/method")
26
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
26
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
27 27
     public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
28 28
             ,Integer opinion){
29 29
         return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
@@ -35,7 +35,6 @@ public class CaseArbitrateController extends BaseController {
35 35
      * @return
36 36
      */
37 37
     @PostMapping("/writtenHear")
38
-    @PreAuthorize("@ss.hasPermi('caseManagement:hear')")
39 38
     public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
40 39
         return caseArbitrateService.writtenHear(arbitrateRecord);
41 40
     }

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java Visa fil

@@ -22,7 +22,7 @@ public class CaseLogRecordController   extends BaseController {
22 22
     /**
23 23
      * 查询案件日志列表
24 24
      */
25
-    @PreAuthorize("@ss.hasPermi('caseLog:list')")
25
+//    @PreAuthorize("@ss.hasPermi('caseLog:list')")
26 26
     @GetMapping("/list")
27 27
     public TableDataInfo list(CaseLogRecord caseLogRecord)
28 28
     {

+ 2
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java Visa fil

@@ -25,7 +25,7 @@ public class CasePaymentController {
25 25
      * @param casePayDTO 缴费传入参数
26 26
      * @return 统一响应结果
27 27
      */
28
-    @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
28
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
29 29
     @PostMapping("/casePay")
30 30
     public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
31 31
         return paymentService.casePay(casePayDTO);
@@ -36,7 +36,7 @@ public class CasePaymentController {
36 36
      * @param caseApplication
37 37
      * @return
38 38
      */
39
-    @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
39
+//    @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
40 40
     @PutMapping("/confirm")
41 41
     public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
42 42
         return paymentService.confirmPayment(caseApplication);

+ 8
- 2
ruoyi-admin/src/main/resources/application.yml Visa fil

@@ -94,14 +94,20 @@ spring:
94 94
   mail:
95 95
     host: smtp.163.com
96 96
     port: 25
97
-    username: hjbjava@163.com
98
-    password: BSRSSEPJWGNNVYYL
97
+    username: lmj1549843951@163.com
98
+    password: JGIOQVFCLAZKXRKO
99 99
     default-encoding: UTF-8
100 100
     properties:
101 101
       mail:
102 102
         smtp:
103
+          connectiontimeout: 5000
104
+          timeout: 5000
105
+          writetimeout: 5000
103 106
           socketFactoryClass: javax.net.ssl.SSLSocketFactory
107
+          socketFactoryFallback: false
108
+          socketFactoryPort: 465
104 109
         debug: false
110
+    protocol: smtp
105 111
 #上上签配置参数
106 112
 ssq:
107 113
   developerId: 1695872832013855470

+ 44
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Visa fil

@@ -302,7 +302,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
302 302
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
303 303
         caseApplicationMapper.submitCaseApplication(caseApplication);
304 304
         // 新增日志
305
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,"");
305
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
306 306
 
307 307
         return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
308 308
     }
@@ -313,7 +313,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
313 313
         caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
314 314
         caseApplicationMapper.submitCaseApplication(caseApplication);
315 315
         // 新增日志
316
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,"");
316
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
317 317
 
318 318
         return AjaxResult.success("归档成功,案件状态已改为已归档");
319 319
     }
@@ -346,19 +346,58 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
346 346
                 }
347 347
             }
348 348
         }
349
+        //发送邮件
350
+        sendCaseEmail(caseApplication1, appEmail, resEmail);
349 351
         // 新增日志
350
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,"");
352
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
351 353
 
352 354
         return AjaxResult.success("仲裁文书送达成功");
353 355
     }
354 356
 
357
+    /**
358
+     * 通过邮件发送裁决书文件
359
+     *
360
+     * @param caseApplication1
361
+     * @param appEmail
362
+     * @param resEmail
363
+     */
364
+    private void sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
365
+        List<File> fileList = new ArrayList<>();
366
+        File file = null;
367
+        List<CaseAttach> caseAttachList = caseApplication1.getCaseAttachList();
368
+        if (caseAttachList != null && caseAttachList.size() > 0) {
369
+            for (CaseAttach caseAttach : caseAttachList) {
370
+                if (caseAttach.getAnnexType() == 3) {
371
+                    String annexPath = caseAttach.getAnnexPath();
372
+                    String path = "/home/ruoyi/" + annexPath;
373
+//        String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
374
+//        String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
375
+                    file = new File(path);
376
+                    fileList.add(file);
377
+                    System.out.println("文件长度:" + file.length());
378
+                }
379
+            }
380
+        }
381
+        if (file != null) {
382
+            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
383
+            try {
384
+//                emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
385
+                emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
386
+            } catch (Exception e) {
387
+                System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
388
+                System.out.println(e.toString());
389
+            }
390
+        }
391
+
392
+    }
393
+
355 394
     @Override
356 395
     public AjaxResult stamp(CaseApplication caseApplication) {
357 396
         //更改案件状态(暂时)
358 397
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
359 398
         caseApplicationMapper.submitCaseApplication(caseApplication);
360 399
         // 新增日志
361
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,"");
400
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
362 401
 
363 402
         return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
364 403
     }
@@ -392,7 +431,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
392 431
         try {
393 432
 //            List<File> fileList = new ArrayList<>();
394 433
 //            fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
395
- //           File file = fileList.get(0);//System.out.println("这是文件"+file);
434
+            //           File file = fileList.get(0);//System.out.println("这是文件"+file);
396 435
             //电子邮件送达
397 436
 //            EmailOutUtil emailOutUtil = new EmailOutUtil();
398 437
 //            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();

+ 308
- 326
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil