Quellcode durchsuchen

截止9.14开发

hejinbo vor 2 Jahren
Ursprung
Commit
3028291cce

+ 49
- 12
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Datei anzeigen

10
 import org.springframework.web.bind.annotation.*;
10
 import org.springframework.web.bind.annotation.*;
11
 import org.springframework.web.multipart.MultipartFile;
11
 import org.springframework.web.multipart.MultipartFile;
12
 
12
 
13
+import java.util.ArrayList;
13
 import java.util.List;
14
 import java.util.List;
14
 
15
 
15
 /**
16
 /**
19
 @RequestMapping("/evidence")
20
 @RequestMapping("/evidence")
20
 public class CaseEvidenceController extends BaseController {
21
 public class CaseEvidenceController extends BaseController {
21
     private final ICaseEvidenceService caseEvidenceService;
22
     private final ICaseEvidenceService caseEvidenceService;
23
+
22
     @Autowired
24
     @Autowired
23
     public CaseEvidenceController(ICaseEvidenceService caseEvidenceService) {
25
     public CaseEvidenceController(ICaseEvidenceService caseEvidenceService) {
24
         this.caseEvidenceService = caseEvidenceService;
26
         this.caseEvidenceService = caseEvidenceService;
25
     }
27
     }
26
-    /**
28
+
29
+   /* *//**
27
      * 查询被申请人案件列表
30
      * 查询被申请人案件列表
31
+     *
28
      * @param identityNum 身份证号
32
      * @param identityNum 身份证号
29
      * @return
33
      * @return
30
-     */
34
+     *//*
31
     @GetMapping("/respondent")
35
     @GetMapping("/respondent")
32
-    public TableDataInfo getCaseListByRespondent(@RequestParam String identityNum
33
-            ,Integer pageNum,Integer pageSize){
36
+    public TableDataInfo getCaseListByRespondent(@RequestParam String identityNum) {
34
         startPage();
37
         startPage();
35
         List<CaseEvidenceVO> list = caseEvidenceService.getCaseListByRespondent(identityNum);
38
         List<CaseEvidenceVO> list = caseEvidenceService.getCaseListByRespondent(identityNum);
36
-        return getDataTable(list);
37
-    }
39
+        if (list != null) {
40
+            return getDataTable(list);
41
+        }
42
+        return getDataTable(new ArrayList<>());
43
+    }*/
44
+
38
     /**
45
     /**
39
-     * 根据案件id查询案件详情
46
+     * 被申请人根据案件id查询案件详情
47
+     *
40
      * @param id
48
      * @param id
41
      * @return
49
      * @return
42
      */
50
      */
43
     @GetMapping("/{id}")
51
     @GetMapping("/{id}")
44
-    public AjaxResult getCaseDetailsById(@PathVariable Long id ){
52
+    public AjaxResult getCaseDetailsById(@PathVariable Long id) {
45
         return caseEvidenceService.getCaseDetailsById(id);
53
         return caseEvidenceService.getCaseDetailsById(id);
46
     }
54
     }
55
+
47
     /**
56
     /**
48
      * 案件证据上传
57
      * 案件证据上传
49
-     * @param file 附件
58
+     *
59
+     * @param file      附件
50
      * @param annexType 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
60
      * @param annexType 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
51
-     * @param id 案件申请id
61
+     * @param id        案件申请id
52
      * @return
62
      * @return
53
      */
63
      */
54
     @PostMapping("/upload")
64
     @PostMapping("/upload")
55
-    public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file , Integer annexType , Long id){
56
-        return caseEvidenceService.uploadEvidence(file,annexType,id);
65
+    public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
66
+        return caseEvidenceService.uploadEvidence(file, annexType, id);
57
     }
67
     }
68
+
69
+ /*   @GetMapping("/applicant")
70
+    public TableDataInfo getCaseListByApplicant(@RequestParam String identityNum) {
71
+        startPage();
72
+        List<CaseEvidenceVO> list = caseEvidenceService.getCaseListByApplicant(identityNum);
73
+        if (list != null) {
74
+            return getDataTable(list);
75
+        }
76
+        return getDataTable(new ArrayList<>());
77
+    }*/
78
+
79
+    /**
80
+     * 查询当前用户案件列表
81
+     * @param identityNum
82
+     * @return
83
+     */
84
+    @GetMapping("/all")
85
+    public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
86
+        startPage();
87
+        List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
88
+        if (list != null) {
89
+            return getDataTable(list);
90
+        }
91
+        return getDataTable(new ArrayList<>());
92
+    }
93
+
94
+
58
 }
