61 changed files with 1151 additions and 39 deletions
			
			
		| @ -0,0 +1,51 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 角色默认的可操作功能列表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-05-21 | |||
|  */ | |||
| @Data | |||
| public class RoleOperationDefaultDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 角色KEY | |||
|      */ | |||
| 	private String roleKey; | |||
| 
 | |||
|     /** | |||
|      * 操作key | |||
|      */ | |||
| 	private String operationKey; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,33 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.dao; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.entity.RoleOperationDefaultEntity; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| 
 | |||
| /** | |||
|  * 角色默认的可操作功能列表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-05-21 | |||
|  */ | |||
| @Mapper | |||
| public interface RoleOperationDefaultDao extends BaseDao<RoleOperationDefaultEntity> { | |||
| 	 | |||
| } | |||
| @ -0,0 +1,41 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.entity; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| 
 | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| @Data | |||
| public class RoleOperationDefaultEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 角色KEY | |||
|      */ | |||
| 	private String roleKey; | |||
| 
 | |||
|     /** | |||
|      * 操作key | |||
|      */ | |||
| 	private String operationKey; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dao.RoleOperationDefaultDao"> | |||
| 
 | |||
|     <resultMap type="com.epmet.entity.RoleOperationDefaultEntity" id="roleOperationDefaultMap"> | |||
|         <result property="id" column="ID"/> | |||
|         <result property="roleKey" column="ROLE_KEY"/> | |||
|         <result property="operationKey" column="OPERATION_KEY"/> | |||
|         <result property="delFlag" column="DEL_FLAG"/> | |||
|         <result property="revision" column="REVISION"/> | |||
|         <result property="createdBy" column="CREATED_BY"/> | |||
|         <result property="createdTime" column="CREATED_TIME"/> | |||
|         <result property="updatedBy" column="UPDATED_BY"/> | |||
|         <result property="updatedTime" column="UPDATED_TIME"/> | |||
|     </resultMap> | |||
| 
 | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,90 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.dto.form; | |||
| 
 | |||
| import lombok.Data; | |||
| import org.hibernate.validator.constraints.Length; | |||
| 
 | |||
| import javax.validation.constraints.NotBlank; | |||
| import java.io.Serializable; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 添加组织-接口入参 | |||
|  * | |||
|  * @author sun | |||
|  */ | |||
| @Data | |||
| public class AddRootAgencyFormDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     //=====分组校验========
 | |||
|     public interface AddRootAgencyGroup {} | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
|     @NotBlank(message = "客户ID不能为空", groups = AddRootAgencyGroup.class) | |||
|     private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 机构组织名称 | |||
|      */ | |||
|     @NotBlank(message = "组织名称不能为空" , groups = AddRootAgencyGroup.class) | |||
|     @Length(max=50,message = "机构名称不能超过50个字" , groups = AddRootAgencyGroup.class) | |||
|     private String agencyName; | |||
| 
 | |||
|     /** | |||
|      * 机关级别(社区级:community, | |||
|      * 乡(镇、街道)级:street, | |||
|      * 区县级: district, | |||
|      * 市级: city | |||
|      * 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) | |||
|      */ | |||
|     @NotBlank(message = "机关级别不能为空" , groups = AddRootAgencyGroup.class) | |||
|     @Length(max=30,message = "机关类别不能超过30个字" , groups = AddRootAgencyGroup.class) | |||
|     private String level; | |||
| 
 | |||
|     /** | |||
|      * 地区编码 | |||
|      */ | |||
|     @NotBlank(message = "地区编码不能为空", groups = AddRootAgencyGroup.class) | |||
|     @Length(max=10,message = "地区编码不能超过10位", groups = AddRootAgencyGroup.class) | |||
|     private String areaCode; | |||
| 
 | |||
|     /** | |||
|      * 省份 | |||
|      */ | |||
|     @NotBlank(message = "省级机关名称不能为空", groups = AddRootAgencyGroup.class) | |||
|     @Length(max=30,message = "省级机关名称不能超过30个字", groups = AddRootAgencyGroup.class) | |||
|     private String province; | |||
| 
 | |||
