|
|
@@ -143,7 +143,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
143
|
143
|
*/
|
|
144
|
144
|
@Override
|
|
145
|
145
|
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
|
|
146
|
+ // admin查询所有案件
|
|
|
147
|
+ if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
|
|
148
|
+
|
|
|
149
|
+ if(req.getHearDateFlag()!=null){
|
|
|
150
|
+ // todo 暂时写死
|
|
|
151
|
+ req.setCaseFlowId(9);
|
|
|
152
|
+ }
|
|
|
153
|
+ startPage();
|
|
146
|
154
|
|
|
|
155
|
+ return msCaseApplicationMapper.list(req, null);
|
|
|
156
|
+ }
|
|
147
|
157
|
// 根据用户查询角色
|
|
148
|
158
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
149
|
159
|
// 根据id查询用户
|
|
|
@@ -168,22 +178,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
168
|
178
|
throw new ServiceException("该角色为绑定案件流程");
|
|
169
|
179
|
}
|
|
170
|
180
|
Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
|
|
171
|
|
- // admin查询所有案件
|
|
172
|
|
- if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
|
173
|
|
- MsCaseFlow caseFlow =null;
|
|
174
|
|
- if(req.getHearDateFlag()!=null){
|
|
175
|
|
- caseFlow = flowMap.get("caseManagement:list:mediate");
|
|
176
|
|
- }else {
|
|
177
|
|
- // 根据按钮权限标识符查询待选择调解员流程id
|
|
178
|
|
- caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
|
179
|
|
- }
|
|
180
|
|
- if(caseFlow!=null) {
|
|
181
|
|
- req.setCaseFlowId(caseFlow.getId());
|
|
182
|
|
- }
|
|
183
|
|
- startPage();
|
|
184
|
|
-
|
|
185
|
|
- return msCaseApplicationMapper.list(req, null);
|
|
186
|
|
- }
|
|
|
181
|
+ List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
|
|
187
|
182
|
for (SysRole role : roles) {
|
|
188
|
183
|
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
|
|
189
|
184
|
if(sysUser.getDeptId()!=null) {
|
|
|
@@ -194,25 +189,30 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
194
|
189
|
|
|
195
|
190
|
}
|
|
196
|
191
|
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
|
|
|
192
|
+ caseStatusNames=new ArrayList<>();
|
|
197
|
193
|
// todo 被申请人案件根据被申请人身份证号查询案件列表
|
|
198
|
194
|
req.setRespondentIdentityNum(sysUser.getIdCard());
|
|
199
|
195
|
MsCaseFlow caseFlow =null;
|
|
200
|
|
- // 查询待调解流程id
|
|
201
|
|
- if(req.getHearDateFlag()!=null){
|
|
202
|
|
- caseFlow = flowMap.get("caseManagement:list:mediate");
|
|
|
196
|
+ // todo 查询待调解流程id被申请人暂时写死
|
|
|
197
|
+ if(req.getMiniProgressFlag()!=null) {
|
|
|
198
|
+ if (req.getHearDateFlag() != null) {
|
|
|
199
|
+// caseFlow = flowMap.get("caseManagement:list:mediate");
|
|
|
200
|
+ caseStatusNames.add("待调解");
|
|
|
201
|
+ } else {
|
|
|
202
|
+ // 待选择调解员
|
|
|
203
|
+ caseStatusNames.add("待选择调解员");
|
|
|
204
|
+ }
|
|
203
|
205
|
}else {
|
|
204
|
|
- // 根据按钮权限标识符查询待选择调解员流程id
|
|
205
|
|
- caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
|
206
|
|
- }
|
|
207
|
|
- if(caseFlow!=null) {
|
|
208
|
|
- req.setCaseFlowId(caseFlow.getId());
|
|
|
206
|
+ // PC端
|
|
|
207
|
+ caseStatusNames.add("待被申请人签收");
|
|
209
|
208
|
}
|
|
|
209
|
+
|
|
210
|
210
|
break;
|
|
211
|
211
|
}
|
|
212
|
212
|
}
|
|
213
|
213
|
startPage();
|
|
214
|
214
|
// 查询案件列表
|
|
215
|
|
- List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList()));
|
|
|
215
|
+ List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
|
|
216
|
216
|
return caseApplicationList;
|
|
217
|
217
|
}
|
|
218
|
218
|
|
|
|
@@ -599,7 +599,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
599
|
599
|
if(templateManage==null||StrUtil.isEmpty(templateManage.getTemOrigPath())){
|
|
600
|
600
|
throw new ServiceException("未找到模板");
|
|
601
|
601
|
}
|
|
602
|
|
- String templatePath = "/home/ruoyi/" + templateManage.getTemOrigPath();
|
|
|
602
|
+ String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
|
|
603
|
603
|
templatePath=templatePath.replace("/profile","/uploadPath");
|
|
604
|
604
|
|
|
605
|
605
|
try {
|
|
|
@@ -1057,12 +1057,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1057
|
1057
|
|
|
1058
|
1058
|
// MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
|
|
1059
|
1059
|
// todo 返回申请人预约信息,预约信息查预约表
|
|
1060
|
|
- Example example = new Example(MsCaseMediator.class);
|
|
1061
|
|
- Example.Criteria criteria = example.createCriteria();
|
|
1062
|
|
- criteria.andIsNull("type");
|
|
1063
|
|
- criteria.andEqualTo("caseAppliId", id);
|
|
1064
|
1060
|
// criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
|
|
1065
|
|
- MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectOneByExample(example);
|
|
|
1061
|
+ MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectLastApplicant(id);
|
|
1066
|
1062
|
if(msCaseMediator==null){
|
|
1067
|
1063
|
return AjaxResult.success(result);
|
|
1068
|
1064
|
}
|