Merge remote-tracking branch 'origin/master'

This commit is contained in:
paidaxing444 2020-04-18 20:08:28 +08:00
commit 0a0d82c5b1
11 changed files with 460 additions and 282 deletions

View File

@ -57,6 +57,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.parentId != 200"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@ -64,6 +65,7 @@
v-hasPermi="['system:dept:edit']" v-hasPermi="['system:dept:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
v-if="scope.row.deptId < 200"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-plus" icon="el-icon-plus"
@ -71,7 +73,7 @@
v-hasPermi="['system:dept:add']" v-hasPermi="['system:dept:add']"
>新增</el-button> >新增</el-button>
<el-button <el-button
v-if="scope.row.parentId != 0" v-if="scope.row.parentId != 0 && scope.row.parentId != 200"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@ -158,6 +160,7 @@ export default {
components: { Treeselect }, components: { Treeselect },
data() { data() {
return { return {
sh: false,
// //
loading: true, loading: true,
// //

View File

@ -107,7 +107,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -137,6 +137,15 @@
>{{dict.dictLabel}}</el-radio> >{{dict.dictLabel}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </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-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
@ -150,7 +159,14 @@
</template> </template>
<script> <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 { export default {
name: "Post", name: "Post",
@ -174,13 +190,16 @@ export default {
open: false, open: false,
// //
statusOptions: [], statusOptions: [],
//
purpOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
postCode: undefined, postCode: undefined,
postName: undefined, postName: undefined,
status: undefined status: undefined,
purp: undefined
}, },
// //
form: {}, form: {},
@ -203,6 +222,9 @@ export default {
this.getDicts("sys_normal_disable").then(response => { this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data; this.statusOptions = response.data;
}); });
this.getDicts("sys_purpose").then(response => {
this.purpOptions = response.data;
});
}, },
methods: { methods: {
/** 查询岗位列表 */ /** 查询岗位列表 */
@ -231,6 +253,7 @@ export default {
postName: undefined, postName: undefined,
postSort: 0, postSort: 0,
status: "0", status: "0",
purp: "1",
remark: undefined remark: undefined
}; };
this.resetForm("form"); this.resetForm("form");
@ -247,9 +270,9 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.postId) this.ids = selection.map(item => item.postId);
this.single = selection.length!=1 this.single = selection.length != 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -260,7 +283,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const postId = row.postId || this.ids const postId = row.postId || this.ids;
getPost(postId).then(response => { getPost(postId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
@ -298,29 +321,39 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const postIds = row.postId || this.ids; const postIds = row.postId || this.ids;
this.$confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?', "警告", { this.$confirm(
'是否确认删除岗位编号为"' + postIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }
)
.then(function() {
return delPost(postIds); return delPost(postIds);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(function() {}); })
.catch(function() {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有岗位数据项?', "警告", { this.$confirm("是否确认导出所有岗位数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { })
.then(function() {
return exportPost(queryParams); return exportPost(queryParams);
}).then(response => { })
.then(response => {
this.download(response.msg); this.download(response.msg);
}).catch(function() {}); })
.catch(function() {});
} }
} }
}; };

View File

