实现批量审核仲裁方式
This commit is contained in:
+10
@@ -34,6 +34,16 @@ public class CaseArbitrateController extends BaseController {
|
|||||||
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
|
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量审核仲裁方式
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/methodBatch")
|
||||||
|
public AjaxResult examineArbitrateMethodBatch(@Validated @RequestBody CaseApplication caseApplication){
|
||||||
|
return caseArbitrateService.examineArbitrateMethodBatch(caseApplication);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 书面审理
|
* 书面审理
|
||||||
* @param
|
* @param
|
||||||
|
|||||||
+2
@@ -14,4 +14,6 @@ public interface ICaseArbitrateService {
|
|||||||
AjaxResult writtenHear(CaseIds caseIds);
|
AjaxResult writtenHear(CaseIds caseIds);
|
||||||
|
|
||||||
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
|
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
|
||||||
|
|
||||||
|
AjaxResult examineArbitrateMethodBatch(CaseApplication caseApplication);
|
||||||
}
|
}
|
||||||
|
|||||||
+76
@@ -5,6 +5,7 @@ import com.deepoove.poi.data.PictureRenderData;
|
|||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.WordUtil;
|
import com.ruoyi.common.utils.WordUtil;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||||
@@ -163,6 +164,81 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult examineArbitrateMethodBatch(CaseApplication caseApplication) {
|
||||||
|
CaseApplication caseApplicationsel = new CaseApplication();
|
||||||
|
caseApplicationsel.setBatchNumber(caseApplication.getBatchNumber());
|
||||||
|
caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
|
||||||
|
List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
||||||
|
if (caseApplications1 != null && caseApplications1.size() > 0) {
|
||||||
|
for(CaseApplication caseApplicationse:caseApplications1){
|
||||||
|
String caseNum = caseApplicationse.getCaseNum();
|
||||||
|
Integer arbitratMethod = caseApplication.getArbitratMethod();
|
||||||
|
if (arbitratMethod == 1) {
|
||||||
|
caseApplicationse.setArbitratMethod(1);
|
||||||
|
caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||||
|
// 新增日志
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||||
|
|
||||||
|
}else if (arbitratMethod == 2) {
|
||||||
|
//修改案件状态为待书面审理
|
||||||
|
caseApplicationse.setArbitratMethod(2);
|
||||||
|
caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||||
|
// 新增日志
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
|
||||||
|
|
||||||
|
if (i > 0) {
|
||||||
|
String arbitratMethodStr = caseApplicationse.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||||
|
//发送短信通知
|
||||||
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
|
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(caseApplicationse.getId());
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||||
|
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||||
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||||
|
request.setTemplateId("1931000");
|
||||||
|
request.setPhone(affiliate.getContactTelphone());
|
||||||
|
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||||
|
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||||
|
String name = affiliate.getName();
|
||||||
|
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||||
|
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||||
|
//保存短信发送记录
|
||||||
|
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||||
|
smsSendRecord.setCaseId(caseApplicationse.getId());
|
||||||
|
smsSendRecord.setCaseNum(caseApplicationse.getCaseNum());
|
||||||
|
smsSendRecord.setPhone(request.getPhone());
|
||||||
|
smsSendRecord.setSendTime(new Date());
|
||||||
|
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
|
||||||
|
smsSendRecord.setSendContent(content);
|
||||||
|
smsSendRecord.setCreateBy(getUsername());
|
||||||
|
if (aBoolean){
|
||||||
|
smsSendRecord.setSendStatus(1);
|
||||||
|
}else {
|
||||||
|
smsSendRecord.setSendStatus(0);
|
||||||
|
}
|
||||||
|
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult writtenHear(CaseIds caseIds) {
|
public AjaxResult writtenHear(CaseIds caseIds) {
|
||||||
|
|||||||
Reference in New Issue
Block a user