Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0a0d82c5b1
@ -57,6 +57,7 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@ -64,6 +65,7 @@
|
||||
v-hasPermi="['system:dept:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.deptId < 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@ -71,7 +73,7 @@
|
||||
v-hasPermi="['system:dept:add']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 0"
|
||||
v-if="scope.row.parentId != 0 && scope.row.parentId != 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@ -158,6 +160,7 @@ export default {
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
sh: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 表格树数据
|
||||
|
@ -107,7 +107,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -137,6 +137,15 @@
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位用途" prop="purp">
|
||||
<el-radio-group v-model="form.purp">
|
||||
<el-radio
|
||||
v-for="dict in purpOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@ -150,7 +159,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
|
||||
import {
|
||||
listPost,
|
||||
getPost,
|
||||
delPost,
|
||||
addPost,
|
||||
updatePost,
|
||||
exportPost
|
||||
} from "@/api/system/post";
|
||||
|
||||
export default {
|
||||
name: "Post",
|
||||
@ -174,13 +190,16 @@ export default {
|
||||
open: false,
|
||||
// 状态数据字典
|
||||
statusOptions: [],
|
||||
// 岗位用途
|
||||
purpOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
postCode: undefined,
|
||||
postName: undefined,
|
||||
status: undefined
|
||||
status: undefined,
|
||||
purp: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -203,6 +222,9 @@ export default {
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_purpose").then(response => {
|
||||
this.purpOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询岗位列表 */
|
||||
@ -231,6 +253,7 @@ export default {
|
||||
postName: undefined,
|
||||
postSort: 0,
|
||||
status: "0",
|
||||
purp: "1",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
@ -247,9 +270,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.postId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map(item => item.postId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -260,7 +283,7 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const postId = row.postId || this.ids
|
||||
const postId = row.postId || this.ids;
|
||||
getPost(postId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
@ -298,29 +321,39 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const postIds = row.postId || this.ids;
|
||||
this.$confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?', "警告", {
|
||||
this.$confirm(
|
||||
'是否确认删除岗位编号为"' + postIds + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delPost(postIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有岗位数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
this.$confirm("是否确认导出所有岗位数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportPost(queryParams);
|
||||
}).then(response => {
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -173,6 +173,15 @@
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途">
|
||||
<el-radio-group v-model="form.purpose">
|
||||
<el-radio
|
||||
v-for="dict in purposeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单权限">
|
||||
<el-tree
|
||||
:data="menuOptions"
|
||||
@ -233,9 +242,24 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRole, getRole, delRole, addRole, updateRole, exportRole, dataScope, changeRoleStatus } from "@/api/system/role";
|
||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||
import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept";
|
||||
import {
|
||||
listRole,
|
||||
getRole,
|
||||
delRole,
|
||||
addRole,
|
||||
updateRole,
|
||||
exportRole,
|
||||
dataScope,
|
||||
changeRoleStatus
|
||||
} from "@/api/system/role";
|
||||
import {
|
||||
treeselect as menuTreeselect,
|
||||
roleMenuTreeselect
|
||||
} from "@/api/system/menu";
|
||||
import {
|
||||
treeselect as deptTreeselect,
|
||||
roleDeptTreeselect
|
||||
} from "@/api/system/dept";
|
||||
|
||||
export default {
|
||||
name: "Role",
|
||||
@ -263,6 +287,8 @@ export default {
|
||||
dateRange: [],
|
||||
// 状态数据字典
|
||||
statusOptions: [],
|
||||
// 用途数据字典
|
||||
purposeOptions: [],
|
||||
// 数据范围选项
|
||||
dataScopeOptions: [
|
||||
{
|
||||
@ -296,7 +322,8 @@ export default {
|
||||
pageSize: 10,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
status: undefined
|
||||
status: undefined,
|
||||
purpose: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -323,6 +350,9 @@ export default {
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_purpose").then(response => {
|
||||
this.purposeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询角色列表 */
|
||||
@ -383,15 +413,22 @@ export default {
|
||||
// 角色状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', "警告", {
|
||||
this.$confirm(
|
||||
'确认要"' + text + '""' + row.roleName + '"角色吗?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return changeRoleStatus(row.roleId, row.status);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
})
|
||||
.catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
@ -418,7 +455,8 @@ export default {
|
||||
status: "0",
|
||||
menuIds: [],
|
||||
deptIds: [],
|
||||
remark: undefined
|
||||
remark: undefined,
|
||||
purpose: "1"
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -435,9 +473,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.roleId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map(item => item.roleId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -449,7 +487,7 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const roleId = row.roleId || this.ids
|
||||
const roleId = row.roleId || this.ids;
|
||||
this.$nextTick(() => {
|
||||
this.getRoleMenuTreeselect(roleId);
|
||||
});
|
||||
@ -519,29 +557,39 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const roleIds = row.roleId || this.ids;
|
||||
this.$confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?', "警告", {
|
||||
this.$confirm(
|
||||
'是否确认删除角色编号为"' + roleIds + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delRole(roleIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有角色数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
this.$confirm("是否确认导出所有角色数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportRole(queryParams);
|
||||
}).then(response => {
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -103,7 +103,7 @@ public class BySchoolController extends BaseController
|
||||
{
|
||||
//从school表中取出当前最大的ID值 并且将其赋值给dept中的ordernumber
|
||||
String maxId = jdbcTemplate.queryForObject(String.format("select MAX(id) from by_school"),String.class);
|
||||
|
||||
//生成32位UUID
|
||||
String uuid = getUUID32();
|
||||
|
||||
//将UUID赋值给xxdm
|
||||
@ -114,12 +114,19 @@ public class BySchoolController extends BaseController
|
||||
|
||||
//创建dept实例 并且向要添加的dept中设置各个参数
|
||||
SysDept dept = new SysDept();
|
||||
if (maxId != "0")
|
||||
{
|
||||
dept.setOrderNum(maxId);
|
||||
System.out.println("------------" + maxId);
|
||||
}else
|
||||
{
|
||||
dept.setOrderNum("6");
|
||||
}
|
||||
dept.setSchoolId(bySchool.getXxdm());
|
||||
dept.setCreateBy(SecurityUtils.getUsername());
|
||||
dept.setParentId(200L);
|
||||
dept.setAncestors("0,100,200");
|
||||
dept.setDeptName(bySchool.getSchoolName());
|
||||
dept.setOrderNum(maxId);
|
||||
dept.setPhone(bySchool.getTel());
|
||||
dept.setLeader(SecurityUtils.getUsername());
|
||||
//插入数据
|
||||
@ -136,6 +143,16 @@ public class BySchoolController extends BaseController
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BySchool bySchool)
|
||||
{
|
||||
//创建dept实例 并且向要添加的dept中设置各个参数
|
||||
SysDept dept = new SysDept();
|
||||
|
||||
//设置schoolID为xxdm
|
||||
dept.setSchoolId(bySchool.getXxdm());
|
||||
|
||||
//通过selectdeptlist来获取deptid
|
||||
dept.setDeptId(deptService.selectDeptList(dept).get(0).getDeptId());
|
||||
dept.setStatus(bySchool.getStatus());
|
||||
deptService.updateDept(dept);
|
||||
return toAjax(bySchoolService.updateBySchool(bySchool));
|
||||
}
|
||||
|
||||
@ -147,6 +164,31 @@ public class BySchoolController extends BaseController
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
//遍历ids
|
||||
for (int i=0;i<ids.length;i++)
|
||||
{
|
||||
//循环找出school表的id
|
||||
Long bySchId = ids[i];
|
||||
|
||||
//用school表ID获取xxdm的值
|
||||
//将值赋给dept中的schoolID
|
||||
SysDept dept = new SysDept();
|
||||
dept.setSchoolId(bySchoolService.selectBySchoolById(bySchId).getXxdm());
|
||||
|
||||
//通过dept表的schoolID来找出dept的List
|
||||
deptService.deleteDeptById(deptService.selectDeptList(dept).get(0).getDeptId());
|
||||
}
|
||||
return toAjax(bySchoolService.deleteBySchoolByIds(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -88,9 +88,9 @@ public class BySchool extends BaseEntity
|
||||
@Excel(name = "紧急联系电话")
|
||||
private String emTel;
|
||||
|
||||
/** 状态(0试用,1开通,2停用,3禁用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=试用,1开通,2停用,3禁用")
|
||||
private Long status;
|
||||
/** 状态(0正常,1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1停用")
|
||||
private String status;
|
||||
|
||||
/** 幼儿园规模 */
|
||||
@Excel(name = "幼儿园规模")
|
||||
@ -140,6 +140,12 @@ public class BySchool extends BaseEntity
|
||||
@Excel(name = "当前学期")
|
||||
private String dqxq;
|
||||
|
||||
|
||||
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String isDel;
|
||||
|
||||
//部门
|
||||
private SysDept dept;
|
||||
|
||||
@ -295,12 +301,12 @@ public class BySchool extends BaseEntity
|
||||
{
|
||||
return emTel;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
@ -421,7 +427,13 @@ public class BySchool extends BaseEntity
|
||||
this.xxdm = xxdm;
|
||||
}
|
||||
|
||||
public String getIsDel() {
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public void setIsDel(String isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -459,6 +471,7 @@ public class BySchool extends BaseEntity
|
||||
.append("dqxn", getDqxn())
|
||||
.append("dqxq", getDqxq())
|
||||
.append("dept", getDept())
|
||||
.append("isDel",getIsDel())
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@ public class SysPost extends BaseEntity
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 用途(1幼儿园 2系统) */
|
||||
private String purp;
|
||||
|
||||
/** 用户是否存在此岗位标识 默认不存在 */
|
||||
private boolean flag = false;
|
||||
|
||||
@ -104,6 +107,14 @@ public class SysPost extends BaseEntity
|
||||
{
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getPurp() {
|
||||
return purp;
|
||||
}
|
||||
|
||||
public void setPurp(String purp) {
|
||||
this.purp = purp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -118,6 +129,9 @@ public class SysPost extends BaseEntity
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("purp", getPurp())
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,197 +1,209 @@
|
||||
package com.ruoyi.project.system.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 角色表 sys_role
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SysRole extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 角色ID */
|
||||
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
|
||||
private Long roleId;
|
||||
|
||||
/** 角色名称 */
|
||||
@Excel(name = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
/** 角色权限 */
|
||||
@Excel(name = "角色权限")
|
||||
private String roleKey;
|
||||
|
||||
/** 角色排序 */
|
||||
@Excel(name = "角色排序")
|
||||
private String roleSort;
|
||||
|
||||
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
|
||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
|
||||
private String dataScope;
|
||||
|
||||
/** 角色状态(0正常 1停用) */
|
||||
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 用户是否存在此角色标识 默认不存在 */
|
||||
private boolean flag = false;
|
||||
|
||||
/** 菜单组 */
|
||||
private Long[] menuIds;
|
||||
|
||||
/** 部门组(数据权限) */
|
||||
private Long[] deptIds;
|
||||
|
||||
public SysRole()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SysRole(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getRoleId()
|
||||
{
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public boolean isAdmin()
|
||||
{
|
||||
return isAdmin(this.roleId);
|
||||
}
|
||||
|
||||
public static boolean isAdmin(Long roleId)
|
||||
{
|
||||
return roleId != null && 1L == roleId;
|
||||
}
|
||||
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
|
||||
public String getRoleName()
|
||||
{
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName)
|
||||
{
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
@NotBlank(message = "权限字符不能为空")
|
||||
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
|
||||
public String getRoleKey()
|
||||
{
|
||||
return roleKey;
|
||||
}
|
||||
|
||||
public void setRoleKey(String roleKey)
|
||||
{
|
||||
this.roleKey = roleKey;
|
||||
}
|
||||
|
||||
@NotBlank(message = "显示顺序不能为空")
|
||||
public String getRoleSort()
|
||||
{
|
||||
return roleSort;
|
||||
}
|
||||
|
||||
public void setRoleSort(String roleSort)
|
||||
{
|
||||
this.roleSort = roleSort;
|
||||
}
|
||||
|
||||
public String getDataScope()
|
||||
{
|
||||
return dataScope;
|
||||
}
|
||||
|
||||
public void setDataScope(String dataScope)
|
||||
{
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public boolean isFlag()
|
||||
{
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(boolean flag)
|
||||
{
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public Long[] getMenuIds()
|
||||
{
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
public void setMenuIds(Long[] menuIds)
|
||||
{
|
||||
this.menuIds = menuIds;
|
||||
}
|
||||
|
||||
public Long[] getDeptIds()
|
||||
{
|
||||
return deptIds;
|
||||
}
|
||||
|
||||
public void setDeptIds(Long[] deptIds)
|
||||
{
|
||||
this.deptIds = deptIds;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("roleId", getRoleId())
|
||||
.append("roleName", getRoleName())
|
||||
.append("roleKey", getRoleKey())
|
||||
.append("roleSort", getRoleSort())
|
||||
.append("dataScope", getDataScope())
|
||||
.append("status", getStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
package com.ruoyi.project.system.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 角色表 sys_role
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SysRole extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 角色ID */
|
||||
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
|
||||
private Long roleId;
|
||||
|
||||
/** 角色名称 */
|
||||
@Excel(name = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
/** 角色权限 */
|
||||
@Excel(name = "角色权限")
|
||||
private String roleKey;
|
||||
|
||||
/** 角色排序 */
|
||||
@Excel(name = "角色排序")
|
||||
private String roleSort;
|
||||
|
||||
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
|
||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
|
||||
private String dataScope;
|
||||
|
||||
/** 角色状态(0正常 1停用) */
|
||||
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 用户是否存在此角色标识 默认不存在 */
|
||||
private boolean flag = false;
|
||||
|
||||
/** 菜单组 */
|
||||
private Long[] menuIds;
|
||||
|
||||
/** 部门组(数据权限) */
|
||||
private Long[] deptIds;
|
||||
|
||||
/** 角色用途 (1代表幼儿园 2代表系统) */
|
||||
private String purpose;
|
||||
|
||||
public SysRole()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SysRole(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getRoleId()
|
||||
{
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public boolean isAdmin()
|
||||
{
|
||||
return isAdmin(this.roleId);
|
||||
}
|
||||
|
||||
public static boolean isAdmin(Long roleId)
|
||||
{
|
||||
return roleId != null && 1L == roleId;
|
||||
}
|
||||
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
|
||||
public String getRoleName()
|
||||
{
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName)
|
||||
{
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
@NotBlank(message = "权限字符不能为空")
|
||||
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
|
||||
public String getRoleKey()
|
||||
{
|
||||
return roleKey;
|
||||
}
|
||||
|
||||
public void setRoleKey(String roleKey)
|
||||
{
|
||||
this.roleKey = roleKey;
|
||||
}
|
||||
|
||||
@NotBlank(message = "显示顺序不能为空")
|
||||
public String getRoleSort()
|
||||
{
|
||||
return roleSort;
|
||||
}
|
||||
|
||||
public void setRoleSort(String roleSort)
|
||||
{
|
||||
this.roleSort = roleSort;
|
||||
}
|
||||
|
||||
public String getDataScope()
|
||||
{
|
||||
return dataScope;
|
||||
}
|
||||
|
||||
public void setDataScope(String dataScope)
|
||||
{
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public boolean isFlag()
|
||||
{
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(boolean flag)
|
||||
{
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public Long[] getMenuIds()
|
||||
{
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
public void setMenuIds(Long[] menuIds)
|
||||
{
|
||||
this.menuIds = menuIds;
|
||||
}
|
||||
|
||||
public Long[] getDeptIds()
|
||||
{
|
||||
return deptIds;
|
||||
}
|
||||
|
||||
public void setDeptIds(Long[] deptIds)
|
||||
{
|
||||
this.deptIds = deptIds;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("roleId", getRoleId())
|
||||
.append("roleName", getRoleName())
|
||||
.append("roleKey", getRoleKey())
|
||||
.append("roleSort", getRoleSort())
|
||||
.append("dataScope", getDataScope())
|
||||
.append("status", getStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("purpose", getPurpose())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getPurpose() {
|
||||
return purpose;
|
||||
}
|
||||
|
||||
public void setPurpose(String purpose) {
|
||||
this.purpose = purpose;
|
||||
}
|
||||
}
|
||||
|
@ -37,45 +37,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="openDeadline" column="open_deadline" />
|
||||
<result property="dqxn" column="dqxn" />
|
||||
<result property="dqxq" column="dqxq" />
|
||||
<result property="isDel" column="is_del" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBySchoolVo">
|
||||
select id, xxdm, school_name, name_short, type, parent_id, province, provincename, regionid, regionname, area, areaname, address, mastername, tel, em_man, em_tel, status, scale, create_time, create_user, approval_user, approval_time, remark, location, is_demonstr, businesslicenseimg, open_book, fee_status, open_deadline, dqxn, dqxq from by_school
|
||||
select id, xxdm, school_name, name_short, type, parent_id, province, provincename, regionid, regionname, area, areaname, address, mastername, tel, em_man, em_tel, status, scale, create_time, create_user, approval_user, approval_time, remark, location, is_demonstr, businesslicenseimg, open_book, fee_status, open_deadline, dqxn, dqxq, is_del from by_school
|
||||
</sql>
|
||||
|
||||
<select id="selectBySchoolList" parameterType="BySchool" resultMap="BySchoolResult">
|
||||
<include refid="selectBySchoolVo"/>
|
||||
<where>
|
||||
<if test="xxdm != null and xxdm != ''"> and xxdm like concat('%', #{xxdm}, '%')</if>
|
||||
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
||||
<if test="nameShort != null and nameShort != ''"> and name_short = #{nameShort}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
||||
<if test="provincename != null and provincename != ''"> and provincename like concat('%', #{provincename}, '%')</if>
|
||||
<if test="regionid != null and regionid != ''"> and regionid = #{regionid}</if>
|
||||
<if test="regionname != null and regionname != ''"> and regionname like concat('%', #{regionname}, '%')</if>
|
||||
<if test="area != null and area != ''"> and area = #{area}</if>
|
||||
<if test="areaname != null and areaname != ''"> and areaname like concat('%', #{areaname}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="mastername != null and mastername != ''"> and mastername like concat('%', #{mastername}, '%')</if>
|
||||
<if test="tel != null and tel != ''"> and tel = #{tel}</if>
|
||||
<if test="emMan != null and emMan != ''"> and em_man = #{emMan}</if>
|
||||
<if test="emTel != null and emTel != ''"> and em_tel = #{emTel}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="scale != null "> and scale = #{scale}</if>
|
||||
<if test="createUser != null "> and create_user = #{createUser}</if>
|
||||
<if test="approvalUser != null "> and approval_user = #{approvalUser}</if>
|
||||
<if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="isDemonstr != null "> and is_demonstr = #{isDemonstr}</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''"> and businesslicenseimg = #{businesslicenseimg}</if>
|
||||
<if test="openBook != null "> and open_book = #{openBook}</if>
|
||||
<if test="feeStatus != null "> and fee_status = #{feeStatus}</if>
|
||||
<if test="openDeadline != null "> and open_deadline = #{openDeadline}</if>
|
||||
<if test="dqxn != null and dqxn != ''"> and dqxn = #{dqxn}</if>
|
||||
<if test="dqxq != null and dqxq != ''"> and dqxq = #{dqxq}</if>
|
||||
</where>
|
||||
where is_del = '0'
|
||||
<if test="xxdm != null and xxdm != ''"> and xxdm like concat('%', #{xxdm}, '%')</if>
|
||||
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
||||
<if test="nameShort != null and nameShort != ''"> and name_short = #{nameShort}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
||||
<if test="provincename != null and provincename != ''"> and provincename like concat('%', #{provincename}, '%')</if>
|
||||
<if test="regionid != null and regionid != ''"> and regionid = #{regionid}</if>
|
||||
<if test="regionname != null and regionname != ''"> and regionname like concat('%', #{regionname}, '%')</if>
|
||||
<if test="area != null and area != ''"> and area = #{area}</if>
|
||||
<if test="areaname != null and areaname != ''"> and areaname like concat('%', #{areaname}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="mastername != null and mastername != ''"> and mastername like concat('%', #{mastername}, '%')</if>
|
||||
<if test="tel != null and tel != ''"> and tel = #{tel}</if>
|
||||
<if test="emMan != null and emMan != ''"> and em_man = #{emMan}</if>
|
||||
<if test="emTel != null and emTel != ''"> and em_tel = #{emTel}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="scale != null "> and scale = #{scale}</if>
|
||||
<if test="createUser != null "> and create_user = #{createUser}</if>
|
||||
<if test="approvalUser != null "> and approval_user = #{approvalUser}</if>
|
||||
<if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="isDemonstr != null "> and is_demonstr = #{isDemonstr}</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''"> and businesslicenseimg = #{businesslicenseimg}</if>
|
||||
<if test="openBook != null "> and open_book = #{openBook}</if>
|
||||
<if test="feeStatus != null "> and fee_status = #{feeStatus}</if>
|
||||
<if test="openDeadline != null "> and open_deadline = #{openDeadline}</if>
|
||||
<if test="dqxn != null and dqxn != ''"> and dqxn = #{dqxn}</if>
|
||||
<if test="dqxq != null and dqxq != ''"> and dqxq = #{dqxq}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBySchoolById" parameterType="Long" resultMap="BySchoolResult">
|
||||
@ -196,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBySchoolByIds" parameterType="String">
|
||||
delete from by_school where id in
|
||||
update by_school set is_del = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="schoolId != null and schoolId != ''">
|
||||
AND school_id = #{schoolId}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
order by d.parent_id, d.order_num
|
||||
@ -152,4 +155,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="purp" column="purp" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPostVo">
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark, purp
|
||||
from sys_post
|
||||
</sql>
|
||||
|
||||
@ -79,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="purp != null and purp != ''">purp = #{purp},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
@ -93,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">post_name,</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="purp != null and purp != ''">purp,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">#{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">#{postSort},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="purp != null and purp != ''">#{purp},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
|
@ -17,11 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="purpose" column="purpose" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRoleVo">
|
||||
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,
|
||||
r.status, r.del_flag, r.create_time, r.remark
|
||||
r.status, r.del_flag, r.create_time, r.remark, r.purpose
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
@ -96,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dataScope != null and dataScope != ''">data_scope,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="purpose != null and purpose != ''">purpose,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
@ -106,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="purpose != null and purpose != ''">#{purpose},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
@ -119,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
|
||||
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="purpose != null and purpose != ''">purpose = #{purpose},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user