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