();
+ ew.where("ifDel=0");
+ return toGridData(sysRolesService.selectPage(page, ew));
+ }
- /**
- * 跳转到编辑页面
- *
- * @return
- */
- @RequestMapping(value = { "/{id}/toEdit" }, method = RequestMethod.GET)
- public String toEdit(@PathVariable String id, Model model) {
- if (!StringUtils.isBlank(id) && !"0".equals(id)) {
- SysRoles role = sysRolesService.selectById(id);
- model.addAttribute("role", role);
- }
- return "/role/role_edit";
- }
-
- /**
- * 创建用户
- *
- * TODO
- *
- * @param user
- * @return
- */
- @RequestMapping(value = "/create", method = RequestMethod.POST)
- @ResponseBody
- public AjaxResult create(SysRoles role, AjaxResult ajaxResult) {
- role.setId(StrUtils.uuid());
- role.setIfdel(0);
- boolean tag = sysRolesService.insert(role);
- return handleAjaxResult(ajaxResult, tag, OperationName.CREATE);
- }
+ /**
+ * 跳转到编辑页面
+ *
+ * @return
+ */
+ @RequestMapping(value = { "/{id}/toEdit" }, method = RequestMethod.GET)
+ public String toEdit(@PathVariable String id, Model model) {
+ if (!StringUtils.isBlank(id) && !"0".equals(id)) {
+ SysRoles role = sysRolesService.selectById(id);
+ model.addAttribute("role", role);
+ }
+ return "/role/role_edit";
+ }
- /**
- * 修改信息
- */
- @RequestMapping(value = "/update", method = { RequestMethod.POST })
- @ResponseBody
- public AjaxResult update(SysRoles role, AjaxResult ajaxResult) {
- boolean tag = sysRolesService.updateById(role);
- return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE);
- }
+ /**
+ * 创建用户
+ *
+ * TODO
+ *
+ * @param user
+ * @return
+ */
+ @RequestMapping(value = "/create", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxResult create(SysRoles role, AjaxResult ajaxResult) {
+ role.setId(StrUtils.uuid());
+ role.setIfdel(0);
+ boolean tag = sysRolesService.insert(role);
+ return handleAjaxResult(ajaxResult, tag, OperationName.CREATE);
+ }
- /**
- * 删除用户
- *
- * @return
- */
- @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST })
- @ResponseBody
- public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) {
- int tag = sysRolesService.deleteLogicById(id);
- return handleAjaxResult(ajaxResult, tag, OperationName.DELETE);
- }
+ /**
+ * 修改信息
+ */
+ @RequestMapping(value = "/update", method = { RequestMethod.POST })
+ @ResponseBody
+ public AjaxResult update(SysRoles role, AjaxResult ajaxResult) {
+ boolean tag = sysRolesService.updateById(role);
+ return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE);
+ }
+
+ /**
+ * 删除用户
+ *
+ * @return
+ */
+ @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST })
+ @ResponseBody
+ public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) {
+ int tag = sysRolesService.deleteLogicById(id);
+ return handleAjaxResult(ajaxResult, tag, OperationName.DELETE);
+ }
}
diff --git a/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java b/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java
index eda1dcd..3a79415 100644
--- a/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java
+++ b/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java
@@ -71,8 +71,8 @@ public class SysUsersController extends BaseController {
public Map list(Model model) {
Page page = getPage();
EntityWrapper ew = new EntityWrapper();
- ew.where("ifDel=0");
- page = userService.selectPage(page,ew);
+ ew.where("ifDel=0");
+ page = userService.selectPage(page, ew);
return toGridData(page);
}
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.java b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.java
new file mode 100644
index 0000000..76db8d9
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.java
@@ -0,0 +1,20 @@
+package com.lyms.cm.dao.sys;
+
+import com.lyms.cm.entity.sys.SysDepartments;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+import java.io.Serializable;
+/**
+ *
+ * Mapper接口
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@Repository
+public interface SysDepartmentsMapper extends BaseMapper {
+
+ public Integer deleteLogicById(Serializable id);
+
+}
\ No newline at end of file
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.xml b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.xml
new file mode 100644
index 0000000..7715969
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysDepartmentsMapper.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID AS id, PARENT_ID AS parentId, NAME AS name, ORG_ID AS orgId, DESCRIPTION AS description, PUBLISH_ID AS publishId, IFDEL AS ifdel, MODIFIED AS modified, CREATED AS created, SHORT_CODE AS shortCode, FOREIGN_ID AS foreignId
+
+
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.java b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.java
new file mode 100644
index 0000000..e8abc00
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.java
@@ -0,0 +1,20 @@
+package com.lyms.cm.dao.sys;
+
+import com.lyms.cm.entity.sys.SysOrganizations;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+import java.io.Serializable;
+/**
+ *
+ * Mapper接口
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@Repository
+public interface SysOrganizationsMapper extends BaseMapper {
+
+ public Integer deleteLogicById(Serializable id);
+
+}
\ No newline at end of file
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.xml b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.xml
new file mode 100644
index 0000000..b70eddf
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysOrganizationsMapper.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID AS id, NAME AS name, TYPE AS type, LEVEL AS level, PROVINCE_ID AS provinceId, CITY_ID AS cityId, AREA_ID AS areaId, ADDRESS AS address, DESCRIPTION AS description, PUBLISH_ID AS publishId, IFDEL AS ifdel, MODIFIED AS modified, CREATED AS created, FOREIGN_ID AS foreignId, STREET_ID AS streetId, STATUS AS status, SHORT_CODE AS shortCode, LAT AS lat, LNG AS lng, LOGO AS logo, IMAGE AS image, GRADE_LEVEL AS gradeLevel, STAR_LEVEL AS starLevel, MOBILE AS mobile
+
+
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.java b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.java
new file mode 100644
index 0000000..9a34c7f
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.java
@@ -0,0 +1,36 @@
+package com.lyms.cm.dao.sys;
+
+import java.io.Serializable;
+/**
+ *
+ * Mapper接口
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.lyms.cm.entity.sys.SysRegions;
+
+@Repository
+public interface SysRegionsMapper extends BaseMapper {
+
+ public Integer deleteLogicById(Serializable id);
+
+ /**
+ * @Description:获取父/子级Region
+ * @param id
+ * @return
+ * 创建人:maliang
+ * 创建时间:2017年3月8日
+ * 修改人:
+ * 修改时间:
+ */
+ public List selectRegionsById(@Param("id") Serializable id);
+
+}
\ No newline at end of file
diff --git a/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.xml b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.xml
new file mode 100644
index 0000000..c949c49
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/dao/sys/SysRegionsMapper.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SYS_REGIONS
+
+
+
+ ID AS id, PARENT_ID AS parentId, NAME AS name, ENABLE AS enable, IFDEL AS ifdel, CODE AS code, MODIFIE AS modifie, CREATED AS created, FOREIGN_ID AS foreignId
+
+
+
+
+ select from as re
+
+ re.PARENT_ID=#{id}
+
+
+
+
diff --git a/center.manager/src/main/java/com/lyms/cm/entity/sys/SysDepartments.java b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysDepartments.java
new file mode 100644
index 0000000..d82a2f0
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysDepartments.java
@@ -0,0 +1,166 @@
+package com.lyms.cm.entity.sys;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+/**
+ *
+ * 部门 科室表
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@TableName("SYS_DEPARTMENTS")
+public class SysDepartments implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ @TableField(value = "ID")
+ private String id;
+ /**
+ * 上级部门,0为root
+ */
+ @TableField(value = "PARENT_ID")
+ private String parentId;
+ /**
+ *
+ */
+ @TableField(value = "NAME")
+ private String name;
+ /**
+ * 机构id
+ */
+ @TableField(value = "ORG_ID")
+ private String orgId;
+ /**
+ *
+ */
+ @TableField(value = "DESCRIPTION")
+ private String description;
+ /**
+ *
+ */
+ @TableField(value = "PUBLISH_ID")
+ private String publishId;
+ /**
+ *
+ */
+ @TableField(value = "IFDEL")
+ private Integer ifdel;
+ /**
+ *
+ */
+ @TableField(value = "MODIFIED")
+ private Date modified;
+ /**
+ *
+ */
+ @TableField(value = "CREATED")
+ private Date created;
+ /**
+ * 简码
+ */
+ @TableField(value = "SHORT_CODE")
+ private String shortCode;
+ /**
+ *
+ */
+ @TableField(value = "FOREIGN_ID")
+ private String foreignId;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgId(String orgId) {
+ this.orgId = orgId;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getPublishId() {
+ return publishId;
+ }
+
+ public void setPublishId(String publishId) {
+ this.publishId = publishId;
+ }
+
+ public Integer getIfdel() {
+ return ifdel;
+ }
+
+ public void setIfdel(Integer ifdel) {
+ this.ifdel = ifdel;
+ }
+
+ public Date getModified() {
+ return modified;
+ }
+
+ public void setModified(Date modified) {
+ this.modified = modified;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ public String getShortCode() {
+ return shortCode;
+ }
+
+ public void setShortCode(String shortCode) {
+ this.shortCode = shortCode;
+ }
+
+ public String getForeignId() {
+ return foreignId;
+ }
+
+ public void setForeignId(String foreignId) {
+ this.foreignId = foreignId;
+ }
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/entity/sys/SysOrganizations.java b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysOrganizations.java
new file mode 100644
index 0000000..8b6859b
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysOrganizations.java
@@ -0,0 +1,336 @@
+package com.lyms.cm.entity.sys;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *
+ * 机构表
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@TableName("SYS_ORGANIZATIONS")
+public class SysOrganizations implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ @TableId(value="ID")
+ private String id;
+ /**
+ * 机构名
+ */
+ @TableField(value="NAME")
+ private String name;
+ /**
+ * 1:卫生与计划生育委员会,2:妇幼保健院/站,3:妇产(科)医院,4:综合医院,5:计生站,6:卫生院,7:卫生所,8:其他
+ */
+ @TableField(value="TYPE")
+ private Integer type;
+ /**
+ * 1省,2市,3区县,4乡镇,5村,6其他
+ */
+ @TableField(value="LEVEL")
+ private Integer level;
+ /**
+ * 省ID
+ */
+ @TableField(value="PROVINCE_ID")
+ private String provinceId;
+ /**
+ * 城市ID
+ */
+ @TableField(value="CITY_ID")
+ private String cityId;
+ /**
+ * 区县ID
+ */
+ @TableField(value="AREA_ID")
+ private String areaId;
+ /**
+ * 街道地址
+ */
+ @TableField(value="ADDRESS")
+ private String address;
+ /**
+ * 简介
+ */
+ @TableField(value="DESCRIPTION")
+ private String description;
+ /**
+ * 发布人ID
+ */
+ @TableField(value="PUBLISH_ID")
+ private String publishId;
+ /**
+ * 1:有效,2:无效
+ */
+ @TableField(value="IFDEL")
+ private Integer ifdel;
+ /**
+ * 最后修改时间
+ */
+ @TableField(value="MODIFIED")
+ private Date modified;
+ /**
+ * 创建时间
+ */
+ @TableField(value="CREATED")
+ private Date created;
+ /**
+ *
+ */
+ @TableField(value="FOREIGN_ID")
+ private String foreignId;
+ /**
+ *
+ */
+ @TableField(value="STREET_ID")
+ private String streetId;
+ /**
+ * 0,"正式运行" 1,"试运行" 2,"停止运行"
+ */
+ @TableField(value="STATUS")
+ private Integer status;
+ /**
+ * 简码
+ */
+ @TableField(value="SHORT_CODE")
+ private String shortCode;
+ /**
+ * 经度
+ */
+ @TableField(value="LAT")
+ private Double lat;
+ /**
+ * '纬度
+ */
+ @TableField(value="LNG")
+ private Double lng;
+ /**
+ *
+ */
+ @TableField(value="LOGO")
+ private String logo;
+ /**
+ *
+ */
+ @TableField(value="IMAGE")
+ private String image;
+ /**
+ * 医院等级
+ */
+ @TableField(value="GRADE_LEVEL")
+ private Integer gradeLevel;
+ /**
+ * 星级
+ */
+ @TableField(value="STAR_LEVEL")
+ private Integer starLevel;
+ /**
+ * 服务热线
+ */
+ @TableField(value="MOBILE")
+ private String mobile;
+
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getType() {
+ return type;
+ }
+
+ public void setType(Integer type) {
+ this.type = type;
+ }
+
+ public Integer getLevel() {
+ return level;
+ }
+
+ public void setLevel(Integer level) {
+ this.level = level;
+ }
+
+ public String getProvinceId() {
+ return provinceId;
+ }
+
+ public void setProvinceId(String provinceId) {
+ this.provinceId = provinceId;
+ }
+
+ public String getCityId() {
+ return cityId;
+ }
+
+ public void setCityId(String cityId) {
+ this.cityId = cityId;
+ }
+
+ public String getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(String areaId) {
+ this.areaId = areaId;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getPublishId() {
+ return publishId;
+ }
+
+ public void setPublishId(String publishId) {
+ this.publishId = publishId;
+ }
+
+ public Integer getIfdel() {
+ return ifdel;
+ }
+
+ public void setIfdel(Integer ifdel) {
+ this.ifdel = ifdel;
+ }
+
+ public Date getModified() {
+ return modified;
+ }
+
+ public void setModified(Date modified) {
+ this.modified = modified;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ public String getForeignId() {
+ return foreignId;
+ }
+
+ public void setForeignId(String foreignId) {
+ this.foreignId = foreignId;
+ }
+
+ public String getStreetId() {
+ return streetId;
+ }
+
+ public void setStreetId(String streetId) {
+ this.streetId = streetId;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public String getShortCode() {
+ return shortCode;
+ }
+
+ public void setShortCode(String shortCode) {
+ this.shortCode = shortCode;
+ }
+
+ public Double getLat() {
+ return lat;
+ }
+
+ public void setLat(Double lat) {
+ this.lat = lat;
+ }
+
+ public Double getLng() {
+ return lng;
+ }
+
+ public void setLng(Double lng) {
+ this.lng = lng;
+ }
+
+ public String getLogo() {
+ return logo;
+ }
+
+ public void setLogo(String logo) {
+ this.logo = logo;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public Integer getGradeLevel() {
+ return gradeLevel;
+ }
+
+ public void setGradeLevel(Integer gradeLevel) {
+ this.gradeLevel = gradeLevel;
+ }
+
+ public Integer getStarLevel() {
+ return starLevel;
+ }
+
+ public void setStarLevel(Integer starLevel) {
+ this.starLevel = starLevel;
+ }
+
+ public String getMobile() {
+ return mobile;
+ }
+
+ public void setMobile(String mobile) {
+ this.mobile = mobile;
+ }
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/entity/sys/SysRegions.java b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysRegions.java
new file mode 100644
index 0000000..b0e4a79
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/entity/sys/SysRegions.java
@@ -0,0 +1,140 @@
+package com.lyms.cm.entity.sys;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+/**
+ *
+ * 省市区地址表
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@TableName("SYS_REGIONS")
+public class SysRegions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ @TableField(value = "ID")
+ private String id;
+ /**
+ *
+ */
+ @TableField(value = "PARENT_ID")
+ private String parentId;
+ /**
+ *
+ */
+ @TableField(value = "NAME")
+ private String name;
+ /**
+ *
+ */
+ @TableField(value = "ENABLE")
+ private Integer enable;
+ /**
+ *
+ */
+ @TableField(value = "IFDEL")
+ private Integer ifdel;
+ /**
+ *
+ */
+ @TableField(value = "CODE")
+ private String code;
+ /**
+ *
+ */
+ @TableField(value = "MODIFIE")
+ private Date modifie;
+ /**
+ *
+ */
+ @TableField(value = "CREATED")
+ private Date created;
+ /**
+ *
+ */
+ @TableField(value = "FOREIGN_ID")
+ private String foreignId;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getEnable() {
+ return enable;
+ }
+
+ public void setEnable(Integer enable) {
+ this.enable = enable;
+ }
+
+ public Integer getIfdel() {
+ return ifdel;
+ }
+
+ public void setIfdel(Integer ifdel) {
+ this.ifdel = ifdel;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public Date getModifie() {
+ return modifie;
+ }
+
+ public void setModifie(Date modifie) {
+ this.modifie = modifie;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ public String getForeignId() {
+ return foreignId;
+ }
+
+ public void setForeignId(String foreignId) {
+ this.foreignId = foreignId;
+ }
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/SysDepartmentsService.java b/center.manager/src/main/java/com/lyms/cm/service/sys/SysDepartmentsService.java
new file mode 100644
index 0000000..e437e53
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/SysDepartmentsService.java
@@ -0,0 +1,24 @@
+package com.lyms.cm.service.sys;
+
+import com.lyms.cm.entity.sys.SysDepartments;
+import com.lyms.web.service.BaseService;
+import java.io.Serializable;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+public interface SysDepartmentsService extends BaseService {
+
+ /**
+ * @Description:逻辑删除,ifDel = 1 为删除,否则为没有删除
+ * @param id 删除主键id
+ * @return 大于0修改成功,否则为失败
+ */
+ public Integer deleteLogicById(Serializable id);
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganizationsService.java b/center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganizationsService.java
new file mode 100644
index 0000000..a4b15e8
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/SysOrganizationsService.java
@@ -0,0 +1,63 @@
+package com.lyms.cm.service.sys;
+
+import java.io.Serializable;
+
+import com.lyms.cm.entity.sys.SysOrganizations;
+import com.lyms.exception.SystemException;
+import com.lyms.web.service.BaseService;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+public interface SysOrganizationsService extends BaseService {
+
+ /**
+ * @Description:逻辑删除,ifDel = 1 为删除,否则为没有删除
+ * @param id 删除主键id
+ * @return 大于0修改成功,否则为失败
+ */
+ public Integer deleteLogicById(Serializable id);
+
+ /**
+ * @Description:添加机构信息
+ * @param organizations
+ * @return
+ * @throws SystemException
+ * 创建人:maliang
+ * 创建时间:2017年3月8日
+ * 修改人:
+ * 修改时间:
+ */
+ public boolean addOrg(SysOrganizations organizations) throws SystemException;
+
+ /**
+ * 修改机构信息
+ * @Description:TODO(方法描述)
+ * @param organizations
+ * @return
+ * @throws SystemException
+ * 创建人:maliang
+ * 创建时间:2017年3月8日
+ * 修改人:
+ * 修改时间:
+ */
+ public boolean updateOrg(SysOrganizations organizations) throws SystemException;
+
+ /**
+ * @Description:根据ID删除
+ * @param id
+ * @return
+ * @throws SystemException
+ * 创建人:maliang
+ * 创建时间:2017年3月8日
+ * 修改人:
+ * 修改时间:
+ */
+ public boolean deleteById(String id) throws SystemException;
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/SysRegionsService.java b/center.manager/src/main/java/com/lyms/cm/service/sys/SysRegionsService.java
new file mode 100644
index 0000000..4935a4a
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/SysRegionsService.java
@@ -0,0 +1,39 @@
+package com.lyms.cm.service.sys;
+
+import java.io.Serializable;
+import java.util.List;
+
+import com.lyms.cm.entity.sys.SysRegions;
+import com.lyms.web.service.BaseService;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+public interface SysRegionsService extends BaseService {
+
+ public static final String NOT_PARENT_TAG = "f6c505dd-835a-43d7-b0bb-fdb9eb0b7b31";
+
+ /**
+ * @Description:逻辑删除,ifDel = 1 为删除,否则为没有删除
+ * @param id 删除主键id
+ * @return 大于0修改成功,否则为失败
+ */
+ public Integer deleteLogicById(Serializable id);
+
+ /**
+ * @Description:获取区域信息
+ * @param id id为空,获取所有一级区域,不为空,获取parentId = id 的子区域
+ * @return
+ * 创建人:maliang
+ * 创建时间:2017年3月8日
+ * 修改人:
+ * 修改时间:
+ */
+ public List selectRegions(String id);
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/SysUsersService.java b/center.manager/src/main/java/com/lyms/cm/service/sys/SysUsersService.java
index 98feba9..2610a9b 100644
--- a/center.manager/src/main/java/com/lyms/cm/service/sys/SysUsersService.java
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/SysUsersService.java
@@ -16,59 +16,59 @@ import com.lyms.web.service.BaseService;
*/
public interface SysUsersService extends BaseService {
- /**
- * 添加用户
- *
- * @param user
- * @return
- * @author maliang
- */
- public boolean addUser(SysUsers user) throws SystemException;
+ /**
+ * 添加用户
+ *
+ * @param user
+ * @return
+ * @author maliang
+ */
+ public boolean addUser(SysUsers user) throws SystemException;
- /**
- * 修改用户信息
- *
- * @param user
- * @return
- * @author maliang
- */
- public boolean updateUser(SysUsers user) throws SystemException;
+ /**
+ * 修改用户信息
+ *
+ * @param user
+ * @return
+ * @author maliang
+ */
+ public boolean updateUser(SysUsers user) throws SystemException;
- /**
- * 根据ID获取用户信息
- *
- * @param userId
- * @return
- * @author maliang
- */
- // public SysUsers getUserById(String userId) throws SystemException;
+ /**
+ * 根据ID获取用户信息
+ *
+ * @param userId
+ * @return
+ * @author maliang
+ */
+ // public SysUsers getUserById(String userId) throws SystemException;
- /**
- * 启用/停用
- *
- * 根据用户ID操作
- *
- *
- * @param userId
- * @return
- * @author maliang
- */
- public boolean enabled(String userId) throws SystemException;
+ /**
+ * 启用/停用
+ *
+ * 根据用户ID操作
+ *
+ *
+ * @param userId
+ * @return
+ * @author maliang
+ */
+ public boolean enabled(String userId) throws SystemException;
- /**
- * 删除用户信息
- *
- * @param userId
- * @return
- * @throws SystemException
- */
- public boolean delete(String userId) throws SystemException;
+ /**
+ * 删除用户信息
+ *
+ * @param userId
+ * @return
+ * @throws SystemException
+ */
+ public boolean delete(String userId) throws SystemException;
- /**
- *
@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除
- * @param id 删除主键id
- * @return 大于0修改成功,否则为失败
- */
- public Integer deleteLogicById(Serializable id);
+ /**
+ * @Description:逻辑删除,ifDel = 1 为删除,否则为没有删除
+ * @param id 删除主键id
+ * @return 大于0修改成功,否则为失败
+ */
+ public Integer deleteLogicById(Serializable id);
}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysDepartmentsServiceImpl.java b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysDepartmentsServiceImpl.java
new file mode 100644
index 0000000..53e329b
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysDepartmentsServiceImpl.java
@@ -0,0 +1,24 @@
+package com.lyms.cm.service.sys.impl;
+
+import com.lyms.cm.entity.sys.SysDepartments;
+import com.lyms.cm.dao.sys.SysDepartmentsMapper;
+import com.lyms.cm.service.sys.SysDepartmentsService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import java.io.Serializable;
+
+/**
+ *
+ * 部门 科室表 服务实现类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@Service
+public class SysDepartmentsServiceImpl extends ServiceImpl implements SysDepartmentsService {
+
+ public Integer deleteLogicById(Serializable id){
+ return baseMapper.deleteLogicById(id);
+ }
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganizationsServiceImpl.java b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganizationsServiceImpl.java
new file mode 100644
index 0000000..3f023ab
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysOrganizationsServiceImpl.java
@@ -0,0 +1,57 @@
+package com.lyms.cm.service.sys.impl;
+
+import java.io.Serializable;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.lyms.cm.dao.sys.SysOrganizationsMapper;
+import com.lyms.cm.entity.sys.SysOrganizations;
+import com.lyms.cm.service.sys.SysOrganizationsService;
+import com.lyms.exception.SystemException;
+import com.lyms.util.StrUtils;
+
+/**
+ *
+ * 机构表 服务实现类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@Service
+public class SysOrganizationsServiceImpl extends ServiceImpl
+ implements SysOrganizationsService {
+
+ public Integer deleteLogicById(Serializable id) {
+ return baseMapper.deleteLogicById(id);
+ }
+
+ @Override
+ @Transactional
+ public boolean addOrg(SysOrganizations organizations) throws SystemException {
+ if (organizations == null)
+ return false;
+ organizations.setId(StrUtils.uuid());
+ Integer tag = baseMapper.insert(organizations);
+ return tag != null && tag >= 1;
+ }
+
+ @Override
+ @Transactional
+ public boolean updateOrg(SysOrganizations organizations) throws SystemException {
+ if (organizations == null)
+ return false;
+ Integer tag = baseMapper.updateById(organizations);
+ return tag != null && tag >= 1;
+ }
+
+ @Override
+ @Transactional
+ public boolean deleteById(String id) throws SystemException {
+ Integer tag = baseMapper.deleteLogicById(id);
+ return tag != null && tag >= 1;
+ }
+
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysRegionsServiceImpl.java b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysRegionsServiceImpl.java
new file mode 100644
index 0000000..de0c0f7
--- /dev/null
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysRegionsServiceImpl.java
@@ -0,0 +1,40 @@
+package com.lyms.cm.service.sys.impl;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.lyms.cm.dao.sys.SysRegionsMapper;
+import com.lyms.cm.entity.sys.SysRegions;
+import com.lyms.cm.service.sys.SysRegionsService;
+
+/**
+ *
+ * 省市区地址表 服务实现类
+ *
+ *
+ * @author maliang
+ * @since 2017-03-08
+ */
+@Service
+public class SysRegionsServiceImpl extends ServiceImpl implements SysRegionsService {
+
+ @Autowired
+ private SysRegionsMapper regionsMapper;
+
+ public Integer deleteLogicById(Serializable id) {
+ return baseMapper.deleteLogicById(id);
+ }
+
+ @Override
+ public List selectRegions(String id) {
+ if (StringUtils.isBlank(id)) {
+ id = NOT_PARENT_TAG;
+ }
+ return regionsMapper.selectRegionsById(id);
+ }
+}
diff --git a/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysUsersServiceImpl.java b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysUsersServiceImpl.java
index ea700ab..84d04ec 100644
--- a/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysUsersServiceImpl.java
+++ b/center.manager/src/main/java/com/lyms/cm/service/sys/impl/SysUsersServiceImpl.java
@@ -71,7 +71,6 @@ public class SysUsersServiceImpl extends ServiceImpl i
}
@Override
- @Transactional
public boolean updateUser(SysUsers user) throws SystemException {
if (empty(user))
return false;
@@ -115,11 +114,11 @@ public class SysUsersServiceImpl extends ServiceImpl i
// TODO 通过sql 修改
SysUsers user = userMapper.selectById(userId);
if (user != null) {
- Integer ifDel = user.getIfdel() ;
+ Integer ifDel = user.getIfdel();
if (ifDel == null || ifDel == ValidityEnum.VALIDITY.getValidity()) {
- ifDel = ValidityEnum.UNVALIDITY.getValidity();
+ ifDel = ValidityEnum.UNVALIDITY.getValidity();
} else {
- ifDel = ValidityEnum.VALIDITY.getValidity();
+ ifDel = ValidityEnum.VALIDITY.getValidity();
}
user.setIfdel(ifDel);
Integer tag = userMapper.updateById(user);
@@ -128,9 +127,10 @@ public class SysUsersServiceImpl extends ServiceImpl i
return false;
}
- @Override
- public Integer deleteLogicById(Serializable id) {
- return baseMapper.deleteLogicById(id);
- }
+ @Override
+ @Transactional
+ public Integer deleteLogicById(Serializable id) {
+ return baseMapper.deleteLogicById(id);
+ }
}
diff --git a/center.manager/src/main/webapp/WEB-INF/views/common/base_list.html b/center.manager/src/main/webapp/WEB-INF/views/common/base_list.html
index ebb1471..ba9cefd 100644
--- a/center.manager/src/main/webapp/WEB-INF/views/common/base_list.html
+++ b/center.manager/src/main/webapp/WEB-INF/views/common/base_list.html
@@ -36,6 +36,71 @@