获取证据目录列表
This commit is contained in:
@@ -194,6 +194,10 @@
|
|||||||
<source>${java.version}</source>
|
<source>${java.version}</source>
|
||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
<excludes>
|
||||||
|
<exclude>ruoyi-system/**</exclude>
|
||||||
|
<exclude>ruoyi-common/**</exclude>
|
||||||
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|||||||
+10
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||||
@@ -134,4 +135,13 @@ public class CaseEvidenceController extends BaseController {
|
|||||||
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
|
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
|
||||||
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
|
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取证据目录树列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/evidenceTree")
|
||||||
|
public AjaxResult evidenceTree(CaseEvidenceDirectory caseEvidenceDirectory)
|
||||||
|
{
|
||||||
|
return success(caseEvidenceService.selectEvidenceTreeList(caseEvidenceDirectory)) ;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Treeselect树结构实体类
|
* Treeselect树结构实体类
|
||||||
*
|
*
|
||||||
@@ -38,6 +39,7 @@ public class TreeSelect implements Serializable
|
|||||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TreeSelect(SysMenu menu)
|
public TreeSelect(SysMenu menu)
|
||||||
{
|
{
|
||||||
this.id = menu.getMenuId();
|
this.id = menu.getMenuId();
|
||||||
|
|||||||
+9
-3
@@ -6,6 +6,9 @@ import lombok.Builder;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -16,12 +19,12 @@ public class CaseEvidenceDirectory extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Integer id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父id
|
* 父id
|
||||||
*/
|
*/
|
||||||
private Integer parentId;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 证据名称
|
* 证据名称
|
||||||
@@ -41,5 +44,8 @@ public class CaseEvidenceDirectory extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 案件id
|
* 案件id
|
||||||
*/
|
*/
|
||||||
private Integer caseId;
|
private Long caseId;
|
||||||
|
|
||||||
|
/** 子目录 */
|
||||||
|
private List<CaseEvidenceDirectory> children = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
+176
@@ -0,0 +1,176 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目录查询返回类
|
||||||
|
*/
|
||||||
|
public class CaseEvidenceDirectoryVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 父id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证据名称
|
||||||
|
*/
|
||||||
|
private String evidenceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件id
|
||||||
|
*/
|
||||||
|
private Integer annexId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 级数
|
||||||
|
*/
|
||||||
|
private Integer series;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件id
|
||||||
|
*/
|
||||||
|
private Long caseId;
|
||||||
|
|
||||||
|
/** 子目录 */
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private List<CaseEvidenceDirectory> children;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||||
|
private Date updateTime;
|
||||||
|
public CaseEvidenceDirectoryVO(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long getSerialVersionUID() {
|
||||||
|
return serialVersionUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(Long parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEvidenceName() {
|
||||||
|
return evidenceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEvidenceName(String evidenceName) {
|
||||||
|
this.evidenceName = evidenceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAnnexId() {
|
||||||
|
return annexId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnnexId(Integer annexId) {
|
||||||
|
this.annexId = annexId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSeries() {
|
||||||
|
return series;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeries(Integer series) {
|
||||||
|
this.series = series;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCaseId() {
|
||||||
|
return caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaseId(Long caseId) {
|
||||||
|
this.caseId = caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CaseEvidenceDirectory> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<CaseEvidenceDirectory> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(String updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CaseEvidenceDirectoryVO(CaseEvidenceDirectory caseEvidenceDirectory) {
|
||||||
|
this.id = caseEvidenceDirectory.getId();
|
||||||
|
this.parentId = caseEvidenceDirectory.getParentId();
|
||||||
|
this.evidenceName = caseEvidenceDirectory.getEvidenceName();
|
||||||
|
this.annexId = caseEvidenceDirectory.getAnnexId();
|
||||||
|
this.series = caseEvidenceDirectory.getSeries();
|
||||||
|
this.caseId = caseEvidenceDirectory.getCaseId();
|
||||||
|
this.children = caseEvidenceDirectory.getChildren();
|
||||||
|
this.createTime = caseEvidenceDirectory.getCreateTime();
|
||||||
|
this.createBy = caseEvidenceDirectory.getCreateBy();
|
||||||
|
this.updateBy = caseEvidenceDirectory.getUpdateBy();
|
||||||
|
this.updateTime = caseEvidenceDirectory.getUpdateTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
+30
@@ -3,7 +3,9 @@ package com.ruoyi.wisdomarbitrate.service;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -35,4 +37,32 @@ public interface ICaseEvidenceService {
|
|||||||
AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList);
|
AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList);
|
||||||
|
|
||||||
int deleteFile( List<Integer> fileIds);
|
int deleteFile( List<Integer> fileIds);
|
||||||
|
|
||||||
|
List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询证据目录数据
|
||||||
|
*
|
||||||
|
* @param caseEvidenceDirectory 证据目录信息
|
||||||
|
* @return 证据目录信息集合
|
||||||
|
*/
|
||||||
|
List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要树结构
|
||||||
|
*
|
||||||
|
* @param caseEvidenceDirectorys 证据列表
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要下拉树结构
|
||||||
|
*
|
||||||
|
* @param caseEvidenceDirectorys 证据目录列表
|
||||||
|
* @return 下拉树结构列表
|
||||||
|
*/
|
||||||
|
List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
|
||||||
}
|
}
|
||||||
|
|||||||
+97
-21
@@ -7,6 +7,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
@@ -24,6 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -39,6 +42,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
private CaseAttachMapper caseAttachMapper;
|
private CaseAttachMapper caseAttachMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseLogRecordMapper caseLogRecordMapper;
|
private CaseLogRecordMapper caseLogRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -103,8 +108,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
.userName(userName)
|
.userName(userName)
|
||||||
.build();
|
.build();
|
||||||
int count = caseAttachMapper.save(caseAttach);
|
int count = caseAttachMapper.save(caseAttach);
|
||||||
if (count > 0 && annexType!=null && annexType!=8) {
|
if (count > 0 && annexType != null && annexType != 8) {
|
||||||
if(id!=null){
|
if (id != null) {
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(id);
|
caseApplication.setId(id);
|
||||||
@@ -115,7 +120,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
||||||
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
||||||
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
||||||
return AjaxResult.success("上传成功",caseAttachselect);
|
return AjaxResult.success("上传成功", caseAttachselect);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -125,18 +130,18 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IdentityAuthenticationMapper identityAuthenticationMapper;
|
IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||||
if(StringUtils.isBlank(identityNum)){
|
if (StringUtils.isBlank(identityNum)) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
String username = loginUser.getUsername();
|
String username = loginUser.getUsername();
|
||||||
IdentityAuthentication authentication=new IdentityAuthentication();
|
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||||
authentication.setUserName(username);
|
authentication.setUserName(username);
|
||||||
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
||||||
if(authentication1!=null){
|
if (authentication1 != null) {
|
||||||
identityNum = authentication1.getIdentityNo();
|
identityNum = authentication1.getIdentityNo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,7 +155,7 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
// 新增日志
|
// 新增日志
|
||||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_TRIAL, "");
|
||||||
|
|
||||||
return AjaxResult.success("证据确认成功");
|
return AjaxResult.success("证据确认成功");
|
||||||
}
|
}
|
||||||
@@ -182,25 +187,26 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
//修改案件状态
|
//修改案件状态
|
||||||
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
|
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
|
||||||
//选择仲裁方式
|
//选择仲裁方式
|
||||||
if (caseEvidenceDTO.getOpenCourtHear()==1){ //开庭审理
|
if (caseEvidenceDTO.getOpenCourtHear() == 1) { //开庭审理
|
||||||
caseApplication1.setArbitratMethod(1);
|
caseApplication1.setArbitratMethod(1);
|
||||||
}else {
|
} else {
|
||||||
caseApplication1.setArbitratMethod(2); //书面审理
|
caseApplication1.setArbitratMethod(2); //书面审理
|
||||||
}
|
}
|
||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
// 新增日志
|
// 新增日志
|
||||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT, "");
|
||||||
|
|
||||||
return AjaxResult.success("提交成功");
|
return AjaxResult.success("提交成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
|
public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
|
||||||
List<CaseAttach> successList= new ArrayList<>();
|
List<CaseAttach> successList = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
String filePath = RuoYiConfig.getUploadPath();
|
String filePath = RuoYiConfig.getUploadPath();
|
||||||
for (MultipartFile file : files) {
|
for (MultipartFile file : files) {
|
||||||
@@ -214,8 +220,8 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
.userName(userName)
|
.userName(userName)
|
||||||
.build();
|
.build();
|
||||||
int count = caseAttachMapper.save(caseAttach);
|
int count = caseAttachMapper.save(caseAttach);
|
||||||
if (count > 0 && annexType!=null && annexType!=8) {
|
if (count > 0 && annexType != null && annexType != 8) {
|
||||||
if(id!=null){
|
if (id != null) {
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(id);
|
caseApplication.setId(id);
|
||||||
@@ -236,7 +242,7 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
return AjaxResult.error("上传失败");
|
return AjaxResult.error("上传失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("上传成功",successList);
|
return AjaxResult.success("上传成功", successList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +252,7 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
caseApplication.setId(caseAppliId);
|
caseApplication.setId(caseAppliId);
|
||||||
caseApplication.setAnnexTypeList(annexTypeList);
|
caseApplication.setAnnexTypeList(annexTypeList);
|
||||||
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
||||||
if(CollectionUtil.isNotEmpty(caseAttachList)){
|
if (CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||||
for (CaseAttach caseAttach : caseAttachList) {
|
for (CaseAttach caseAttach : caseAttachList) {
|
||||||
String annexName = caseAttach.getAnnexName();
|
String annexName = caseAttach.getAnnexName();
|
||||||
String prefix = "/profile";
|
String prefix = "/profile";
|
||||||
@@ -255,8 +261,8 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||||
caseAttach.setAnnexPath(annexPath);
|
caseAttach.setAnnexPath(annexPath);
|
||||||
int startIndexnew = annexName.lastIndexOf("/");
|
int startIndexnew = annexName.lastIndexOf("/");
|
||||||
if(startIndexnew!=-1){
|
if (startIndexnew != -1) {
|
||||||
String annexNamenew = annexName.substring(startIndexnew+1);
|
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||||
caseAttach.setAnnexName(annexNamenew);
|
caseAttach.setAnnexName(annexNamenew);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,11 +272,81 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteFile( List<Integer> fileIds) {
|
public int deleteFile(List<Integer> fileIds) {
|
||||||
|
|
||||||
return caseAttachMapper.deleteByFileIds(fileIds);
|
return caseAttachMapper.deleteByFileIds(fileIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory) {
|
||||||
|
List<CaseEvidenceDirectory> caseEvidenceDirectorys = SpringUtils.getAopProxy(this).selectCaseEvidenceList(caseEvidenceDirectory);
|
||||||
|
return buildCaseEvidenceTreeSelect(caseEvidenceDirectorys);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory) {
|
||||||
|
return caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
|
||||||
|
List<CaseEvidenceDirectory> returnList = new ArrayList<>();
|
||||||
|
List<Long> tempList = caseEvidenceDirectorys.stream().map(CaseEvidenceDirectory::getId).collect(Collectors.toList());
|
||||||
|
for (CaseEvidenceDirectory caseEvidenceDirectory : caseEvidenceDirectorys) {
|
||||||
|
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||||
|
if (!tempList.contains(caseEvidenceDirectory.getParentId())) {
|
||||||
|
recursionFn(caseEvidenceDirectorys, caseEvidenceDirectory);
|
||||||
|
returnList.add(caseEvidenceDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returnList.isEmpty())
|
||||||
|
{
|
||||||
|
returnList = caseEvidenceDirectorys;
|
||||||
|
}
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
|
||||||
|
List<CaseEvidenceDirectory> caseEvidenceDirectories = buildCaseEvidenceTree(caseEvidenceDirectorys);
|
||||||
|
return caseEvidenceDirectories.stream().map(CaseEvidenceDirectoryVO::new).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归列表
|
||||||
|
*/
|
||||||
|
private void recursionFn(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||||
|
// 得到子节点列表
|
||||||
|
List<CaseEvidenceDirectory> childList = getChildList(list, t);
|
||||||
|
t.setChildren(childList);
|
||||||
|
for (CaseEvidenceDirectory tChild : childList) {
|
||||||
|
if (hasChild(list, tChild)) {
|
||||||
|
recursionFn(list, tChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到子节点列表
|
||||||
|
*/
|
||||||
|
private List<CaseEvidenceDirectory> getChildList(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||||
|
List<CaseEvidenceDirectory> tlist = new ArrayList<>();
|
||||||
|
Iterator<CaseEvidenceDirectory> it = list.iterator();
|
||||||
|
while (it.hasNext()) {
|
||||||
|
CaseEvidenceDirectory n = it.next();
|
||||||
|
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) {
|
||||||
|
tlist.add(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有子节点
|
||||||
|
*/
|
||||||
|
private boolean hasChild(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
|
||||||
|
return getChildList(list, t).size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
||||||
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
||||||
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,7 @@
|
|||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<select id="selectList" resultMap="CaseEvidenceDirectoryResult">
|
<select id="selectList" parameterType="CaseEvidenceDirectory" resultMap="CaseEvidenceDirectoryResult">
|
||||||
select id,parent_id,evidence_name,annex_id,series,create_time,update_time,case_appli_id,create_by,update_by
|
select id,parent_id,evidence_name,annex_id,series,create_time,update_time,case_appli_id,create_by,update_by
|
||||||
from case_evidence_directory
|
from case_evidence_directory
|
||||||
<where>
|
<where>
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
<if test="caseId != null ">
|
<if test="caseId != null ">
|
||||||
AND case_appli_id = #{caseId}
|
AND case_appli_id = #{caseId}
|
||||||
</if>
|
</if>
|
||||||
|
order by case_evidence_directory.parent_id
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user