@ -173,6 +173,15 @@
>{{dict.dictLabel}}</el-radio> >{{dict.dictLabel}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </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-form-item label="菜单权限">
<el-tree <el-tree
:data="menuOptions" :data="menuOptions"
@ -233,9 +242,24 @@
</template> </template>
<script> <script>
import { listRole, getRole, delRole, addRole, updateRole, exportRole, dataScope, changeRoleStatus } from "@/api/system/role"; import {
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; listRole,
import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept"; 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 { export default {
name: "Role", name: "Role",
@ -263,6 +287,8 @@ export default {
dateRange: [], dateRange: [],
// //
statusOptions: [], statusOptions: [],
//
purposeOptions: [],
// //
dataScopeOptions: [ dataScopeOptions: [
{ {
@ -296,7 +322,8 @@ export default {
pageSize: 10, pageSize: 10,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
status: undefined status: undefined,
purpose: undefined
}, },
// //
form: {}, form: {},
@ -323,6 +350,9 @@ export default {
this.getDicts("sys_normal_disable").then(response => { this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data; this.statusOptions = response.data;
}); });
this.getDicts("sys_purpose").then(response => {
this.purposeOptions = response.data;
});
}, },
methods: { methods: {
/** 查询角色列表 */ /** 查询角色列表 */
@ -383,15 +413,22 @@ export default {
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用"; let text = row.status === "0" ? "启用" : "停用";
this.$confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', "警告", { this.$confirm(
'确认要"' + text + '""' + row.roleName + '"角色吗?',
"警告",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }
)
.then(function() {
return changeRoleStatus(row.roleId, row.status); return changeRoleStatus(row.roleId, row.status);
}).then(() => { })
.then(() => {
this.msgSuccess(text + "成功"); this.msgSuccess(text + "成功");
}).catch(function() { })
.catch(function() {
row.status = row.status === "0" ? "1" : "0"; row.status = row.status === "0" ? "1" : "0";
}); });
}, },
@ -418,7 +455,8 @@ export default {
status: "0", status: "0",
menuIds: [], menuIds: [],
deptIds: [], deptIds: [],
remark: undefined remark: undefined,
purpose: "1"
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -435,9 +473,9 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.roleId) this.ids = selection.map(item => item.roleId);
this.single = selection.length!=1 this.single = selection.length != 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -449,7 +487,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const roleId = row.roleId || this.ids const roleId = row.roleId || this.ids;
this.$nextTick(() => { this.$nextTick(() => {
this.getRoleMenuTreeselect(roleId); this.getRoleMenuTreeselect(roleId);
}); });
@ -519,29 +557,39 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const roleIds = row.roleId || this.ids; const roleIds = row.roleId || this.ids;
this.$confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?', "警告", { this.$confirm(
'是否确认删除角色编号为"' + roleIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }
)
.then(function() {
return delRole(roleIds); return delRole(roleIds);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(function() {}); })
.catch(function() {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有角色数据项?', "警告", { this.$confirm("是否确认导出所有角色数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { })
.then(function() {
return exportRole(queryParams); return exportRole(queryParams);
}).then(response => { })
.then(response => {
this.download(response.msg); this.download(response.msg);
}).catch(function() {}); })
.catch(function() {});
} }
} }
}; };

View File

@ -103,7 +103,7 @@ public class BySchoolController extends BaseController
{ {
//从school表中取出当前最大的ID值 并且将其赋值给dept中的ordernumber //从school表中取出当前最大的ID值 并且将其赋值给dept中的ordernumber
String maxId = jdbcTemplate.queryForObject(String.format("select MAX(id) from by_school"),String.class); String maxId = jdbcTemplate.queryForObject(String.format("select MAX(id) from by_school"),String.class);
//生成32位UUID
String uuid = getUUID32(); String uuid = getUUID32();
//将UUID赋值给xxdm //将UUID赋值给xxdm
@ -114,12 +114,19 @@ public class BySchoolController extends BaseController
//创建dept实例 并且向要添加的dept中设置各个参数 //创建dept实例 并且向要添加的dept中设置各个参数
SysDept dept = new SysDept(); SysDept dept = new SysDept();
if (maxId != "0")
{
dept.setOrderNum(maxId);
System.out.println("------------" + maxId);
}else
{
dept.setOrderNum("6");
}
dept.setSchoolId(bySchool.getXxdm()); dept.setSchoolId(bySchool.getXxdm());
dept.setCreateBy(SecurityUtils.getUsername()); dept.setCreateBy(SecurityUtils.getUsername());
dept.setParentId(200L); dept.setParentId(200L);
dept.setAncestors("0,100,200"); dept.setAncestors("0,100,200");
dept.setDeptName(bySchool.getSchoolName()); dept.setDeptName(bySchool.getSchoolName());
dept.setOrderNum(maxId);
dept.setPhone(bySchool.getTel()); dept.setPhone(bySchool.getTel());
dept.setLeader(SecurityUtils.getUsername()); dept.setLeader(SecurityUtils.getUsername());
//插入数据 //插入数据
@ -136,6 +143,16 @@ public class BySchoolController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BySchool bySchool) 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)); return toAjax(bySchoolService.updateBySchool(bySchool));
} }
@ -147,6 +164,31 @@ public class BySchoolController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] 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)); return toAjax(bySchoolService.deleteBySchoolByIds(ids));
} }
} }

View File

