Przeglądaj źródła

优化用印申请功能

qitz 2 lat temu
rodzic
commit
766f9e9fb7

+ 7
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Wyświetl plik

@@ -392,6 +392,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
392 392
         if (nextFlow == null) {
393 393
             return AjaxResult.error("未找到下一个流程节点");
394 394
         }
395
+        // 查询当前节点
396
+        MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(dto.getCaseFlowId());
397
+        if (currentFlow == null) {
398
+            return AjaxResult.error("当前流程不存在");
399
+        }
395 400
         if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
396 401
             // 批量操作
397 402
             // 查询该批号下该流程的案件
@@ -403,9 +408,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
403 408
                 application.setCaseFlowId(nextFlow.getId());
404 409
                 application.setCaseStatusName(nextFlow.getCaseStatusName());
405 410
                 caseApplicationMapper.updateByPrimaryKeySelective(application);
406
-                CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
407
-
408
-
411
+                CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"用印申请");
409 412
             }
410 413
         } else {
411 414
             // 单独
@@ -415,9 +418,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
415 418
             application.setCaseFlowId(nextFlow.getId());
416 419
             application.setCaseStatusName(nextFlow.getCaseStatusName());
417 420
             caseApplicationMapper.updateByPrimaryKeySelective(application);
418
-            CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
419
-
420
-
421
+            CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"用印申请");
421 422
         }
422 423
         return AjaxResult.success("用印申请成功");
423 424