main
tamguo 7 years ago
parent 526021e88e
commit b01f2fc8ef

@ -4,14 +4,15 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
/** /**
* The persistent class for the sys_company database table. * The persistent class for the sys_company database table.
* *
*/ */
@TableName(value="sys_company") @TableName(value="sys_company")
@KeySequence
public class SysCompanyEntity implements Serializable { public class SysCompanyEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -27,7 +28,7 @@ public class SysCompanyEntity implements Serializable {
private String parentCodes; private String parentCodes;
private String remarks; private String remarks;
private String status; private String status;
private String treeLeaf; private Boolean treeLeaf;
private BigDecimal treeLevel; private BigDecimal treeLevel;
private String treeNames; private String treeNames;
private BigDecimal treeSort; private BigDecimal treeSort;
@ -39,14 +40,6 @@ public class SysCompanyEntity implements Serializable {
public SysCompanyEntity() { public SysCompanyEntity() {
} }
public String getCompanyCode() {
return this.companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getAreaCode() { public String getAreaCode() {
return this.areaCode; return this.areaCode;
} }
@ -135,14 +128,6 @@ public class SysCompanyEntity implements Serializable {
this.status = status; this.status = status;
} }
public String getTreeLeaf() {
return this.treeLeaf;
}
public void setTreeLeaf(String treeLeaf) {
this.treeLeaf = treeLeaf;
}
public BigDecimal getTreeLevel() { public BigDecimal getTreeLevel() {
return this.treeLevel; return this.treeLevel;
} }
@ -199,4 +184,24 @@ public class SysCompanyEntity implements Serializable {
this.viewCode = viewCode; this.viewCode = viewCode;
} }
public Boolean getTreeLeaf() {
return treeLeaf;
}
public void setTreeLeaf(Boolean treeLeaf) {
this.treeLeaf = treeLeaf;
}
public String getId() {
return this.getCompanyCode();
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
} }

@ -31,7 +31,7 @@ public class SysOfficeEntity implements Serializable {
private String phone; private String phone;
private String remarks; private String remarks;
private String status; private String status;
private String treeLeaf; private Boolean treeLeaf;
private BigDecimal treeLevel; private BigDecimal treeLevel;
private String treeNames; private String treeNames;
private BigDecimal treeSort; private BigDecimal treeSort;
@ -172,11 +172,11 @@ public class SysOfficeEntity implements Serializable {
this.status = status; this.status = status;
} }
public String getTreeLeaf() { public Boolean getTreeLeaf() {
return this.treeLeaf; return this.treeLeaf;
} }
public void setTreeLeaf(String treeLeaf) { public void setTreeLeaf(Boolean treeLeaf) {
this.treeLeaf = treeLeaf; this.treeLeaf = treeLeaf;
} }
@ -243,5 +243,10 @@ public class SysOfficeEntity implements Serializable {
public void setZipCode(String zipCode) { public void setZipCode(String zipCode) {
this.zipCode = zipCode; this.zipCode = zipCode;
} }
// grid tree
public String getId() {
return this.getOfficeCode();
}
} }

@ -17,6 +17,10 @@ public class SysUserEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String userCode; private String userCode;
private String officeCode;
private String officeName;
private String companyCode;
private String companyName;
private String avatar; private String avatar;
private String corpCode; private String corpCode;
private String corpName; private String corpName;
@ -371,4 +375,36 @@ public class SysUserEntity implements Serializable {
this.wxOpenid = wxOpenid; this.wxOpenid = wxOpenid;
} }
public String getOfficeCode() {
return officeCode;
}
public void setOfficeCode(String officeCode) {
this.officeCode = officeCode;
}
public String getOfficeName() {
return officeName;
}
public void setOfficeName(String officeName) {
this.officeName = officeName;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
} }

@ -51,7 +51,7 @@ public class SysCompanyServiceImpl extends ServiceImpl<SysCompanyMapper, SysComp
SysCompanyEntity company = companyList.get(i); SysCompanyEntity company = companyList.get(i);
node.put("name", company.getCompanyName()); node.put("name", company.getCompanyName());
node.put("id", company.getCompanyCode()); node.put("id", company.getId());
node.put("pId", company.getParentCode()); node.put("pId", company.getParentCode());
node.put("title", company.getFullName()); node.put("title", company.getFullName());
nodes.add(node); nodes.add(node);

