优化 #135
@@ -33,6 +33,13 @@ public interface CaseApplicationMapper {
|
||||
|
||||
CaseApplication selectCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 根据案件id查询案件信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
|
||||
|
||||
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
@@ -76,4 +83,5 @@ public interface CaseApplicationMapper {
|
||||
* @return
|
||||
*/
|
||||
int batchDeletecaseApplication(@Param("ids") List<Long> ids);
|
||||
|
||||
}
|
||||
|
||||
+45
-28
@@ -105,7 +105,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
Long userId = user.getUserId();
|
||||
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
@@ -552,7 +551,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertcaseApplication(CaseApplication caseApplication) {
|
||||
// 新增立案信息
|
||||
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
||||
//根据仲裁费用计费规则计算应缴费用
|
||||
//暂时设置计费比率为0.01
|
||||
@@ -563,10 +562,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
String caseNum = generateCaseNum();
|
||||
caseApplication.setCaseNum(caseNum);
|
||||
caseApplication.setCreateBy(getUsername());
|
||||
|
||||
// 新增立案信息
|
||||
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
||||
Map<String, Long> deptMap =new HashMap<>();
|
||||
// 判断申请机构
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
// 查询所有的组织机构,组装成map
|
||||
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
||||
@@ -574,7 +574,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
deptList = new ArrayList<>();
|
||||
}
|
||||
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
||||
|
||||
// 查询申请人角色id
|
||||
Long roleId = roleMapper.selectRoleIdByName("申请人");
|
||||
for (CaseAffiliate caseAffiliate : caseAffiliates) {
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||
@@ -600,13 +601,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
}
|
||||
// 组装申请代理人信息
|
||||
String agentInfoFlag = buildAgentInfo(caseAffiliate);
|
||||
String agentInfoFlag = buildAgentInfo(caseAffiliate,roleId);
|
||||
if(StrUtil.isNotEmpty(agentInfoFlag)){
|
||||
throw new ServiceException(agentInfoFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 新增案件关联人
|
||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
|
||||
@@ -614,6 +615,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||
// 修改案件附件
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
@@ -666,6 +668,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
deptList = new ArrayList<>();
|
||||
}
|
||||
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
||||
// 查询申请人角色id
|
||||
Long roleId = roleMapper.selectRoleIdByName("申请人");
|
||||
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||
@@ -691,7 +695,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
|
||||
}
|
||||
String agentInfoFlag = buildAgentInfo(caseAffiliate);
|
||||
String agentInfoFlag = buildAgentInfo(caseAffiliate,roleId);
|
||||
if(StrUtil.isNotEmpty(agentInfoFlag)){
|
||||
throw new ServiceException(agentInfoFlag);
|
||||
}
|
||||
@@ -718,10 +722,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
* 组装申请代理人信息
|
||||
* @param caseAffiliate
|
||||
*/
|
||||
private String buildAgentInfo(CaseAffiliate caseAffiliate) {
|
||||
private String buildAgentInfo(CaseAffiliate caseAffiliate,Long roleId) {
|
||||
if (caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
|
||||
// 查询申请人角色id
|
||||
Long roleId = roleMapper.selectRoleIdByName("申请人");
|
||||
|
||||
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
||||
// 根据代理人身份证去用户表查询,有修改,么有新增
|
||||
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
||||
@@ -764,28 +767,40 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
||||
caseAffiliate.setNameAgent(agentUser.getNickName());
|
||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||
List<Long> longList=new ArrayList<>();
|
||||
// 新增角色为申请人
|
||||
if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
|
||||
List<Long> longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
||||
longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
||||
if(!longList.contains(roleId)) {
|
||||
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
|
||||
SysUserRole sysUserRole = new SysUserRole();
|
||||
sysUserRole.setUserId(agentUser.getUserId());
|
||||
sysUserRole.setRoleId(roleId);
|
||||
sysUserRoles.add(sysUserRole);
|
||||
if (CollectionUtil.isNotEmpty(sysUserRoles)) {
|
||||
userRoleMapper.batchUserRole(sysUserRoles);
|
||||
}
|
||||
insertAgentUserRole(agentUser,roleId);
|
||||
}
|
||||
}else {
|
||||
|
||||
insertAgentUserRole(agentUser,roleId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增角色为申请人
|
||||
* @param agentUser
|
||||
* @param roleId
|
||||
*/
|
||||
private void insertAgentUserRole(SysUser agentUser, Long roleId) {
|
||||
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
|
||||
SysUserRole sysUserRole = new SysUserRole();
|
||||
sysUserRole.setUserId(agentUser.getUserId());
|
||||
sysUserRole.setRoleId(roleId);
|
||||
sysUserRoles.add(sysUserRole);
|
||||
if (CollectionUtil.isNotEmpty(sysUserRoles)) {
|
||||
userRoleMapper.batchUserRole(sysUserRoles);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int submitCaseApplication( List<Long> ids) {
|
||||
@@ -882,7 +897,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
if(caseApplicationList!=null&&caseApplicationList.size()>0){
|
||||
// 1,查询所有的组织机构,组装成map
|
||||
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
||||
@@ -890,6 +904,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(CollectionUtil.isNotEmpty(deptList)) {
|
||||
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
||||
}
|
||||
// 查询申请人角色id
|
||||
Long roleId = roleMapper.selectRoleIdByName("申请人");
|
||||
List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
|
||||
for (int i = 0; i < caseApplicationList.size(); i++){
|
||||
CaseApplication caseApplication = caseApplicationList.get(i);
|
||||
@@ -907,7 +923,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
//赋值CaseApplication的案件关联人信息
|
||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||
// 组装案件关联人信息
|
||||
assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap);
|
||||
assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap,roleId);
|
||||
|
||||
// int caseApplicationCount = selectCaseApplicationCount(caseApplication);
|
||||
// if(caseApplicationCount>0){
|
||||
@@ -928,7 +944,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
||||
}
|
||||
}
|
||||
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
||||
if(caseApplicationListinsert.size()>0){
|
||||
// List<CaseApplication> caseApplicationListinsertDiffer = caseApplicationListinsert.stream().collect(
|
||||
// collectingAndThen(
|
||||
// toCollection(() -> new TreeSet<>(Comparator.comparing(CaseApplication::getCaseNum))),
|
||||
@@ -946,7 +962,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||
CaseApplication caseApplicationNew = new CaseApplication();
|
||||
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
|
||||
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
||||
if(caseApplicationListinsert.size()>0){
|
||||
for (int j = 0; j < caseApplicationListinsert.size(); j++){
|
||||
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
|
||||
|
||||
@@ -976,7 +992,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
||||
successMsg.append("<br/>").append(successNum).append("、立案编号 ").append(caseApplicationItera.getCaseNum()).append(" 导入成功");
|
||||
}
|
||||
|
||||
// }
|
||||
@@ -988,7 +1004,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}else {
|
||||
throw new ServiceException("导入立案申请数据不能为空!");
|
||||
}
|
||||
return successMsg.append(failureMsg.toString()).toString();
|
||||
return successMsg.append(failureMsg).toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -1857,7 +1873,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
|
||||
|
||||
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
|
||||
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew,
|
||||
Map<String, Long> deptMap,Long roleId) {
|
||||
// 申请人信息
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
|
||||
@@ -1869,7 +1886,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(StrUtil.isNotEmpty(caseApplication.getName())){
|
||||
setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
|
||||
}
|
||||
String s = buildAgentInfo(caseAffiliate);
|
||||
String s = buildAgentInfo(caseAffiliate,roleId);
|
||||
if(StrUtil.isNotEmpty(s)){
|
||||
StringBuilder errorMsg = caseApplication.getErrorMsg();
|
||||
if(StrUtil.isEmpty(errorMsg)){
|
||||
|
||||
+92
-62
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.WordUtil;
|
||||
@@ -20,6 +21,8 @@ import java.nio.file.StandardCopyOption;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
@@ -37,87 +40,114 @@ 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)) {
|
||||
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 caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 == null) {
|
||||
return AjaxResult.success();
|
||||
CaseApplication caseApplicationById = caseApplicationMap.get(id);
|
||||
if (caseApplicationById == null) {
|
||||
continue;
|
||||
}
|
||||
int arbitratMethod = caseApplication1.getArbitratMethod();
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
if (opinion == 0) { //拒绝
|
||||
if (arbitratMethod == 2) {
|
||||
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||
//修改案件状态为待开庭审理
|
||||
// 获取该案件仲裁方式
|
||||
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);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), 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 {
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
if (arbitratMethod == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
caseLogStatus = CaseApplicationConstants.PENDING_WRIITEN_HEAR;
|
||||
|
||||
}
|
||||
} else {
|
||||
if (arbitratMethod == 2) {
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
|
||||
|
||||
} else {
|
||||
//修改案件状态为待开庭审理
|
||||
} else {
|
||||
//修改案件状态为待开庭审理
|
||||
// caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
|
||||
//修改案件状态为待修改开庭时间
|
||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
|
||||
caseLogStatus = CaseApplicationConstants.MODIFY_HEARDATE;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||
//发送短信通知
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1931000");
|
||||
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.setPhone(affiliate.getContactTelphone());
|
||||
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
|
||||
// 1931000 普通短信 确定仲裁方式通知 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
|
||||
SmsUtils.sendSms(request);
|
||||
} else { //被申请人
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 更改案件状态
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplicationById);
|
||||
if (i > 0) {
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseLogStatus, "");
|
||||
// 发送短信
|
||||
sendArbitratMethodMes(caseApplicationById, request, caseNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
* @param caseApplicationById
|
||||
* @param request
|
||||
* @param caseNum
|
||||
*/
|
||||
private void sendArbitratMethodMes(CaseApplication caseApplicationById, SmsUtils.SendSmsRequest request, String caseNum) {
|
||||
String arbitratMethodStr = caseApplicationById.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
|
||||
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplicationById.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
|
||||
if (CollectionUtil.isEmpty(caseAffiliates)) {
|
||||
return;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult writtenHear(ArbitrateRecord arbitrateRecord) {
|
||||
|
||||
@@ -488,7 +488,37 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="listCaseApplicationByIds" resultMap="CaseApplicationResult">
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
c.case_status ,
|
||||
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
|
||||
c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
|
||||
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
|
||||
<where>
|
||||
<if test="ids != null and ids.size() > 0 ">
|
||||
c.id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
@@ -526,4 +556,5 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<result property="caseStatus" column="case_status" />
|
||||
</resultMap>
|
||||
<select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
|
||||
select c.id, c.case_num,c.case_status
|
||||
select DISTINCT(c.id) id, c.case_num,c.case_status
|
||||
from case_application as c ,case_affiliate as d
|
||||
where c.id = d.case_appli_id
|
||||
<if test="identityNum != null and identityNum != ''">
|
||||
|
||||
Reference in New Issue
Block a user