1
This commit is contained in:
+2
-1
@@ -182,7 +182,8 @@ public class MsCaseApplicationController extends BaseController {
|
||||
public AjaxResult verifyMediator(@RequestBody BookingVO vo ) {
|
||||
if((vo.getId() == null && StrUtil.isEmpty(vo.getBatchNumber()))
|
||||
|| vo.getCaseFlowId()==null
|
||||
|| CollectionUtil.isEmpty(vo.getUserList())){
|
||||
|| vo.getMediatorId()==null
|
||||
|| StrUtil.isEmpty(vo.getMediatorName())){
|
||||
return error("参数校验失败");
|
||||
}
|
||||
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();
|
||||
// 查询案件列表
|
||||
List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
|
||||
return caseApplicationList;
|
||||
return msCaseApplicationMapper.list(req, caseStatusNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -271,12 +270,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
List<MsCaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
||||
// 保存案件相关人员
|
||||
if (affiliate != null) {
|
||||
// 设置申请人
|
||||
// 设置申请机构
|
||||
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
||||
// 组装申请机构
|
||||
insertDept(affiliate);
|
||||
// 新增申请机构代理人
|
||||
insertAgentUser(affiliate);
|
||||
}else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
|
||||
// 申请人为自然人
|
||||
//
|
||||
}
|
||||
// 压缩包导入,则根据身份证号获取性别和出生日期
|
||||
String identityNum = affiliate.getRespondentIdentityNum();
|
||||
@@ -915,6 +917,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if (currentFlow == null) {
|
||||
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
|
||||
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.setMediatorId(sysUser.getUserId());
|
||||
mediator.setMediatorName(sysUser.getNickName());
|
||||
mediator.setType(vo.getMiniProgressFlag()==null?MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag());
|
||||
mediator.setType(miniProgressFlag);
|
||||
msCaseMediatorMapper.insert(mediator);
|
||||
}
|
||||
|
||||
@@ -977,10 +988,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if(vo.getMiniProgressFlag() == null) {
|
||||
// 申请人预约,需要查询被申请人是否预约,identity_type不为空
|
||||
criteria.andIsNotNull("type");
|
||||
criteria.andEqualTo("type", MediatorTypeEnum.MI_NI_PROGRESS.getCode());
|
||||
}else {
|
||||
// 被申请人预约,需要查询申请人是否预约,identity_type为空
|
||||
criteria.andIsNull("type");
|
||||
criteria.andEqualTo("type", MediatorTypeEnum.PC.getCode());
|
||||
}
|
||||
criteria.andEqualTo("caseAppliId", vo.getId());
|
||||
// criteria.andEqualTo("mediatorId", user.getUserId());
|
||||
@@ -1836,8 +1847,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
throw new ServiceException("未找到下一个流程节点");
|
||||
}
|
||||
// setMediatorAndDate(application,vo);
|
||||
application.setMediatorId(vo.getUserList().get(0).getUserId());
|
||||
application.setMediatorName(vo.getUserList().get(0).getNickName());
|
||||
application.setMediatorId(vo.getMediatorId());
|
||||
application.setMediatorName(vo.getMediatorName());
|
||||
application.setCaseFlowId(nextFlow.getNodeId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
@@ -2190,6 +2201,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
||||
userMapper.insertUser(agentUser);
|
||||
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
||||
// 新增部门用户关联表
|
||||
// sysUserMapper.insertUser()
|
||||
} else if (null == agentUser.getDeptId() ) {
|
||||
// todo 未关联部门,关联部门
|
||||
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