16 changed files with 378 additions and 10 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.govorg.GovOrgService; |
||||
|
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 GovOrgService govOrgService; |
||||
|
|
||||
|
/** |
||||
|
* @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 = govOrgService.getReceiverList(formDTO); |
||||
|
return new Result<ReceiversResultDTO>().ok(result); |
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue