新增案件
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
package com.ruoyi.common.core.controller;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
@@ -20,6 +13,14 @@ import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web层通用数据处理
|
||||
@@ -184,13 +185,7 @@ public class BaseController
|
||||
return getLoginUser().getUserId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录部门id
|
||||
*/
|
||||
public Long getDeptId()
|
||||
{
|
||||
return getLoginUser().getDeptId();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取登录用户名
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import com.ruoyi.common.annotation.DictConvert;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||
import com.ruoyi.common.annotation.Excel.Type;
|
||||
import com.ruoyi.common.annotation.Excels;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.xss.Xss;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户对象 sys_user
|
||||
@@ -27,9 +28,9 @@ public class SysUser extends BaseEntity
|
||||
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||
private Long userId;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门编号", type = Type.IMPORT)
|
||||
private Long deptId;
|
||||
/** 部门IDs */
|
||||
// @Excel(name = "部门编号", type = Type.IMPORT)
|
||||
private List<Long> deptIds;
|
||||
|
||||
/** 用户账号 */
|
||||
@Excel(name = "登录名称")
|
||||
@@ -52,6 +53,15 @@ public class SysUser extends BaseEntity
|
||||
this.nickNameAndNum = nickNameAndNum;
|
||||
}
|
||||
|
||||
public List<Long> getDeptIds() {
|
||||
return deptIds;
|
||||
}
|
||||
|
||||
public void setDeptIds(List<Long> deptIds) {
|
||||
this.deptIds = deptIds;
|
||||
}
|
||||
|
||||
|
||||
/** 用户身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
@@ -96,11 +106,11 @@ public class SysUser extends BaseEntity
|
||||
private Date loginDate;
|
||||
|
||||
/** 部门对象 */
|
||||
@Excels({
|
||||
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
|
||||
@Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
|
||||
})
|
||||
private SysDept dept;
|
||||
// @Excels({
|
||||
// @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
|
||||
// @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
|
||||
// })
|
||||
private List<SysDept> depts;
|
||||
|
||||
/** 角色对象 */
|
||||
private List<SysRole> roles;
|
||||
@@ -119,6 +129,8 @@ public class SysUser extends BaseEntity
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public SysUser(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
@@ -144,11 +156,6 @@ public class SysUser extends BaseEntity
|
||||
return userId != null && 1L == userId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public String getSexName() {
|
||||
return sexName;
|
||||
}
|
||||
@@ -165,9 +172,9 @@ public class SysUser extends BaseEntity
|
||||
this.specialty = specialty;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId)
|
||||
public void setDeptId(List<Long> deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
this.deptIds = deptId;
|
||||
}
|
||||
|
||||
@Xss(message = "用户昵称不能包含脚本字符")
|
||||
@@ -288,14 +295,14 @@ public class SysUser extends BaseEntity
|
||||
this.loginDate = loginDate;
|
||||
}
|
||||
|
||||
public SysDept getDept()
|
||||
public List<SysDept> getDept()
|
||||
{
|
||||
return dept;
|
||||
return depts;
|
||||
}
|
||||
|
||||
public void setDept(SysDept dept)
|
||||
public void setDept(List<SysDept> depts)
|
||||
{
|
||||
this.dept = dept;
|
||||
this.depts = depts;
|
||||
}
|
||||
|
||||
public List<SysRole> getRoles()
|
||||
@@ -346,11 +353,12 @@ public class SysUser extends BaseEntity
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("userId", getUserId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("deptIds", getDeptIds())
|
||||
.append("userName", getUserName())
|
||||
.append("idCard", getIdCard())
|
||||
.append("nickName", getNickName())
|
||||
|
||||
@@ -21,10 +21,7 @@ public class LoginUser implements UserDetails
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户唯一标识
|
||||
@@ -81,10 +78,9 @@ public class LoginUser implements UserDetails
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions)
|
||||
public LoginUser(Long userId, SysUser user, Set<String> permissions)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.deptId = deptId;
|
||||
this.user = user;
|
||||
this.permissions = permissions;
|
||||
}
|
||||
@@ -99,15 +95,7 @@ public class LoginUser implements UserDetails
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
|
||||
@@ -17,6 +17,10 @@ public enum AnnexTypeEnum implements EnumsInterface {
|
||||
MEETING_VIDEO(5, "会议视频"),
|
||||
MEDIATE(6, "庭审笔录"),
|
||||
MEDIATE_BOOK(7, "调解书"),
|
||||
MEDIATION_FILES(8, "调解资料"),
|
||||
|
||||
SEAL_PICTURE(10, "印章图片"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import com.ruoyi.common.interfaces.EnumsInterface;
|
||||
|
||||
/**
|
||||
* @Classname AnnexTypeEnum
|
||||
* @Description 调解方式枚举
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/1/12 17:50
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public enum MediationMethodEnum implements EnumsInterface {
|
||||
ON_LINE("1", "线上调解"),
|
||||
OFF_LINE("2", "线下调解"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String text;
|
||||
|
||||
MediationMethodEnum(String code, String text)
|
||||
{
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getText()
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取text
|
||||
* @param codeNo
|
||||
* @return
|
||||
*/
|
||||
public static String getTextByCode(String codeNo){
|
||||
for (MediationMethodEnum value : MediationMethodEnum.values()) {
|
||||
if (value.getCode().equals(codeNo)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return codeNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据text获取code
|
||||
* @param textStr
|
||||
* @return
|
||||
*/
|
||||
public static String getCodeByText(String textStr){
|
||||
for (MediationMethodEnum value : MediationMethodEnum.values()) {
|
||||
if (value.getText().equals(textStr)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return textStr;
|
||||
}
|
||||
}
|
||||
@@ -29,20 +29,7 @@ public class SecurityUtils
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门ID
|
||||
**/
|
||||
public static Long getDeptId()
|
||||
{
|
||||
try
|
||||
{
|
||||
return getLoginUser().getDeptId();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new ServiceException("获取部门ID异常", HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户账户
|
||||
|
||||
Reference in New Issue
Block a user