Bläddra i källkod

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb

hejinbo 2 år sedan
förälder
incheckning
0b8c566f1d

+ 12
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Visa fil

@@ -439,5 +439,16 @@ public class CaseApplicationController extends BaseController {
439 439
         return caseApplicationService.uploadCaseZipFile(file);
440 440
     }
441 441
 
442
-
442
+    /**
443
+     * 根据附件id修改案件id
444
+     * @param caseAttach
445
+     * @return
446
+     */
447
+    @PostMapping("/updateCaseIdByAnnexId")
448
+    public AjaxResult updateCaseIdByAnnexId(@RequestBody CaseAttach caseAttach)  {
449
+        if(caseAttach.getAnnexId()==null || caseAttach.getCaseAppliId()==null){
450
+            return error("参数校验失败");
451
+        }
452
+        return caseApplicationService.updateCaseIdByAnnexId(caseAttach);
453
+    }
443 454
 }

+ 5
- 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Visa fil

@@ -101,17 +101,14 @@ public class CaseEvidenceController extends BaseController {
101 101
     /**
102 102
      * 查询当前用户案件列表
103 103
      *
104
-     * @param identityNum
104
+     * @param caseStatus
105 105
      * @return
106 106
      */
107 107
     @GetMapping("/all")
108
-    public TableDataInfo getCaseListAll(@RequestParam(required = false) String identityNum) {
109
-        startPage();
110
-        List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
111
-        if (list != null) {
112
-            return getDataTable(list);
113
-        }
114
-        return getDataTable(new ArrayList<>());
108
+    public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
109
+
110
+       return success(caseEvidenceService.getCaseListAll(caseStatus));
111
+
115 112
     }
116 113
 
117 114
     /**

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseEvidenceVO.java Visa fil

@@ -1,8 +1,11 @@
1 1
 package com.ruoyi.wisdomarbitrate.domain.vo;
2 2
 
3 3
 
4
+import com.fasterxml.jackson.annotation.JsonFormat;
4 5
 import lombok.Data;
5 6
 
7
+import java.util.Date;
8
+
6 9
 @Data
7 10
 public class CaseEvidenceVO {
8 11
     /**
@@ -25,4 +28,13 @@ public class CaseEvidenceVO {
25 28
      * 案件状态
26 29
      */
27 30
     private Integer caseStatus;
31
+    /**
32
+     * 房间号
33
+     */
34
+    private Long roomId;
35
+    /**
36
+     * 开庭时间
37
+     */
38
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
39
+    private Date scheduleStartTime;
28 40
 }

+ 6
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Visa fil

@@ -114,4 +114,10 @@ public interface ICaseApplicationService {
114 114
 
115 115
     AjaxResult uploadCaseZipFile(MultipartFile file);
116 116
 
117
+    /**
118
+     * 根据附件id修改案件id
119
+     * @param caseAttach
120
+     * @return
121
+     */
122
+    AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach);
117 123
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java Visa fil

@@ -17,7 +17,7 @@ public interface ICaseEvidenceService {
17 17
 
18 18
     AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
19 19
 
20
-    List<CaseEvidenceVO> getCaseListAll(String identityNum);
20
+    List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
21 21
 
22 22
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
23 23
 

+ 20
- 23
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Visa fil

@@ -184,7 +184,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
184 184
                         || "部门长".equals(role.getRoleName())) {
185 185
                     List<Integer> caseStatusList = new ArrayList<>();
186 186
                     caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
187
-                    caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
187
+                  //  caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
188 188
                     caseApplication.setDeptHeadStatus(caseStatusList);
189 189
                     caseApplication.setIsOtherRole(1);
190 190
                 }
@@ -260,7 +260,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
260 260
                     || "部门长".equals(role.getRoleName())) {
261 261
                 caseApplication.setIsOtherRole(1);
262 262
                 caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
263
-                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
263
+             //   caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
264 264
                 caseApplication.setDeptHeadStatus(caseStatusList);
265 265
             }
266 266
             if ("仲裁员".equals(role.getRoleName())) {
@@ -279,7 +279,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
279 279
                 caseApplication.setDeptIds(deptIds);
280 280
             }
281 281
             if ("申请人".equals(role.getRoleName())) {
282
-                //  caseApplication.setIsOtherRole(1);
282
+                  caseApplication.setIsOtherRole(1);
283 283
                 // 查询角色有关的用户部门
284 284
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
285 285
             }
@@ -2127,14 +2127,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2127 2127
         caseApplication.setId(messageVO.getId());
2128 2128
         CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
2129 2129
         String returnResult = "短信发送成功";
2130
-        //todo 需要申请模板,申请人,被申请人发送短信通知
2130
+        // 需要申请模板,申请人,被申请人发送短信通知
2131 2131
         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
2132 2132
         String startFormat = "";
2133 2133
         String endFormat = "";
2134 2134
         // 创建房间短信通知