95
 }

+ 2
- 2
ruoyi-admin/src/main/resources/application.yml Datei anzeigen

9
   # 实例演示开关
9
   # 实例演示开关
10
   demoEnabled: true
10
   demoEnabled: true
11
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
11
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
12
-  profile: D:/ruoyi/uploadPath
12
+  profile: /home/ruoyi/uploadPath
13
   # 获取ip地址开关
13
   # 获取ip地址开关
14
   addressEnabled: false
14
   addressEnabled: false
15
   # 验证码类型 math 数字计算 char 字符验证
15
   # 验证码类型 math 数字计算 char 字符验证
142
       appId: 2021003141676135
142
       appId: 2021003141676135
143
     callback:
143
     callback:
144
       domain: http://121.40.189.20:9000/
144
       domain: http://121.40.189.20:9000/
145
-      watch: true
145
+      watch: false
146
       cycle: 10
146
       cycle: 10

+ 28
- 9
ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java Datei anzeigen

2
 
2
 
3
 import com.tencentcloudapi.common.Credential;
3
 import com.tencentcloudapi.common.Credential;
4
 import com.tencentcloudapi.common.exception.TencentCloudSDKException;
4
 import com.tencentcloudapi.common.exception.TencentCloudSDKException;
5
+import com.tencentcloudapi.common.profile.ClientProfile;
6
+import com.tencentcloudapi.common.profile.HttpProfile;
7
+import com.tencentcloudapi.cvm.v20170312.CvmClient;
8
+import com.tencentcloudapi.cvm.v20170312.models.DescribeRegionsRequest;
9
+import com.tencentcloudapi.cvm.v20170312.models.DescribeRegionsResponse;
5
 import com.tencentcloudapi.sms.v20210111.SmsClient;
10
 import com.tencentcloudapi.sms.v20210111.SmsClient;
6
 import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
11
 import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
12
+import com.tencentcloudapi.sms.v20210111.models.SendStatus;
7
 import lombok.Data;
13
 import lombok.Data;
8
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
9
 import lombok.var;
15
 import lombok.var;
12
 
18
 
13
 @Slf4j
19
 @Slf4j
14
 public class SmsUtils {
20
 public class SmsUtils {
15
-    private static final String SDK_APP_ID = "应用id";
16
-    private static final String SECRET_ID = "API的SecretId";
17
-    private static final String SECRET_KEY = "API的SecretKey";
18
-    private static final String SIGN_NAME = "签名内容";
21
+    //应用id
22
+    private static final String SDK_APP_ID = "1400854852";
23
+    //API的SecretId
24
+    private static final String SECRET_ID = "AKIDeEf2A8uX1HSainvvnXAc3X9ZlhtyvkMp";
25
+    //API的SecretKey
26
+    private static final String SECRET_KEY = "QjphKo8zkHZigT8j9PVtFPJyfIvO3d6V";
27
+    //签名内容
28
+    private static final String SIGN_NAME = "西安云美电子科技有限公司";
29
+
19
     public static Boolean sendSms(SendSmsRequest request) {
30
     public static Boolean sendSms(SendSmsRequest request) {
20
-        Credential cred = new Credential(SECRET_ID,SECRET_KEY);
31
+        Credential cred = new Credential(SECRET_ID, SECRET_KEY );
32
+
21
         SmsClient client = new SmsClient(cred, "ap-guangzhou");
33
         SmsClient client = new SmsClient(cred, "ap-guangzhou");
22
 
34
 
23
         final var req = new com.tencentcloudapi.sms.v20210111.models.SendSmsRequest();
35
         final var req = new com.tencentcloudapi.sms.v20210111.models.SendSmsRequest();
24
         req.setPhoneNumberSet(new String[]{"+86" + request.getPhone()});
36
         req.setPhoneNumberSet(new String[]{"+86" + request.getPhone()});
25
-        req.setSmsSdkAppId(SDK_APP_ID);
37
+        req.setSmsSdkAppId(SDK_APP_ID );
26
         req.setSignName(SIGN_NAME);
38
         req.setSignName(SIGN_NAME);
27
         req.setTemplateId(request.getTemplateId());
39
         req.setTemplateId(request.getTemplateId());
28
         req.setTemplateParamSet(request.getTemplateParamSet());
40
         req.setTemplateParamSet(request.getTemplateParamSet());
29
-
30
         SendSmsResponse res = null;
41
         SendSmsResponse res = null;
31
         try {
42
         try {
32
             res = client.SendSms(req);
43
             res = client.SendSms(req);
34
             log.error("发送短信出错:", e);
45
             log.error("发送短信出错:", e);
35
             return Boolean.FALSE;
46
             return Boolean.FALSE;
36
         }
47
         }
37
-        log.error("发送短信结果:", SendSmsResponse.toJsonString(res));
48
+        SendStatus sendStatus = res.getSendStatusSet()[0];
49
+        log.info("发送短信结果:Code={}, Message={}", sendStatus.getCode(), sendStatus.getMessage());
38
 
50
 
39
         if (Objects.nonNull(res.getSendStatusSet()) && res.getSendStatusSet().length > 0 && "Ok".equals(res.getSendStatusSet()[0].getCode())){
51
         if (Objects.nonNull(res.getSendStatusSet()) && res.getSendStatusSet().length > 0 && "Ok".equals(res.getSendStatusSet()[0].getCode())){
40
             return Boolean.TRUE;
52
             return Boolean.TRUE;
41
         }
53
         }
42
         return Boolean.FALSE;
54
         return Boolean.FALSE;
43
     }
55
     }
44
-
45
     /**
56
     /**
46
      * 参数对象
57
      * 参数对象
47
      */
58
      */
63
         private String[] templateParamSet;
74
         private String[] templateParamSet;
64
 
75
 
65
     }
76
     }
