|
|
@@ -7,12 +7,10 @@ import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
7
|
7
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
|
8
|
8
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|
9
|
9
|
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
|
|
10
|
+import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
|
10
|
11
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
|
|
11
|
12
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
|
12
|
|
-import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
|
13
|
|
-import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
|
14
|
|
-import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
|
15
|
|
-import com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper;
|
|
|
13
|
+import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
16
|
14
|
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
|
17
|
15
|
import org.springframework.beans.BeanUtils;
|
|
18
|
16
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -21,10 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
21
|
19
|
import org.springframework.web.multipart.MultipartFile;
|
|
22
|
20
|
|
|
23
|
21
|
import java.io.IOException;
|
|
24
|
|
-import java.time.LocalDate;
|
|
25
|
|
-import java.time.LocalDateTime;
|
|
26
|
|
-import java.time.format.DateTimeFormatter;
|
|
27
|
|
-import java.util.ArrayList;
|
|
28
|
22
|
import java.util.Arrays;
|
|
29
|
23
|
import java.util.List;
|
|
30
|
24
|
|
|
|
@@ -38,10 +32,11 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
38
|
32
|
private CaseApplicationMapper caseApplicationMapper;
|
|
39
|
33
|
@Autowired
|
|
40
|
34
|
private CaseAttachMapper caseAttachMapper;
|
|
41
|
|
-
|
|
|
35
|
+ @Autowired
|
|
|
36
|
+ private CaseLogRecordMapper caseLogRecordMapper;
|
|
42
|
37
|
@Override
|
|
43
|
38
|
@Transactional
|
|
44
|
|
- public AjaxResult getCaseDetailsById(Long id,String userName) {
|
|
|
39
|
+ public AjaxResult getCaseDetailsById(Long id, String userName) {
|
|
45
|
40
|
CaseApplication caseApplication = new CaseApplication();
|
|
46
|
41
|
caseApplication.setId(id);
|
|
47
|
42
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
@@ -52,10 +47,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
52
|
47
|
caseAffiliate.setCaseAppliId(id);
|
|
53
|
48
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
|
54
|
49
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
|
55
|
|
- String name = affiliate.getName();
|
|
56
|
|
- //判断当前登录人和案件关联人姓名是否一致
|
|
57
|
|
- if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
|
|
58
|
|
- caseDetailVO.setIdentityType(affiliate.getIdentityType());
|
|
|
50
|
+ if (affiliate.getName() != null) {
|
|
|
51
|
+ String name = affiliate.getName();
|
|
|
52
|
+ //判断当前登录人和案件关联人姓名是否一致
|
|
|
53
|
+ if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
|
|
|
54
|
+ caseDetailVO.setIdentityType(affiliate.getIdentityType());
|
|
|
55
|
+ }
|
|
59
|
56
|
}
|
|
60
|
57
|
if (affiliate.getIdentityType() == 1) { //申请人
|
|
61
|
58
|
caseDetailVO.setApplicantName(affiliate.getName());
|
|
|
@@ -64,13 +61,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
64
|
61
|
}
|
|
65
|
62
|
//根据案件id查询案件证据材料
|
|
66
|
63
|
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
|
67
|
|
- if (evidenceMaterialList!=null&&evidenceMaterialList.size()>0){
|
|
|
64
|
+ if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
|
|
68
|
65
|
for (CaseAttach caseAttach : evidenceMaterialList) {
|
|
69
|
|
- String path =caseAttach.getAnnexName();
|
|
|
66
|
+ String path = caseAttach.getAnnexName();
|
|
70
|
67
|
String prefix = "/profile";
|
|
71
|
68
|
int startIndex = path.indexOf(prefix);
|
|
72
|
69
|
startIndex += prefix.length();
|
|
73
|
|
- String extractedPath = "/uploadPath"+path.substring(startIndex);
|
|
|
70
|
+ String extractedPath = "/uploadPath" + path.substring(startIndex);
|
|
74
|
71
|
caseAttach.setAnnexPath(extractedPath);
|
|
75
|
72
|
}
|
|
76
|
73
|
}
|
|
|
@@ -116,7 +113,6 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
116
|
113
|
}
|
|
117
|
114
|
|
|
118
|
115
|
|
|
119
|
|
-
|
|
120
|
116
|
@Override
|
|
121
|
117
|
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
|
122
|
118
|
List<Integer> caseStatusList = Arrays.asList(3, 4, 5, 9);
|
|
|
@@ -127,12 +123,41 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
127
|
123
|
public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
|
|
128
|
124
|
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
|
|
129
|
125
|
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
130
|
|
- if (i>0){
|
|
|
126
|
+ if (i > 0) {
|
|
131
|
127
|
return AjaxResult.success("证据确认成功");
|
|
132
|
128
|
}
|
|
133
|
129
|
return AjaxResult.error("暂无需要确认的证据");
|
|
134
|
130
|
}
|
|
135
|
131
|
|
|
|
132
|
+ @Override
|
|
|
133
|
+ public AjaxResult caseCrossexamination(CaseApplication caseApplication
|
|
|
134
|
+ , Integer objectionAddEviden, Integer openCourtHear, Integer pendingAppointArbotrar) {
|
|
|
135
|
+ //查询案件详细信息
|
|
|
136
|
+ CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
|
137
|
+ if (caseApplication1 != null) {
|
|
|
138
|
+ int caseStatus = caseApplication1.getCaseStatus();
|
|
|
139
|
+ caseApplication1.setObjectionAddEviden(objectionAddEviden);
|
|
|
140
|
+ caseApplication1.setOpenCourtHear(openCourtHear);
|
|
|
141
|
+ caseApplication1.setPendingAppointArbotrar(pendingAppointArbotrar);
|
|
|
142
|
+ //修改案件状态
|
|
|
143
|
+ caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
|
|
|
144
|
+ int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
|
|
145
|
+ if (i>0){
|
|
|
146
|
+ //案件日志表里添加数据
|
|
|
147
|
+ CaseLogRecord caseLogRecord = new CaseLogRecord();
|
|
|
148
|
+ caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
|
|
149
|
+ caseLogRecord.setCaseNode(caseStatus);
|
|
|
150
|
+ String createBy = caseApplication1.getCreateBy();
|
|
|
151
|
+ if (createBy!=null){
|
|
|
152
|
+ caseLogRecord.setCreateBy(createBy);
|
|
|
153
|
+ }
|
|
|
154
|
+ caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
|
|
155
|
+ return AjaxResult.success("提交成功");
|
|
|
156
|
+ }
|
|
|
157
|
+ }
|
|
|
158
|
+ return null;
|
|
|
159
|
+ }
|
|
|
160
|
+
|
|
136
|
161
|
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
|
|
137
|
162
|
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
|
|
138
|
163
|
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
|