2135
-        if (messageVO.getScheduleStartTime() == null) {
2136
-            request.setTemplateId("1983692");
2137
-        } else {
2138 2135
             String format = "yyyy/MM/dd HH:mm:ss"; // 目标格式
2139 2136
             Date startDate = messageVO.getScheduleStartTime();
2140 2137
             Date endDate = messageVO.getScheduleEndTime();
@@ -2143,20 +2140,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2143 2140
             endFormat = sdf.format(endDate);
2144 2141
             // 预约会议短信模板
2145 2142
             request.setTemplateId("1983711");
2146
-        }
2143
+
2147 2144
 
2148 2145
         for (CaseAffiliate caseAffiliate : caseAffiliates) {
2149 2146
             request.setPhone(caseAffiliate.getContactTelphone());
2150 2147
             request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() + caseAffiliate.getUserId()});
2151
-            // 1952136 普通短信 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请在浏览器打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。
2152 2148
             String userId = (null == caseAffiliate.getUserId() ? "" : caseAffiliate.getUserId());
2153
-            if (messageVO.getScheduleStartTime() == null) {
2154
-                // 1983692	开庭审理创建会议通知  尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。
2155
-                request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() + userId});
2156
-            } else {
2157
-                //  1983711 开庭审理预约会议短信通知  尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},会议时间为{4},请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。
2158
-                request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() + userId, startFormat + "-" + endFormat});
2159
-            }
2149
+            //  1983711 开庭审理预约会议短信通知  尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},会议时间为{4},请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。
2150
+            request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() , startFormat + "-" + endFormat});
2151
+
2160 2152
             Boolean aBoolean = SmsUtils.sendSms(request);
2161 2153
             //保存短信发送记录
2162 2154
             SmsSendRecord smsSendRecord = new SmsSendRecord();
@@ -2164,13 +2156,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2164 2156
             smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum());
2165 2157
             smsSendRecord.setPhone(request.getPhone());
2166 2158
             smsSendRecord.setSendTime(new Date());
2167
-            String content = "";
2168
-            if (messageVO.getScheduleStartTime() == null) {
2169
-                content = "尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplicationselect.getCaseNum() + "仲裁案件,开庭审理房间号为" + messageVO.getRoomNo() + userId + ",请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。";
2170
-            } else {
2171
-                content = "尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplicationselect.getCaseNum() + "仲裁案件,开庭审理房间号为" + messageVO.getRoomNo() + userId + "会议时间为" + startFormat + "-" + endFormat + ",请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。";
2172
-
2173
-            }
2159
+            String   content = "尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplicationselect.getCaseNum() + "仲裁案件,开庭审理房间号为" + messageVO.getRoomNo()  + "会议时间为" + startFormat + "-" + endFormat + ",请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。";
2174 2160
             smsSendRecord.setSendContent(content);
2175 2161
 
2176 2162
             String userName;
@@ -2972,6 +2958,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2972 2958
         return null;
2973 2959
     }
2974 2960
 
2961
+    /**
2962
+     * 根据附件id修改案件id
2963
+     * @param caseAttach
2964
+     * @return
2965
+     */
2966
+    @Override
2967
+    public AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach) {
2968
+        caseAttachMapper.updateCaseAttach(caseAttach);
2969
+        return success();
2970
+    }
2971
+
2975 2972
     public static List<String> findAndConvertPDF(File directory) {
2976 2973
         List<String> pdfPaths = new ArrayList<>();
2977 2974
         if (directory.isFile()) {

+ 5
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Visa fil

@@ -147,10 +147,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
147 147
     IdentityAuthenticationMapper identityAuthenticationMapper;
148 148
 
149 149
     @Override
150
-    public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
150
+    public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
151 151
         // 是否为超级管理员
152 152
         int adMinFlag=0;
153
-        if (StringUtils.isBlank(identityNum)) {
153
+        String identityNum = "";
154 154
             IdentityAuthentication authentication = new IdentityAuthentication();
155 155
             LoginUser loginUser = SecurityUtils.getLoginUser();
156 156
             // 查询该用户的角色
@@ -175,8 +175,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
175 175
                   identityNum = authentication1.getIdentityNo();
176 176
               }
177 177
           }
178
-        }
179
-        List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
178
+
179
+        List<Integer> caseStatusList = Arrays.asList(caseStatus);
180 180
         return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
181 181
     }
182 182
 
@@ -430,6 +430,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
430 430
 
431 431
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
432 432
         List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
433
+       // todo 返回房间号和开庭时间
433 434
         if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
434 435
             for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
435 436
                 //根据案件id查询姓名

+ 34
- 36
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Visa fil

@@ -305,7 +305,7 @@
305 305
                 WHERE case_appli_id = c.id
306 306
                  )
307 307
                 WHERE
308
-                ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
308
+                ca.identity_type=1 and c.case_status in (1,5,11,14,15,16,17,31)
309 309
                 <if test="caseStatusList != null and caseStatusList.size() > 0">
310 310
                     and c.case_status in
311 311
                     <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
@@ -676,13 +676,11 @@
676 676
 <!--                </foreach> )-->
677 677
 <!--            </if>-->
678 678
             <!--申请人-->
