Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
+15
-2
@@ -12,6 +12,7 @@ import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -38,11 +39,23 @@ public class CaseApplicationController extends BaseController {
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(CaseApplication caseApplication) {
|
public TableDataInfo list(CaseApplication caseApplication) {
|
||||||
startPage();
|
startPage();
|
||||||
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationListNew(caseApplication);
|
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
|
||||||
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据角色查询待办数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
@GetMapping("/toDoCount")
|
||||||
|
public AjaxResult toDoCount() {
|
||||||
|
ToDoCount toDoCount = caseApplicationService.selectToDoCount();
|
||||||
|
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
||||||
|
return success(toDoCount);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增立案数据
|
* 新增立案数据
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -49,6 +49,14 @@ public interface SysRoleMapper
|
|||||||
*/
|
*/
|
||||||
public SysRole selectRoleById(Long roleId);
|
public SysRole selectRoleById(Long roleId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据角色名称查询角色id
|
||||||
|
* @param roleName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long selectRoleIdByName(String roleName);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色
|
* 根据用户ID查询角色
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -329,6 +329,30 @@ public class CaseApplication extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String userId;
|
private String userId;
|
||||||
private List<Long> deptIds;
|
private List<Long> deptIds;
|
||||||
|
/**
|
||||||
|
* 部门长状态
|
||||||
|
*/
|
||||||
|
private List<Integer> deptHeadStatus;
|
||||||
|
/**
|
||||||
|
* 财务状态
|
||||||
|
*/
|
||||||
|
private Integer financeStatus;
|
||||||
|
|
||||||
|
public Integer getFinanceStatus() {
|
||||||
|
return financeStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinanceStatus(Integer financeStatus) {
|
||||||
|
this.financeStatus = financeStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getDeptHeadStatus() {
|
||||||
|
return deptHeadStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptHeadStatus(List<Integer> deptHeadStatus) {
|
||||||
|
this.deptHeadStatus = deptHeadStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Long> getDeptIds() {
|
public List<Long> getDeptIds() {
|
||||||
return deptIds;
|
return deptIds;
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangqiong
|
||||||
|
* @description 待办数量
|
||||||
|
* @date 2023-10-17 09:48
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ToDoCount {
|
||||||
|
|
||||||
|
private int caseApply; // 立案申请
|
||||||
|
private int caseApplyCheck; // 待立案审查
|
||||||
|
private int caseApplyPay; // 待缴费
|
||||||
|
private int caseApplyPayCheck; // 待缴费确认
|
||||||
|
private int caseApplyEvidence; //待案件质证
|
||||||
|
private int caseApplyGroupCheck; // 待组庭审核
|
||||||
|
private int caseApplyGroupConfirm; // 待组庭确定
|
||||||
|
// private int caseApplyGroupNotice;
|
||||||
|
private int caseApplyArbitrateWay; // 待审核仲裁方式
|
||||||
|
private int caseApplyGroupOnline; // 待开庭审理
|
||||||
|
private int caseApplyGroupOffline; // 待书面审理
|
||||||
|
private int caseApplyAward; // 待生成仲裁文书
|
||||||
|
private int caseApplyAwardCheck; // 待核验仲裁文书
|
||||||
|
private int caseApplyAwardConfirm; // 待审核仲裁文书
|
||||||
|
private int caseApplyAwardSign; // 待仲裁文书签名
|
||||||
|
private int caseApplyAwardSeal; // 待仲裁文书用印
|
||||||
|
private int caseApplyAwardSend; // 待仲裁文书送达
|
||||||
|
private int caseApplyStored; // 待案件归档
|
||||||
|
private int caseApplyArchived; // 已归档
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -60,4 +61,10 @@ public interface CaseApplicationMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
|
List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
|
||||||
|
|
||||||
|
ToDoCount selectAdminCaseToDoCount();
|
||||||
|
|
||||||
|
ToDoCount selectDeptHeadCaseToDoCount( @Param("statusList")List<Integer> caseStatusList);
|
||||||
|
|
||||||
|
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-1
@@ -6,12 +6,13 @@ import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ICaseApplicationService {
|
public interface ICaseApplicationService {
|
||||||
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
|
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
|
||||||
List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication);
|
List<CaseApplication> selectCaseApplicationListByRole(CaseApplication caseApplication);
|
||||||
|
|
||||||
|
|
||||||
int insertcaseApplication(CaseApplication caseApplication);
|
int insertcaseApplication(CaseApplication caseApplication);
|
||||||
@@ -53,4 +54,10 @@ public interface ICaseApplicationService {
|
|||||||
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
||||||
|
|
||||||
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询待办数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ToDoCount selectToDoCount();
|
||||||
}
|
}
|
||||||
|
|||||||
+132
-11
@@ -28,7 +28,11 @@ import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||||
import com.ruoyi.system.mapper.SysUserMapper;
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||||
@@ -80,6 +84,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysUserMapper sysUserMapper;
|
private SysUserMapper sysUserMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private SysUserRoleMapper userRoleMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper roleMapper;
|
||||||
|
@Autowired
|
||||||
private SealSignRecordMapper sealSignRecordMapper;
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseLogRecordMapper caseLogRecordMapper;
|
private CaseLogRecordMapper caseLogRecordMapper;
|
||||||
@@ -99,7 +107,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @Override
|
// @Override
|
||||||
public List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication) {
|
public List<CaseApplication> selectCaseApplicationListByRole(CaseApplication caseApplication) {
|
||||||
// 获取登录用户
|
// 获取登录用户
|
||||||
LoginUser loginUser = getLoginUser();
|
LoginUser loginUser = getLoginUser();
|
||||||
SysUser user = loginUser.getUser();
|
SysUser user = loginUser.getUser();
|
||||||
@@ -125,11 +133,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||||
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||||
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
return caseApplicationMapper.selectDeptHeadCaseApplicationList(caseApplication,caseStatusList);
|
caseApplication.setDeptHeadStatus(caseStatusList);
|
||||||
}
|
}
|
||||||
if(role.getRoleName().equals("仲裁员")){
|
if(role.getRoleName().equals("仲裁员")){
|
||||||
caseApplication.setUserId(String.valueOf(userId));
|
caseApplication.setUserId(String.valueOf(userId));
|
||||||
}
|
}
|
||||||
|
if(role.getRoleName().equals("财务")){
|
||||||
|
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
|
}
|
||||||
if(role.getRoleName().equals("法律顾问")){
|
if(role.getRoleName().equals("法律顾问")){
|
||||||
// 查询角色有关的用户部门
|
// 查询角色有关的用户部门
|
||||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||||
@@ -151,6 +162,64 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public ToDoCount selectToDoCount() {
|
||||||
|
|
||||||
|
// 获取登录用户
|
||||||
|
LoginUser loginUser = getLoginUser();
|
||||||
|
SysUser user = loginUser.getUser();
|
||||||
|
Long userId = user.getUserId();
|
||||||
|
|
||||||
|
// 查询登录人身份证号
|
||||||
|
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||||
|
List<SysRole> roles = sysUser.getRoles();
|
||||||
|
// 没有角色不能查看案件列表
|
||||||
|
if(CollectionUtil.isEmpty(roles)){
|
||||||
|
throw new ServiceException("该用户没有角色权限");
|
||||||
|
}
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
List<Integer> caseStatusList=new ArrayList<>();
|
||||||
|
for (SysRole role : roles) {
|
||||||
|
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||||
|
if(role.getRoleName().equals("超级管理员")
|
||||||
|
){
|
||||||
|
return caseApplicationMapper.selectAdminCaseToDoCount();
|
||||||
|
}
|
||||||
|
if(role.getRoleName().equals("仲裁委")
|
||||||
|
||role.getRoleName().equals("部门长")){
|
||||||
|
|
||||||
|
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||||
|
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||||
|
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
|
caseApplication.setDeptHeadStatus(caseStatusList);
|
||||||
|
}
|
||||||
|
if(role.getRoleName().equals("仲裁员")){
|
||||||
|
caseApplication.setUserId(String.valueOf(userId));
|
||||||
|
}
|
||||||
|
if(role.getRoleName().equals("财务")){
|
||||||
|
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
|
}
|
||||||
|
if(role.getRoleName().equals("法律顾问")){
|
||||||
|
// 查询角色有关的用户部门
|
||||||
|
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||||
|
caseApplication.setDeptIds(deptIds);
|
||||||
|
}
|
||||||
|
if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
|
||||||
|
// 查询角色有关的用户部门
|
||||||
|
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||||
|
}
|
||||||
|
if(role.getRoleName().equals("被申请人")){
|
||||||
|
//
|
||||||
|
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||||
|
return caseApplicationMapper.selectTodoCountByRole(caseApplication);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||||
|
|
||||||
@@ -206,7 +275,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// 组装申请代理人信息
|
// 组装申请代理人信息
|
||||||
buildAgentInfo(caseAffiliate);
|
String agentInfoFlag = buildAgentInfo(caseAffiliate);
|
||||||
|
if(StrUtil.isNotEmpty(agentInfoFlag)){
|
||||||
|
throw new ServiceException(agentInfoFlag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +366,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||||
|
|
||||||
}
|
}
|
||||||
buildAgentInfo(caseAffiliate);
|
String agentInfoFlag = buildAgentInfo(caseAffiliate);
|
||||||
|
if(StrUtil.isNotEmpty(agentInfoFlag)){
|
||||||
|
throw new ServiceException(agentInfoFlag);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,12 +393,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
* 组装申请代理人信息
|
* 组装申请代理人信息
|
||||||
* @param caseAffiliate
|
* @param caseAffiliate
|
||||||
*/
|
*/
|
||||||
private void buildAgentInfo(CaseAffiliate caseAffiliate) {
|
private String buildAgentInfo(CaseAffiliate caseAffiliate) {
|
||||||
if(StrUtil.isNotEmpty(caseAffiliate.getNameAgent())){
|
if (caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
|
||||||
|
// 查询申请人角色id
|
||||||
|
Long roleId = roleMapper.selectRoleIdByName("申请人");
|
||||||
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
||||||
// 根据代理人身份证去用户表查询,有修改,么有新增
|
// 根据代理人身份证去用户表查询,有修改,么有新增
|
||||||
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
||||||
if(agentUser==null){
|
if (agentUser == null) {
|
||||||
agentUser = new SysUser();
|
agentUser = new SysUser();
|
||||||
agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
|
agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
|
||||||
agentUser.setNickName(caseAffiliate.getNameAgent());
|
agentUser.setNickName(caseAffiliate.getNameAgent());
|
||||||
@@ -332,18 +409,46 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
|
agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
|
||||||
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
|
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
|
||||||
int insertUserRow = sysUserMapper.insertUser(agentUser);
|
int insertUserRow = sysUserMapper.insertUser(agentUser);
|
||||||
if(insertUserRow>0) {
|
// 新增角色为申请人
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
if (insertUserRow > 0) {
|
||||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||||
// 发送短信 todo
|
// 发送短信 todo
|
||||||
}
|
}
|
||||||
}else {
|
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
|
||||||
|
return "申请机构与申请代理人不匹配";
|
||||||
|
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
|
||||||
// 同步用户表和案件关联人表的手机号和名称
|
// 同步用户表和案件关联人表的手机号和名称
|
||||||
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
||||||
caseAffiliate.setNameAgent(agentUser.getNickName());
|
caseAffiliate.setNameAgent(agentUser.getNickName());
|
||||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||||
|
// 新增角色为申请人
|
||||||
|
if(agentUser.getRoleIds()!=null) {
|
||||||
|
List<Long> longList = Arrays.asList(agentUser.getRoleIds());
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -471,7 +576,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// }else {
|
// }else {
|
||||||
// caseApplicationListinsert.add(caseApplication);
|
// caseApplicationListinsert.add(caseApplication);
|
||||||
// }
|
// }
|
||||||
caseApplicationListinsert.add(caseApplication);
|
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
|
||||||
|
caseApplicationListinsert.add(caseApplication);
|
||||||
|
}else {
|
||||||
|
// 拼接错误信息
|
||||||
|
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
||||||
|
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
// 拼接错误信息
|
// 拼接错误信息
|
||||||
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
||||||
@@ -519,7 +630,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||||
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
||||||
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
||||||
buildAgentInfo(caseAffiliate);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||||
@@ -1272,6 +1382,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
return caseApplication;
|
return caseApplication;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int pendTralSure(CaseApplication caseApplication) {
|
public int pendTralSure(CaseApplication caseApplication) {
|
||||||
@@ -1384,6 +1496,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if(StrUtil.isNotEmpty(caseApplication.getName())){
|
if(StrUtil.isNotEmpty(caseApplication.getName())){
|
||||||
setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
|
setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
|
||||||
}
|
}
|
||||||
|
String s = buildAgentInfo(caseAffiliate);
|
||||||
|
if(StrUtil.isNotEmpty(s)){
|
||||||
|
StringBuilder errorMsg = caseApplication.getErrorMsg();
|
||||||
|
if(StrUtil.isEmpty(errorMsg)){
|
||||||
|
errorMsg=new StringBuilder();
|
||||||
|
}
|
||||||
|
errorMsg.append(s);
|
||||||
|
caseApplication.setErrorMsg(errorMsg);
|
||||||
|
}
|
||||||
caseAffiliatesnew.add(caseAffiliate);
|
caseAffiliatesnew.add(caseAffiliate);
|
||||||
|
|
||||||
// 组装被申请人信息
|
// 组装被申请人信息
|
||||||
|
|||||||
+9
-6
@@ -74,14 +74,14 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
return "短信发送失败";
|
return "短信发送失败";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置字典缓存
|
* 设置验证码缓存
|
||||||
*
|
*
|
||||||
* @param key 参数键
|
* @param key 参数键
|
||||||
* @param code 字典数据列表
|
* @param code 验证码
|
||||||
*/
|
*/
|
||||||
public static void setCodeCache(String key, String code)
|
public static void setCodeCache(String key, String code)
|
||||||
{
|
{
|
||||||
SpringUtils.getBean(RedisCache.class).setCacheObject(getVerifyCodeCacheKey(key), code, 5,TimeUnit.MILLISECONDS);
|
SpringUtils.getBean(RedisCache.class).setCacheObject(getVerifyCodeCacheKey(key), code, 5,TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -107,9 +107,12 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult registerUser(IdentityAuthentication ientityAuthentication) {
|
public AjaxResult registerUser(IdentityAuthentication ientityAuthentication) {
|
||||||
|
String codeCache = getCodeCache(ientityAuthentication.getPhone());
|
||||||
// 校验短信验证码
|
// 校验短信验证码
|
||||||
if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
|
if(StrUtil.isEmpty(codeCache)){
|
||||||
return AjaxResult.success("验证码校验失败");
|
return AjaxResult.warn("验证码校验失败");
|
||||||
|
}else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
|
||||||
|
return AjaxResult.warn("验证码校验失败");
|
||||||
}
|
}
|
||||||
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
||||||
if(sysUserName!=null){
|
if(sysUserName!=null){
|
||||||
@@ -140,7 +143,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||||
int row = sysUserMapper.insertUser(sysUser);
|
int row = sysUserMapper.insertUser(sysUser);
|
||||||
if(row<1) {
|
if(row<1) {
|
||||||
return AjaxResult.error("注册失败");
|
return AjaxResult.warn("注册失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectRoleIdByName" resultType="java.lang.Long" >
|
||||||
|
select role_id from sys_role where role_name=#{roleName}
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||||
insert into sys_role(
|
insert into sys_role(
|
||||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||||
|
|||||||
@@ -39,7 +39,13 @@
|
|||||||
|
|
||||||
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||||
select t1.* from(
|
select t1.* from(
|
||||||
select t.* from(
|
select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
||||||
|
t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
||||||
|
t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
|
||||||
|
t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
|
||||||
|
t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
|
||||||
|
t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
|
||||||
|
from(
|
||||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
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 '书面审理'
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||||
ELSE '无审理方式'
|
ELSE '无审理方式'
|
||||||
@@ -99,20 +105,129 @@
|
|||||||
</foreach> )
|
</foreach> )
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
<!--申请人-->
|
||||||
) t1
|
<if test="nameId != null and nameId != ''">
|
||||||
<where>
|
or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||||
<!--申请人-->
|
and t.case_status in (0,2))
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1
|
</if>
|
||||||
and t1.case_status in (0,2)
|
<!--部门长-->
|
||||||
)
|
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||||
|
or (t.identity_type=1 and t.case_status in
|
||||||
|
<foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">#{caseStatus}
|
||||||
|
</foreach>)
|
||||||
|
</if>
|
||||||
|
<!--财务-->
|
||||||
|
<if test="financeStatus != null and financeStatus != ''">
|
||||||
|
or(t.identity_type=1 and t.case_status =#{financeStatus})
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
) t1
|
||||||
|
<!-- <where>-->
|
||||||
|
<!-- <!–申请人–>-->
|
||||||
|
<!-- <if test="nameId != null and nameId != ''">-->
|
||||||
|
<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
||||||
|
<!-- and t1.case_status in (0,2)-->
|
||||||
|
<!-- )-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- </where>-->
|
||||||
order by t1.create_time desc,t1.case_num desc
|
order by t1.create_time desc,t1.case_num desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
||||||
|
select sum( case when t1.case_status=0 then 1 else 0 end) caseApply,
|
||||||
|
sum( case when t1.case_status=1 then 1 else 0 end) caseApplyCheck,
|
||||||
|
sum( case when t1.case_status=2 then 1 else 0 end) caseApplyPay,
|
||||||
|
sum( case when t1.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
||||||
|
sum( case when t1.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
||||||
|
sum( case when t1.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
||||||
|
sum( case when t1.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
||||||
|
sum( case when t1.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
||||||
|
sum( case when t1.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
||||||
|
sum( case when t1.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
||||||
|
sum( case when t1.case_status=10 then 1 else 0 end) caseApplyAward,
|
||||||
|
sum( case when t1.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
||||||
|
sum( case when t1.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
||||||
|
sum( case when t1.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
||||||
|
sum( case when t1.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
||||||
|
sum( case when t1.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
||||||
|
sum( case when t1.case_status=16 then 1 else 0 end) caseApplyStored,
|
||||||
|
sum( case when t1.case_status=17 then 1 else 0 end) caseApplyArchived
|
||||||
|
from(
|
||||||
|
select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
|
||||||
|
select c.id ,
|
||||||
|
c.case_status,ca.application_organ_id,
|
||||||
|
c.arbitrator_id,ca.identity_num , ca.identity_type
|
||||||
|
from case_application c
|
||||||
|
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
|
<where>
|
||||||
|
<if test="caseStatus != null">
|
||||||
|
AND c.case_status = #{caseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="caseNum != null and caseNum != ''">
|
||||||
|
AND c.case_num = #{caseNum}
|
||||||
|
</if>
|
||||||
|
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||||
|
and c.case_status in
|
||||||
|
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||||
|
#{caseStatus}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
) t
|
||||||
|
<where>
|
||||||
|
|
||||||
|
<!--被申请人-->
|
||||||
|
<if test="idCard != null and idCard != ''">
|
||||||
|
or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
||||||
|
</if>
|
||||||
|
<!--仲裁员-->
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
or ( t.identity_type=1 and
|
||||||
|
t.case_status in (7,8,9,12,13,14)
|
||||||
|
and
|
||||||
|
instr (t.arbitrator_id,#{userId})>0)
|
||||||
|
</if>
|
||||||
|
<!--法律顾问-->
|
||||||
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
|
or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
||||||
|
and t.application_organ_id in
|
||||||
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach> )
|
||||||
|
</if>
|
||||||
|
<!--申请人-->
|
||||||
|
<if test="nameId != null and nameId != ''">
|
||||||
|
or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||||
|
and t.case_status in (0,2))
|
||||||
|
|
||||||
|
</if>
|
||||||
|
<!--部门长-->
|
||||||
|
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||||
|
or (t.identity_type=1 and t.case_status in
|
||||||
|
<foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
||||||
|
#{caseStatus}
|
||||||
|
</foreach>)
|
||||||
|
</if>
|
||||||
|
<!--财务-->
|
||||||
|
<if test="financeStatus != null and financeStatus != ''">
|
||||||
|
or( t.identity_type=1 and t.case_status =#{financeStatus})
|
||||||
|
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
) t1
|
||||||
|
<!-- <where>
|
||||||
|
<!–申请人–>-->
|
||||||
|
<!-- <if test="nameId != null and nameId != ''">-->
|
||||||
|
<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
||||||
|
<!-- and t1.case_status in (0,2)-->
|
||||||
|
<!-- )-->
|
||||||
|
<!-- </if>
|
||||||
|
</where> -->
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||||
ELSE '无审理方式'
|
ELSE '无审理方式'
|
||||||
END arbitratMethodName,
|
END arbitratMethodName,
|
||||||
@@ -150,6 +265,53 @@
|
|||||||
</where>
|
</where>
|
||||||
order by c.create_time desc,c.case_num desc
|
order by c.create_time desc,c.case_num desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectAdminCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
||||||
|
SELECT
|
||||||
|
sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
||||||
|
sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
|
||||||
|
sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
|
||||||
|
sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
||||||
|
sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
||||||
|
sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
||||||
|
sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
||||||
|
sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
||||||
|
sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
||||||
|
sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
||||||
|
sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
|
||||||
|
sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
||||||
|
sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
||||||
|
sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
||||||
|
sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
||||||
|
sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
||||||
|
sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
|
||||||
|
sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
|
||||||
|
FROM
|
||||||
|
case_application c
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
|
AND ca.identity_type = 1
|
||||||
|
WHERE
|
||||||
|
c.case_status IN (
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
11,
|
||||||
|
12,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
17
|
||||||
|
)
|
||||||
|
|
||||||
|
</select>
|
||||||
<select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
<select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
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 '书面审理'
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||||
@@ -193,6 +355,63 @@
|
|||||||
</where>
|
</where>
|
||||||
order by c.create_time desc,c.case_num desc
|
order by c.create_time desc,c.case_num desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectDeptHeadCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
||||||
|
select sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
||||||
|
sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
|
||||||
|
sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
|
||||||
|
sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
||||||
|
sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
||||||
|
sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
||||||
|
sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
||||||
|
sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
||||||
|
sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
||||||
|
sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
||||||
|
sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
|
||||||
|
sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
||||||
|
sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
||||||
|
sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
||||||
|
sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
||||||
|
sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
||||||
|
sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
|
||||||
|
sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
|
||||||
|
from case_application c
|
||||||
|
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||||
|
<where>
|
||||||
|
<!--部门长-->
|
||||||
|
<if test="statusList != null and statusList.size() > 0">
|
||||||
|
or c.case_status in
|
||||||
|
<foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
||||||
|
#{caseStatus}
|
||||||
|
</foreach>
|
||||||
|
<!--被申请人-->
|
||||||
|
<if test="idCard != null and idCard != ''">
|
||||||
|
or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
||||||
|
</if>
|
||||||
|
<!--仲裁员-->
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
or ( t.identity_type=1 and
|
||||||
|
t.case_status in (7,8,9,12,13,14)
|
||||||
|
and
|
||||||
|
instr (t.arbitrator_id,#{userId})>0)
|
||||||
|
</if>
|
||||||
|
<!--法律顾问-->
|
||||||
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
|
or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
||||||
|
and t.application_organ_id in
|
||||||
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach> )
|
||||||
|
</if>
|
||||||
|
<!--申请人-->
|
||||||
|
<if test="nameId != null and nameId != ''">
|
||||||
|
or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||||
|
and t.case_status in (0,2))
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
||||||
|
|||||||
Reference in New Issue
Block a user