Procházet zdrojové kódy

修改开庭时间时加短信通知

18792927508 před 2 roky
rodič
revize
d1d1b70d9b

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Zobrazit soubor

@@ -680,7 +680,7 @@ public class CaseApplication  extends BaseEntity {
680 680
     @Excel(name = "被申请人主体信息-身份证号",width = 26)
681 681
     private String debtorIdentityNum;
682 682
     /** 被申请人主体信息-性别 */
683
-    @Excel(name = "被申请人主体信息-性别",width = 26,combo= {"男","女"},readConverterExp = "0=男,女=1")
683
+    @Excel(name = "被申请人主体信息-性别",width = 26,combo= {"男","女"},readConverterExp = "0=男,1=女")
684 684
     private String responSex;
685 685
 
686 686
     public Date getResponBirth() {

+ 31
- 10
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Zobrazit soubor

@@ -115,6 +115,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
115 115
         Long userId = user.getUserId();
116 116
         // 查询登录人身份证号
117 117
         SysUser sysUser = sysUserMapper.selectUserById(userId);
118
+        startPage();
118 119
         // 已办案件
119 120
         if(caseApplication.getSelectCaseStatus().equals("1")){
120 121
             caseApplication.setLoginUserName(sysUser.getUserName());
@@ -125,7 +126,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
125 126
             if (CollectionUtil.isEmpty(roles)) {
126 127
                 throw new ServiceException("该用户没有角色权限");
127 128
             }
128
-            startPage();
129
+
129 130
             for (SysRole role : roles) {
130 131
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
131 132
                 if (role.getRoleName().equals("超级管理员")
@@ -258,7 +259,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
258 259
 //        caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
259 260
         caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
260 261
         int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
262
+       //1975139	修改开庭时间通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已改为{3},请知晓,如非本人操作,请忽略本短信
263
+        //发送短信通知
264
+        SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
265
+        request.setTemplateId("1975139");
261 266
 
267
+        // 发送开庭日期通知短信
268
+        sendHearDateMessage(caseApplication,request,"1975139");
262 269
         // 新增日志
263 270
         CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
264 271
         return rows;
@@ -2136,16 +2143,30 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2136 2143
             }
2137 2144
         }
2138 2145
 
2139
-        //发送短信通知
2146
+        //发送短信通知 1947342 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
2140 2147
         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
2141 2148
         request.setTemplateId("1947342");
2149
+        // 发送开庭日期通知短信
2150
+        sendHearDateMessage(caseApplication,request,"1947342");
2151
+        // 新增日志
2152
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.MODIFY_HEARDATE,"");
2142 2153
 
2154
+        return rows;
2155
+
2156
+    }
2157
+
2158
+    /**
2159
+     * 发送开庭日期通知短信
2160
+     * @param caseApplication
2161
+     * @param request
2162
+     */
2163
+    private void sendHearDateMessage(CaseApplication caseApplication, SmsUtils.SendSmsRequest request,String templateId) {
2143 2164
         CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
2165
+
2144 2166
         String caseNum = caseApplicationselect.getCaseNum();
2145 2167
         Date hearDate = caseApplicationselect.getHearDate();
2146 2168
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
2147 2169
         String hearDatestr = dateFormat.format(hearDate);
2148
-
2149 2170
         String arbitratorId = caseApplicationselect.getArbitratorId();
2150 2171
 //        List<Arbitrator> arbitratorList = new ArrayList<>();
2151 2172
         if(StringUtils.isNotEmpty(arbitratorId)){
@@ -2170,7 +2191,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2170 2191
                         smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum());
2171 2192
                         smsSendRecord.setPhone(request.getPhone());
2172 2193
                         smsSendRecord.setSendTime(new Date());
2173
-                        String content="尊敬的"+name+"用户,您的"+caseNum+"仲裁案件,开庭日期已确定为"+hearDatestr+",请知晓,如非本人操作,请忽略本短信。";
2194
+                        String content="";
2195
+                        if(templateId.equals("1947342")) {
2196
+                             content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已确定为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
2197
+                        }
2198
+                        if(templateId.equals("1975139")) {
2199
+                            content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已改为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
2200
+                        }
2174 2201
                         smsSendRecord.setSendContent(content);
2175 2202
                         smsSendRecord.setCreateBy(getUsername());
2176 2203
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
@@ -2212,15 +2239,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2212 2239
                 }
2213 2240
             }
2214 2241
         }
2215
-        // 新增日志
2216
-        CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.MODIFY_HEARDATE,"");
2217
-
2218
-        return rows;
2219
-
2220 2242
     }
2221 2243
 
2222 2244
 
2223
-
2224 2245
     @Override
2225 2246
     @Transactional
2226 2247
     public int pendingAppointArbotrar(CaseApplication caseApplication) {

+ 1
- 6
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Zobrazit soubor

@@ -82,12 +82,7 @@
82 82
             <if test="loginUserName != null and loginUserName != ''">
83 83
                 AND r.create_by=#{loginUserName}  AND ca.identity_type=1
84 84
             </if>
85
-            <if test="caseStatusList != null and caseStatusList.size() > 0">
86
-                and r.case_node in
87
-                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
88
-                    #{caseStatus}
89
-                </foreach>
90
-            </if>
85
+
91 86
         </where>
92 87
         order by c.create_time desc,c.case_num desc
93 88
     </select>