审核仲裁方式改为单个操作
This commit is contained in:
+5
-7
@@ -22,17 +22,15 @@ public class CaseArbitrateController extends BaseController {
|
||||
|
||||
/**
|
||||
* 审核仲裁方式
|
||||
* @param batchCaseApplication
|
||||
* @param batchCaseApplication 1同意,0拒绝
|
||||
* @param caseApplication
|
||||
* @param opinion 1同意,0拒绝
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/method")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
|
||||
public AjaxResult examineArbitrateMethod(@RequestBody BatchCaseApplication batchCaseApplication){
|
||||
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())|| batchCaseApplication.getOpinion()==null){
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return caseArbitrateService.examineArbitrateMethod(batchCaseApplication.getIds(),batchCaseApplication.getOpinion());
|
||||
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
|
||||
, Integer opinion){
|
||||
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -12,5 +12,5 @@ public interface ICaseArbitrateService {
|
||||
|
||||
AjaxResult writtenHear(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
AjaxResult examineArbitrateMethod(List<Long> ids, Integer opinion);
|
||||
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion);
|
||||
}
|
||||
|
||||
+77
-66
@@ -39,75 +39,86 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult examineArbitrateMethod(List<Long> ids, Integer opinion) {
|
||||
// 批量查询案件信息组装成map
|
||||
List<CaseApplication> caseApplicationList = caseApplicationMapper.listCaseApplicationByIds(ids);
|
||||
if (CollectionUtil.isEmpty(caseApplicationList)) {
|
||||
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) {
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
Map<Long, CaseApplication> caseApplicationMap = caseApplicationList.stream().collect(Collectors.toMap(CaseApplication::getId, Function.identity(), (n1, n2) -> n2));
|
||||
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
|
||||
for (Long id : ids) {
|
||||
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplicationById = caseApplicationMap.get(id);
|
||||
if (caseApplicationById == null) {
|
||||
continue;
|
||||
}
|
||||
// 获取该案件仲裁方式
|
||||
Integer arbitratMethod = caseApplicationById.getArbitratMethod();
|
||||
if(arbitratMethod!=null) {
|
||||
String caseNum = caseApplicationById.getCaseNum();
|
||||
// 日志节点的状态
|
||||
int caseLogStatus;
|
||||
if (opinion == 0) { //拒绝
|
||||
if (arbitratMethod == 2) {
|
||||
caseApplicationById.setArbitratMethod(1); // 更改仲裁方式
|
||||
//修改案件状态为待开庭审理
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
caseLogStatus = CaseApplicationConstants.MODIFY_HEARDATE;
|
||||
|
||||
} else {
|
||||
caseApplicationById.setArbitratMethod(2);
|
||||
//修改案件状态为待书面审理
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
caseLogStatus = CaseApplicationConstants.PENDING_WRIITEN_HEAR;
|
||||
|
||||
}
|
||||
} else {
|
||||
if (arbitratMethod == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
caseLogStatus = CaseApplicationConstants.PENDING_WRIITEN_HEAR;
|
||||
|
||||
} else {
|
||||
//修改案件状态为待开庭审理
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
caseLogStatus = CaseApplicationConstants.MODIFY_HEARDATE;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// 更改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplicationById);
|
||||
if (i > 0) {
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseLogStatus, "");
|
||||
// 发送短信
|
||||
sendArbitratMethodMes(caseApplicationById, request, caseNum);
|
||||
}
|
||||
}
|
||||
Integer arbitratMethod = caseApplication1.getArbitratMethod();
|
||||
if(arbitratMethod==null) {
|
||||
return AjaxResult.error("请先指定仲裁方式");
|
||||
}
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
if (opinion == 0) { //拒绝
|
||||
if (arbitratMethod == 2) {
|
||||
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||
//修改案件状态为待开庭审理
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||
|
||||
} else {
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
}
|
||||
} else {
|
||||
if (arbitratMethod == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
} else {
|
||||
//修改案件状态为待开庭审理
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
||||
|
||||
}
|
||||
}
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication1.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
if (identityType == 1) { //申请人
|
||||
request.setTemplateId("1931000");
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
SmsUtils.sendSms(request);
|
||||
} else { //被申请人
|
||||
request.setTemplateId("1928006");
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
// 模板id1928006 普通短信 案件应诉通知 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击https://phmapp.xayunmei.com选择是否应诉。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
SmsUtils.sendSms(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success("审核成功");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)
|
||||
and t.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
@@ -198,7 +198,7 @@
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)
|
||||
and t.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
|
||||
Reference in New Issue
Block a user