@ -88,9 +88,9 @@ public class BySchool extends BaseEntity
@Excel(name = "紧急联系电话") @Excel(name = "紧急联系电话")
private String emTel; private String emTel;
/** 状态0试用1开通2停用,3禁用) */ /** 状态0正常1停用) */
@Excel(name = "状态", readConverterExp = "0=试用1开通2停用,3禁") @Excel(name = "状态", readConverterExp = "0=正常1停")
private Long status; private String status;
/** 幼儿园规模 */ /** 幼儿园规模 */
@Excel(name = "幼儿园规模") @Excel(name = "幼儿园规模")
@ -140,6 +140,12 @@ public class BySchool extends BaseEntity
@Excel(name = "当前学期") @Excel(name = "当前学期")
private String dqxq; private String dqxq;
/** 删除标志0代表存在 2代表删除 */
private String isDel;
//部门 //部门
private SysDept dept; private SysDept dept;
@ -295,12 +301,12 @@ public class BySchool extends BaseEntity
{ {
return emTel; return emTel;
} }
public void setStatus(Long status) public void setStatus(String status)
{ {
this.status = status; this.status = status;
} }
public Long getStatus() public String getStatus()
{ {
return status; return status;
} }
@ -421,7 +427,13 @@ public class BySchool extends BaseEntity
this.xxdm = xxdm; this.xxdm = xxdm;
} }
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
@Override @Override
public String toString() { public String toString() {
@ -459,6 +471,7 @@ public class BySchool extends BaseEntity
.append("dqxn", getDqxn()) .append("dqxn", getDqxn())
.append("dqxq", getDqxq()) .append("dqxq", getDqxq())
.append("dept", getDept()) .append("dept", getDept())
.append("isDel",getIsDel())
.toString(); .toString();
} }

View File

@ -37,6 +37,9 @@ public class SysPost extends BaseEntity
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 用途1幼儿园 2系统 */
private String purp;
/** 用户是否存在此岗位标识 默认不存在 */ /** 用户是否存在此岗位标识 默认不存在 */
private boolean flag = false; private boolean flag = false;
@ -104,6 +107,14 @@ public class SysPost extends BaseEntity
{ {
this.flag = flag; this.flag = flag;
} }
public String getPurp() {
return purp;
}
public void setPurp(String purp) {
this.purp = purp;
}
@Override @Override
public String toString() { public String toString() {
@ -118,6 +129,9 @@ public class SysPost extends BaseEntity
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("remark", getRemark()) .append("remark", getRemark())
.append("purp", getPurp())
.toString(); .toString();
} }
} }

View File

