forked from rongchao/epmet-cloud-rizhao
14 changed files with 415 additions and 5 deletions
@ -0,0 +1,110 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 人员类别分析 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FactIcuserCategoryAnalysisDailyDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键(人员类别分析表) |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 预警配置ID |
||||
|
*/ |
||||
|
private String configId; |
||||
|
|
||||
|
/** |
||||
|
* 类别列名,对个数据太麻烦了,在这个表存一下 |
||||
|
*/ |
||||
|
private String columnName; |
||||
|
|
||||
|
/** |
||||
|
* 当前数据是截止到XXX的:yyyyMMdd |
||||
|
*/ |
||||
|
private String dateId; |
||||
|
|
||||
|
/** |
||||
|
* 网格id或者组织id |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* grid或者agency |
||||
|
*/ |
||||
|
private String orgType; |
||||
|
|
||||
|
/** |
||||
|
* orgid的上级 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* orgid的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 当前类别总人数 |
||||
|
*/ |
||||
|
private Integer total; |
||||
|
|
||||
|
/** |
||||
|
* 较上月迁出 |
||||
|
*/ |
||||
|
private Integer qcIncr; |
||||
|
|
||||
|
/** |
||||
|
* 较上月迁入 |
||||
|
*/ |
||||
|
private Integer qrIncr; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser.form; |
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 人员类别分析 入参 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcUserCategoryFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2834180692632036316L; |
||||
|
|
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
@NotBlank(message = "请选择查看某个组织或网格", groups = AddUserShowGroup.class) |
||||
|
private String orgId; |
||||
|
|
||||
|
@NotBlank(message = "orgType不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String orgType; |
||||
|
|
||||
|
@NotBlank(message = "dateId不能为空", groups = AddUserInternalGroup.class) |
||||
|
@Length(min = 8, max = 8, message = "dateId格式:yyyyMMdd", groups = AddUserInternalGroup.class) |
||||
|
private String dateId; |
||||
|
|
||||
|
|
||||
|
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
|
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser.result; |
||||
|
|
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 人员类别分析-返参DTO |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcUserCategoryResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2150403803220667018L; |
||||
|
|
||||
|
/** |
||||
|
* 居民类别配置主键 |
||||
|
*/ |
||||
|
// @JsonIgnore
|
||||
|
private String configId; |
||||
|
/** |
||||
|
* 当前类别对应的列名 |
||||
|
*/ |
||||
|
private String categoryKey; |
||||
|
/** |
||||
|
* 类别名称 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
/** |
||||
|
* 类别图标 |
||||
|
*/ |
||||
|
private String dataIcon; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 当前类别下总人数 |
||||
|
*/ |
||||
|
private Integer total=0; |
||||
|
|
||||
|
/** |
||||
|
* 桥上月迁入 |
||||
|
*/ |
||||
|
private Integer immigration=0; |
||||
|
|
||||
|
/** |
||||
|
* 较上月迁出 |
||||
|
*/ |
||||
|
private Integer emigration=0; |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.dataaggre.controller; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dataaggre.dto.epmetuser.form.IcUserCategoryFormDTO; |
||||
|
import com.epmet.dataaggre.dto.epmetuser.result.IcUserCategoryResultDTO; |
||||
|
import com.epmet.dataaggre.service.epmetuser.EpmetUserService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 java.util.List; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("icuser") |
||||
|
public class IcUserController { |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetUserService epmetUserService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 【人员类别分析】-各类别人数 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("category-data") |
||||
|
public Result<List<IcUserCategoryResultDTO>> queryIcUserCategoryData(@LoginUser TokenDto tokenDto, @RequestBody IcUserCategoryFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
ValidatorUtils.validateEntity(formDTO, IcUserCategoryFormDTO.AddUserShowGroup.class, IcUserCategoryFormDTO.AddUserInternalGroup.class); |
||||
|
return new Result<List<IcUserCategoryResultDTO>>().ok(epmetUserService.queryIcUserCategoryData(formDTO)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue