Browse Source
# Conflicts: # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.javadev_shibei_match
48 changed files with 1102 additions and 56 deletions
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Data 2021/8/19 14:06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RoleUsersFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -7732382052293191415L; |
||||
|
@NotBlank(message = "角色ID不能为空") |
||||
|
private String roleId; |
||||
|
private String customerId; |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:16 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class RoleListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -9030492894290373999L; |
||||
|
private String roleId; |
||||
|
private String description; |
||||
|
private String roleName; |
||||
|
private String roleKey; |
||||
|
private Integer staffNum; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:06 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class RoleUsersResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 7109847663910323991L; |
||||
|
private String staffId; |
||||
|
private String name; |
||||
|
private String headPhoto; |
||||
|
private String orgName; |
||||
|
private String gender; |
||||
|
private List<String> roles; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OrgDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3659371769044867016L; |
||||
|
private String orgId; |
||||
|
private String orgName; |
||||
|
private String orgType; |
||||
|
private Integer staffNum; |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:50 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ReceiverDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 7756394210796777416L; |
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String staffName; |
||||
|
/** |
||||
|
* 头像 |
||||
|
*/ |
||||
|
private String headPhoto; |
||||
|
/** |
||||
|
* 所属组织目前显示两级 |
||||
|
*/ |
||||
|
private String orgName; |
||||
|
/** |
||||
|
* 1:已读;0:未读 |
||||
|
*/ |
||||
|
private String readFlag; |
||||
|
/** |
||||
|
* 1男2女0未知 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ReceiversFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1588067365064394258L; |
||||
|
@NotBlank(message = "消息ID不能为空") |
||||
|
private String infoId; |
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 10; |
||||
|
private String readFlag; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SubOrgFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3651225675593357002L; |
||||
|
@NotBlank(message = "组织ID不能为空") |
||||
|
private String agencyId; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg.result; |
||||
|
|
||||
|
import com.epmet.dataaggre.dto.govorg.ReceiverDTO; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class ReceiversResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 255217078396991037L; |
||||
|
private Integer total; |
||||
|
private List<ReceiverDTO> dataList; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dataaggre.dto.govorg.result; |
||||
|
|
||||
|
import com.epmet.dataaggre.dto.govorg.OrgDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SubOrgResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3080780461845963616L; |
||||
|
private List<OrgDTO> subAgencyList; |
||||
|
private List<OrgDTO> departmentList; |
||||
|
private List<OrgDTO> gridList; |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.epmet.dataaggre.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dataaggre.dto.govorg.form.ReceiversFormDTO; |
||||
|
import com.epmet.dataaggre.dto.govorg.result.ReceiversResultDTO; |
||||
|
import com.epmet.dataaggre.service.epmetmessage.EpmetMessageService; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:45 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("info") |
||||
|
public class InfoController { |
||||
|
@Resource |
||||
|
private EpmetMessageService epmetMessageService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 已读未读列表 |
||||
|
* @Param formDTO |
||||
|
* @Return {@link Result<ReceiversResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:49 |
||||
|
*/ |
||||
|
@PostMapping("receivers") |
||||
|
public Result<ReceiversResultDTO> receivers(@RequestBody ReceiversFormDTO formDTO) { |
||||
|
ValidatorUtils.validateEntity(formDTO); |
||||
|
ReceiversResultDTO result = epmetMessageService.getReceiverList(formDTO); |
||||
|
return new Result<ReceiversResultDTO>().ok(result); |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dataaggre.service.epmetmessage; |
||||
|
|
||||
|
import com.epmet.dataaggre.dto.govorg.form.ReceiversFormDTO; |
||||
|
import com.epmet.dataaggre.dto.govorg.result.ReceiversResultDTO; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
public interface EpmetMessageService { |
||||
|
/** |
||||
|
* @Description 获取已读未读人员列表 |
||||
|
* @Param formDTO |
||||
|
* @Return {@link ReceiversResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:56 |
||||
|
*/ |
||||
|
ReceiversResultDTO getReceiverList(ReceiversFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dataaggre.service.epmetmessage.impl; |
||||
|
|
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
||||
|
import com.epmet.dataaggre.dto.govorg.form.ReceiversFormDTO; |
||||
|
import com.epmet.dataaggre.dto.govorg.result.ReceiversResultDTO; |
||||
|
import com.epmet.dataaggre.service.epmetmessage.EpmetMessageService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 15:23 |
||||
|
*/ |
||||
|
@Service |
||||
|
@DataSource(DataSourceConstant.EPMET_MESSAGE) |
||||
|
@Slf4j |
||||
|
public class EpmetMessageServiceImpl implements EpmetMessageService { |
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @Description 获取已读未读人员列表 |
||||
|
* @Param formDTO |
||||
|
* @Return {@link ReceiversResultDTO} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/8/19 14:56 |
||||
|
*/ |
||||
|
@Override |
||||
|
public ReceiversResultDTO getReceiverList(ReceiversFormDTO formDTO) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 从架构通用dto |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/8/19 10:00 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OrgCommonDTO implements Serializable { |
||||
|
private String orgId; |
||||
|
private String orgType; |
||||
|
} |
||||
|
|
@ -0,0 +1,68 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @Description 发送消息入参DTO |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/8/19 9:52 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SendInfoFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3668230349576949684L; |
||||
|
|
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 消息内容,不能超过100,不可为空 |
||||
|
*/ |
||||
|
@Length(min = 1, max = 1000, message = "消息内容不能为空", groups = AddUserShowGroup.class) |
||||
|
private String content; |
||||
|
/** |
||||
|
* 单独选择的人的userId集合 |
||||
|
*/ |
||||
|
private Set<String> staffIdList; |
||||
|
/** |
||||
|
* 按架构选择的,组织或者网格或者部门的集合 |
||||
|
*/ |
||||
|
private Set<OrgCommonDTO> orgList; |
||||
|
/** |
||||
|
* 按职责选择时,角色的id集合 |
||||
|
*/ |
||||
|
private Set<String> roleIdList; |
||||
|
/** |
||||
|
* 按群组选择时,群组的id集合 |
||||
|
*/ |
||||
|
private Set<String> groupIdList; |
||||
|
/** |
||||
|
* 附件列表 |
||||
|
*/ |
||||
|
private List<FileCommonDTO> attachmentList; |
||||
|
|
||||
|
|
||||
|
//以下参数从token中获取
|
||||
|
/** |
||||
|
* 当前用户id |
||||
|
*/ |
||||
|
@NotBlank(message = "userId不能为空",groups =AddUserInternalGroup.class) |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 当前客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
} |
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 发送消息返参DTO |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/8/19 10:20 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SendInfoResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3339252317982375852L; |
||||
|
private String infoId; |
||||
|
} |
||||
|
|
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.StrConstant; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 按架构选择了那些人? 查询入参 |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/8/19 1:37 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OrgStaffFormDTO implements Serializable { |
||||
|
private List<String> agencyIds; |
||||
|
private List<String> deptIds; |
||||
|
private List<String> gridIds; |
||||
|
private String customerId; |
||||
|
public OrgStaffFormDTO(){ |
||||
|
this.agencyIds=new ArrayList<>(); |
||||
|
this.deptIds=new ArrayList<>(); |
||||
|
this.gridIds=new ArrayList<>(); |
||||
|
this.customerId= StrConstant.EPMETY_STR; |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询角色对应的工作人员集合 去重 |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/8/19 11:19 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RoleStaffIdFormDTO implements Serializable { |
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
@NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
@NotEmpty(message = "角色id不能为空",groups = AddUserInternalGroup.class) |
||||
|
private Set<String> roleIds; |
||||
|
} |
||||
|
|
Loading…
Reference in new issue