77
+
78
+    public static void main(String[] args) {
79
+        SendSmsRequest sendSmsRequest = new SendSmsRequest();
80
+        sendSmsRequest.setPhone("15029925289");
81
+        sendSmsRequest.setTemplateId("1927509");
82
+        sendSmsRequest.setTemplateParamSet(new String[]{"用户"});
83
+        SmsUtils.sendSms(sendSmsRequest);
84
+    }
66
 }
85
 }

+ 11
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseDetailVO.java Datei anzeigen

1
 package com.ruoyi.wisdomarbitrate.domain.vo;
1
 package com.ruoyi.wisdomarbitrate.domain.vo;
2
 
2
 
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
3
 import lombok.AllArgsConstructor;
4
 import lombok.AllArgsConstructor;
4
 import lombok.Builder;
5
 import lombok.Builder;
5
 import lombok.Data;
6
 import lombok.Data;
7
 
8
 
8
 import java.math.BigDecimal;
9
 import java.math.BigDecimal;
9
 import java.util.Date;
10
 import java.util.Date;
11
+import java.util.List;
10
 
12
 
11
 @Data
13
 @Data
12
 @Builder
14
 @Builder
53
      * 申请人主张违约金
55
      * 申请人主张违约金
54
      */
56
      */
55
     private BigDecimal claimLiquidDamag;
57
     private BigDecimal claimLiquidDamag;
58
+
59
+    /**
60
+     * 证据材料
61
+     */
62
+    private List<CaseAttach> evidenceMaterialList;
63
+    /**
64
+     * 当前登录人身份类型
65
+     */
66
+    private Integer identityType;
56
 }
67
 }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java Datei anzeigen

2
 
2
 
3
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
3
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
4
 
4
 
5
+import java.util.List;
6
+
5
 public interface CaseAttachMapper {
7
 public interface CaseAttachMapper {
6
     int save(CaseAttach caseAttach);
8
     int save(CaseAttach caseAttach);
9
+
10
+    List<CaseAttach> queryAnnexPathByCaseId(Long id);
7
 }
11
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java Datei anzeigen

10
 @Mapper
10
 @Mapper
11
 public interface CaseEvidenceMapper {
11
 public interface CaseEvidenceMapper {
12
     List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
12
     List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
13
-            , @Param(value = "caseStatus" ) Integer caseStatus
13
+            , @Param(value = "caseStatusList") List<Integer> caseStatusList
14
             , @Param(value = "identityType" ) Integer identityType);
14
             , @Param(value = "identityType" ) Integer identityType);
15
 }
15
 }

+ 6
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java Datei anzeigen

8
 import java.util.List;
8
 import java.util.List;
9
 
9
 