679
-<!--            <if test="applicationOrganId != null and applicationOrganId != ''">-->
680
-<!--                or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
681
-<!--                &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
682
-<!--                and (t.case_status &lt;= 10 or t.case_status=31))-->
683
-<!--            &lt;!&ndash; and t.case_status in (0,2,17))&ndash;&gt;-->
679
+            <if test="applicationOrganId != null and applicationOrganId != ''">
680
+                or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
681
+                 and t.case_status in (0,2,17))
684 682
 
685
-<!--         </if>-->
683
+         </if>
686 684
          <!--部门长-->
687 685
             <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
688 686
                 or (t.identity_type=1 and t.case_status in
@@ -708,37 +706,37 @@
708 706
         </where>
709 707
             union
710 708
         </if>
711
-            <if test="applicationOrganId != null and applicationOrganId != ''">
712
-                <!--申请人案件-->
709
+<!--            <if test="applicationOrganId != null and applicationOrganId != ''">-->
710
+<!--                &lt;!&ndash;申请人案件&ndash;&gt;-->
713 711
 
714
-                select l.case_appli_id id ,
715
-                c.case_status,ca.application_organ_id,
716
-                c.arbitrator_id,ca.identity_num , ca.identity_type
717
-                from case_application c
718
-                JOIN case_application_log l ON c.id = l.case_appli_id
719
-                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version
720
-                <where>
721
-                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
712
+<!--                select l.case_appli_id id ,-->
713
+<!--                c.case_status,ca.application_organ_id,-->
714
+<!--                c.arbitrator_id,ca.identity_num , ca.identity_type-->
715
+<!--                from case_application c-->
716
+<!--                JOIN case_application_log l ON c.id = l.case_appli_id-->
717
+<!--                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version-->
718
+<!--                <where>-->
719
+<!--                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1-->
722 720
 
723
-                    <if test="applicationOrganId != null and applicationOrganId != ''">
724
-                        AND ca.application_organ_id = #{applicationOrganId}
725
-                    </if>
726
-                    <if test="caseStatus != null">
727
-                        AND c.case_status = #{caseStatus}
728
-                    </if>
729
-                    <if test="caseNum != null and caseNum != ''">
730
-                        AND c.case_num = #{caseNum}
731
-                    </if>
732
-                    <if test="nameId != null and nameId != ''">
733
-                        AND ca.application_organ_id=#{nameId}
734
-                    </if>
721
+<!--                    <if test="applicationOrganId != null and applicationOrganId != ''">-->
722
+<!--                        AND ca.application_organ_id = #{applicationOrganId}-->
723
+<!--                    </if>-->
724
+<!--                    <if test="caseStatus != null">-->
725
+<!--                        AND c.case_status = #{caseStatus}-->
726
+<!--                    </if>-->
727
+<!--                    <if test="caseNum != null and caseNum != ''">-->
728
+<!--                        AND c.case_num = #{caseNum}-->
729
+<!--                    </if>-->
730
+<!--                    <if test="nameId != null and nameId != ''">-->
731
+<!--                        AND ca.application_organ_id=#{nameId}-->
732
+<!--                    </if>-->
735 733
 
736
-                    <if test="lockStatus != null">
737
-                        AND c.lock_status = #{lockStatus}
738
-                    </if>
739
-                </where>
740
-                union
741
-            </if>
734
+<!--                    <if test="lockStatus != null">-->
735
+<!--                        AND c.lock_status = #{lockStatus}-->
736
+<!--                    </if>-->
737
+<!--                </where>-->
738
+<!--                union-->
739
+<!--            </if>-->
742 740
             <!--秘书案件-->
743 741
             <if test="deptIds != null and deptIds.size() > 0">
744 742
 
@@ -757,7 +755,7 @@
757 755
                 WHERE case_appli_id = c.id
758 756
                )
759 757
                 WHERE
760
-                ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
758
+                ca.identity_type=1 and c.case_status in (1,5,11,14,15,16,17,31)
761 759
                 <if test="deptIds != null and deptIds.size() > 0">
762 760
                     and ca.application_organ_id in
763 761
                     <foreach item="item" collection="deptIds" open="(" separator="," close=")">

+ 5
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml Visa fil

@@ -7,10 +7,13 @@
7 7
         <id     property="id"       column="id"      />
8 8
         <result property="caseNum"       column="case_num"      />
9 9
         <result property="caseStatus"     column="case_status"    />
10
+        <result property="roomId"     column="room_id"    />
11
+        <result property="scheduleStartTime"     column="schedule_start_time"    />
10 12
     </resultMap>
11 13
     <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
12
-        select DISTINCT(c.id) id, c.case_num,c.case_status
13
-        from case_application as c  ,case_affiliate as d
14
+        select DISTINCT(c.id) id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
15
+        from case_application as c  join case_affiliate as d on c.id = d.case_appli_id
16
+        left join reserved_conference rc on rc.case_id=c.id
14 17
         where c.id = d.case_appli_id
15 18
         <if test="identityNum != null and identityNum != ''">
16 19
             and d.identity_num = #{identityNum}