优化小程序查询案件列表接口
This commit is contained in:
+8
-5
@@ -38,7 +38,7 @@ public class CaseEvidenceController extends BaseController {
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
|
||||
String username = this.getUsername();
|
||||
return caseEvidenceService.getCaseDetailsById(id,username);
|
||||
return caseEvidenceService.getCaseDetailsById(id, username);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,16 +53,17 @@ public class CaseEvidenceController extends BaseController {
|
||||
public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
|
||||
String username = this.getUsername();
|
||||
Long userId = this.getUserId();
|
||||
return caseEvidenceService.uploadEvidence(file, annexType, id,username,userId);
|
||||
return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户案件列表
|
||||
*
|
||||
* @param identityNum
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
|
||||
public TableDataInfo getCaseListAll(@RequestParam(required = false) String identityNum) {
|
||||
startPage();
|
||||
List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
|
||||
if (list != null) {
|
||||
@@ -73,21 +74,23 @@ public class CaseEvidenceController extends BaseController {
|
||||
|
||||
/**
|
||||
* 证据确认
|
||||
*
|
||||
* @param caseApplication 案件对象
|
||||
* @return 统一返回结果
|
||||
*/
|
||||
@PutMapping("/confirm")
|
||||
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
|
||||
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return caseEvidenceService.evidenceConfirmation(caseApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 案件质证
|
||||
*
|
||||
* @param caseEvidenceDTO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/crossexami")
|
||||
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO){
|
||||
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
|
||||
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-1
@@ -3,6 +3,9 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
@@ -118,10 +121,21 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||
if(StringUtils.isBlank(identityNum)){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
String username = loginUser.getUsername();
|
||||
IdentityAuthentication authentication=new IdentityAuthentication();
|
||||
authentication.setUserName(username);
|
||||
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
||||
if(authentication1!=null){
|
||||
identityNum = authentication1.getIdentityNo();
|
||||
}
|
||||
}
|
||||
List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||
return getCaseEvidenceVOList(identityNum, caseStatusList, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user