1
This commit is contained in:
+2
-1
@@ -182,7 +182,8 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
public AjaxResult verifyMediator(@RequestBody BookingVO vo ) {
|
public AjaxResult verifyMediator(@RequestBody BookingVO vo ) {
|
||||||
if((vo.getId() == null && StrUtil.isEmpty(vo.getBatchNumber()))
|
if((vo.getId() == null && StrUtil.isEmpty(vo.getBatchNumber()))
|
||||||
|| vo.getCaseFlowId()==null
|
|| vo.getCaseFlowId()==null
|
||||||
|| CollectionUtil.isEmpty(vo.getUserList())){
|
|| vo.getMediatorId()==null
|
||||||
|
|| StrUtil.isEmpty(vo.getMediatorName())){
|
||||||
return error("参数校验失败");
|
return error("参数校验失败");
|
||||||
}
|
}
|
||||||
return caseApplicationService.verifyMediator(vo);
|
return caseApplicationService.verifyMediator(vo);
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户和部门关联表 ms_sys_user_dept
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysUserDept extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 部门ID */
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 父部门ID */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUserDept;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户部门表 数据层
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public interface SysUserDeptMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 通过用户ID查询
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 用户对象信息
|
||||||
|
*/
|
||||||
|
public List<SysUserDept> selectUserById(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param sysUserDept
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insert(SysUserDept sysUserDept);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增
|
||||||
|
* @param sysUserDept
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int batchSave(@Param("list") List<SysUserDept> sysUserDept);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户ID删除
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserById(@Param("userId)") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param userIds 需要删除的用户ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserByIds(@Param("ids") Long[] userIds);
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -26,7 +26,7 @@ public class BookingVO {
|
|||||||
/**
|
/**
|
||||||
* 被申请人调解员列表
|
* 被申请人调解员列表
|
||||||
*/
|
*/
|
||||||
private List<MsCaseMediator>resMediatorList;
|
private List<MsCaseMediator> resMediatorList;
|
||||||
/**
|
/**
|
||||||
* 开庭日期集合
|
* 开庭日期集合
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
|||||||
/**
|
/**
|
||||||
* 申请机构名称
|
* 申请机构名称
|
||||||
*/
|
*/
|
||||||
private String applicationOrganName;
|
private String applicationName;
|
||||||
/**
|
/**
|
||||||
* 被申请人姓名
|
* 被申请人姓名
|
||||||
*/
|
*/
|
||||||
|
|||||||
+21
-8
@@ -212,8 +212,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
}
|
}
|
||||||
startPage();
|
startPage();
|
||||||
// 查询案件列表
|
// 查询案件列表
|
||||||
List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
|
return msCaseApplicationMapper.list(req, caseStatusNames);
|
||||||
return caseApplicationList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -271,12 +270,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
List<MsCaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
List<MsCaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
||||||
// 保存案件相关人员
|
// 保存案件相关人员
|
||||||
if (affiliate != null) {
|
if (affiliate != null) {
|
||||||
// 设置申请人
|
// 设置申请机构
|
||||||
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
||||||
// 组装申请机构
|
// 组装申请机构
|
||||||
insertDept(affiliate);
|
insertDept(affiliate);
|
||||||
// 新增申请机构代理人
|
// 新增申请机构代理人
|
||||||
insertAgentUser(affiliate);
|
insertAgentUser(affiliate);
|
||||||
|
}else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
|
||||||
|
// 申请人为自然人
|
||||||
|
//
|
||||||
}
|
}
|
||||||
// 压缩包导入,则根据身份证号获取性别和出生日期
|
// 压缩包导入,则根据身份证号获取性别和出生日期
|
||||||
String identityNum = affiliate.getRespondentIdentityNum();
|
String identityNum = affiliate.getRespondentIdentityNum();
|
||||||
@@ -915,6 +917,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
if (currentFlow == null) {
|
if (currentFlow == null) {
|
||||||
return AjaxResult.error("当前流程不存在");
|
return AjaxResult.error("当前流程不存在");
|
||||||
}
|
}
|
||||||
|
Integer miniProgressFlag = vo.getMiniProgressFlag() == null ? MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag();
|
||||||
|
// 先删除已选择的调解员,在新增
|
||||||
|
Example mediatorExample = new Example(MsCaseMediator.class);
|
||||||
|
Example.Criteria mediatorCriteria = mediatorExample.createCriteria();
|
||||||
|
mediatorCriteria.andEqualTo("caseAppliId", vo.getId());
|
||||||
|
mediatorCriteria.andEqualTo("type", miniProgressFlag);
|
||||||
|
|
||||||
|
msCaseMediatorMapper.deleteByExample(mediatorExample);
|
||||||
|
|
||||||
// 获取选择的调解员id
|
// 获取选择的调解员id
|
||||||
List<Long> userIds = vo.getUserList().stream().map(SysUser::getUserId).collect(Collectors.toList());
|
List<Long> userIds = vo.getUserList().stream().map(SysUser::getUserId).collect(Collectors.toList());
|
||||||
// 新增案件预约表
|
// 新增案件预约表
|
||||||
@@ -923,7 +934,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
mediator.setCaseAppliId(vo.getId());
|
mediator.setCaseAppliId(vo.getId());
|
||||||
mediator.setMediatorId(sysUser.getUserId());
|
mediator.setMediatorId(sysUser.getUserId());
|
||||||
mediator.setMediatorName(sysUser.getNickName());
|
mediator.setMediatorName(sysUser.getNickName());
|
||||||
mediator.setType(vo.getMiniProgressFlag()==null?MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag());
|
mediator.setType(miniProgressFlag);
|
||||||
msCaseMediatorMapper.insert(mediator);
|
msCaseMediatorMapper.insert(mediator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -977,10 +988,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
Example.Criteria criteria = example.createCriteria();
|
Example.Criteria criteria = example.createCriteria();
|
||||||
if(vo.getMiniProgressFlag() == null) {
|
if(vo.getMiniProgressFlag() == null) {
|
||||||
// 申请人预约,需要查询被申请人是否预约,identity_type不为空
|
// 申请人预约,需要查询被申请人是否预约,identity_type不为空
|
||||||
criteria.andIsNotNull("type");
|
criteria.andEqualTo("type", MediatorTypeEnum.MI_NI_PROGRESS.getCode());
|
||||||
}else {
|
}else {
|
||||||
// 被申请人预约,需要查询申请人是否预约,identity_type为空
|
// 被申请人预约,需要查询申请人是否预约,identity_type为空
|
||||||
criteria.andIsNull("type");
|
criteria.andEqualTo("type", MediatorTypeEnum.PC.getCode());
|
||||||
}
|
}
|
||||||
criteria.andEqualTo("caseAppliId", vo.getId());
|
criteria.andEqualTo("caseAppliId", vo.getId());
|
||||||
// criteria.andEqualTo("mediatorId", user.getUserId());
|
// criteria.andEqualTo("mediatorId", user.getUserId());
|
||||||
@@ -1836,8 +1847,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
throw new ServiceException("未找到下一个流程节点");
|
throw new ServiceException("未找到下一个流程节点");
|
||||||
}
|
}
|
||||||
// setMediatorAndDate(application,vo);
|
// setMediatorAndDate(application,vo);
|
||||||
application.setMediatorId(vo.getUserList().get(0).getUserId());
|
application.setMediatorId(vo.getMediatorId());
|
||||||
application.setMediatorName(vo.getUserList().get(0).getNickName());
|
application.setMediatorName(vo.getMediatorName());
|
||||||
application.setCaseFlowId(nextFlow.getNodeId());
|
application.setCaseFlowId(nextFlow.getNodeId());
|
||||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||||
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||||
@@ -2190,6 +2201,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
||||||
userMapper.insertUser(agentUser);
|
userMapper.insertUser(agentUser);
|
||||||
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
||||||
|
// 新增部门用户关联表
|
||||||
|
// sysUserMapper.insertUser()
|
||||||
} else if (null == agentUser.getDeptId() ) {
|
} else if (null == agentUser.getDeptId() ) {
|
||||||
// todo 未关联部门,关联部门
|
// todo 未关联部门,关联部门
|
||||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.SysUserDeptMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.common.core.domain.entity.SysUserDept" id="resultMap">
|
||||||
|
<id property="userId" column="user_id" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUserById" parameterType="Long" resultMap="resultMap">
|
||||||
|
select * from ms_sys_user_dept
|
||||||
|
where user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept">
|
||||||
|
insert into ms_sys_user_dept(
|
||||||
|
user_id,
|
||||||
|
dept_id
|
||||||
|
)values(
|
||||||
|
#{userId},
|
||||||
|
#{deptId}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="batchSave">
|
||||||
|
insert into ms_sys_user_dept(
|
||||||
|
user_id,
|
||||||
|
dept_id
|
||||||
|
)values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
(
|
||||||
|
#{item.userId},
|
||||||
|
#{item.deptId}
|
||||||
|
)
|
||||||
|
</foreach>;
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<delete id="deleteUserById" parameterType="Long">
|
||||||
|
delete from ms_sys_user_dept where user_id = #{userId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteUserByIds" parameterType="Long">
|
||||||
|
delete from ms_sys_user_dept where user_id in
|
||||||
|
<foreach collection="ids" item="userId" open="(" separator="," close=")">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user