|
|
@@ -5,6 +5,7 @@ import com.deepoove.poi.data.PictureRenderData;
|
|
5
|
5
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
6
|
6
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
7
|
7
|
import com.ruoyi.common.core.redis.RedisCache;
|
|
|
8
|
+import com.ruoyi.common.exception.ServiceException;
|
|
8
|
9
|
import com.ruoyi.common.utils.WordUtil;
|
|
9
|
10
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
|
10
|
11
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
|
@@ -163,6 +164,81 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|
163
|
164
|
return AjaxResult.success();
|
|
164
|
165
|
}
|
|
165
|
166
|
|
|
|
167
|
+ @Override
|
|
|
168
|
+ @Transactional
|
|
|
169
|
+ public AjaxResult examineArbitrateMethodBatch(CaseApplication caseApplication) {
|
|
|
170
|
+ CaseApplication caseApplicationsel = new CaseApplication();
|
|
|
171
|
+ caseApplicationsel.setBatchNumber(caseApplication.getBatchNumber());
|
|
|
172
|
+ caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
|
|
|
173
|
+ List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
|
|
174
|
+ if (caseApplications1 != null && caseApplications1.size() > 0) {
|
|
|
175
|
+ for(CaseApplication caseApplicationse:caseApplications1){
|
|
|
176
|
+ String caseNum = caseApplicationse.getCaseNum();
|
|
|
177
|
+ Integer arbitratMethod = caseApplication.getArbitratMethod();
|
|
|
178
|
+ if (arbitratMethod == 1) {
|
|
|
179
|
+ caseApplicationse.setArbitratMethod(1);
|
|
|
180
|
+ caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
|
|
181
|
+ // 新增日志
|
|
|
182
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
|
|
183
|
+
|
|
|
184
|
+ }else if (arbitratMethod == 2) {
|
|
|
185
|
+ //修改案件状态为待书面审理
|
|
|
186
|
+ caseApplicationse.setArbitratMethod(2);
|
|
|
187
|
+ caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
|
|
188
|
+ // 新增日志
|
|
|
189
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
|
|
190
|
+
|
|
|
191
|
+ }
|
|
|
192
|
+ int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
|
|
|
193
|
+
|
|
|
194
|
+ if (i > 0) {
|
|
|
195
|
+ String arbitratMethodStr = caseApplicationse.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
|
|
196
|
+ //发送短信通知
|
|
|
197
|
+ SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
|
198
|
+
|
|
|
199
|
+ CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
200
|
+ caseAffiliate.setCaseAppliId(caseApplicationse.getId());
|
|
|
201
|
+ List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
|
|
202
|
+ if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
|
|
203
|
+ for (CaseAffiliate affiliate : caseAffiliates) {
|
|
|
204
|
+ request.setTemplateId("1931000");
|
|
|
205
|
+ request.setPhone(affiliate.getContactTelphone());
|
|
|
206
|
+ // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
|
|
207
|
+ // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
208
|
+ String name = affiliate.getName();
|
|
|
209
|
+ request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
|
|
210
|
+ Boolean aBoolean = SmsUtils.sendSms(request);
|
|
|
211
|
+ //保存短信发送记录
|
|
|
212
|
+ SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
|
213
|
+ smsSendRecord.setCaseId(caseApplicationse.getId());
|
|
|
214
|
+ smsSendRecord.setCaseNum(caseApplicationse.getCaseNum());
|
|
|
215
|
+ smsSendRecord.setPhone(request.getPhone());
|
|
|
216
|
+ smsSendRecord.setSendTime(new Date());
|
|
|
217
|
+ String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
|
|
|
218
|
+ smsSendRecord.setSendContent(content);
|
|
|
219
|
+ smsSendRecord.setCreateBy(getUsername());
|
|
|
220
|
+ if (aBoolean){
|
|
|
221
|
+ smsSendRecord.setSendStatus(1);
|
|
|
222
|
+ }else {
|
|
|
223
|
+ smsSendRecord.setSendStatus(0);
|
|
|
224
|
+ }
|
|
|
225
|
+ smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
|
|
226
|
+ }
|
|
|
227
|
+ }
|
|
|
228
|
+
|
|
|
229
|
+
|
|
|
230
|
+ }
|
|
|
231
|
+
|
|
|
232
|
+
|
|
|
233
|
+ }
|
|
|
234
|
+
|
|
|
235
|
+ }else{
|
|
|
236
|
+ throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
|
|
|
237
|
+ }
|
|
|
238
|
+
|
|
|
239
|
+ return AjaxResult.success();
|
|
|
240
|
+ }
|
|
|
241
|
+
|
|
166
|
242
|
@Override
|
|
167
|
243
|
@Transactional
|
|
168
|
244
|
public AjaxResult writtenHear(CaseIds caseIds) {
|