diff --git a/erp_web/js/easyui-1.3.5/themes/icon.css b/erp_web/js/easyui-1.3.5/themes/icon.css index fbe4ffe8..59e59fee 100644 --- a/erp_web/js/easyui-1.3.5/themes/icon.css +++ b/erp_web/js/easyui-1.3.5/themes/icon.css @@ -99,4 +99,7 @@ } .icon-basket_add{ background:url('icons/basket_add.png') no-repeat center center; +} +.icon-user{ + background:url('icons/user.png') no-repeat center center; } \ No newline at end of file diff --git a/erp_web/js/easyui-1.3.5/themes/icons/user.png b/erp_web/js/easyui-1.3.5/themes/icons/user.png new file mode 100644 index 00000000..79f35ccb Binary files /dev/null and b/erp_web/js/easyui-1.3.5/themes/icons/user.png differ diff --git a/erp_web/pages/manage/depot.html b/erp_web/pages/manage/depot.html index 2dc19289..baebe71b 100644 --- a/erp_web/pages/manage/depot.html +++ b/erp_web/pages/manage/depot.html @@ -80,8 +80,11 @@ 负责人 + style="width: 175px;height: 20px" readonly="readonly"/> + + + @@ -104,6 +107,9 @@ 取消 +
+
\ No newline at end of file diff --git a/erp_web/pages/manage/user_forselect.html b/erp_web/pages/manage/user_forselect.html new file mode 100644 index 00000000..3e17f540 --- /dev/null +++ b/erp_web/pages/manage/user_forselect.html @@ -0,0 +1,54 @@ + + + + 机构选择 + + + + + + + + + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/sql/华夏ERP数据库设计汇总.xlsx b/sql/华夏ERP数据库设计汇总.xlsx index ff0ead0c..c6aa38c3 100644 Binary files a/sql/华夏ERP数据库设计汇总.xlsx and b/sql/华夏ERP数据库设计汇总.xlsx differ diff --git a/src/main/java/com/jsh/erp/controller/UserController.java b/src/main/java/com/jsh/erp/controller/UserController.java index 390552fc..a79e3f86 100644 --- a/src/main/java/com/jsh/erp/controller/UserController.java +++ b/src/main/java/com/jsh/erp/controller/UserController.java @@ -1,6 +1,7 @@ package com.jsh.erp.controller; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -10,6 +11,8 @@ import com.jsh.erp.datasource.entities.DepotEx; import com.jsh.erp.datasource.entities.SerialNumberEx; import com.jsh.erp.datasource.entities.User; import com.jsh.erp.datasource.entities.UserEx; +import com.jsh.erp.datasource.vo.TreeNode; +import com.jsh.erp.datasource.vo.TreeNodeEx; import com.jsh.erp.service.user.UserService; import com.jsh.erp.utils.*; import org.slf4j.Logger; @@ -311,5 +314,18 @@ public class UserController { userService.batDeleteUser(ids); return result; } + @RequestMapping("/getOrganizationUserTree") + public JSONArray getOrganizationUserTree()throws Exception{ + JSONArray arr=new JSONArray(); + List organizationUserTree= userService.getOrganizationUserTree(); + if(organizationUserTree!=null&&organizationUserTree.size()>0){ + for(TreeNodeEx node:organizationUserTree){ + String str=JSON.toJSONString(node); + JSONObject obj=JSON.parseObject(str); + arr.add(obj) ; + } + } + return arr; + } } diff --git a/src/main/java/com/jsh/erp/datasource/mappers/UserMapperEx.java b/src/main/java/com/jsh/erp/datasource/mappers/UserMapperEx.java index 30ad71ee..a589d240 100644 --- a/src/main/java/com/jsh/erp/datasource/mappers/UserMapperEx.java +++ b/src/main/java/com/jsh/erp/datasource/mappers/UserMapperEx.java @@ -3,6 +3,8 @@ package com.jsh.erp.datasource.mappers; import com.jsh.erp.datasource.entities.User; import com.jsh.erp.datasource.entities.UserEx; import com.jsh.erp.datasource.entities.UserExample; +import com.jsh.erp.datasource.vo.TreeNode; +import com.jsh.erp.datasource.vo.TreeNodeEx; import org.apache.ibatis.annotations.Param; import java.util.Date; @@ -31,4 +33,7 @@ public interface UserMapperEx { @Param("loginame") String loginame); int batDeleteOrUpdateUser(@Param("ids") String ids[], @Param("status") byte status); + + List getNodeTree(); + List getNextNodeTree(Map parameterMap); } \ No newline at end of file diff --git a/src/main/java/com/jsh/erp/datasource/vo/NodeAttributes.java b/src/main/java/com/jsh/erp/datasource/vo/NodeAttributes.java new file mode 100644 index 00000000..6b3d4a94 --- /dev/null +++ b/src/main/java/com/jsh/erp/datasource/vo/NodeAttributes.java @@ -0,0 +1,30 @@ +package com.jsh.erp.datasource.vo; + +/** + * Description + * + * @Author: qiankunpingtai + * @Date: 2019/3/13 18:11 + */ +public class NodeAttributes { + //编号 + private String no; + //类型 + private Integer type; + + public String getNo() { + return no; + } + + public void setNo(String no) { + this.no = no; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } +} diff --git a/src/main/java/com/jsh/erp/datasource/vo/TreeNodeEx.java b/src/main/java/com/jsh/erp/datasource/vo/TreeNodeEx.java new file mode 100644 index 00000000..8c938a53 --- /dev/null +++ b/src/main/java/com/jsh/erp/datasource/vo/TreeNodeEx.java @@ -0,0 +1,96 @@ +package com.jsh.erp.datasource.vo; + +import java.util.List; + +/** + * Description + * + * @Author: qiankunpingtai + * @Date: 2019/3/13 18:10 + */ +public class TreeNodeEx { + /** + * id主键 + * */ + private Long id; + /** + * text显示的文本 + * */ + private String text; + /** + *state节点状态,'open' 或 'closed',默认:'open'。如果为'closed'的时候,将不自动展开该节点。 + * */ + private String state="open"; + /** + *iconCls 节点图标id + * */ + private String iconCls; + /** + * checked 是否被选中 + * */ + private boolean checked; + /** + *attributes 自定义属性 + * */ + private NodeAttributes attributes; + /** + * children 子节点 + * */ + private List children; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getIconCls() { + return iconCls; + } + + public void setIconCls(String iconCls) { + this.iconCls = iconCls; + } + + public boolean isChecked() { + return checked; + } + + public void setChecked(boolean checked) { + this.checked = checked; + } + + public NodeAttributes getAttributes() { + return attributes; + } + + public void setAttributes(NodeAttributes attributes) { + this.attributes = attributes; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/src/main/java/com/jsh/erp/service/user/UserService.java b/src/main/java/com/jsh/erp/service/user/UserService.java index 4464a9d3..24c53abc 100644 --- a/src/main/java/com/jsh/erp/service/user/UserService.java +++ b/src/main/java/com/jsh/erp/service/user/UserService.java @@ -10,6 +10,8 @@ import com.jsh.erp.datasource.entities.UserEx; import com.jsh.erp.datasource.entities.UserExample; import com.jsh.erp.datasource.mappers.UserMapper; import com.jsh.erp.datasource.mappers.UserMapperEx; +import com.jsh.erp.datasource.vo.TreeNode; +import com.jsh.erp.datasource.vo.TreeNodeEx; import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.service.orgaUserRel.OrgaUserRelService; import com.jsh.erp.utils.ExceptionCodeConstants; @@ -398,4 +400,7 @@ public class UserService { } } + public List getOrganizationUserTree() { + return userMapperEx.getNodeTree(); + } } diff --git a/src/main/resources/mapper_xml/UserMapperEx.xml b/src/main/resources/mapper_xml/UserMapperEx.xml index 201541c3..1a4c5f70 100644 --- a/src/main/resources/mapper_xml/UserMapperEx.xml +++ b/src/main/resources/mapper_xml/UserMapperEx.xml @@ -132,4 +132,56 @@ ) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file