@ -1,197 +1,209 @@
package com.ruoyi.project.system.domain; package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
* 角色表 sys_role * 角色表 sys_role
* *
* @author ruoyi * @author ruoyi
*/ */
public class SysRole extends BaseEntity public class SysRole extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 角色ID */ /** 角色ID */
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC) @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
private Long roleId; private Long roleId;
/** 角色名称 */ /** 角色名称 */
@Excel(name = "角色名称") @Excel(name = "角色名称")
private String roleName; private String roleName;
/** 角色权限 */ /** 角色权限 */
@Excel(name = "角色权限") @Excel(name = "角色权限")
private String roleKey; private String roleKey;
/** 角色排序 */ /** 角色排序 */
@Excel(name = "角色排序") @Excel(name = "角色排序")
private String roleSort; private String roleSort;
/** 数据范围1所有数据权限2自定义数据权限3本部门数据权限4本部门及以下数据权限 */ /** 数据范围1所有数据权限2自定义数据权限3本部门数据权限4本部门及以下数据权限 */
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限") @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
private String dataScope; private String dataScope;
/** 角色状态0正常 1停用 */ /** 角色状态0正常 1停用 */
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用") @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 删除标志0代表存在 2代表删除 */ /** 删除标志0代表存在 2代表删除 */
private String delFlag; private String delFlag;
/** 用户是否存在此角色标识 默认不存在 */ /** 用户是否存在此角色标识 默认不存在 */
private boolean flag = false; private boolean flag = false;
/** 菜单组 */ /** 菜单组 */
private Long[] menuIds; private Long[] menuIds;
/** 部门组(数据权限) */ /** 部门组(数据权限) */
private Long[] deptIds; private Long[] deptIds;
public SysRole() /** 角色用途 (1代表幼儿园 2代表系统) */
{ private String purpose;
} public SysRole()
{
public SysRole(Long roleId)
{ }
this.roleId = roleId;
} public SysRole(Long roleId)
{
public Long getRoleId() this.roleId = roleId;
{ }
return roleId;
} public Long getRoleId()
{
public void setRoleId(Long roleId) return roleId;
{ }
this.roleId = roleId;
} public void setRoleId(Long roleId)
{
public boolean isAdmin() this.roleId = roleId;
{ }
return isAdmin(this.roleId);
} public boolean isAdmin()
{
public static boolean isAdmin(Long roleId) return isAdmin(this.roleId);
{ }
return roleId != null && 1L == roleId;
} public static boolean isAdmin(Long roleId)
{
@NotBlank(message = "角色名称不能为空") return roleId != null && 1L == roleId;
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") }
public String getRoleName()
{ @NotBlank(message = "角色名称不能为空")
return roleName; @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
} public String getRoleName()
{
public void setRoleName(String roleName) return roleName;
{ }
this.roleName = roleName;
} public void setRoleName(String roleName)
{
@NotBlank(message = "权限字符不能为空") this.roleName = roleName;
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") }
public String getRoleKey()
{ @NotBlank(message = "权限字符不能为空")
return roleKey; @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
} public String getRoleKey()
{
public void setRoleKey(String roleKey) return roleKey;
{ }
this.roleKey = roleKey;
} public void setRoleKey(String roleKey)
{
@NotBlank(message = "显示顺序不能为空") this.roleKey = roleKey;
public String getRoleSort() }
{
return roleSort; @NotBlank(message = "显示顺序不能为空")
} public String getRoleSort()
{
public void setRoleSort(String roleSort) return roleSort;
{ }
this.roleSort = roleSort;
} public void setRoleSort(String roleSort)
{
public String getDataScope() this.roleSort = roleSort;
{ }
return dataScope;
} public String getDataScope()
{
public void setDataScope(String dataScope) return dataScope;
{ }
this.dataScope = dataScope;
} public void setDataScope(String dataScope)
{
public String getStatus() this.dataScope = dataScope;
{ }
return status;
} public String getStatus()
{
public void setStatus(String status) return status;
{ }
this.status = status;
} public void setStatus(String status)
{
public String getDelFlag() this.status = status;
{ }
return delFlag;
} public String getDelFlag()
{
public void setDelFlag(String delFlag) return delFlag;
{ }
this.delFlag = delFlag;
} public void setDelFlag(String delFlag)
{
public boolean isFlag() this.delFlag = delFlag;
{ }
return flag;
} public boolean isFlag()
{
public void setFlag(boolean flag) return flag;
{ }
this.flag = flag;
} public void setFlag(boolean flag)
{
public Long[] getMenuIds() this.flag = flag;
{ }
return menuIds;
} public Long[] getMenuIds()
{
public void setMenuIds(Long[] menuIds) return menuIds;
{ }
this.menuIds = menuIds;
} public void setMenuIds(Long[] menuIds)
{
public Long[] getDeptIds() this.menuIds = menuIds;
{ }
return deptIds;
} public Long[] getDeptIds()
{
public void setDeptIds(Long[] deptIds) return deptIds;
{ }
this.deptIds = deptIds;
} public void setDeptIds(Long[] deptIds)
{
public String toString() { this.deptIds = deptIds;
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) }
.append("roleId", getRoleId())
.append("roleName", getRoleName()) public String toString() {
.append("roleKey", getRoleKey()) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("roleSort", getRoleSort()) .append("roleId", getRoleId())
.append("dataScope", getDataScope()) .append("roleName", getRoleName())
.append("status", getStatus()) .append("roleKey", getRoleKey())
.append("delFlag", getDelFlag()) .append("roleSort", getRoleSort())
.append("createBy", getCreateBy()) .append("dataScope", getDataScope())
.append("createTime", getCreateTime()) .append("status", getStatus())
.append("updateBy", getUpdateBy()) .append("delFlag", getDelFlag())
.append("updateTime", getUpdateTime()) .append("createBy", getCreateBy())
.append("remark", getRemark()) .append("createTime", getCreateTime())
.toString(); .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;
}
}

View File

@ -37,45 +37,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="openDeadline" column="open_deadline" /> <result property="openDeadline" column="open_deadline" />
<result property="dqxn" column="dqxn" /> <result property="dqxn" column="dqxn" />
<result property="dqxq" column="dqxq" /> <result property="dqxq" column="dqxq" />
<result property="isDel" column="is_del" />
</resultMap> </resultMap>
<sql id="selectBySchoolVo"> <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> </sql>
<select id="selectBySchoolList" parameterType="BySchool" resultMap="BySchoolResult"> <select id="selectBySchoolList" parameterType="BySchool" resultMap="BySchoolResult">
<include refid="selectBySchoolVo"/> <include refid="selectBySchoolVo"/>
<where> where is_del = '0'
<if test="xxdm != null and xxdm != ''"> and xxdm like concat('%', #{xxdm}, '%')</if> <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="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
<if test="nameShort != null and nameShort != ''"> and name_short = #{nameShort}</if> <if test="nameShort != null and nameShort != ''"> and name_short = #{nameShort}</if>
<if test="type != null "> and type = #{type}</if> <if test="type != null "> and type = #{type}</if>
<if test="parentId != null "> and parent_id = #{parentId}</if> <if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="province != null and province != ''"> and province = #{province}</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="provincename != null and provincename != ''"> and provincename like concat('%', #{provincename}, '%')</if>
<if test="regionid != null and regionid != ''"> and regionid = #{regionid}</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="regionname != null and regionname != ''"> and regionname like concat('%', #{regionname}, '%')</if>
<if test="area != null and area != ''"> and area = #{area}</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="areaname != null and areaname != ''"> and areaname like concat('%', #{areaname}, '%')</if>
<if test="address != null and address != ''"> and address = #{address}</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="mastername != null and mastername != ''"> and mastername like concat('%', #{mastername}, '%')</if>
<if test="tel != null and tel != ''"> and tel = #{tel}</if> <if test="tel != null and tel != ''"> and tel = #{tel}</if>
<if test="emMan != null and emMan != ''"> and em_man = #{emMan}</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="emTel != null and emTel != ''"> and em_tel = #{emTel}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="scale != null "> and scale = #{scale}</if> <if test="scale != null "> and scale = #{scale}</if>
<if test="createUser != null "> and create_user = #{createUser}</if> <if test="createUser != null "> and create_user = #{createUser}</if>
<if test="approvalUser != null "> and approval_user = #{approvalUser}</if> <if test="approvalUser != null "> and approval_user = #{approvalUser}</if>
<if test="approvalTime != null "> and approval_time = #{approvalTime}</if> <if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
<if test="location != null and location != ''"> and location = #{location}</if> <if test="location != null and location != ''"> and location = #{location}</if>
<if test="isDemonstr != null "> and is_demonstr = #{isDemonstr}</if> <if test="isDemonstr != null "> and is_demonstr = #{isDemonstr}</if>
<if test="businesslicenseimg != null and businesslicenseimg != ''"> and businesslicenseimg = #{businesslicenseimg}</if> <if test="businesslicenseimg != null and businesslicenseimg != ''"> and businesslicenseimg = #{businesslicenseimg}</if>
<if test="openBook != null "> and open_book = #{openBook}</if> <if test="openBook != null "> and open_book = #{openBook}</if>
<if test="feeStatus != null "> and fee_status = #{feeStatus}</if> <if test="feeStatus != null "> and fee_status = #{feeStatus}</if>
<if test="openDeadline != null "> and open_deadline = #{openDeadline}</if> <if test="openDeadline != null "> and open_deadline = #{openDeadline}</if>
<if test="dqxn != null and dqxn != ''"> and dqxn = #{dqxn}</if> <if test="dqxn != null and dqxn != ''"> and dqxn = #{dqxn}</if>
<if test="dqxq != null and dqxq != ''"> and dqxq = #{dqxq}</if> <if test="dqxq != null and dqxq != ''"> and dqxq = #{dqxq}</if>
</where>
</select> </select>
<select id="selectBySchoolById" parameterType="Long" resultMap="BySchoolResult"> <select id="selectBySchoolById" parameterType="Long" resultMap="BySchoolResult">
@ -196,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteBySchoolByIds" parameterType="String"> <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=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

View File

@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="schoolId != null and schoolId != ''">
AND school_id = #{schoolId}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${dataScope} ${dataScope}
order by d.parent_id, d.order_num 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} update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete> </delete>
</mapper> </mapper>

View File

@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="purp" column="purp" />
</resultMap> </resultMap>
<sql id="selectPostVo"> <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 from sys_post
</sql> </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="postName != null and postName != ''">post_name = #{postName},</if>
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if> <if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
<if test="status != null and status != ''">status = #{status},</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="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate() 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="postName != null and postName != ''">post_name,</if>
<if test="postSort != null and postSort != ''">post_sort,</if> <if test="postSort != null and postSort != ''">post_sort,</if>
<if test="status != null and status != ''">status,</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="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
create_time create_time
@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="postName != null and postName != ''">#{postName},</if> <if test="postName != null and postName != ''">#{postName},</if>
<if test="postSort != null and postSort != ''">#{postSort},</if> <if test="postSort != null and postSort != ''">#{postSort},</if>
<if test="status != null and status != ''">#{status},</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="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate() sysdate()

View File

@ -17,11 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="purpose" column="purpose" />
</resultMap> </resultMap>
<sql id="selectRoleVo"> <sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, 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 from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id 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 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="dataScope != null and dataScope != ''">data_scope,</if>
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</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> <if test="createBy != null and createBy != ''">create_by,</if>
create_time create_time
)values( )values(
@ -106,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataScope != null and dataScope != ''">#{dataScope},</if> <if test="dataScope != null and dataScope != ''">#{dataScope},</if>
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</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> <if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate() 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="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if> <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
<if test="status != null and status != ''">status = #{status},</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="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate() update_time = sysdate()