@ -31,7 +31,6 @@ mybatis-plus.global-config.id-type=5
mybatis-plus.global-config.field-strategy=2 mybatis-plus.global-config.field-strategy=2
mybatis-plus.global-config.db-column-underline=true mybatis-plus.global-config.db-column-underline=true
mybatis-plus.global-config.refresh-mapper=true mybatis-plus.global-config.refresh-mapper=true
mybatis-plus.global-config.key-generator=com.baomidou.mybatisplus.incrementer.H2KeyGenerator
mybatis-plus.global-config.logic-delete-value=0 mybatis-plus.global-config.logic-delete-value=0
mybatis-plus.global-config.logic-not-delete-value=1 mybatis-plus.global-config.logic-not-delete-value=1
mybatis-plus.global-config.sql-injector=com.baomidou.mybatisplus.mapper.LogicSqlInjector mybatis-plus.global-config.sql-injector=com.baomidou.mybatisplus.mapper.LogicSqlInjector

@ -4,9 +4,28 @@
<select id="listData" resultType="SysCompanyEntity"> <select id="listData" resultType="SysCompanyEntity">
SELECT SELECT
c.* c.company_code,
c.parent_code,
c.parent_codes,
c.tree_sort,
c.tree_sorts,
c.tree_leaf,
c.tree_level,
c.tree_names,
c.view_code,
c.company_name,
c.full_name,
c.area_code,
c.`status`,
c.create_by,
c.create_date,
c.update_by,
c.update_date,
c.remarks,
c.corp_code,
c.corp_name
FROM FROM
sys_company c sys_company c
<where> <where>
1 = 1 1 = 1
<choose> <choose>

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tamguo.modules.sys.dao.SysOfficeMapper"> <mapper namespace="com.tamguo.modules.sys.dao.SysOfficeMapper">
<select id="listData" resultType="SysCompanyEntity"> <select id="listData" resultType="SysOfficeEntity">
SELECT SELECT
o.* o.*
FROM FROM

@ -4,7 +4,18 @@
<select id="listData" resultType="SysPostEntity"> <select id="listData" resultType="SysPostEntity">
SELECT SELECT
p.* p.post_code,
p.post_name,
p.post_type,
p.post_sort,
p.`status`,
p.create_by,
p.create_date,
p.update_by,
p.update_date,
p.remarks,
p.corp_code,
p.corp_name
FROM FROM
sys_post p sys_post p
<where> <where>

@ -13,9 +13,23 @@
<select id="listData" resultType="SysUserEntity"> <select id="listData" resultType="SysUserEntity">
SELECT SELECT
u.* u.user_code,
u.office_code,
u.office_name,
u.company_code,
u.company_name,
u.login_code,
u.user_name,
u.ref_name,
u.email,
u.mobile,
u.phone,
u.update_date,
u.`status`
FROM FROM
sys_user u sys_user u
WHERE
1 = 1
</select> </select>
</mapper> </mapper>

File diff suppressed because one or more lines are too long

@ -93,11 +93,11 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
$('#dataGrid').dataGrid({ $('#dataGrid').dataGrid({
searchForm: $("#searchForm"), searchForm: $("#searchForm"),
columnModel: [ columnModel: [
{header:'岗位名称', name:'name', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){ {header:'岗位名称', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="'+ctx+'sys/post/detail?id='+row.id+'" class="btnList" data-title="编辑岗位">'+(val||row.id)+'</a>'; return '<a href="'+ctx+'sys/post/detail?id='+row.id+'" class="btnList" data-title="编辑岗位">'+(val||row.id)+'</a>';
}}, }},
{header:'岗位编码', name:'code', index:'a.post_code', width:200, align:"center"}, {header:'岗位编码', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'排序号', name:'sorts', index:'a.post_sort', width:80, align:"center"}, {header:'排序号', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'岗位分类', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){ {header:'岗位分类', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
if(val == "gaoguan"){ if(val == "gaoguan"){
return '高管'; return '高管';

@ -300,8 +300,8 @@ $('#dataGrid').dataGrid({
}}, }},
{header:'用户昵称', name:'userName', index:'a.user_name', width:200, align:"center"}, {header:'用户昵称', name:'userName', index:'a.user_name', width:200, align:"center"},
{header:'员工姓名', name:'refName', index:'a.ref_name', width:200, align:"center"}, {header:'员工姓名', name:'refName', index:'a.ref_name', width:200, align:"center"},
{header:'归属机构', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"}, {header:'归属机构', name:'officeName', index:'o.office_name', width:200, align:"center"},
{header:'归属公司', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"}, {header:'归属公司', name:'companyName', index:'c.company_name', width:200, align:"center"},
{header:'电子邮箱', name:'email', index:'a.email', width:200, align:"center"}, {header:'电子邮箱', name:'email', index:'a.email', width:200, align:"center"},
{header:'手机号码', name:'mobile', index:'a.mobile', width:200, align:"center"}, {header:'手机号码', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'办公电话', name:'phone', index:'a.phone', width:200, align:"center"}, {header:'办公电话', name:'phone', index:'a.phone', width:200, align:"center"},

Loading…
Cancel
Save