From ad4f1aecb2a4bf682b706988bb2bb3725b0f680c Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Wed, 18 Oct 2023 10:19:49 +0800
Subject: [PATCH 1/9] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=A1=88=E4=BB=B6?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/wisdomarbitrate/CaseApplicationMapper.xml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
index 0991056..51246c9 100644
--- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
@@ -128,8 +128,7 @@
- or(t.identity_type=1 and t.case_status =#{financeStatus})
-
+ or ( t.identity_type=1 and t.case_status =#{financeStatus})
) t1
@@ -219,9 +218,9 @@
)
-
- or( t.identity_type=1 and t.case_status =#{financeStatus})
+
+ or ( t.identity_type=1 and t.case_status =#{financeStatus})
) t1
From 10f7fffe10b81f54b6099658a8128cf281615912 Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Wed, 18 Oct 2023 18:04:31 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wisdomarbitrate/CaseApplicationMapper.xml | 121 +++++++++---------
1 file changed, 61 insertions(+), 60 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
index 51246c9..b5fb734 100644
--- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
@@ -49,7 +49,7 @@
-
-
- or ( t.application_organ_id = #{nameId} AND t.identity_type=1
- and t.case_status in (0,2))
+
+
+ or ( t.application_organ_id = #{nameId} AND t.identity_type=1
+ and t.case_status in (0,2))
-
-
+
+
- or (t.identity_type=1 and t.case_status in
- #{caseStatus}
- )
+ or (t.identity_type=1 and t.case_status in
+ #{caseStatus}
+ )
- or ( t.identity_type=1 and t.case_status =#{financeStatus})
+ (t.identity_type=1 and t.case_status =#{financeStatus})
+
) t1
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
order by t1.create_time desc,t1.case_num desc
@@ -226,14 +219,6 @@
) t1
-
-
-
-
-
-
@@ -322,106 +307,6 @@
)
-
- select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
- ELSE '无审理方式'
- END arbitratMethodName,
- c.case_status ,
- CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
- when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
- when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
- when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
- when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
- when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
- ELSE '无案件状态'
- END caseStatusName,
- c.hear_date ,c.arbitrat_claims ,
- c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
- c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
- c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
- from case_application c
- LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
-
- c.case_status in
-
- #{caseStatus}
-
-
- AND c.case_status = #{caseApplication.caseStatus}
-
-
- AND c.case_num = #{caseApplication.caseNum}
-
-
- AND ca.application_organ_id=#{caseApplication.nameId} AND ca.identity_type=1
-
-
- and c.case_status in
-
- #{caseStatus}
-
-
-
- order by c.create_time desc,c.case_num desc
-
-
- select sum( case when c.case_status=0 then 1 else 0 end) caseApply,
- sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
- sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
- sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
- sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
- sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
- sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
- sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
- sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
- sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
- sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
- sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
- sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
- sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
- sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
- sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
- sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
- sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
- from case_application c
- LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
-
-
-
- or c.case_status in
-
- #{caseStatus}
-
-
-
- or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
-
-
-
- or ( t.identity_type=1 and
- t.case_status in (7,8,9,12,13,14)
- and
- instr (t.arbitrator_id,#{userId})>0)
-
-
-
- or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
- and t.application_organ_id in
-
- #{item}
- )
-
-
-
- or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
- and t.case_status in (0,2))
- )
-
-
-
-
-
From ff637782cb05bc956ed198bc3b1819eb3fb3ebc2 Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Wed, 18 Oct 2023 18:22:44 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=A1=88=E4=BB=B6?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/CaseApplicationServiceImpl.java | 41 ++++++++-----------
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
index eca8ee5..9d5fa5f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
@@ -22,19 +22,13 @@ import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
-
-
-
import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.exception.EsignDemoException;
-import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
-import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
@@ -44,7 +38,6 @@ import com.ruoyi.wisdomarbitrate.utils.SignAward;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
@@ -71,8 +64,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Autowired
private CaseAffiliateMapper caseAffiliateMapper;
- @Autowired
- private CasePaymentRecordMapper casePaymentRecordMapper;
@Autowired
private ArbitrateRecordMapper arbitrateRecordMapper;
@Autowired
@@ -127,25 +118,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
){
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
}
-// if(role.getRoleName().equals("仲裁委")
-// ||role.getRoleName().equals("部门长")){
-// List caseStatusList=new ArrayList<>();
-// caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
-// caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
-// caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
-// caseApplication.setDeptHeadStatus(caseStatusList);
-// }
-// if(role.getRoleName().equals("仲裁员")){
-// caseApplication.setUserId(String.valueOf(userId));
-// }
+ if(role.getRoleName().equals("仲裁委")
+ ||role.getRoleName().equals("部门长")){
+ List caseStatusList=new ArrayList<>();
+ caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
+ caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
+ caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
+ caseApplication.setDeptHeadStatus(caseStatusList);
+ }
+ if(role.getRoleName().equals("仲裁员")){
+ caseApplication.setUserId(String.valueOf(userId));
+ }
if(role.getRoleName().equals("财务")){
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
}
-// if(role.getRoleName().equals("法律顾问")){
-// // 查询角色有关的用户部门
-// List deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
-// caseApplication.setDeptIds(deptIds);
-// }
+ if(role.getRoleName().equals("法律顾问")){
+ // 查询角色有关的用户部门
+ List deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
+ caseApplication.setDeptIds(deptIds);
+ }
if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
// 查询角色有关的用户部门
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
From 54ee01cb770220fff45678d68785ed1066cb82ca Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Wed, 18 Oct 2023 19:27:31 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E6=A1=88=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/CaseApplicationServiceImpl.java | 8 ++++----
.../wisdomarbitrate/CaseApplicationMapper.xml | 17 +++++++++--------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
index 9d5fa5f..a46eb04 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
@@ -397,7 +397,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
agentUser.setNickName(caseAffiliate.getNameAgent());
agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
- agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
+ // agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
int insertUserRow = sysUserMapper.insertUser(agentUser);
// 新增角色为申请人
@@ -411,15 +411,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
if (insertUserRow > 0) {
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
- // 发送短信 1955400 普通短信 导入后通知申请人认证注册 尊敬的{1},您的申请的仲裁案件已导入,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信 已生效
+ // 明天改下模板id:1956159 普通短信 通知用户认证注册 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- request.setTemplateId("1955400");
+ request.setTemplateId("1956159");
request.setPhone(agentUser.getPhonenumber());
request.setTemplateParamSet(new String[]{agentUser.getNickName()});
SmsUtils.sendSms(request);
}
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
- return "申请机构与申请代理人不匹配";
+ return "该申请代理人已存在,与申请机构不匹配";
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
// 同步用户表和案件关联人表的手机号和名称
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
index 6c8ed3a..105cacf 100644
--- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
@@ -96,18 +96,18 @@
- or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
or ( t.identity_type=1 and
- t.case_status in (7,8,9,12,13,14)
+ t.case_status in (7,8,9,12,13,14,17)
and
instr (t.arbitrator_id,#{userId})>0)
- or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
and t.application_organ_id in
#{item}
@@ -117,7 +117,7 @@
or ( t.application_organ_id = #{nameId} AND t.identity_type=1
- and t.case_status in (0,2))
+ and t.case_status in (0,2,17))
@@ -132,6 +132,7 @@
+
) t1
@@ -182,18 +183,18 @@
- or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
or ( t.identity_type=1 and
- t.case_status in (7,8,9,12,13,14)
+ t.case_status in (7,8,9,12,13,14,17)
and
instr (t.arbitrator_id,#{userId})>0)
- or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
and t.application_organ_id in
#{item}
@@ -202,7 +203,7 @@
or ( t.application_organ_id = #{nameId} AND t.identity_type=1
- and t.case_status in (0,2))
+ and t.case_status in (0,2,17))
From 699a69f1e91c1e566ba1575bad8ba7ed34c6a664 Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Thu, 19 Oct 2023 09:52:26 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E7=BC=B4=E8=B4=B9?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=94=E5=9B=9E=E7=BC=B4=E8=B4=B9=E5=87=AD?=
=?UTF-8?q?=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/CaseApplicationServiceImpl.java | 21 +++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
index a46eb04..4cf35b7 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
@@ -1114,8 +1114,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
caseApplication.setAnnexType(8);
// 查询缴费凭证
- List payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
- caseApplicationselect.setPayOrderList(payOrderList);
+ List caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
+ if (caseAttachList != null && caseAttachList.size() > 0) {
+ for (CaseAttach caseAttach : caseAttachList) {
+ String annexName = caseAttach.getAnnexName();
+ String prefix = "/profile";
+ int startIndex = annexName.indexOf(prefix);
+ startIndex += prefix.length();
+ String annexPath = "/uploadPath" + annexName.substring(startIndex);
+ caseAttach.setAnnexPath(annexPath);
+ int startIndexnew = annexName.lastIndexOf("/");
+ if(startIndexnew!=-1){
+ String annexNamenew = annexName.substring(startIndexnew+1);
+ caseAttach.setAnnexName(annexNamenew);
+ }
+
+
+ }
+ }
+ caseApplicationselect.setPayOrderList(caseAttachList);
return caseApplicationselect;
}
From 3f17c3a7eed5fcf7d4171fd285b8601f74f2c8cd Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Thu, 19 Oct 2023 10:47:35 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E6=A1=88=E4=BB=B6=E8=AF=81=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CaseEvidenceController.java | 25 +++++++
.../service/ICaseEvidenceService.java | 13 ++++
.../service/impl/CaseEvidenceServiceImpl.java | 69 +++++++++++++++++++
3 files changed, 107 insertions(+)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
index 3a408ca..b6c00ba 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.wisdomarbitrate;
+import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@@ -55,6 +56,30 @@ public class CaseEvidenceController extends BaseController {
Long userId = this.getUserId();
return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
}
+ @PostMapping("/batchUpload")
+ public AjaxResult batchUpload(@RequestParam("file") MultipartFile[] file, Integer annexType, Long id) {
+ if(file==null){
+ return error("请选择要上传的文件");
+ }
+ String username = this.getUsername();
+ Long userId = this.getUserId();
+ return caseEvidenceService.batchUpload(file, annexType, id, username, userId);
+ }
+
+ /**
+ * 获取附件
+ * @param caseAppliId
+ * @param annexTypeList
+ * @param
+ * @return
+ */
+ @GetMapping("/fileList")
+ public AjaxResult fileList(Long caseAppliId, @RequestParam("annexTypeList") List annexTypeList){
+ if(caseAppliId==null){
+ return error("案件id不能为空");
+ }
+ return caseEvidenceService.fileList(caseAppliId, annexTypeList);
+ }
/**
* 查询当前用户案件列表
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
index e601832..6302add 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
@@ -20,4 +20,17 @@ public interface ICaseEvidenceService {
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
+
+ /**
+ * 批量上传文件
+ * @param file
+ * @param annexType
+ * @param id
+ * @param username
+ * @param userId
+ * @return
+ */
+ AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
+
+ AjaxResult fileList(Long caseAppliId, List annexTypeList);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
index c83db9f..a0a24de 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.wisdomarbitrate.service.impl;
+import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -195,6 +197,73 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
}
return null;
}
+ @Transactional
+ @Override
+ public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
+ List successList= new ArrayList<>();
+ try {
+ String filePath = RuoYiConfig.getUploadPath();
+ for (MultipartFile file : files) {
+ // 上传
+ String fileName = FileUploadUtils.upload(filePath, file);
+ CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
+ .annexName(fileName)
+ .annexPath(filePath)
+ .annexType(annexType)
+ .userId(userId)
+ .userName(userName)
+ .build();
+ int count = caseAttachMapper.save(caseAttach);
+ if (count > 0 && annexType!=null && annexType!=8) {
+ if(id!=null){
+ //修改案件状态
+ CaseApplication caseApplication = new CaseApplication();
+ caseApplication.setId(id);
+ caseApplication.setCaseStatus(4);
+ caseApplicationMapper.submitCaseApplication(caseApplication);
+ }
+ CaseAttach caseAttachselect = new CaseAttach();
+ caseAttachselect.setAnnexId(caseAttach.getAnnexId());
+ caseAttachselect.setAnnexName(caseAttach.getAnnexName());
+ caseAttachselect.setAnnexType(caseAttach.getAnnexType());
+ successList.add(caseAttachselect);
+ }
+ }
+
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ return AjaxResult.error("上传失败");
+ }
+
+ return AjaxResult.success("上传成功",successList);
+
+ }
+
+ @Override
+ public AjaxResult fileList(Long caseAppliId, List annexTypeList) {
+ CaseApplication caseApplication = new CaseApplication();
+ caseApplication.setId(caseAppliId);
+ caseApplication.setAnnexTypeList(annexTypeList);
+ List caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
+ if(CollectionUtil.isNotEmpty(caseAttachList)){
+ for (CaseAttach caseAttach : caseAttachList) {
+ String annexName = caseAttach.getAnnexName();
+ String prefix = "/profile";
+ int startIndex = annexName.indexOf(prefix);
+ startIndex += prefix.length();
+ String annexPath = "/uploadPath" + annexName.substring(startIndex);
+ caseAttach.setAnnexPath(annexPath);
+ int startIndexnew = annexName.lastIndexOf("/");
+ if(startIndexnew!=-1){
+ String annexNamenew = annexName.substring(startIndexnew+1);
+ caseAttach.setAnnexName(annexNamenew);
+ }
+ }
+ return AjaxResult.success(caseAttachList);
+ }
+ return null;
+ }
private List getCaseEvidenceVOList(String identityNum, List caseStatusList, Integer identityType) {
List caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
From 3cc72198d90513ea854d2b980d6a11b6499cfb7a Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Thu, 19 Oct 2023 14:05:15 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=97=B6=E6=8F=90?=
=?UTF-8?q?=E7=A4=BA=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=88=A0=E9=99=A4=E9=99=84?=
=?UTF-8?q?=E4=BB=B6=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wisdomarbitrate/CaseEvidenceController.java | 16 ++++++++++++++++
.../wisdomarbitrate/mapper/CaseAttachMapper.java | 2 ++
.../service/ICaseEvidenceService.java | 2 ++
.../service/impl/CaseApplicationServiceImpl.java | 11 ++++++++---
.../service/impl/CaseEvidenceServiceImpl.java | 6 ++++++
.../resources/mapper/system/SysUserMapper.xml | 6 +++++-
.../mapper/wisdomarbitrate/CaseAttachMapper.xml | 7 +++++++
7 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
index b6c00ba..f3bc7b2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.wisdomarbitrate;
+import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -81,6 +82,21 @@ public class CaseEvidenceController extends BaseController {
return caseEvidenceService.fileList(caseAppliId, annexTypeList);
}
+ /**
+ * 删除附件
+ * @param fileIds
+ * @return
+ */
+ @PostMapping("/deleteFile")
+ public AjaxResult deleteFile( @RequestParam("fileIds") List fileIds){
+
+ if(CollectionUtil.isEmpty(fileIds)){
+ return error("附件id不能为空");
+ }
+ return toAjax(caseEvidenceService.deleteFile( fileIds));
+ }
+
+
/**
* 查询当前用户案件列表
*
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
index 95498cd..c455c8a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -18,4 +19,5 @@ public interface CaseAttachMapper {
int updateCaseAttachBycaseid(CaseAttach caseAttach);
+ int deleteByFileIds(@Param("ids") List fileIds);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
index 6302add..969e13f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
@@ -33,4 +33,6 @@ public interface ICaseEvidenceService {
AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
AjaxResult fileList(Long caseAppliId, List annexTypeList);
+
+ int deleteFile( List fileIds);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
index 4cf35b7..a0a3a5d 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
@@ -419,15 +419,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
SmsUtils.sendSms(request);
}
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
- return "该申请代理人已存在,与申请机构不匹配";
+// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
+ if(null!=agentUser.getDept()&&StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
+ return "该申请代理人已在【" + agentUser.getDept().getDeptName()+"】申请机构下存在,请检查填写信息是否正确";
+ }else {
+ return "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确";
+ }
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
// 同步用户表和案件关联人表的手机号和名称
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
caseAffiliate.setNameAgent(agentUser.getNickName());
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
// 新增角色为申请人
- if(agentUser.getRoleIds()!=null) {
- List longList = Arrays.asList(agentUser.getRoleIds());
+ if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
+ List longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
if(!longList.contains(roleId)) {
ArrayList sysUserRoles = new ArrayList<>();
SysUserRole sysUserRole = new SysUserRole();
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
index a0a24de..b742dda 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
@@ -265,6 +265,12 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
return null;
}
+ @Override
+ public int deleteFile( List fileIds) {
+
+ return caseAttachMapper.deleteByFileIds(fileIds);
+ }
+
private List getCaseEvidenceVOList(String identityNum, List caseStatusList, Integer identityType) {
List caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 795bb69..53865cf 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -178,7 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select u.* from sys_user u
+ select u.*,d.dept_name,ur.role_id
+ from sys_user u
+ left join sys_dept d on u.dept_id = d.dept_id
+ left join sys_user_role ur on u.user_id = ur.user_id
+ left join sys_role r on r.role_id = ur.role_id
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
index 2eabbbd..d68b234 100644
--- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
@@ -17,6 +17,13 @@
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
+
+ delete from case_attach
+ where annex_id in
+
+ #{id}
+
+
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
From 2d658af62e62fa6641a343b521d4c7d2fb661271 Mon Sep 17 00:00:00 2001
From: 18792927508 <1322446236@qq.com>
Date: Thu, 19 Oct 2023 15:15:20 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/CaseArbitrateServiceImpl.java | 2 --
.../ruoyi/wisdomarbitrate/utils/CaseLogUtils.java | 15 ++++++++++-----
.../wisdomarbitrate/CaseLogRecordMapper.xml | 4 ++--
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
index b6d5d36..5e59301 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
@@ -104,8 +104,6 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
}
}
}
- // 新增日志
- CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
return AjaxResult.success("审核成功");
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java
index 7781461..d99c420 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java
@@ -1,8 +1,10 @@
package com.ruoyi.wisdomarbitrate.utils;
import cn.hutool.extra.spring.SpringUtil;
+import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
@@ -17,6 +19,7 @@ import javax.validation.constraints.NotNull;
public class CaseLogUtils
{
private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
+ private static SysUserMapper userMapper= SpringUtil.getBean(SysUserMapper.class);
/**
* 新增案件日志
@@ -25,13 +28,15 @@ public class CaseLogUtils
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ){
+ CaseLogRecord operLog = new CaseLogRecord();
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
- String nickName = loginUser.getUser().getNickName();
- CaseLogRecord operLog = new CaseLogRecord();
- operLog.setCreateBy(loginUser.getUsername());
- operLog.setCreateNickName(nickName);
- operLog.setUpdateBy(loginUser.getUsername());
+ if(loginUser!=null) {
+ SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
+ operLog.setCreateBy(sysUser.getUserName());
+ operLog.setCreateNickName(sysUser.getNickName());
+ operLog.setUpdateBy(sysUser.getUserName());
+ }
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode);
operLog.setNotes(notes);
diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml
index ae6f859..355ca93 100644
--- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml
@@ -25,8 +25,8 @@
cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
CASE cl.case_node when 0 then '立案申请' when 1 then '提交立案申请' when 2 then '立案审查'
when 3 then '支付成功' when 4 then '缴费确认' when 5 then '案件质证'
- when 6 then '组庭审核' when 7 then '组庭确认' when 8 then '待开庭审理'
- when 9 then '待书面审理' when 10 then '书面审理' when 11 then '拒绝裁决书'
+ when 6 then '组庭审核' when 7 then '组庭确认' when 8 then '当前仲裁方式为开庭审理'
+ when 9 then '当前仲裁方式为书面审理' when 10 then '书面审理' when 11 then '生成裁決书'
when 12 then '核验裁决书' when 13 then '同意裁决书' when 14 then '签名成功'
when 15 then '用印成功' when 16 then '送达仲裁文书' when 17 then '案件归档'
when 26 then '证据确认成功'