Parcourir la source

Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

wangqiong123 il y a 2 ans
Parent
révision
6d79065b92

+ 12
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Voir le fichier

@@ -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
 }

+ 6
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Voir le fichier

@@ -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
 }

+ 19
- 22
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Voir le fichier

@@ -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())) {
@@ -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;
@@ -2955,6 +2941,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2955 2941
 
2956 2942
     }
2957 2943
 
2944
+    /**
2945
+     * 根据附件id修改案件id
2946
+     * @param caseAttach
2947
+     * @return
2948
+     */
2949
+    @Override
2950
+    public AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach) {
2951
+        caseAttachMapper.updateCaseAttach(caseAttach);
2952
+        return success();
2953
+    }
2954
+
2958 2955
     public static List<String> findAndConvertPDF(File directory) {
2959 2956
         List<String> pdfPaths = new ArrayList<>();
2960 2957
         if (directory.isFile()) {

+ 34
- 36
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Voir le fichier

@@ -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=")">