10
 public interface ICaseEvidenceService {
10
 public interface ICaseEvidenceService {
11
-    List<CaseEvidenceVO> getCaseListByRespondent(String identityNum);
11
+   // List<CaseEvidenceVO> getCaseListByRespondent(String identityNum);
12
 
12
 
13
     AjaxResult getCaseDetailsById(Long id);
13
     AjaxResult getCaseDetailsById(Long id);
14
 
14
 
15
     AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id);
15
     AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id);
16
+
17
+    //List<CaseEvidenceVO> getCaseListByApplicant(String identityNum);
18
+
19
+    List<CaseEvidenceVO> getCaseListAll(String identityNum);
20
+
16
 }
21
 }

+ 48
- 19
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Datei anzeigen

19
 import org.springframework.web.multipart.MultipartFile;
19
 import org.springframework.web.multipart.MultipartFile;
20
 
20
 
21
 import java.io.IOException;
21
 import java.io.IOException;
22
+import java.util.Arrays;
22
 import java.util.List;
23
 import java.util.List;
23
 
24
 
24
 @Service
25
 @Service
31
     private CaseApplicationMapper caseApplicationMapper;
32
     private CaseApplicationMapper caseApplicationMapper;
32
     @Autowired
33
     @Autowired
33
     private CaseAttachMapper caseAttachMapper;
34
     private CaseAttachMapper caseAttachMapper;
34
-    @Override
35
+ /*   @Override
35
     public List<CaseEvidenceVO> getCaseListByRespondent(String identityNum) {
36
     public List<CaseEvidenceVO> getCaseListByRespondent(String identityNum) {
36
-        int caseStatus = 3;
37
-        int identityType = 2;
38
-        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatus,identityType);
39
-        if (caseListByRespondent!= null && caseListByRespondent.size()>0){
40
-            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
41
-                //根据案件id查询申请人姓名
42
-                CaseAffiliate caseAffiliate = new CaseAffiliate();
43
-                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
44
-                caseAffiliate.setIdentityType(1);
45
-                String name = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate).get(0).getName();
46
-                caseEvidenceVO.setApplicantName(name);
47
-            }
48
-            return caseListByRespondent;
49
-        }
50
-        return null;
51
-    }
37
+        return getCaseEvidenceVOList(identityNum,3, 2);
38
+    }*/
52
 
39
 
53
     @Override
40
     @Override
54
     public AjaxResult getCaseDetailsById(Long id) {
41
     public AjaxResult getCaseDetailsById(Long id) {
58
         if (caseApplication1!=null){
45
         if (caseApplication1!=null){
59
             CaseDetailVO caseDetailVO = new CaseDetailVO();
46
             CaseDetailVO caseDetailVO = new CaseDetailVO();
60
             BeanUtils.copyProperties(caseApplication1,caseDetailVO);
47
             BeanUtils.copyProperties(caseApplication1,caseDetailVO);
48
+            //查询案件证据材料
49
+           // List <CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
61
             CaseAffiliate caseAffiliate = new CaseAffiliate();
50
             CaseAffiliate caseAffiliate = new CaseAffiliate();
62
             caseAffiliate.setCaseAppliId(id);
51
             caseAffiliate.setCaseAppliId(id);
63
             List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
52
             List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
81
         }
70
         }
82
         try {
71
         try {
83
             String filePath  = RuoYiConfig.getUploadPath();
72
             String filePath  = RuoYiConfig.getUploadPath();
73
+            // 获取文件原始名称
74
+            String fileName = file.getOriginalFilename();
75
+            String fileSavePath = filePath + "/" +  fileName;
84
             // 上传并返回新文件名称
76
             // 上传并返回新文件名称
85
-            String fileNewName  = FileUploadUtils.upload(filePath, file);
77
+            String fileNewName  = FileUploadUtils.upload(filePath,file);
86
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
78
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
87
                     .annexName(fileNewName)
79
                     .annexName(fileNewName)
88
-                    .annexPath(filePath)
80
+                    .annexPath(fileSavePath)
89
                     .annexType(annexType)
81
                     .annexType(annexType)
90
                     .build();
82
                     .build();
91
             int count = caseAttachMapper.save(caseAttach);
83
             int count = caseAttachMapper.save(caseAttach);
92
             if (count>0){
84
             if (count>0){
85
+                //修改案件状态
86
+                CaseApplication caseApplication = new CaseApplication();
87
+                caseApplication.setId(id);
88
+                caseApplication.setCaseStatus(4);
89
+                caseApplicationMapper.submitCaseApplication(caseApplication);
93
                 return AjaxResult.success("上传成功");
90
                 return AjaxResult.success("上传成功");
94
             }
91
             }
95
         } catch (IOException e) {
92
         } catch (IOException e) {
98
 
95
 
99
         return AjaxResult.error("上传失败");
96
         return AjaxResult.error("上传失败");
100
     }
97
     }
98
+
99
+/*    @Override
100
+    public List<CaseEvidenceVO> getCaseListByApplicant(String identityNum) {
101
+        return getCaseEvidenceVOList(identityNum,4, 1);
102
+    }*/
103
+
104
+    @Override
105
+    public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
106
+        List<Integer> caseStatusList = Arrays.asList(3, 4, 5, 9);
107
+        return getCaseEvidenceVOList(identityNum,caseStatusList,null);
108
+    }
109
+
110
+    private  List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum ,List<Integer> caseStatusList, Integer identityType){
111
+        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList,identityType);
112
+        if (caseListByRespondent!= null && caseListByRespondent.size()>0){
113
+            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
114
+                //根据案件id查询姓名
115
+                CaseAffiliate caseAffiliate = new CaseAffiliate();
116
+                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
117
+                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
118
+                for (CaseAffiliate affiliate : caseAffiliates) {
119
+                    if (affiliate.getIdentityType() == 1){  //申请人
120
+                        caseEvidenceVO.setApplicantName(affiliate.getName());
121
+                    }else {
122
+                        caseEvidenceVO.setRespondentName(affiliate.getName());
123
+                    }
124
+                }
125
+            }
126
+            return caseListByRespondent;
127
+        }
128
+        return null;
129
+    }
101
 }
