Browse Source

Merge remote-tracking branch 'origin/dev_five_coverage' into dev_five_coverage

master
sunyuchao 3 years ago
parent
commit
a0e4c963c2
  1. 23
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/ZhzlCategorySelectDTO.java
  2. 108
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ZhzlResiCategoryEnum.java
  3. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java

23
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/ZhzlCategorySelectDTO.java

@ -0,0 +1,23 @@
package com.epmet.commons.tools.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author yzm
* @Date 2022/7/26 16:37
*/
@Data
public class ZhzlCategorySelectDTO implements Serializable {
private String label;
private String value;
private String queryType;
private String tableName;
private String columnName;
private String columnValue;
private Integer sort;
}

108
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ZhzlResiCategoryEnum.java

@ -0,0 +1,108 @@
package com.epmet.commons.tools.enums;
import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO;
import java.util.ArrayList;
import java.util.List;
public enum ZhzlResiCategoryEnum {
// resi_xfry 信访人员
// anzhibangjiao 安置帮教
// xiejiaorenyuan 邪教人员
// buliangqingshaonian 不良青少年
// shequjiaozheng 社区矫正
// zhaoshizhaohuojingshenbing 肇事肇祸精神病
// xidurenyuan 吸毒人员
resi_xfry("resi_xfry", "信访人员", "equal", "ic_resi_user", "IS_XFRY", "1", 1),
anzhibangjiao("anzhibangjiao", "安置帮教", "list_equal", "ic_special", "SPECIAL_RQLB", "anzhibangjiao", 2),
xiejiaorenyuan("xiejiaorenyuan", "邪教人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xiejiaorenyuan", 3),
buliangqingshaonian("buliangqingshaonian", "不良青少年", "list_equal", "ic_special", "SPECIAL_RQLB", "buliangqingshaonian", 4),
shequjiaozheng("shequjiaozheng", "社区矫正", "list_equal", "ic_special", "SPECIAL_RQLB", "shequjiaozheng", 5),
zhaoshizhaohuojingshenbing("zhaoshizhaohuojingshenbing", "肇事肇祸精神病", "list_equal", "ic_special", "SPECIAL_RQLB", "zhaoshizhaohuojingshenbing", 6),
xidurenyuan("xidurenyuan", "吸毒人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xidurenyuan", 7);
private String code;
private String name;
private String queryType;
private String tableName;
private String columnName;
private String columnValue;
private Integer sort;
ZhzlResiCategoryEnum(String code, String name, String queryType, String tableName, String columnName, String columnValue, Integer sort) {
this.code = code;
this.name = name;
this.queryType = queryType;
this.tableName = tableName;
this.columnName = columnName;
this.columnValue = columnValue;
this.sort = sort;
}
public static ZhzlResiCategoryEnum getEnum(String code) {
ZhzlResiCategoryEnum[] values = ZhzlResiCategoryEnum.values();
for (ZhzlResiCategoryEnum value : values) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}
/**
* 转为数据
*
* @return 枚举对象数组
*/
public static List<ZhzlCategorySelectDTO> toSelectList() {
List<ZhzlCategorySelectDTO> list = new ArrayList<>();
for (ZhzlResiCategoryEnum item : ZhzlResiCategoryEnum.values()) {
ZhzlCategorySelectDTO selectDTO = new ZhzlCategorySelectDTO();
selectDTO.setLabel(item.getName());
selectDTO.setValue(item.getCode());
selectDTO.setQueryType(item.getQueryType());
selectDTO.setTableName(item.getTableName());
selectDTO.setColumnName(item.getColumnName());
selectDTO.setColumnValue(item.getColumnValue());
selectDTO.setSort(item.getSort());
list.add(selectDTO);
}
return list;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getQueryType() {
return queryType;
}
public String getTableName() {
return tableName;
}
public String getColumnName() {
return columnName;
}
public String getColumnValue() {
return columnValue;
}
public Integer getSort() {
return sort;
}
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java

@ -1,13 +1,15 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO;
import com.epmet.commons.tools.enums.ZhzlResiCategoryEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.dto.govorg.form.CoverageAnalisisDataListFormDTO;
import com.epmet.dataaggre.dto.govorg.result.CoverageAnalisisDataListResultDTO;
import com.epmet.dataaggre.service.CoverageService;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
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;
@ -43,4 +45,13 @@ public class CoverageController {
return new Result<PageData<CoverageAnalisisDataListResultDTO>>().ok(page);
}
/**
* 综合治理图层页面居民类别下拉框
* @return
*/
@PostMapping("zhzl-category-option")
public Result<List<ZhzlCategorySelectDTO>> queryZhzlCategorySelectOptions() {
List<ZhzlCategorySelectDTO> list = ZhzlResiCategoryEnum.toSelectList();
return new Result<List<ZhzlCategorySelectDTO>>().ok(list);
}
}

Loading…
Cancel
Save