22 changed files with 413 additions and 12 deletions
			
			
		@ -1,8 +1,32 @@ | 
				
			|||||
package com.epmet.service; | 
					package com.epmet.service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.dto.form.StaffSinDeptFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.StaffSinGridFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.result.StaffSinDeptResultDTO; | 
				
			||||
 | 
					import com.epmet.dto.result.StaffSinGridResultDTO; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
/** | 
					/** | 
				
			||||
 * @Author zxc | 
					 * @Author zxc | 
				
			||||
 * @DateTime 2020/8/13 9:17 上午 | 
					 * @DateTime 2020/8/13 9:17 上午 | 
				
			||||
 */ | 
					 */ | 
				
			||||
public interface OpenUpService { | 
					public interface OpenUpService { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * @Description  网格工作人员  被禁用的、未激活的不显示 | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @author zxc | 
				
			||||
 | 
					     * @date 2020/8/13 9:42 上午 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    List<StaffSinGridResultDTO> staffSinGrid(StaffSinGridFormDTO formDTO); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * @Description  部门工作人员  被禁用的、未激活的不显示 | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @author zxc | 
				
			||||
 | 
					     * @date 2020/8/13 9:51 上午 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    List<StaffSinDeptResultDTO> staffSinDept( StaffSinDeptFormDTO formDTO); | 
				
			||||
 | 
					
 | 
				
			||||
} | 
					} | 
				
			||||
 | 
				
			|||||
@ -1,12 +1,68 @@ | 
				
			|||||
package com.epmet.service.impl; | 
					package com.epmet.service.impl; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			||||
 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			||||
 | 
					import com.epmet.constant.ModuleConstant; | 
				
			||||
 | 
					import com.epmet.dto.form.CommonGridIdFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.StaffSinDeptFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.StaffSinGridFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.UserIdsFormDTO; | 
				
			||||
 | 
					import com.epmet.dto.result.StaffSinDeptResultDTO; | 
				
			||||
 | 
					import com.epmet.dto.result.StaffSinGridResultDTO; | 
				
			||||
 | 
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
				
			||||
 | 
					import com.epmet.feign.GovOrgOpenFeignClient; | 
				
			||||
import com.epmet.service.OpenUpService; | 
					import com.epmet.service.OpenUpService; | 
				
			||||
 | 
					import org.bouncycastle.math.raw.Mod; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
import org.springframework.stereotype.Service; | 
					import org.springframework.stereotype.Service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
/** | 
					/** | 
				
			||||
 * @Author zxc | 
					 * @Author zxc | 
				
			||||
 * @DateTime 2020/8/13 9:18 上午 | 
					 * @DateTime 2020/8/13 9:18 上午 | 
				
			||||
 */ | 
					 */ | 
				
			||||
@Service | 
					@Service | 
				
			||||
public class OpenUpServiceImpl implements OpenUpService { | 
					public class OpenUpServiceImpl implements OpenUpService { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private EpmetUserOpenFeignClient epmetUserOpenFeignClient; | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private GovOrgOpenFeignClient govOrgOpenFeignClient; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * @Description  网格工作人员  被禁用的、未激活的不显示 | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @author zxc | 
				
			||||
 | 
					     * @date 2020/8/13 9:42 上午 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    @Override | 
				
			||||
 | 
					    public List<StaffSinGridResultDTO> staffSinGrid(StaffSinGridFormDTO formDTO) { | 
				
			||||
 | 
					        CommonGridIdFormDTO commonGridId = new CommonGridIdFormDTO(); | 
				
			||||
 | 
					        commonGridId.setGridId(formDTO.getGridId()); | 
				
			||||
 | 
					        commonGridId.setUserId(""); | 
				
			||||
 | 
					        Result<List<String>> gridStaffs = govOrgOpenFeignClient.getGridStaffs(commonGridId); | 
				
			||||
 | 
					        if (!gridStaffs.success()){ | 
				
			||||
 | 
					            throw new RenException(ModuleConstant.ERROR_GOV_ORG); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        List<String> userIds = gridStaffs.getData(); | 
				
			||||
 | 
					        UserIdsFormDTO userIdsForm = new UserIdsFormDTO(); | 
				
			||||
 | 
					        userIdsForm.setUserIds(userIds); | 
				
			||||
 | 
					        Result<List<StaffSinGridResultDTO>> staffInfoList = epmetUserOpenFeignClient.getStaffInfoList(userIdsForm); | 
				
			||||
 | 
					        if (!staffInfoList.success()){ | 
				
			||||
 | 
					            throw new RenException(ModuleConstant.ERROR_EPMET_USER); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return staffInfoList.getData(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * @Description  部门工作人员  被禁用的、未激活的不显示 | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @author zxc | 
				
			||||
 | 
					     * @date 2020/8/13 9:51 上午 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    @Override | 
				
			||||
 | 
					    public List<StaffSinDeptResultDTO> staffSinDept(StaffSinDeptFormDTO formDTO) { | 
				
			||||
 | 
					        return null; | 
				
			||||
 | 
					    } | 
				
			||||
} | 
					} | 
				
			||||
 | 
				
			|||||
@ -0,0 +1,20 @@ | 
				
			|||||
 | 
					package com.epmet.dto.form; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Author zxc | 
				
			||||
 | 
					 * @DateTime 2020/8/13 10:37 上午 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class DepartmentIdFormDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = -1718433407335647411L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 部门Id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String departmentId; | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,20 @@ | 
				
			|||||
 | 
					package com.epmet.dto.form; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Author zxc | 
				
			||||
 | 
					 * @DateTime 2020/8/13 10:35 上午 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class GridIdFormDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = -1062540828459359881L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 网格Id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String gridId; | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,18 @@ | 
				
			|||||
 | 
					package com.epmet.dto.form; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Author zxc | 
				
			||||
 | 
					 * @DateTime 2020/8/13 1:36 下午 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class UserIdsFormDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = -6168528618954442905L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private List<String> userIds; | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,33 @@ | 
				
			|||||
 | 
					package com.epmet.dto.result; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.fasterxml.jackson.annotation.JsonIgnore; | 
				
			||||
 | 
					import jdk.nashorn.internal.ir.annotations.Ignore; | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Author zxc | 
				
			||||
 | 
					 * @DateTime 2020/8/13 9:30 上午 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class RoleResultDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = -432136606721817459L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 角色key | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String roleKey; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 角色名称 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String roleName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 用户id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    @JsonIgnore | 
				
			||||
 | 
					    private String userId; | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,42 @@ | 
				
			|||||
 | 
					package com.epmet.dto.result; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.io.Serializable; | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Author zxc | 
				
			||||
 | 
					 * @DateTime 2020/8/13 9:25 上午 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class StaffSinGridResultDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = -3440415466710443002L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 工作人员Id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String staffId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 工作人员名称 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String staffName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 头像 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String headPhoto; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 性别,1男2女0未知 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private Integer gender; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 角色列表 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private List<RoleResultDTO> roleList; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
					Loading…
					
					
				
		Reference in new issue