feat: There is no way the Laws
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -37,9 +38,7 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
standTypeList.add(SarTypeEnum.STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.INLAND_STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.FOREIGN_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.INLAND_LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.FOREIGN_LAWS.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS_STAND.getValue());
|
||||
standStateList.add("DRAFT");
|
||||
standStateList.add("ADVICE");
|
||||
standStateList.add("RADYSUBMIT");
|
||||
@@ -78,6 +77,7 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
public static List<String> numFieldListLaws = new ArrayList<>(); // 属性表数字类型字段
|
||||
public static List<SarStandAttrDetails> lawsInlandAttrFieldList = new ArrayList<>(); // 属性表数字类型字段
|
||||
public static List<SarStandAttrDetails> lawsForeignAttrFieldList = new ArrayList<>(); // 全部政策字段属性
|
||||
public static List<SarStandAttrDetails> lawsStandAttrFieldList = new ArrayList<>(); // 全部政策字段属性
|
||||
public static Map<String,String> selectFieldMapLaws = new HashMap<>(); // 下拉属性字段及选项值
|
||||
|
||||
// 企标属性字段信息
|
||||
@@ -95,7 +95,7 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
logger.info("项目启动时加载-搜索中心-查询标准属性类!");
|
||||
logger.info("项目启动时加载--查询标准属性类!");
|
||||
// 属性表需要查询的字段
|
||||
StringBuilder fieldInfoBuilder = new StringBuilder();
|
||||
StringBuilder fieldInfoBuilderLaws = new StringBuilder();
|
||||
@@ -108,7 +108,7 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
qw.orderByAsc("ORDER_NUM");
|
||||
List<SarStandAttrDetails> getDetailsList = sarStandAttrDetailsEOService.list(qw);
|
||||
if (getDetailsList != null && !getDetailsList.isEmpty()) {
|
||||
logger.info("项目启动时加载-搜索中心-查询标准属性类--查询到" + getDetailsList.size() + "条属性字段数据!");
|
||||
logger.info("项目启动时加载--查询标准属性类--查询到" + getDetailsList.size() + "条属性字段数据!");
|
||||
for (SarStandAttrDetails detailsEO : getDetailsList) {
|
||||
String sarType = detailsEO.getSarType();
|
||||
String attrType = detailsEO.getAttrType();
|
||||
@@ -137,12 +137,16 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
numFieldList.add(detailsEO.getAttrField());
|
||||
}
|
||||
} else if (lawsTypeList.contains(sarType)) {
|
||||
if (!SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
|
||||
lawsInlandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
if (!SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
|
||||
if (SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
|
||||
lawsForeignAttrFieldList.add(detailsEO);
|
||||
}
|
||||
if (SarTypeEnum.LAWS_STAND.getValue().equals(sarType)) {
|
||||
lawsStandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
|
||||
if (SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
|
||||
lawsInlandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
|
||||
fieldInfoNameBuilderLaws.append(detailsEO.getAttrName() + ",");
|
||||
queryFieldListLaws.add(detailsEO.getAttrField());
|
||||
@@ -193,9 +197,9 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
if (StringUtils.isNotBlank(queryFieldBuss)) {
|
||||
queryFieldBuss = queryFieldBuss.substring(0,queryFieldBuss.length()-1);
|
||||
}
|
||||
logger.info("项目启动时加载-搜索中心-查询标准属性类--查询到属性字段为:" + queryField);
|
||||
logger.info("项目启动时加载-搜索中心-查询政策属性类--查询到属性字段为:" + queryFieldLaws);
|
||||
logger.info("项目启动时加载-搜索中心-查询企标属性类--查询到属性字段为:" + queryFieldBuss);
|
||||
logger.info("项目启动时加载--查询标准属性类--查询到属性字段为:" + queryField);
|
||||
logger.info("项目启动时加载--查询政策属性类--查询到属性字段为:" + queryFieldLaws);
|
||||
logger.info("项目启动时加载--查询企标属性类--查询到属性字段为:" + queryFieldBuss);
|
||||
queryFieldNames = fieldInfoNameBuilder.toString();
|
||||
queryFieldNamesLaws = fieldInfoNameBuilderLaws.toString();
|
||||
queryFieldNamesBuss = fieldInfoNameBuilderBuss.toString();
|
||||
@@ -208,11 +212,11 @@ public class InitStandAttrSearchUtil implements ApplicationRunner {
|
||||
if (StringUtils.isNotBlank(queryFieldNamesBuss)) {
|
||||
queryFieldNamesBuss = queryFieldNamesBuss.substring(0,queryFieldNamesBuss.length()-1);
|
||||
}
|
||||
logger.info("项目启动时加载-搜索中心-查询标准属性类--查询到属性字段名称为:" + queryFieldNames);
|
||||
logger.info("项目启动时加载-搜索中心-查询政策属性类--查询到属性字段名称为:" + queryFieldNamesLaws);
|
||||
logger.info("项目启动时加载-搜索中心-查询企标属性类--查询到属性字段名称为:" + queryFieldNamesBuss);
|
||||
logger.info("项目启动时加载--查询标准属性类--查询到属性字段名称为:" + queryFieldNames);
|
||||
logger.info("项目启动时加载--查询政策属性类--查询到属性字段名称为:" + queryFieldNamesLaws);
|
||||
logger.info("项目启动时加载--查询企标属性类--查询到属性字段名称为:" + queryFieldNamesBuss);
|
||||
} else {
|
||||
logger.error("项目启动时加载-搜索中心-查询标准属性类--未查询到属性字段数据!");
|
||||
logger.error("项目启动时加载--查询标准属性类--未查询到属性字段数据!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ public enum SarTypeEnum {
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准法规"),FOREIGN_LAWS("FOREIGN_LAWS","国外政策"),
|
||||
STAND("STAND","国内外标准法规"),
|
||||
LAWS("LAWS","国内外政策"),
|
||||
LAWS_STAND("LAWS_STAND","国内外政策"),
|
||||
BUSINESS("BUSINESS","企业标准"),
|
||||
BUSS("BUSS","企业标准"),
|
||||
SPLIT("SPLIT","标准拆分"),
|
||||
|
||||
Reference in New Issue
Block a user