From 64a6da5598be071901dd97a04c98f4f4aa1e53ed Mon Sep 17 00:00:00 2001 From: tamguo Date: Tue, 24 Jul 2018 15:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/sys/model/SysCompanyEntity.java | 24 +++++++++---------- .../resources/mappers/SysCompanyMapper.xml | 14 +++++------ .../jqGrid/4.7/js/jquery.jqGrid.extend.js | 2 +- .../templates/modules/sys/company/index.html | 7 +++--- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java index 9526a73..0e42a4c 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysCompanyEntity.java @@ -17,12 +17,12 @@ import com.tamguo.modules.sys.model.enums.SysCompanyStatusEnum; public class SysCompanyEntity implements Serializable { private static final long serialVersionUID = 1L; - private String code; + private String id; private String name; private String fullName; private String type; private String remarks; - private String parentCode; + private String parentId; private Boolean isLeaf; private Integer treeLevel; private Date updateDate; @@ -78,12 +78,6 @@ public class SysCompanyEntity implements Serializable { public void setUpdateDate(Date updateDate) { this.updateDate = updateDate; } - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } public SysCompanyStatusEnum getStatus() { return status; } @@ -96,11 +90,17 @@ public class SysCompanyEntity implements Serializable { public void setParentName(String parentName) { this.parentName = parentName; } - public String getParentCode() { - return parentCode; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getParentId() { + return parentId; } - public void setParentCode(String parentCode) { - this.parentCode = parentCode; + public void setParentId(String parentId) { + this.parentId = parentId; } } \ No newline at end of file diff --git a/tamguo-oms/src/main/resources/mappers/SysCompanyMapper.xml b/tamguo-oms/src/main/resources/mappers/SysCompanyMapper.xml index 5066ef0..f4308f6 100644 --- a/tamguo-oms/src/main/resources/mappers/SysCompanyMapper.xml +++ b/tamguo-oms/src/main/resources/mappers/SysCompanyMapper.xml @@ -4,8 +4,8 @@ SELECT - c.code, - c.parent_code, + c.id, + c.parent_id, c.is_leaf, c.tree_level, c.name, @@ -44,8 +44,8 @@ cp.name as parent_name FROM sys_company c - LEFT JOIN sys_company cp on cp.code = c.parent_code + LEFT JOIN sys_company cp on cp.id = c.parent_id WHERE - c.code = #{code} + c.id = #{id} \ No newline at end of file diff --git a/tamguo-oms/src/main/resources/static/jqGrid/4.7/js/jquery.jqGrid.extend.js b/tamguo-oms/src/main/resources/static/jqGrid/4.7/js/jquery.jqGrid.extend.js index 8d131e7..3c630e2 100644 --- a/tamguo-oms/src/main/resources/static/jqGrid/4.7/js/jquery.jqGrid.extend.js +++ b/tamguo-oms/src/main/resources/static/jqGrid/4.7/js/jquery.jqGrid.extend.js @@ -22,7 +22,7 @@ }, treeReader: { level_field: "treeLevel", - parent_id_field: "parentCode", + parent_id_field: "parentId", userdata: "otherData", leaf_field: "isLeaf", expanded_field: "isOpen", diff --git a/tamguo-oms/src/main/resources/templates/modules/sys/company/index.html b/tamguo-oms/src/main/resources/templates/modules/sys/company/index.html index 24b448b..77c8269 100644 --- a/tamguo-oms/src/main/resources/templates/modules/sys/company/index.html +++ b/tamguo-oms/src/main/resources/templates/modules/sys/company/index.html @@ -86,10 +86,9 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/> $('#dataGrid').dataGrid({ searchForm: $("#searchForm"), columnModel: [ - {header:'公司名称', name:'name', index:'a.company_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){ - return '( '+row.code+' ) '+''+(val||row.code)+''; + {header:'公司名称', name:'name', index:'a.name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){ + return '( '+row.id+' ) '+''+(val||row.id)+''; }}, - {header:'公司编码', name:'code', index:'a.code',hidden : true, align:"left"}, {header:'公司全称', name:'fullName', index:'a.full_name', width:200, align:"left"}, {header:'排序号', name:'treeSort', index:'a.tree_sort', width:80, align:"center"}, {header:'归属区域', name:'area.treeNames', index:'a.areaCode', width:200, align:"center"}, @@ -100,7 +99,7 @@ $('#dataGrid').dataGrid({ }}, {header:'操作', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){ var actions = []; - actions.push(' '); + actions.push(' '); if (row.status == Global.STATUS_NORMAL){ actions.push(' '); }