This commit is contained in:
qitz
2023-10-19 15:19:13 +08:00
12 changed files with 333 additions and 293 deletions
@@ -55,16 +55,9 @@ public interface CaseApplicationMapper {
*/
void updatePayType(CaseConfirmPayDTO payDTO);
/**
* 查询部门长案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
ToDoCount selectAdminCaseToDoCount();
ToDoCount selectDeptHeadCaseToDoCount( @Param("statusList")List<Integer> caseStatusList);
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
}
@@ -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<Integer> fileIds);
}
@@ -20,4 +20,19 @@ 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<Integer> annexTypeList);
int deleteFile( List<Integer> fileIds);
}
@@ -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<Integer> 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<Integer> 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<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
// caseApplication.setDeptIds(deptIds);
// }
if(role.getRoleName().equals("法律顾问")){
// 查询角色有关的用户部门
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
caseApplication.setDeptIds(deptIds);
}
if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
// 查询角色有关的用户部门
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
@@ -559,12 +550,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
Map<String, Long> deptMap =new HashMap<>();
if (caseAffiliates != null && caseAffiliates.size() > 0) {
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
for (CaseAffiliate caseAffiliate : caseAffiliates) {
caseAffiliate.setCaseAppliId(caseApplication.getId());
@@ -623,7 +614,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
String currentDay = DateUtils.dateTime();
String caseNum = "zc"+ currentDay;
//查询出当天的案件编号的最大值
Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum,caseNum.length());
if(null == maxCaseNum){
caseNum = caseNum + "001";
}else {
@@ -689,7 +680,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
}
}
@@ -722,7 +713,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);
// 新增角色为申请人
@@ -736,23 +727,28 @@ 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 "该申请代理人已在"+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<Long> longList = Arrays.asList(agentUser.getRoleIds());
if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
List<Long> longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
if(!longList.contains(roleId)) {
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
SysUserRole sysUserRole = new SysUserRole();
@@ -918,47 +914,47 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
// if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
List<CaseApplication> caseApplicationNewList = null;
for (int i = 0; i < caseApplicationListinsert.size(); i++){
caseApplicationNewList = new ArrayList<>();
CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
// 设置自动编码
caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
CaseApplication caseApplicationNew = new CaseApplication();
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
for (int j = 0; j < caseApplicationListinsert.size(); j++){
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
List<CaseApplication> caseApplicationNewList = null;
for (int i = 0; i < caseApplicationListinsert.size(); i++){
caseApplicationNewList = new ArrayList<>();
CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
// 设置自动编码
caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
CaseApplication caseApplicationNew = new CaseApplication();
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
for (int j = 0; j < caseApplicationListinsert.size(); j++){
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
}
caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
}
caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
caseApplicationNewList.add(caseApplicationNew);
}
caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
caseApplicationNewList.add(caseApplicationNew);
}
for (int k = 0; k < caseApplicationNewList.size(); k++){
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
// 新增立案信息
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
}
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
}
for (int k = 0; k < caseApplicationNewList.size(); k++){
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
// 新增立案信息
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
}
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
}
successNum++;
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
}
successNum++;
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
}
// }
@@ -969,7 +965,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}else {
throw new ServiceException("导入立案申请数据不能为空!");
}
return successMsg.append(failureMsg.toString()).toString();
return successMsg.append(failureMsg.toString()).toString();
}
@@ -1439,8 +1435,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
caseApplication.setAnnexType(8);
// 查询缴费凭证
List<CaseAttach> payOrderList = caseAttachMapper.queryCaseAttachList(caseApplication);
caseApplicationselect.setPayOrderList(payOrderList);
List<CaseAttach> 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;
}
@@ -1739,19 +1752,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
for(int i = 0;i < idStrList.length;i ++ ){
idList.add(Long.parseLong(idStrList[i]));
}
// 查询仲裁员电话号
List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
if(CollectionUtil.isNotEmpty(userList)) {
for (SysUser user : userList) {
//给仲裁员发送短信通知
request.setPhone(user.getPhonenumber());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = user.getNickName();
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
SmsUtils.sendSms(request);
// 查询仲裁员电话号
List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
if(CollectionUtil.isNotEmpty(userList)) {
for (SysUser user : userList) {
//给仲裁员发送短信通知
request.setPhone(user.getPhonenumber());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = user.getNickName();
request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
SmsUtils.sendSms(request);
}
}
}
}
}
@@ -1764,7 +1777,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
caseAffiliateselect.setName(caseAffiliateselect.getApplicationOrganName());
}
//给申请人、被申请人发送短信通知
@@ -1817,7 +1830,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
// 申请人信息
// 申请人信息
CaseAffiliate caseAffiliate = new CaseAffiliate();
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
@@ -1832,7 +1845,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if(StrUtil.isNotEmpty(s)){
StringBuilder errorMsg = caseApplication.getErrorMsg();
if(StrUtil.isEmpty(errorMsg)){
errorMsg=new StringBuilder();
errorMsg=new StringBuilder();
}
errorMsg.append(s);
caseApplication.setErrorMsg(errorMsg);
@@ -1879,27 +1892,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseApplication.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
// 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){
caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseApplication.getName())));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseApplication.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
caseAffiliate.setApplicationOrganName(caseApplication.getName());
}
}
}
@@ -104,8 +104,6 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
}
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
return AjaxResult.success("审核成功");
}
@@ -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,79 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
}
return null;
}
@Transactional
@Override
public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
List<CaseAttach> 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<Integer> annexTypeList) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseAppliId);
caseApplication.setAnnexTypeList(annexTypeList);
List<CaseAttach> 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;
}
@Override
public int deleteFile( List<Integer> fileIds) {
return caseAttachMapper.deleteByFileIds(fileIds);
}
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
@@ -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);