|     /** | |||
|      * 城市 | |||
|      */ | |||
|     @Length(max=30,message = "市级机关名称不能超过30个字", groups = AddRootAgencyGroup.class) | |||
|     private String city; | |||
| 
 | |||
|     /** | |||
|      * 区县 | |||
|      */ | |||
|     @Length(max=30,message = "区县级机关名称不能超过30个字", groups = AddRootAgencyGroup.class) | |||
|     private String district; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,38 @@ | |||
| package com.epmet.dto.form; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| import javax.validation.constraints.NotBlank; | |||
| import javax.validation.constraints.NotNull; | |||
| 
 | |||
| /** | |||
|  * { | |||
|  * 	"customerId": "100824", | |||
|  * 	"realName": "XF9wxEFMfi", | |||
|  * 	"gender": "Vxa8GNrMfb", | |||
|  * 	"mobile": "54RyjPWtwh", | |||
|  * 	"agencyId": "101259" | |||
|  * } | |||
|  */ | |||
| @Data | |||
| public class CustomerManagerFormDTO { | |||
| 
 | |||
|     public interface AddManagerGroup {} | |||
| 
 | |||
|     @NotBlank(message = "客户ID不能为空", groups = { AddManagerGroup.class }) | |||
|     private String customerId; | |||
| 
 | |||
|     @NotBlank(message = "管理员名字不能为空", groups = { AddManagerGroup.class }) | |||
|     private String realName; | |||
| 
 | |||
|     @NotNull(message = "管理员性别不能为空", groups = { AddManagerGroup.class }) | |||
|     private Integer gender; | |||
| 
 | |||
|     @NotBlank(message = "管理员手机号不能为空", groups = { AddManagerGroup.class }) | |||
|     private String mobile; | |||
| 
 | |||
|     // 根据customerId查询rootAgency即可获得
 | |||
|     //@NotBlank(message = "管理员所属组织ID不能为空", groups = { AddManagerGroup.class })
 | |||
|     //private String agencyId;
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| 
 | |||
| @Data | |||
| public class CustomerDetailResultDTO { | |||
| 
 | |||
|     private RootAgencyDTO rootAgencyDTO; | |||
| 
 | |||
|     private CustomerInfoDTO customerInfoDTO; | |||
| 
 | |||
|     private List<ManagerDTO> managers = new ArrayList<>(); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,9 @@ | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| @Data | |||
| public class CustomerInfoDTO { | |||
|     private String customerName; | |||
|     private String organizationLevel; | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| @Data | |||
| public class ManagerDTO { | |||
| 
 | |||
|     private String realName; | |||
|     private String gender; | |||
|     private String mobile; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| @Data | |||
| public class RootAgencyDTO { | |||
|     private String agencyName; | |||
|     private String level; | |||
|     private String areaCode; | |||
|     private String province; | |||
|     private String city; | |||
|     private String district; | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package com.epmet.constant; | |||
| 
 | |||
| /** | |||
|  * 角色key常量 | |||
|  */ | |||
| public class RoleKeyConstants { | |||
| 
 | |||
|     public static final String ROLE_KEY_MANAGER = "manager"; | |||
|     public static final String ROLE_KEY_PARTY_PRINCIPALS = "party_principals"; | |||
|     public static final String ROLE_KEY_GRID_MANAGER = "grid_manager"; | |||
|     public static final String ROLE_KEY_AGENCY_LEADER = "agency_leader"; | |||
|     public static final String ROLE_KEY_GRID_PARTY_DIRECTOR = "grid_party_director"; | |||
|     public static final String ROLE_KEY_DEPT_LEADER = "dept_leader"; | |||
|     public static final String ROLE_KEY_STAFF = "staff"; | |||
|     public static final String ROLE_KEY_GRID_MEMBER = "grid_member"; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,8 @@ | |||
| package com.epmet.constant; | |||
| 
 | |||
| public class UserWorkType { | |||
| 
 | |||
|     public static final String FULL_TIME="fulltime"; | |||
|     public static final String PART_TIME="parttime"; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,18 @@ | |||
| package com.epmet.dto.form; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| import javax.validation.constraints.NotBlank; | |||
| 
 | |||
| @Data | |||
| public class CustomerRoleFormDTO { | |||
| 
 | |||
|     public interface GetRoleByCustomerAndKey{} | |||
| 
 | |||
|     @NotBlank(message = "客户ID不能为空", groups = { GetRoleByCustomerAndKey.class }) | |||
|     private String customerId; | |||
| 
 | |||
|     @NotBlank(message = "角色Key不能为空", groups = { GetRoleByCustomerAndKey.class }) | |||
|     private String roleKey; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,86 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.dto.result; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 政府端角色模板表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-05-21 | |||
|  */ | |||
| @Data | |||
| public class GovStaffRoleTemplateDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * ID | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 角色key | |||
|      */ | |||
| 	private String roleKey; | |||
| 
 | |||
|     /** | |||
|      * 角色名称 | |||
|      */ | |||
| 	private String roleName; | |||
| 
 | |||
|     /** | |||
|      * 角色所属体系类型:org,dept,grid | |||
|      */ | |||
| 	private String orgType; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private Integer delFlag; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private Integer revision; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private String createdBy; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private Date createdTime; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private String updatedBy; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private Date updatedTime; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,41 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.dao; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.dto.result.GovStaffRoleTemplateDTO; | |||
| import com.epmet.entity.GovStaffRoleTemplateEntity; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| 
 | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * 政府端角色模板表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-05-21 | |||
|  */ | |||
| @Mapper | |||
| public interface GovStaffRoleTemplateDao extends BaseDao<GovStaffRoleTemplateEntity> { | |||
| 
 | |||
|     /** | |||
|      * 列出有效的角色字典 | |||
|      * @return | |||
|      */ | |||
|     List<GovStaffRoleTemplateDTO> listValidateRoles(); | |||
| } | |||
| @ -0,0 +1,56 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.entity; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| 
 | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| import java.util.Date; | |||
| 
 | |||
| /** | |||
|  * 政府端角色模板表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-05-21 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("gov_staff_role_template") | |||
| public class GovStaffRoleTemplateEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 角色key | |||
|      */ | |||
| 	private String roleKey; | |||
| 
 | |||
|     /** | |||
|      * 角色名称 | |||
|      */ | |||
| 	private String roleName; | |||
| 
 | |||
|     /** | |||
|      * 角色所属体系类型:org,dept,grid | |||
|      */ | |||
| 	private String orgType; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,27 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dao.GovStaffRoleTemplateDao"> | |||
| 
 | |||
|     <resultMap type="com.epmet.entity.GovStaffRoleTemplateEntity" id="govStaffRoleTemplateMap"> | |||
|         <result property="id" column="ID"/> | |||
|         <result property="roleKey" column="ROLE_KEY"/> | |||
|         <result property="roleName" column="ROLE_NAME"/> | |||
|         <result property="orgType" column="ORG_TYPE"/> | |||
|         <result property="delFlag" column="DEL_FLAG"/> | |||
|         <result property="revision" column="REVISION"/> | |||
|         <result property="createdBy" column="CREATED_BY"/> | |||
|         <result property="createdTime" column="CREATED_TIME"/> | |||
|         <result property="updatedBy" column="UPDATED_BY"/> | |||
|         <result property="updatedTime" column="UPDATED_TIME"/> | |||
|     </resultMap> | |||
| 
 | |||
|     <!--列出有效的角色字典--> | |||
|     <select id="listValidateRoles" resultType="com.epmet.dto.result.GovStaffRoleTemplateDTO"> | |||
|         SELECT * | |||
|         FROM gov_staff_role_template | |||
|         WHERE DEL_FLAG = 0 | |||
|     </select> | |||
| 
 | |||
| 
 | |||
| </mapper> | |||
					Loading…
					
					
				
		Reference in new issue