Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Mediation-Backend into qtz
This commit is contained in:
@@ -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());
|
||||
@@ -1898,8 +1909,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);
|
||||
@@ -2252,6 +2263,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()));
|
||||
|
||||
Reference in New Issue
Block a user