Procházet zdrojové kódy

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

qitz před 2 roky
rodič
revize
c64b709e33

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

@@ -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
     }

+ 17
- 17
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Zobrazit soubor

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

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

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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

+ 2
- 2
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java Zobrazit soubor

@@ -43,8 +43,8 @@ public class WxAppletNotifyUtils {
43 43
         body.putOpt("expire_interval",30);
44 44
         String post = HttpUtil.post(url,body.toJSONString(2));
45 45
         JSONObject result = JSONUtil.parseObj(post);
46
-        if(result!=null){
47
-            result.getStr("openlink");
46
+        if(result!=null && result.containsKey("openlink")){
47
+         return    result.getStr("openlink");
48 48
         }
49 49
         return null;
50 50
     }

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

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