130
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Datei anzeigen

110
                         request.setTemplateParamSet(new String[]{"模板中的参数值,如果没有则为空"});
110
                         request.setTemplateParamSet(new String[]{"模板中的参数值,如果没有则为空"});
111
                     }
111
                     }
112
                 }
112
                 }
113
-                //SmsUtils.sendSms(request);
113
+                SmsUtils.sendSms(request);
114
                 return AjaxResult.success();
114
                 return AjaxResult.success();
115
             }
115
             }
116
         }
116
         }

+ 13
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Datei anzeigen

3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper">
6
+    <resultMap type="CaseAttach" id="CaseAttachResult">
7
+        <id     property="annexId"       column="annex_id"      />
8
+        <result property="caseAppliId"       column="case_appli_id"      />
9
+        <result property="annexName"     column="annex_name"    />
10
+        <result property="annexPath"     column="annex_path"    />
11
+        <result property="annexPath"     column="annex_type"    />
12
+        <result property="note"     column="note"    />
13
+    </resultMap>
6
     <insert id="save">
14
     <insert id="save">
7
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note)
15
         INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note)
8
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note})
16
         VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note})
9
     </insert>
17
     </insert>
18
+    <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
19
+        select annex_id,case_appli_id,annex_name,annex_path,annex_type,note
20
+        from case_attach
21
+        where
22
+    </select>
10
 </mapper>
23
 </mapper>

+ 20
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml Datei anzeigen

3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
6
-    <select id="getCaseListByRespondent" resultType="CaseEvidenceVO">
7
-        select c.id, c.case_num as caseNum ,c.case_status as caseStatus,d.name as respondentName
6
+    <resultMap type="CaseEvidenceVO" id="CaseEvidenceVOResult">
7
+        <id     property="id"       column="id"      />
8
+        <result property="caseNum"       column="case_num"      />
9
+        <result property="caseStatus"     column="case_status"    />
10
+    </resultMap>
11
+    <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
12
+        select c.id, c.case_num,c.case_status
8
         from case_application as c  ,case_affiliate as d
13
         from case_application as c  ,case_affiliate as d
9
-        where c.id = d.case_appli_id and d.identity_num = #{identityNum} and identity_type = #{identityType}
10
-          and c.case_status = #{caseStatus}
14
+        where c.id = d.case_appli_id
15
+        <if test="identityNum != null and identityNum != ''">
16
+            and d.identity_num = #{identityNum}
17
+        </if>
18
+        <if test="identityType != null ">
19
+            and identity_type = #{identityType}
20
+        </if>
21
+        <if test="caseStatusList != null and caseStatusList.size() > 0">
22
+            and c.case_status in
23
+            <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
24
+                #{caseStatus}
25
+            </foreach>
26
+        </if>
11
     </select>
27
     </select>
12
 </mapper>
28
 </mapper>