Commit 744cc4b2 authored by 刘林's avatar 刘林

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

parents 36eab2c3 2b27ec2f
......@@ -107,11 +107,17 @@ public class EsBaseEnterpriseInfo {
/**
* 涉及设备类型
* 涉及设备类型code
*/
@Field(type = FieldType.Keyword)
private String equipCategory;
/**
* 涉及设备类型名称
*/
@Field(type = FieldType.Keyword)
private String equipCategoryName;
/**
* 公司的orgCode
......
......@@ -60,7 +60,7 @@ public class EsUserInfo {
/**
* 岗位名称-按照new_post显示
*/
@Field(type = FieldType.Text)
@Field(type = FieldType.Keyword)
private String postName;
/**
......@@ -136,12 +136,18 @@ public class EsUserInfo {
private String profile;
/**
* 设备类型
* 设备类型code
*/
@Field(type = FieldType.Keyword)
private String equipType;
/**
* 设备类型名称
*/
@Field(type = FieldType.Keyword)
private String equipTypeName;
/**
* 职称
*/
@Field(type = FieldType.Keyword)
......@@ -156,7 +162,7 @@ public class EsUserInfo {
/**
* 岗位子类型名称(多个逗号分割)
*/
@Field(type = FieldType.Text)
@Field(type = FieldType.Keyword)
private String subPostName;
/**
......@@ -168,7 +174,7 @@ public class EsUserInfo {
/**
* 管辖机构名称--来源企业表
*/
@Field(type = FieldType.Text)
@Field(type = FieldType.Keyword)
private String superviseOrgName;
/**
......
......@@ -380,6 +380,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String fuzzyValue = String.valueOf(v);
BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery();
queryBuilder.should(QueryBuilders.wildcardQuery("name", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("postName", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("subPostName", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("unitName", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("equipCategoryName", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("superviseOrgName", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("address", "*" + fuzzyValue + "*"));
queryBuilder.minimumShouldMatch(1);
boolMust.must(queryBuilder);
} else if (k.equals("unitCategory")) {
......@@ -588,6 +594,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
queryBuilder.should(QueryBuilders.wildcardQuery("useUnit.keyword", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("address.keyword", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("superviseOrgName.keyword", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("equipCategoryName.keyword", "*" + fuzzyValue + "*"));
queryBuilder.should(QueryBuilders.wildcardQuery("contactUser.keyword", "*" + fuzzyValue + "*"));
queryBuilder.minimumShouldMatch(1);
boolMust.must(queryBuilder);
......@@ -1874,8 +1881,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
public JSONArray queryRYLX(JSONObject params) {
JSONArray result = new JSONArray();
JSONArray type = params.containsKey("type") ? JSONObject.parseArray(JSONObject.toJSONString(params.get("type"))) : new JSONArray();
String subType = params.containsKey("subType") ? params.get("subType").toString() : "";
JSONArray unitType = params.containsKey("unitType") && !"".equals(params.get("unitType")) ? JSONObject.parseArray(JSONObject.toJSONString(params.get("unitType"))) : new JSONArray();
String newPost = params.containsKey("newPost") ? params.get("newPost").toString() : "";
List<String> typeList = new ArrayList<>(Arrays.asList(
"QYRYGW",
......@@ -1891,21 +1898,21 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
.in(DataDictionary::getType, typeList)
.list();
if (!"".equals(subType)) {
if (!"".equals(newPost)) {
List<DataDictionary> childrenrylx = dataDictionaryService.lambdaQuery()
.in(DataDictionary::getParent, subType)
.in(DataDictionary::getParent, newPost)
.like(DataDictionary::getType, "QYRYGW")
.orderByAsc(DataDictionary::getSortNum)
.list();
result = deployDictionary(childrenrylx);
}
if (!ObjectUtils.isEmpty(type) && !type.contains("all")) {
if (!ObjectUtils.isEmpty(unitType) && !unitType.contains("all")) {
try {
ArrayList<String> postDictCodeList = new ArrayList<>();
JsonNode jsonNode = new ObjectMapper().readTree(unitTypeLimitUserType.getInputStream());
type.forEach(unitType -> {
JsonNode companyTypeNode = jsonNode.get(unitType.toString());
unitType.forEach(item -> {
JsonNode companyTypeNode = jsonNode.get(item.toString());
if (companyTypeNode != null && companyTypeNode.isObject()) {
Iterator<Map.Entry<String, JsonNode>> fields = companyTypeNode.fields();
while (fields.hasNext()) {
......@@ -1923,7 +1930,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
if ("".equals(subType) && (ObjectUtils.isEmpty(type) || type.contains("all"))) {
if ("".equals(newPost) && (ObjectUtils.isEmpty(unitType) || unitType.contains("all"))) {
result = deployDictionary(allPost);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment