Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
@@ -36,6 +36,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
* AWG 接口
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/regulations/searchStandData");
|
||||
addInterceptor.excludePathPatterns("/api/regulationsTDM/standData");
|
||||
/**
|
||||
* TODO 测试流程 开放 login 接口 正式环境 关闭
|
||||
*/
|
||||
@@ -122,6 +123,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
// 重置ES
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetALLSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/manualResetALLSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetALLSearchCenterToSearch");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetAStandSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetBLawsSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetCBussStandSearchCenter");
|
||||
|
||||
@@ -138,7 +138,7 @@ stand.edit.file.path = /data/slrs/file/
|
||||
file.downloadUrl=https://srms.foton.com.cn/file/
|
||||
|
||||
#上传文件白名单-以,分隔
|
||||
upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt,pdg
|
||||
upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt,pdg,rar,zip,dot
|
||||
|
||||
# =============================================================================
|
||||
# elasticsearch 配置
|
||||
|
||||
@@ -122,7 +122,7 @@ public interface ElasticsearchService {
|
||||
* 使用索引查询所有
|
||||
*/
|
||||
|
||||
List<Map<String,Object>> searchAll(String index);
|
||||
List<Map<String,Object>> searchAll(String index,String search);
|
||||
|
||||
/**
|
||||
* 使用分词查询
|
||||
|
||||
+8
-2
@@ -284,7 +284,7 @@ public class ElasticsearchServiceImpl implements ElasticsearchService {
|
||||
* 使用索引查询所有
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> searchAll(String index) {
|
||||
public List<Map<String, Object>> searchAll(String index,String search) {
|
||||
List<Map<String, Object>> sourceList = new ArrayList<Map<String, Object>>();
|
||||
|
||||
//1、指定es集群 cluster.name 是固定的key值,my-application是ES集群的名称
|
||||
@@ -295,7 +295,13 @@ public class ElasticsearchServiceImpl implements ElasticsearchService {
|
||||
.get();
|
||||
SearchHits hits = sResponse.getHits();
|
||||
if(hits.getTotalHits().value > 0){
|
||||
SearchResponse scrollResp = search(index,qBuilder, 1,(int) hits.getTotalHits().value);
|
||||
QueryBuilder queryBuilder1 = QueryBuilders.multiMatchQuery("");
|
||||
if(StringUtils.isNotBlank(search)){
|
||||
queryBuilder1 = QueryBuilders.multiMatchQuery(search,
|
||||
"sortTitle","numberTitle","yearOrder","nameTitle","title","textContent","issue_time"
|
||||
).minimumShouldMatch("100%").field("sortTitle",1005f).field("numberTitle",1004f).field("yearOrder",1003f).field("nameTitle",1002f).field("title",1000f).field("textContent",100f).field("issue_time",10f);
|
||||
}
|
||||
SearchResponse scrollResp = search(index,queryBuilder1, 1,(int) hits.getTotalHits().value);
|
||||
for (SearchHit hit : scrollResp.getHits().getHits()) {
|
||||
sourceList.add(hit.getSourceAsMap());
|
||||
}
|
||||
|
||||
+18
-34
@@ -1209,17 +1209,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
// 记录搜索记录到数据库中
|
||||
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||
"title"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||
"textItems"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
boolSelectValue.should(QueryBuilders.wildcardQuery("title.keyword","*"+searchInfoEO.getSelectValue()+"*"));
|
||||
boolQueryBuilder.must(boolSelectValue);
|
||||
QueryBuilder multiQueryBuilder = QueryBuilders.multiMatchQuery("");
|
||||
multiQueryBuilder = QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
|
||||
"sortTitle","numberTitle","yearOrder","nameTitle","title","textContent","issue_time"
|
||||
).minimumShouldMatch("100%").field("sortTitle",1005f).field("numberTitle",1004f).field("yearOrder",1003f).field("nameTitle",1002f).field("title",1000f).field("textContent",100f).field("issue_time",10f);
|
||||
boolQueryBuilder.must(multiQueryBuilder);
|
||||
}
|
||||
//在结果中检索
|
||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword())) {
|
||||
@@ -1259,6 +1253,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
searchRequestBuilder = client.prepareSearch("fulltextserch")
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.highlighter(hiBuilder)
|
||||
.addSort("sortTitle.keyword",SortOrder.ASC)
|
||||
.addSort("issue_time_order",SortOrder.DESC)
|
||||
.setFrom((searchInfoEO.getPage()-1)*searchInfoEO.getPageSize())
|
||||
.setSize(searchInfoEO.getPageSize());
|
||||
@@ -1481,29 +1476,19 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
if(null != value || null != select){
|
||||
if (null != value && select == null) {
|
||||
boolSelectValue
|
||||
.should(QueryBuilders.wildcardQuery("sortTitle.keyword", "*" + value.toUpperCase() + "*").boost(1005f))
|
||||
.should(QueryBuilders.wildcardQuery("numberTitle.keyword", "*" + value.toUpperCase() + "*").boost(1003f))
|
||||
.should(QueryBuilders.wildcardQuery("yearOrder.keyword", "*" + value.toUpperCase() + "*").boost(1002f))
|
||||
.should(QueryBuilders.wildcardQuery("nameTitle.keyword", "*" + value.toUpperCase() + "*").boost(1001f))
|
||||
.should(QueryBuilders.wildcardQuery("title.keyword", "*" + value.toUpperCase() + "*").boost(1000f))
|
||||
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + value.toUpperCase() + "*").boost(0.0000000000000000000000000000000001f))
|
||||
.should(QueryBuilders.wildcardQuery("issue_time", "*" + value.toUpperCase() + "*"));
|
||||
// multiQueryBuilder = QueryBuilders.multiMatchQuery("*"+value+"*",
|
||||
// "title.keyword", "textContent", "issue_time").minimumShouldMatch("100%").field("title.keyword", 1000f).field("textContent.keyword", 0.0000000000000000000000000000000001f);
|
||||
//// boolQueryMust.must(multiQueryBuilder);
|
||||
// boolQueryShould.should(multiQueryBuilder);
|
||||
QueryBuilder queryBuilder1 = QueryBuilders.multiMatchQuery("");
|
||||
queryBuilder1 = QueryBuilders.multiMatchQuery(value,
|
||||
"sortTitle","numberTitle","yearOrder","nameTitle","title","textContent","issue_time"
|
||||
).minimumShouldMatch("100%").field("sortTitle",1005f).field("numberTitle",1004f).field("yearOrder",1003f).field("nameTitle",1002f).field("title",1000f).field("textContent",100f).field("issue_time",10f);
|
||||
boolQueryShould.must(queryBuilder1);
|
||||
}
|
||||
// searchInfoEO.setSelectValue(searchInfoEO.getSelectValue().replace("-","\\-"));
|
||||
if (null != select) {
|
||||
boolSelectValue
|
||||
.should(QueryBuilders.wildcardQuery("sortTitle.keyword", "*" + real.toUpperCase() + "*").boost(1005f))
|
||||
.should(QueryBuilders.wildcardQuery("numberTitle.keyword", "*" + real.toUpperCase() + "*").boost(1003f))
|
||||
.should(QueryBuilders.wildcardQuery("yearOrder.keyword", "*" + real.toUpperCase() + "*").boost(1002f))
|
||||
.should(QueryBuilders.wildcardQuery("nameTitle.keyword", "*" + real.toUpperCase() + "*").boost(1001f))
|
||||
.should(QueryBuilders.wildcardQuery("title.keyword", "*" + real.toUpperCase() + "*").boost(1000f))
|
||||
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + real.toUpperCase() + "*").boost(0.0000000000000000000000000000000001f))
|
||||
.should(QueryBuilders.wildcardQuery("issue_time", "*" + real.toUpperCase() + "*"));
|
||||
QueryBuilder queryBuilder2 = QueryBuilders.multiMatchQuery("");
|
||||
queryBuilder2 = QueryBuilders.multiMatchQuery(real,
|
||||
"sortTitle","numberTitle","yearOrder","nameTitle","title","textContent","issue_time"
|
||||
).minimumShouldMatch("100%").field("sortTitle",1005f).field("numberTitle",1004f).field("yearOrder",1003f).field("nameTitle",1002f).field("title",1000f).field("textContent",100f).field("issue_time",10f);
|
||||
boolQueryShould.must(queryBuilder2);
|
||||
// for (String se : selects) {
|
||||
// if (StringUtils.isNotBlank(se)) {
|
||||
// boolSelectValue
|
||||
@@ -1519,7 +1504,6 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// .should(QueryBuilders.wildcardQuery("issue_time", "*" + real + "*"));
|
||||
// boolQueryShould.must(boolSelectValue);
|
||||
// }
|
||||
boolQueryShould.must(boolSelectValue);
|
||||
}
|
||||
|
||||
BoolQueryBuilder queryBuilder = new BoolQueryBuilder();
|
||||
@@ -1541,7 +1525,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
//在结果中检索
|
||||
// boolQueryBuilder.must(multiQueryBuilder);
|
||||
HighlightBuilder hiBuilder=new HighlightBuilder();
|
||||
HighlightBuilder.Field highlightTitle = new HighlightBuilder.Field("title.keyword");
|
||||
HighlightBuilder.Field highlightTitle = new HighlightBuilder.Field("title");
|
||||
hiBuilder.field(highlightTitle);
|
||||
HighlightBuilder.Field highlightUser = new HighlightBuilder.Field("textContent");
|
||||
hiBuilder.field(highlightUser);
|
||||
@@ -1567,7 +1551,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
Map<String, Object> sourceAsMap = searchHit.getSourceAsMap();
|
||||
//解析高亮字段
|
||||
Map<String, HighlightField> highlightFields = searchHit.getHighlightFields();
|
||||
HighlightField field= highlightFields.get("title.keyword");
|
||||
HighlightField field= highlightFields.get("title");
|
||||
if(field!= null){
|
||||
Text[] fragments = field.fragments();
|
||||
String n_field = "";
|
||||
|
||||
+35
-4
@@ -4,6 +4,8 @@ import com.adc.da.search.entity.FullTextSearchEO;
|
||||
import com.adc.da.search.entity.StandLawsEO;
|
||||
import com.adc.da.search.service.ElasticsearchService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.util.DateUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -15,9 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
@@ -34,6 +36,9 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
client = this.transportClient;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private ElasticsearchService elasticsearchService;
|
||||
|
||||
@@ -124,6 +129,13 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
}
|
||||
|
||||
Map<String,Object> getFullTextSearchForMap(Map<String,Object> attrInfoMap){
|
||||
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_id","dic_type_code", "dic_type_name","show_index");
|
||||
Map<String, Integer> dicMap = dicInfo.stream()
|
||||
.filter(item-> ("2klxdk7fo3tvpvin70dk".equals(item.getDicId()) || "18mg1g4x0rwubcto7fdd".equals(item.getDicId()) || "08rerbsn8ucjfk13z2ci".equals(item.getDicId()) || "pnv0ik979yqogocqujwo".equals(item.getDicId())) && !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getShowIndex,(value1, value2 )->value2));
|
||||
|
||||
boolean isForeign = false;
|
||||
Map<String,Object> fullTextSearchEO = new HashMap<>();
|
||||
Map<String,String> mapItems = new TreeMap<>();
|
||||
@@ -139,7 +151,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
}
|
||||
if("stand".equals(attrInfoMap.get("type"))){
|
||||
// 标准全文
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("numbershow")+" "+attrInfoMap.get("nameshow"));
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("numbershow")+" "+attrInfoMap.getOrDefault("nameshow",""));
|
||||
|
||||
for (String key : attrInfoMap.keySet()) {
|
||||
if (null == attrInfoMap.get(key) || "".equals(attrInfoMap.get(key))){
|
||||
@@ -222,9 +234,16 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contentBuilder.append("标准文本: ").append(attrInfoMap.get("content")).append(" ");
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
if ("FOREIGN".equals(String.valueOf(attrInfoMap.get("standType")))){
|
||||
fullTextSearchEO.put("standTypeOrder","2");
|
||||
}else {
|
||||
fullTextSearchEO.put("standTypeOrder","1");
|
||||
}
|
||||
fullTextSearchEO.put("standSortOrder",esStateOrder(String.valueOf(attrInfoMap.get("standSort")),dicMap));
|
||||
fullTextSearchEO.put("yearOrder", String.valueOf(attrInfoMap.get("standYear")));
|
||||
fullTextSearchEO.put("sortTitle", String.valueOf(attrInfoMap.get("standSort")));
|
||||
fullTextSearchEO.put("numberTitle", String.valueOf(attrInfoMap.get("standNumber")));
|
||||
@@ -253,7 +272,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
attrInfoMap.put(key, "null");
|
||||
}
|
||||
}
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("lawsTypeName")+" "+attrInfoMap.get("lawsNumber")+" "+attrInfoMap.get("lawsName"));
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("lawsTypeName")+" "+attrInfoMap.getOrDefault("lawsNumber","")+" "+attrInfoMap.getOrDefault("lawsName",""));
|
||||
StringBuilder contentBuilder = new StringBuilder();
|
||||
contentBuilder.append("政策分类: ").append(attrInfoMap.get("lawsTypeName")).append(" ");
|
||||
contentBuilder.append("政策编号: ").append(attrInfoMap.get("lawsNumber")).append(" ");
|
||||
@@ -302,6 +321,8 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
contentBuilder.append("标准文本: ").append(attrInfoMap.get("content")).append(" ");
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
fullTextSearchEO.put("standTypeOrder","4");
|
||||
fullTextSearchEO.put("standSortOrder",esStateOrder(String.valueOf(attrInfoMap.get("lawsTypeName")),dicMap));
|
||||
fullTextSearchEO.put("yearOrder", String.valueOf(attrInfoMap.get("lawsYearName")));
|
||||
fullTextSearchEO.put("sortTitle", String.valueOf(attrInfoMap.get("lawsTypeName")));
|
||||
fullTextSearchEO.put("numberTitle", String.valueOf(attrInfoMap.get("lawsNumber")));
|
||||
@@ -321,7 +342,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
attrInfoMap.put(key, "null");
|
||||
}
|
||||
}
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("stand_code")+" "+attrInfoMap.get("stand_name"));
|
||||
fullTextSearchEO.put("title",attrInfoMap.get("stand_code")+" "+attrInfoMap.getOrDefault("stand_name",""));
|
||||
StringBuilder contentBuilder = new StringBuilder();
|
||||
contentBuilder.append("企标类别:").append(attrInfoMap.get("standSort")).append(" ");
|
||||
contentBuilder.append("标准年份:").append(attrInfoMap.get("standYear")).append(" ");
|
||||
@@ -360,6 +381,8 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
fullTextSearchEO.put("standTypeOrder","3");
|
||||
fullTextSearchEO.put("standSortOrder",esStateOrder(String.valueOf(attrInfoMap.get("standSort")),dicMap));
|
||||
fullTextSearchEO.put("yearOrder", String.valueOf(attrInfoMap.get("standYear")));
|
||||
fullTextSearchEO.put("sortTitle", String.valueOf(attrInfoMap.get("standSort")));
|
||||
fullTextSearchEO.put("numberTitle", String.valueOf(attrInfoMap.get("standNumber")));
|
||||
@@ -376,6 +399,14 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
return fullTextSearchEO;
|
||||
}
|
||||
|
||||
private String esStateOrder(String data, Map<String,Integer> dicMap){
|
||||
if(StringUtils.isNotBlank(data) && dicMap.get(data.toUpperCase()) != null){
|
||||
return String.valueOf(dicMap.get(data.toUpperCase()));
|
||||
}else {
|
||||
return "99999";
|
||||
}
|
||||
}
|
||||
|
||||
private String dateFormatToStr(String dateStr){
|
||||
if(dateStr == null || dateStr.equals("")){
|
||||
return "";
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.adc.da.mq;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Component
|
||||
public class CreateStandardMQService {
|
||||
@Autowired
|
||||
private AmqpTemplate rabbitTemplate;
|
||||
|
||||
/**
|
||||
* @Author yuezhihang
|
||||
* @Description 创建消息队列
|
||||
* Date 2018/8/24 13:59
|
||||
* @Param [convert, convertType]
|
||||
* @return int
|
||||
**/
|
||||
public void sendMQ(List<DSarStandardDTO> changeJJSS, List<DSarStandardDTO> changeXXYX ){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("changeJJSS",changeJJSS);
|
||||
map.put("changeXXYX",changeXXYX);
|
||||
// map.put("map",hashMap);
|
||||
//发送消息队列
|
||||
this.rabbitTemplate.convertAndSend("standard-exchange_updateText_RELEASE", "standard-key_updateText_RELEASE", map);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
@@ -201,6 +202,77 @@ public class SendQdUpdateMQService {
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
value = @Queue(value = "createMQ_Standard_updateText_RELEASE", durable = "true"),
|
||||
exchange = @Exchange(value = "standard-exchange_updateText_RELEASE", ignoreDeclarationExceptions = "true"),
|
||||
key = "standard-key_updateText_RELEASE"))
|
||||
public void createStandardMQ(Map<String, Object> bussMap, Message message, Channel channel) throws Exception {
|
||||
|
||||
//数据字典数据组装
|
||||
//数据字典数据组装
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("WBZTCLASS");
|
||||
arr.forEach(stringStringMap -> {
|
||||
map.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||
});
|
||||
|
||||
|
||||
List<DSarStandardDTO> changeJJSS= (List<DSarStandardDTO>) bussMap.get("changeJJSS");
|
||||
List<DSarStandardDTO> changeXXYX= (List<DSarStandardDTO>) bussMap.get("changeXXYX");
|
||||
|
||||
|
||||
|
||||
//写修改逻辑
|
||||
Thread.sleep(5000);
|
||||
for (DSarStandardDTO jjss : changeJJSS) {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("ID", jjss.getId());
|
||||
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||
if (null != infos && infos.size() > 0) {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(jjss.getId());
|
||||
sarStandardsInfo.setModifyTime(new Date());
|
||||
sarStandardsInfo.setTextStatus(map.get("即将实施"));
|
||||
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(jjss.getId());
|
||||
if (bussAttrInfoMap != null) {
|
||||
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
}
|
||||
try {
|
||||
|
||||
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (DSarStandardDTO jjss : changeXXYX) {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("ID", jjss.getId());
|
||||
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||
if (null != infos && infos.size() > 0) {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(jjss.getId());
|
||||
sarStandardsInfo.setModifyTime(new Date());
|
||||
sarStandardsInfo.setTextStatus(map.get("现行有效"));
|
||||
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(jjss.getId());
|
||||
if (bussAttrInfoMap != null) {
|
||||
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
}
|
||||
try {
|
||||
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.adc.da.scheduled;
|
||||
|
||||
import com.adc.da.mq.CreateStandardMQService;
|
||||
import com.adc.da.scheduled.dao.SarStandardInfoDao;
|
||||
import com.adc.da.scheduled.dao.SarStandardItemDao;
|
||||
import com.adc.da.scheduled.dao.SarStandardWarningDao;
|
||||
import com.adc.da.scheduled.entity.TermDTO;
|
||||
|
||||
import com.adc.da.slrs.ActivityDatas.entity.DataList;
|
||||
import com.adc.da.slrs.processModel.utils.TrainFormDate;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
|
||||
@@ -13,8 +15,10 @@ import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -35,6 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -73,7 +79,13 @@ public class ScheduledJob {
|
||||
@Autowired
|
||||
private IWarningDateService iWarningDateService;// 预警日期
|
||||
|
||||
// @PostConstruct //程序启动时执行一次
|
||||
@Autowired
|
||||
CreateStandardMQService createStandardMQService;
|
||||
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
// @PostConstruct //程序启动时执行一次
|
||||
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
// @Scheduled(fixedDelay = 120000)
|
||||
@@ -121,7 +133,7 @@ public class ScheduledJob {
|
||||
logger.info("========================================================================================================");
|
||||
//删除不在预警范围的标准
|
||||
int remove = sarStandardWarningDao.autoCancelWarning();
|
||||
logger.info("取消"+remove+"条预警");
|
||||
logger.info("取消" + remove + "条预警");
|
||||
|
||||
//预警期限(当前日期至3个月后)
|
||||
TermDTO term = new TermDTO();
|
||||
@@ -129,7 +141,7 @@ public class ScheduledJob {
|
||||
List<WarningDate> warningDateList = sarStandardWarningDao.getWarningDate(term);
|
||||
|
||||
ArrayList<WarningDate> data = new ArrayList<>();
|
||||
warningDateList.forEach(item->{
|
||||
warningDateList.forEach(item -> {
|
||||
|
||||
for (String s : item.getSSRQ().split(",")) {
|
||||
|
||||
@@ -157,16 +169,16 @@ public class ScheduledJob {
|
||||
//联接标准的日期子表 和分解单表 查询符合预警期限的标准和分解项
|
||||
List<EarlyWarningEO> warningList = sarStandardWarningDao.getWarningId(term);
|
||||
|
||||
warningList.forEach(item->{
|
||||
warningList.forEach(item -> {
|
||||
item.setId(UUIDUtils.randomUUID20());
|
||||
});
|
||||
//持久化至预警表 忽略标准id和标志位都一样的数据
|
||||
if (warningList.size()!=0){
|
||||
if (warningList.size() != 0) {
|
||||
//此表的STAND_ID和MARK字段以及ITEMS_ID字段需个建立唯一性约束
|
||||
int count = sarStandardWarningDao.ignoreInsert(warningList);
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("已预警"+ count+"条标准或条款!!");
|
||||
logger.info("已预警" + count + "条标准或条款!!");
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("==================================预警结束======================================");
|
||||
|
||||
@@ -174,10 +186,6 @@ public class ScheduledJob {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISarUpdLogService sarUpdLogEOService;
|
||||
|
||||
@@ -205,11 +213,11 @@ public class ScheduledJob {
|
||||
*实施日期是当前系统时间的标准文本状态变为'现行有效'
|
||||
*/
|
||||
QueryWrapper<SarStandAttrInfo> columnsAndCondition = new QueryWrapper<>();
|
||||
columnsAndCondition.select("STAND_ID").like("SSRQ",LocalDate.now());
|
||||
List<Map<String, Object>> effectiveList=sarStandAttrInfoDao.selectMaps(columnsAndCondition);
|
||||
columnsAndCondition.select("STAND_ID").like("SSRQ", LocalDate.now());
|
||||
List<Map<String, Object>> effectiveList = sarStandAttrInfoDao.selectMaps(columnsAndCondition);
|
||||
// List<ScheduledDTO> effectiveList = sarStandardInfoDao.selectWithinTerm(data, "SSRQ");
|
||||
|
||||
effectiveList.forEach(item->{
|
||||
effectiveList.forEach(item -> {
|
||||
try {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(item.get("STAND_ID").toString());
|
||||
@@ -218,8 +226,8 @@ public class ScheduledJob {
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||
// sarStandardInfoDao.updateStandardInfo(item.getStandId(),"vsaga7nwub");
|
||||
|
||||
}catch (Exception e){
|
||||
System.out.println("标准id为=="+item.get("STAND_ID").toString()+"==文本状态更新失败");
|
||||
} catch (Exception e) {
|
||||
System.out.println("标准id为==" + item.get("STAND_ID").toString() + "==文本状态更新失败");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -230,8 +238,8 @@ public class ScheduledJob {
|
||||
QueryWrapper<SarStandAttrInfo> columnForDTBJH = new QueryWrapper<>();
|
||||
|
||||
columnForDTBJH.select("DTBJH")
|
||||
.eq("VALID_FLAG","0")
|
||||
.ne("DTBJH","");
|
||||
.eq("VALID_FLAG", "0")
|
||||
.ne("DTBJH", "");
|
||||
//查询代替标准字段得到一个 被代替了的标准的id的键值对列表
|
||||
List<Map<String, Object>> replaceStandIdMaps = sarStandAttrInfoDao.selectMaps(columnForDTBJH);
|
||||
HashMap<String, Integer> replaceIdCountMap = new HashMap<>();
|
||||
@@ -242,15 +250,15 @@ public class ScheduledJob {
|
||||
* 国内外表准号格式不统一
|
||||
*/
|
||||
// Pattern pattern = Pattern.compile("^\\S*\\s\\S*[\\u2014\\u002d\\s]\\d{4}$");
|
||||
replaceStandIdMaps.forEach(item->{
|
||||
if (item!=null){
|
||||
//此标准代替的标准的标准号的数组
|
||||
String DTBJHStr = item.get("DTBJH").toString();
|
||||
replaceStandIdMaps.forEach(item -> {
|
||||
if (item != null) {
|
||||
//此标准代替的标准的标准号的数组
|
||||
String DTBJHStr = item.get("DTBJH").toString();
|
||||
|
||||
//数据格式: (GB 123-2000,GB 4233434-2021,GB 423423423-2021)
|
||||
if (!DTBJHStr.equals("")) {
|
||||
String[] DTBJHArray = DTBJHStr.split(",");
|
||||
for (String DTBJH : DTBJHArray) {
|
||||
//数据格式: (GB 123-2000,GB 4233434-2021,GB 423423423-2021)
|
||||
if (!DTBJHStr.equals("")) {
|
||||
String[] DTBJHArray = DTBJHStr.split(",");
|
||||
for (String DTBJH : DTBJHArray) {
|
||||
|
||||
// if (!pattern.matcher(DTBJH).matches()){
|
||||
// continue;
|
||||
@@ -268,45 +276,43 @@ public class ScheduledJob {
|
||||
// .eq("STAND_YEAR", year);
|
||||
|
||||
|
||||
List<String> standId = sarStandardsInfoDao.selectIdFormDTBZH(DTBJH);
|
||||
if (standId.size() > 0) {
|
||||
boolean b = replaceIdCountMap.containsKey(standId.get(0));
|
||||
//如果代替标准id已存在则映射为2不存在则添加并映射为1
|
||||
if (b) {
|
||||
replaceIdCountMap.replace(standId.get(0), 2);
|
||||
} else {
|
||||
replaceIdCountMap.put(standId.get(0), 1);
|
||||
}
|
||||
List<String> standId = sarStandardsInfoDao.selectIdFormDTBZH(DTBJH);
|
||||
if (standId.size() > 0) {
|
||||
boolean b = replaceIdCountMap.containsKey(standId.get(0));
|
||||
//如果代替标准id已存在则映射为2不存在则添加并映射为1
|
||||
if (b) {
|
||||
replaceIdCountMap.replace(standId.get(0), 2);
|
||||
} else {
|
||||
replaceIdCountMap.put(standId.get(0), 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//一个被代替标准号时,文本状态更新为废止状态,两个及以上时更新为被代替状态
|
||||
for (String key : replaceIdCountMap.keySet()) {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
String reasonMsg="";
|
||||
switch (replaceIdCountMap.get(key)){
|
||||
case 1 :
|
||||
String reasonMsg = "";
|
||||
switch (replaceIdCountMap.get(key)) {
|
||||
case 1:
|
||||
//废止状态
|
||||
sarStandardsInfo.setTextStatus("chblaarg77");
|
||||
sarStandardsInfo.setId(key);
|
||||
reasonMsg="该标准被一个标准代替";
|
||||
reasonMsg = "该标准被一个标准代替";
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
//被代替状态
|
||||
sarStandardsInfo.setTextStatus("qke0ckro2p");
|
||||
sarStandardsInfo.setId(key);
|
||||
reasonMsg="该标准被一个以上标准代替";
|
||||
reasonMsg = "该标准被一个以上标准代替";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -321,11 +327,11 @@ public class ScheduledJob {
|
||||
sarStandardsInfo.setStandNumber(beforeSarStandardsInfoEO.getStandNumber());
|
||||
sarStandardsInfo.setStandYear(beforeSarStandardsInfoEO.getStandYear());
|
||||
sarStandardsInfo.setStandName(beforeSarStandardsInfoEO.getStandName());
|
||||
saveUpdateLog(sarStandardsInfo,beforeSarStandardsInfoEO,reasonMsg);
|
||||
saveUpdateLog(sarStandardsInfo, beforeSarStandardsInfoEO, reasonMsg);
|
||||
//更新日志
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||
}catch (Exception e){
|
||||
System.out.println("代替标准状态更新:id为"+key+"文本状态更新失败");
|
||||
} catch (Exception e) {
|
||||
System.out.println("代替标准状态更新:id为" + key + "文本状态更新失败");
|
||||
}
|
||||
}
|
||||
logger.info("==================================更新文本状态结束======================================");
|
||||
@@ -334,22 +340,134 @@ public class ScheduledJob {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void saveUpdateLog(SarStandardsInfo sarStandardsInfoEO, SarStandardsInfo beforeSarStandardsInfo,String reasonMsg) throws Exception {
|
||||
public void saveUpdateLog(SarStandardsInfo sarStandardsInfoEO, SarStandardsInfo beforeSarStandardsInfo, String reasonMsg) throws Exception {
|
||||
Map<String, Object> newMap = new HashMap<>();
|
||||
Map<String, Object> oldMap = new HashMap<>();
|
||||
String attrStr = sarStandardsInfoEO.getSarStandAttrEOStr();
|
||||
if (StringUtils.isNotBlank(attrStr)) {
|
||||
newMap = JSONObject.fromObject(attrStr);
|
||||
}
|
||||
newMap.put("textStatus",sarStandardsInfoEO.getTextStatus());
|
||||
oldMap.put("textStatus",beforeSarStandardsInfo.getTextStatus());
|
||||
newMap.put("textStatus", sarStandardsInfoEO.getTextStatus());
|
||||
oldMap.put("textStatus", beforeSarStandardsInfo.getTextStatus());
|
||||
// 增加关联事件
|
||||
String number = sarStandardsInfoEO.getStandSort() + " " + sarStandardsInfoEO.getStandNumber();
|
||||
if (StringUtils.isNotBlank(sarStandardsInfoEO.getStandYear())) {
|
||||
number += "-" + sarStandardsInfoEO.getStandYear();
|
||||
}
|
||||
String content ="==定时任务执行修改==:" + number + " 《" + sarStandardsInfoEO.getStandName() + "》"+reasonMsg;
|
||||
String content = "==定时任务执行修改==:" + number + " 《" + sarStandardsInfoEO.getStandName() + "》" + reasonMsg;
|
||||
sarUpdLogEOService.createUpdateLog(sarStandardsInfoEO.getStandType() + "_STAND", sarStandardsInfoEO.getId(), oldMap, newMap, content);
|
||||
}
|
||||
|
||||
|
||||
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
// @Scheduled(cron = "*/30 * * * * ?")
|
||||
@Async
|
||||
public void TextStatusUpdateStandard() {
|
||||
Logger logger = LoggerFactory.getLogger(ScheduledJob.class);
|
||||
logger.info("=======================================开始更新文本状态======================================");
|
||||
//第一步 查询满足条件的数据 第一步只能查询 需要的标准id和日期
|
||||
//查询出两组数据
|
||||
Map<String, String> map = new HashMap<>();
|
||||
List<String> types = new ArrayList<>();
|
||||
types.add("WBZTCLASS");
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCodeByType(types);
|
||||
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("WBZTCLASS");
|
||||
arr.forEach(stringStringMap -> {
|
||||
stringStringMap.keySet().forEach(s -> {
|
||||
map.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||
});
|
||||
});
|
||||
//只针对国内标准 INLAND
|
||||
|
||||
// 查询国标 实施日期 晚于现在
|
||||
// 标准状态属于发布
|
||||
// 标准状态改为即将实施
|
||||
List<DSarStandardDTO> changeJJSS = new ArrayList<>();
|
||||
List<String> strings = new ArrayList<>();
|
||||
strings.add(map.get("发布"));
|
||||
List<DSarStandardDTO> sarStandardsInfos = sarStandardsInfoDao.dealWithDS("INLAND", strings);
|
||||
//判定时间
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (null != sarStandardsInfos && sarStandardsInfos.size() > 0) {
|
||||
for (DSarStandardDTO s : sarStandardsInfos) {
|
||||
if (null != s.getSSRQ()) {
|
||||
if (s.getSSRQ().contains(",")) {
|
||||
//多个日期拆分 一个满足就都满足
|
||||
if (findFirstTime(s.getSSRQ()).compareTo(new Date()) >= 0 && !changeJJSS.contains(s)) {
|
||||
changeJJSS.add(s);
|
||||
}
|
||||
} else {
|
||||
Date date = null;
|
||||
try {
|
||||
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s.getSSRQ(), "yyyy-MM-dd"));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.info("时间为:" + date);
|
||||
//与现在时间进行比较
|
||||
if (date.compareTo(new Date()) >= 0 && !changeJJSS.contains(s)) {
|
||||
changeJJSS.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 标桩状态 属于即将实施 或 发布
|
||||
// 实施日期 在今天之前
|
||||
// 标准状态 改为现行有效
|
||||
List<DSarStandardDTO> changeXXYX = new ArrayList<>();
|
||||
List<String> strings2 = new ArrayList<>();
|
||||
strings2.add(map.get("即将实施"));
|
||||
strings2.add(map.get("发布"));
|
||||
List<DSarStandardDTO> sarStandardsInfos1 = sarStandardsInfoDao.dealWithDS("INLAND", strings2);
|
||||
if (null != sarStandardsInfos1 && sarStandardsInfos1.size() > 0) {
|
||||
for (DSarStandardDTO s : sarStandardsInfos1) {
|
||||
if (null != s.getSSRQ()) {
|
||||
if (s.getSSRQ().contains(",")) {
|
||||
//多个日期拆分 一个满足就都满足
|
||||
if (findFirstTime(s.getSSRQ()).compareTo(new Date()) < 0 && !changeXXYX.contains(s)) {
|
||||
changeXXYX.add(s);
|
||||
}
|
||||
} else {
|
||||
Date date = null;
|
||||
try {
|
||||
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s.getSSRQ(), "yyyy-MM-dd"));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.info("时间为:" + date);
|
||||
//与现在时间进行比较
|
||||
if (date.compareTo(new Date()) < 0 && !changeXXYX.contains(s)) {
|
||||
changeXXYX.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("改为即将实施的有" + changeJJSS.size() + "条");
|
||||
logger.info("改为现行有效的有" + changeXXYX.size() + "条");
|
||||
logger.info("=============================");
|
||||
createStandardMQService.sendMQ(changeJJSS,changeXXYX);
|
||||
}
|
||||
}
|
||||
|
||||
private Date findFirstTime(String ssrq) {
|
||||
String[] as = ssrq.split(",");
|
||||
List<Date> dates = new ArrayList<>();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
for (String s : as) {
|
||||
Date date = null;
|
||||
try {
|
||||
date = dateFormat.parse(TrainFormDate.dealWithTimeZoneyyyy(s, "yyyy-MM-dd"));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
dates.add(date);
|
||||
}
|
||||
dates.sort(Comparator.comparing(date -> date));
|
||||
return dates.get(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
package com.adc.da.scheduledState.server;
|
||||
|
||||
import com.adc.da.mq.CreateStandMQService;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.scheduledState.utils.Util;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年01月25日 3:34
|
||||
*/
|
||||
@EnableScheduling
|
||||
@Component
|
||||
@Slf4j
|
||||
public class UpdateStateBussSync {
|
||||
Logger logger = LoggerFactory.getLogger(UpdateStateBussSync.class);
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private SarStandItemsDao standItemsDao;
|
||||
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarBussionessStandDao;
|
||||
|
||||
@Autowired
|
||||
private ISarBussionessStandService iSarBussionessStandService;
|
||||
|
||||
@Autowired
|
||||
private ISarBussStandAttrInfoService sarBussStandAttrInfoService;
|
||||
|
||||
@Autowired
|
||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||
|
||||
/**
|
||||
* 根据配置文件设置是否开启定时器
|
||||
*/
|
||||
|
||||
@Value("${isNotScheduled}")
|
||||
private boolean isNotScheduled; //是否开启定时器
|
||||
|
||||
|
||||
// 每天0点1分执行 企标标准文本状态 即将实施和现行有效状态自动变更逻辑
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="*/60 * * * * ?")
|
||||
// @Scheduled(cron = "0 1 0 * * ?")
|
||||
@Async
|
||||
public void BussScheduled(){
|
||||
if(isNotScheduled){
|
||||
try{
|
||||
Thread.sleep(2000);
|
||||
logger.info("每天0点1分执行 企标标准文本状态 即将实施和现行有效状态自动变更逻辑:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
|
||||
// 发布、即将实施
|
||||
List<String> list = new ArrayList<>();
|
||||
// 发布
|
||||
list.add("6jnqba2mby");
|
||||
// 即将实施
|
||||
list.add("rpvoxsvr60");
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("A.VALID_FLAG","0");
|
||||
wrapper.in("A.TEXT_STATUS_BUSS",list);
|
||||
List<SarBussionessStand> getStateScheduledList = sarBussionessStandDao.getStateScheduledList(wrapper);
|
||||
if(!getStateScheduledList.isEmpty()){
|
||||
// N个实施日期中大于当前日期
|
||||
List<SarBussionessStand> getStateScheduledListToIsAfter = getStateScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getPutTime())){
|
||||
List<String> dateList = Arrays.stream(info.getPutTime().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
List<String> dateIsAfterList = dateList.stream().filter(s -> {
|
||||
if(Util.isValidDate(s)){
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDateTime parse = LocalDate.parse(s, dateTimeFormatter).atStartOfDay();
|
||||
// 实施日期是否大于当前日期
|
||||
return parse.isAfter(now);
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return !dateIsAfterList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
// N个实施日期中小于当前时间
|
||||
List<SarBussionessStand> getStateScheduledListToIsBefore = getStateScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getPutTime())){
|
||||
List<String> dateList = Arrays.stream(info.getPutTime().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
List<String> dateIsBeforeList = dateList.stream().filter(s -> {
|
||||
if(Util.isValidDate(s)){
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDateTime parse = LocalDate.parse(s, dateTimeFormatter).atStartOfDay();
|
||||
// 实施日期是否小于当前时间
|
||||
return parse.isBefore(now);
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return !dateIsBeforeList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// N个实施日期中大于当前日期 执行逻辑 更为即将实施
|
||||
if(!getStateScheduledListToIsAfter.isEmpty()){
|
||||
execStandDate(getStateScheduledListToIsAfter,"rpvoxsvr60");
|
||||
}
|
||||
|
||||
// N个实施日期中小于当前时间 执行逻辑 更为现行有效
|
||||
if(!getStateScheduledListToIsBefore.isEmpty()){
|
||||
execStandDate(getStateScheduledListToIsBefore,"9z741h2m3j");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
logger.info("每天0点1分执行 企标标准文本状态 即将实施和现行有效状态自动变更逻辑:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 每天0点1分执行 企标标准文本状态被代替逻辑 自动变更作废状态
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="*/60 * * * * ?")
|
||||
// @Scheduled(cron = "0 1 0 * * ?")
|
||||
@Async
|
||||
public void BussScheduledToAbolish(){
|
||||
if(isNotScheduled){
|
||||
try{
|
||||
Thread.sleep(2000);
|
||||
logger.info("每天0点1分执行 企标标准文本状态被代替逻辑 自动变更作废状态:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
|
||||
// 现行有效、即将实施
|
||||
List<String> list = new ArrayList<>();
|
||||
// 现行有效
|
||||
list.add("9z741h2m3j");
|
||||
// 即将实施
|
||||
list.add("rpvoxsvr60");
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("A.VALID_FLAG","0");
|
||||
wrapper.in("A.TEXT_STATUS_BUSS",list);
|
||||
List<SarBussionessStand> getStateScheduledList = sarBussionessStandDao.getStateScheduledList(wrapper);
|
||||
if(!getStateScheduledList.isEmpty()){
|
||||
|
||||
// 需要更新为作废状态的集合
|
||||
List<SarBussionessStand> invalidList = getStateScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getBDTQBBHBUSS())){
|
||||
List<String> bdtList = Arrays.stream(info.getBDTQBBHBUSS().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
// 现行有效、作废
|
||||
List<String> bdtStateList = new ArrayList<>();
|
||||
// 现行有效
|
||||
bdtStateList.add("9z741h2m3j");
|
||||
// 作废
|
||||
bdtStateList.add("3lqnlgmgcn");
|
||||
QueryWrapper wrapperBdt = new QueryWrapper();
|
||||
wrapperBdt.eq("VALID_FLAG","0");
|
||||
wrapperBdt.in("STAND_CODE",bdtList);
|
||||
wrapperBdt.in("TEXT_STATUS_BUSS",bdtStateList);
|
||||
List<SarBussionessStand> queryBDTBussList = sarBussionessStandDao.selectList(wrapperBdt);
|
||||
// 所有的被代替标准号中的有效标准中有一个标准标准状态是现行有效、作废
|
||||
return !queryBDTBussList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
// 作废状态的集合 执行逻辑 更为作废
|
||||
if(!invalidList.isEmpty()){
|
||||
execStandDate(invalidList,"3lqnlgmgcn");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
logger.info("每天0点1分执行 企标标准文本状态被代替逻辑 自动变更作废状态:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Async
|
||||
public void execStandDate(List<SarBussionessStand> infoList, String textStatusStand) throws Exception {
|
||||
List<SarBussionessStand> list = new ArrayList<>();
|
||||
for (SarBussionessStand info : infoList) {
|
||||
info.setTextStatusBuss(textStatusStand);
|
||||
bussAttrInfoShowSearchDetails(info);
|
||||
if (info.getAttrInfoMap() != null) {
|
||||
info.setSarStandAttrEOStr(JSONObject.toJSONString(info.getAttrInfoMap()));
|
||||
}
|
||||
createStandMQService.sendBussStandMQ(info,"update");
|
||||
|
||||
// 只批量更新文本字段
|
||||
SarBussionessStand newInfo = new SarBussionessStand();
|
||||
newInfo.setTextStatusBuss(textStatusStand);
|
||||
newInfo.setId(info.getId());
|
||||
newInfo.setModifyTime(new Date());
|
||||
list.add(newInfo);
|
||||
}
|
||||
|
||||
if(!list.isEmpty()){
|
||||
iSarBussionessStandService.updateBatchById(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取属性字段
|
||||
* @param row
|
||||
*/
|
||||
|
||||
public void bussAttrInfoShowSearchDetails(SarBussionessStand row) throws Exception {
|
||||
if (row != null) {
|
||||
bussAttrInfoSearchDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoCaseMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey().toUpperCase();
|
||||
String value = "";
|
||||
List<String> valArr = new ArrayList<>();
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotBlank(entry.getValue().toString())){
|
||||
Object json= new JSONTokener(entry.getValue().toString()).nextValue();
|
||||
if(json instanceof org.json.JSONArray){
|
||||
valArr = com.alibaba.fastjson.JSONObject.parseArray(entry.getValue().toString(),String.class);
|
||||
}else {
|
||||
value = entry.getValue().toString();
|
||||
valArr = Arrays.asList(value.split(","));
|
||||
}
|
||||
if(!valArr.isEmpty()){
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void bussAttrInfoSearchDetails(SarBussionessStand row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
package com.adc.da.scheduledState.server;
|
||||
|
||||
import com.adc.da.mq.CreateStandMQService;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.scheduledState.utils.Util;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarStandItems.dao.SarStandItemsDao;
|
||||
import com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年01月25日 3:34
|
||||
*/
|
||||
@EnableScheduling
|
||||
@Component
|
||||
@Slf4j
|
||||
public class UpdateStateStandSync {
|
||||
Logger logger = LoggerFactory.getLogger(UpdateStateStandSync.class);
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private SarStandItemsDao standItemsDao;
|
||||
|
||||
@Autowired
|
||||
private CreateStandMQService createStandMQService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SarStandAttrInfoDao sarStandAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private SarStandardsInfoDao sarStandardsInfoDao;
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService iSarStandardsInfoService;
|
||||
|
||||
@Autowired
|
||||
private ISarStandAttrInfoService sarStandAttrInfoEOService;
|
||||
|
||||
/**
|
||||
* 根据配置文件设置是否开启定时器
|
||||
*/
|
||||
|
||||
@Value("${isNotScheduled}")
|
||||
private boolean isNotScheduled; //是否开启定时器
|
||||
|
||||
|
||||
// 每天0点1分执行 国内标准文本状态 即将实施和现行有效状态自动变更逻辑
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="0 37 9 * * ?")
|
||||
// @Scheduled(cron = "0 1 0 * * ?")
|
||||
@Async
|
||||
public void StandScheduled(){
|
||||
if(isNotScheduled){
|
||||
try{
|
||||
Thread.sleep(2000);
|
||||
logger.info("每天0点1分执行 国内标准文本状态 即将实施和现行有效状态自动变更逻辑:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
|
||||
// 发布、即将实施 只查询国内标准
|
||||
List<String> list = new ArrayList<>();
|
||||
// 发布
|
||||
list.add("hc99551723c");
|
||||
// 即将实施
|
||||
list.add("hb0iy9z23c");
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("A.VALID_FLAG","0");
|
||||
wrapper.eq("STAND_TYPE","INLAND");
|
||||
wrapper.in("A.TEXT_STATUS",list);
|
||||
List<SarStandardsInfo> getStateScheduledList = sarStandardsInfoDao.getStateScheduledList(wrapper);
|
||||
if(!getStateScheduledList.isEmpty()){
|
||||
// N个实施日期中大于当前日期
|
||||
List<SarStandardsInfo> getStateScheduledListToIsAfter = getStateScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getSSRQ())){
|
||||
List<String> dateList = Arrays.stream(info.getSSRQ().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
List<String> dateIsAfterList = dateList.stream().filter(s -> {
|
||||
if(Util.isValidDate(s)){
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDateTime parse = LocalDate.parse(s, dateTimeFormatter).atStartOfDay();
|
||||
// 实施日期是否大于当前日期
|
||||
return parse.isAfter(now);
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return !dateIsAfterList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
// N个实施日期中小于当前时间
|
||||
List<SarStandardsInfo> getStateScheduledListToIsBefore = getStateScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getSSRQ())){
|
||||
List<String> dateList = Arrays.stream(info.getSSRQ().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
List<String> dateIsBeforeList = dateList.stream().filter(s -> {
|
||||
if(Util.isValidDate(s)){
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDateTime parse = LocalDate.parse(s, dateTimeFormatter).atStartOfDay();
|
||||
// 实施日期是否小于当前时间
|
||||
return parse.isBefore(now);
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return !dateIsBeforeList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// N个实施日期中大于当前日期 执行逻辑 更为即将实施
|
||||
if(!getStateScheduledListToIsAfter.isEmpty()){
|
||||
logger.info("=============N个实施日期中大于当前日期 执行============");
|
||||
// 文本状态更为即将实施
|
||||
execStandDate(getStateScheduledListToIsAfter,"hb0iy9z23c");
|
||||
}
|
||||
|
||||
// N个实施日期中小于当前时间 执行逻辑 更为现行有效
|
||||
if(!getStateScheduledListToIsBefore.isEmpty()){
|
||||
logger.info("=============N个实施日期中小于当前时间 执行============");
|
||||
// 文本状态更为现行有效
|
||||
execStandDate(getStateScheduledListToIsBefore,"vsaga7nwub");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
logger.info("每天0点1分执行 国内标准文本状态 即将实施和现行有效状态自动变更逻辑:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 每天0点1分执行 国内标准文本状态被代替逻辑 标准自动变更废止
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="*/60 * * * * ?")
|
||||
// @Scheduled(cron = "0 1 0 * * ?")
|
||||
@Async
|
||||
public void StandScheduledToAbolish(){
|
||||
if(isNotScheduled){
|
||||
try{
|
||||
Thread.sleep(2000);
|
||||
logger.info("每天0点1分执行 国内标准文本状态被代替逻辑 标准自动变更废止:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
|
||||
// 现行有效、即将实施、被代替 只查询国内标准
|
||||
List<String> list = new ArrayList<>();
|
||||
// 现行有效
|
||||
list.add("vsaga7nwub");
|
||||
// 即将实施
|
||||
list.add("hb0iy9z23c");
|
||||
// 被代替
|
||||
list.add("qke0ckro2p");
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("A.VALID_FLAG","0");
|
||||
wrapper.eq("STAND_TYPE","INLAND");
|
||||
wrapper.in("A.TEXT_STATUS",list);
|
||||
List<SarStandardsInfo> getStateStandScheduledList = sarStandardsInfoDao.getStateScheduledList(wrapper);
|
||||
|
||||
if(!getStateStandScheduledList.isEmpty()){
|
||||
|
||||
List<SarStandardsInfo> invalidStandToGBList = new ArrayList<>();
|
||||
List<SarStandardsInfo> bdtStandToGBList = new ArrayList<>();
|
||||
|
||||
// 当前标准的标准类别是否是GB类 GB集合逻辑
|
||||
getStateStandScheduledList.forEach(info -> {
|
||||
if(StringUtils.isNotBlank(info.getBDTBZH())){
|
||||
List<String> bdtList = Arrays.stream(info.getBDTBZH().split(",")).map(
|
||||
s -> s.replace(" ","").trim()).collect(Collectors.toList());
|
||||
// 查询等于GB的国内标准
|
||||
QueryWrapper wrapperGB = new QueryWrapper();
|
||||
wrapperGB.eq("SAR_STANDARDS_INFO.VALID_FLAG","0");
|
||||
wrapperGB.eq("SAR_STANDARDS_INFO.STAND_SORT","GB");
|
||||
wrapperGB.in("trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-'," +
|
||||
"SAR_STANDARDS_INFO.STAND_YEAR),' ',''))",bdtList);
|
||||
List<SarStandardsInfo> queryGBList = sarStandardsInfoDao.selectList(wrapperGB);
|
||||
|
||||
if(!queryGBList.isEmpty()){
|
||||
int queryGbCount = queryGBList.size();
|
||||
|
||||
//被代替标准号中所有有效标准的状态都是现行有效状态
|
||||
List<SarStandardsInfo> yxList = queryGBList.stream().filter(info1 ->
|
||||
"vsaga7nwub".equals(info1.getTextStatus())).collect(Collectors.toList());
|
||||
|
||||
//被代替标准号中所有有效标准的状态都是被代替状态
|
||||
List<SarStandardsInfo> bdtStateList = queryGBList.stream().filter(info1 ->
|
||||
"qke0ckro2p".equals(info1.getTextStatus())).collect(Collectors.toList());
|
||||
|
||||
//被代替标准号中所有有效标准的状态都是废止状态
|
||||
List<SarStandardsInfo> fzList = queryGBList.stream().filter(info1 ->
|
||||
"chblaarg77".equals(info1.getTextStatus())).collect(Collectors.toList());
|
||||
|
||||
// 满足其上存入更新废止逻辑 如果只有一个被代替标准 优先更新废止状态
|
||||
if(yxList.size() == queryGbCount || bdtStateList.size() == queryGbCount || fzList.size() == queryGbCount){
|
||||
invalidStandToGBList.add(info);
|
||||
}else {
|
||||
// 被代替标准号中的有效标准的标准状态中有一个是发布、即将实施、现行有效、被代替状态的
|
||||
List<SarStandardsInfo> singleList = queryGBList.stream().filter(info1 -> {
|
||||
if("hc99551723c".equals(info1.getTextStatus()) || "hb0iy9z23c".equals(info1.getTextStatus())
|
||||
|| "vsaga7nwub".equals(info1.getTextStatus()) || "qke0ckro2p".equals(info1.getTextStatus())){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// 满足其上存入更新被代替逻辑
|
||||
if(!singleList.isEmpty()){
|
||||
bdtStandToGBList.add(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 当前标准的标准类别是否是GB类 NOT GB集合逻辑
|
||||
List<SarStandardsInfo> bdtStandToNotGBList = getStateStandScheduledList.stream().filter(info -> {
|
||||
if(StringUtils.isNotBlank(info.getBDTBZH())){
|
||||
List<String> bdtList = Arrays.stream(info.getBDTBZH().split(",")).map(
|
||||
s -> s.replace(" ","").trim()).collect(Collectors.toList());
|
||||
|
||||
//发布、即将实施、现行有效、被代替
|
||||
List<String> bdtStateList = new ArrayList<>();
|
||||
// 发布
|
||||
bdtStateList.add("hc99551723c");
|
||||
// 作废
|
||||
bdtStateList.add("hb0iy9z23c");
|
||||
// 即将实施
|
||||
bdtStateList.add("vsaga7nwub");
|
||||
// 被代替
|
||||
bdtStateList.add("qke0ckro2p");
|
||||
|
||||
// 查询不等于GB的国内标准 且 有效的被代替标准
|
||||
QueryWrapper wrapperNotGB = new QueryWrapper();
|
||||
wrapperNotGB.eq("VALID_FLAG","0");
|
||||
wrapperNotGB.ne("STAND_SORT","GB");
|
||||
wrapperNotGB.in("TEXT_STATUS",wrapperNotGB);
|
||||
wrapperNotGB.in("trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-'," +
|
||||
"SAR_STANDARDS_INFO.STAND_YEAR),' ',''))",bdtList);
|
||||
List<SarStandardsInfo> queryNotGBList = sarStandardsInfoDao.selectList(wrapperNotGB);
|
||||
|
||||
// 被代替标准号中的有效标准的标准状态中有一个是发布、即将实施、现行有效、被代替状态的
|
||||
// 满足其上过滤更新被代替数据
|
||||
return !queryNotGBList.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(!invalidStandToGBList.isEmpty()){
|
||||
logger.info("=============被代替标准号中所有有效标准的状态都是现行有效、被代替、废止状态 执行============");
|
||||
// 文本状态更为废止状态
|
||||
execStandDate(invalidStandToGBList,"chblaarg77");
|
||||
}
|
||||
|
||||
if(!bdtStandToGBList.isEmpty()){
|
||||
logger.info("=============GB=======被代替标准号中的有效标准的标准状态中有一个是发布、即将实施、现行有效、被代替状态的 执行============");
|
||||
// 文本状态更为被代替
|
||||
execStandDate(bdtStandToGBList,"qke0ckro2p");
|
||||
}
|
||||
|
||||
if(!bdtStandToNotGBList.isEmpty()){
|
||||
logger.info("=============NOT GB ===被代替标准号中的有效标准的标准状态中有一个是发布、即将实施、现行有效、被代替状态的 执行============");
|
||||
// 文本状态更为被代替
|
||||
execStandDate(bdtStandToNotGBList,"qke0ckro2p");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
logger.info("每天0点1分执行 国内标准文本状态被代替逻辑 标准自动变更废止:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Async
|
||||
public void execStandDate(List<SarStandardsInfo> infoList, String textStatusStand) throws Exception {
|
||||
List<SarStandardsInfo> list = new ArrayList<>();
|
||||
for (SarStandardsInfo info : infoList) {
|
||||
info.setTextStatus(textStatusStand);
|
||||
standFunc(info);
|
||||
createStandMQService.sendStandMQ(info,"update");
|
||||
|
||||
// 只批量更新文本字段
|
||||
SarStandardsInfo newInfo = new SarStandardsInfo();
|
||||
newInfo.setTextStatus(textStatusStand);
|
||||
newInfo.setId(info.getId());
|
||||
newInfo.setModifyTime(new Date());
|
||||
list.add(newInfo);
|
||||
}
|
||||
|
||||
if(!list.isEmpty()){
|
||||
iSarStandardsInfoService.updateBatchById(list);
|
||||
}
|
||||
}
|
||||
|
||||
private void standFunc(SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||
attrInfoSearchDetails(sarStandardsInfoEO);
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
pageInfo.setStandId(sarStandardsInfoEO.getId());
|
||||
pageInfo.setFileType("FBGBJBD");
|
||||
|
||||
/**
|
||||
* SarItemVO换为sarItemVOS
|
||||
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
|
||||
*/
|
||||
|
||||
List<SarStandItems> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
if (!sarItemVOS.isEmpty()) {
|
||||
Map<String, String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
|
||||
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getTermsConditions));
|
||||
sarStandardsInfoEO.setMapItems(collectMap);
|
||||
}
|
||||
if (sarStandardsInfoEO.getAttrInfoMap() != null) {
|
||||
sarStandardsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarStandardsInfoEO.getAttrInfoMap()));
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarStandardsInfo row) throws Exception {
|
||||
if (row != null) {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
List<String> valArr = new ArrayList<>();
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
if (StringUtils.isNotBlank(entry.getValue().toString())) {
|
||||
Object json = new JSONTokener(entry.getValue().toString()).nextValue();
|
||||
if (json instanceof org.json.JSONArray) {
|
||||
valArr = com.alibaba.fastjson.JSONObject.parseArray(entry.getValue().toString(), String.class);
|
||||
} else {
|
||||
value = entry.getValue().toString();
|
||||
valArr = Arrays.asList(value.split(","));
|
||||
}
|
||||
if (!valArr.isEmpty()) {
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.scheduledState.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年05月11日 15:36
|
||||
*/
|
||||
public class Util {
|
||||
/**
|
||||
* 判断字符串是否为合法的日期格式
|
||||
* @param dateStr 待判断的字符串
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValidDate(String dateStr){
|
||||
//判断结果 默认为true
|
||||
boolean judgeresult=true;
|
||||
//1、首先使用SimpleDateFormat初步进行判断,过滤掉注入 yyyy-01-32 或yyyy-00-0x等格式
|
||||
//此处可根据实际需求进行调整,如需判断yyyy/MM/dd格式将参数改掉即可
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try{
|
||||
//增加强判断条件,否则 诸如2022-02-29也可判断出去
|
||||
format.setLenient(false);
|
||||
Date date =format.parse(dateStr);
|
||||
}catch(Exception e){
|
||||
judgeresult=false;
|
||||
}
|
||||
//由于上述方法只能验证正常的日期格式,像诸如 0001-01-01、11-01-01,10001-01-01等无法校验,此处再添加校验年费是否合法
|
||||
String yearStr=dateStr.split("-")[0];
|
||||
if(yearStr.startsWith("0")||yearStr.length()!=4){
|
||||
judgeresult=false;
|
||||
}
|
||||
return judgeresult;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import com.adc.da.util.http.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -29,6 +31,17 @@ public class ResetSearchCenterController extends BaseController<Map<String, Obje
|
||||
|
||||
@Autowired
|
||||
private ResetSearchCenterService resetSearchCenterService;
|
||||
|
||||
@ApiOperation(value = "|Search|文本条件搜索更新标准数据索引")
|
||||
@PostMapping(value="/resetALLSearchCenterToSearch")
|
||||
public ResponseMessage resetALLSearchCenterToSearch(@RequestBody SearchCenter searchCenter) throws Exception{
|
||||
ResponseMessage x = verifySearchCenter(searchCenter);
|
||||
if (x != null){
|
||||
return x;
|
||||
}
|
||||
return resetSearchCenterService.resetALLSearchCenterToSearch(searchCenter);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SearchCenter|重新创建ALL标准数据索引")
|
||||
@PostMapping(value="/resetALLSearchCenter")
|
||||
public ResponseMessage resetALLSearchCenter(@RequestBody SearchCenter searchCenter) throws Exception{
|
||||
|
||||
@@ -15,6 +15,9 @@ import java.util.List;
|
||||
@Data
|
||||
public class SearchCenter {
|
||||
|
||||
@ApiModelProperty(value = "根据搜索条件")
|
||||
private String search;
|
||||
|
||||
// @ApiModelProperty(value = "分页查询总数 可不填 自动带入总数")
|
||||
// private Integer countStand;
|
||||
|
||||
|
||||
@@ -105,11 +105,66 @@ public class ResetSearchCenterService {
|
||||
client = this.transportClient;
|
||||
}
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetALLSearchCenterToSearch(SearchCenter searchCenter) throws Exception{
|
||||
Boolean getFulltextserchIndex = elasticsearchService.isIndexExist("fulltextserch");
|
||||
SearchCenter standSearch = new SearchCenter();
|
||||
standSearch.setExecType(searchCenter.getExecType());
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
standSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
standSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
SarStandardsInfoEOPage page = new SarStandardsInfoEOPage();
|
||||
ResponseMessage stand = resetStandSearchCenterToSearch(page,standSearch);
|
||||
List<String> r = new ArrayList<>();
|
||||
if(stand.isOk() && StringUtils.isNotBlank(stand.getData().toString())){
|
||||
r.add(stand.getData().toString());
|
||||
}
|
||||
|
||||
SearchCenter lawsSearch = new SearchCenter();
|
||||
lawsSearch.setExecType(searchCenter.getExecType());
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
lawsSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
lawsSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
SarLawsStandInfoPage lawsPage = new SarLawsStandInfoPage();
|
||||
ResponseMessage laws = resetLawsSearchCenterToSearch(lawsPage,lawsSearch);
|
||||
if(laws.isOk() && StringUtils.isNotBlank(laws.getData().toString())){
|
||||
r.add(laws.getData().toString());
|
||||
}
|
||||
|
||||
SearchCenter bussSearch = new SearchCenter();
|
||||
bussSearch.setExecType(searchCenter.getExecType());
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
bussSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
bussSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
SarBussionessStandEOPage bussPage = new SarBussionessStandEOPage();
|
||||
ResponseMessage buss = resetBussStandSearchCenterToSearch(bussPage,bussSearch);
|
||||
if(buss.isOk() && StringUtils.isNotBlank(buss.getData().toString())){
|
||||
r.add(buss.getData().toString());
|
||||
}
|
||||
|
||||
String res = String.join(", ", r);
|
||||
logger.info(res);
|
||||
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetALLSearchCenter(SearchCenter searchCenter) throws Exception{
|
||||
Boolean getFulltextserchIndex = elasticsearchService.isIndexExist("fulltextserch");
|
||||
SearchCenter standSearch = new SearchCenter();
|
||||
standSearch.setExecType(searchCenter.getExecType());
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
standSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
standSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
@@ -122,6 +177,9 @@ public class ResetSearchCenterService {
|
||||
|
||||
SearchCenter lawsSearch = new SearchCenter();
|
||||
lawsSearch.setExecType(searchCenter.getExecType());
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
lawsSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
lawsSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
@@ -136,6 +194,9 @@ public class ResetSearchCenterService {
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
bussSearch.setIdList(searchCenter.getIdList());
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())){
|
||||
bussSearch.setSearch(searchCenter.getSearch());
|
||||
}
|
||||
SarBussionessStandEOPage bussPage = new SarBussionessStandEOPage();
|
||||
ResponseMessage buss = resetBussStandSearchCenter(bussPage,bussSearch);
|
||||
if(buss.isOk() && StringUtils.isNotBlank(buss.getData().toString())){
|
||||
@@ -185,6 +246,78 @@ public class ResetSearchCenterService {
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
//重建国内外标准
|
||||
@Async
|
||||
public ResponseMessage resetStandSearchCenterToSearch(SarStandardsInfoEOPage page,SearchCenter searchCenter) throws Exception{
|
||||
|
||||
int countUpdateSuccess = 0;
|
||||
int countAddSuccess = 0;
|
||||
|
||||
Boolean getStandIndex = elasticsearchService.isIndexExist("fulltextserch");
|
||||
|
||||
if(!getStandIndex){
|
||||
logger.info("ES 不存在索引:fulltextserch");
|
||||
return Result.error("ES 不存在索引:fulltextserch");
|
||||
}
|
||||
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
page.setValidFlag("0");
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
String[] result = searchCenter.getIdList().toArray(new String[0]);
|
||||
page.setIdlist(result);
|
||||
}
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.eq("VALID_FLAG","0");
|
||||
int count = iSarStandardsInfoService.count(qw);
|
||||
if(count > 0){
|
||||
page.setPageSize(count);
|
||||
page.setMenuId("nomenu");
|
||||
page.setStandType("ALL");
|
||||
List<SarStandardsInfo> rowsStand = iSarStandardsInfoService.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> insList = new ArrayList<>();
|
||||
List<SarStandardsInfo> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarStandardsInfo::getId).collect(Collectors.toList());
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 交集 更新
|
||||
List<SarStandardsInfo> intersection = rowsStand.stream()
|
||||
.filter(item -> new ArrayList<>(esIdList)
|
||||
.contains(item.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){
|
||||
List<SarStandardsInfo> collect = intersection.stream()
|
||||
.filter(item -> searchCenter.getIdList().contains(item.getId())).collect(Collectors.toList());
|
||||
updList.addAll(collect);
|
||||
}else{
|
||||
updList.addAll(intersection);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarStandardsInfo sarStandardsInfoEO : updList){
|
||||
countUpdateSuccess++;
|
||||
standFunc(sarStandardsInfoEO);
|
||||
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+0+"条)删除-共"+delList.size()+"条数据");
|
||||
return Result.success("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+0+"条)删除-共"+delList.size()+"条数据");
|
||||
}else {
|
||||
logger.info("未查询到标准数据");
|
||||
return Result.error("未查询到标准数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//重建国内外标准
|
||||
@Async
|
||||
public ResponseMessage resetStandSearchCenter(SarStandardsInfoEOPage page,SearchCenter searchCenter) throws Exception{
|
||||
@@ -199,7 +332,9 @@ public class ResetSearchCenterService {
|
||||
return Result.error("ES 不存在索引:stand");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("stand");
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("stand",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
@@ -296,6 +431,14 @@ public class ResetSearchCenterService {
|
||||
|
||||
}
|
||||
|
||||
private String getSearch(SearchCenter searchCenter) {
|
||||
String search = "";
|
||||
if(StringUtils.isNotBlank(searchCenter.getSearch())) {
|
||||
search = searchCenter.getSearch();
|
||||
}
|
||||
return search;
|
||||
}
|
||||
|
||||
private void standFunc(SarStandardsInfo sarStandardsInfoEO) throws Exception {
|
||||
attrInfoSearchDetails(sarStandardsInfoEO);
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
@@ -365,6 +508,93 @@ public class ResetSearchCenterService {
|
||||
}
|
||||
}
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetLawsSearchCenterToSearch(SarLawsStandInfoPage sarLawsInfoEOPage,SearchCenter searchCenter) throws Exception{
|
||||
Boolean getLawsIndex = elasticsearchService.isIndexExist("fulltextserch");
|
||||
|
||||
if(!getLawsIndex){
|
||||
logger.info("ES 不存在索引:fulltextserch");
|
||||
return Result.error("ES 不存在索引:fulltextserch");
|
||||
}
|
||||
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
sarLawsInfoEOPage.setLawsType("FOREIGN");
|
||||
|
||||
// page idlist 赋值
|
||||
idListFunc(sarLawsInfoEOPage, searchCenter);
|
||||
|
||||
int countUpdateSuccess = 0;
|
||||
int countAddSuccess = 0;
|
||||
QueryWrapper qw2 = new QueryWrapper();
|
||||
qw2.eq("VALID_FLAG","0");
|
||||
int count2 = iSarLawsStandInfoService.count(qw2);
|
||||
if(count2 > 0){
|
||||
sarLawsInfoEOPage.setPageSize(count2);
|
||||
List<SarLawsStandInfo> rowsStand = iSarLawsStandInfoService.getSarStandardsInfoPage(sarLawsInfoEOPage);
|
||||
List<SarLawsStandInfo> insList = new ArrayList<>();
|
||||
List<SarLawsStandInfo> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarLawsStandInfo::getId).collect(Collectors.toList());
|
||||
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 交集 更新
|
||||
List<SarLawsStandInfo> intersection = rowsStand.stream()
|
||||
.filter(item -> new ArrayList<>(esIdList)
|
||||
.contains(item.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){
|
||||
List<SarLawsStandInfo> collect = intersection.stream()
|
||||
.filter(item -> searchCenter.getIdList().contains(item.getId())).collect(Collectors.toList());
|
||||
updList.addAll(collect);
|
||||
}else{
|
||||
updList.addAll(intersection);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarLawsStandInfo sarLawsInfoEO : updList){
|
||||
countUpdateSuccess++;
|
||||
lawsAttrInfoShowSearchDetails(sarLawsInfoEO);
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
pageInfo.setStandId(sarLawsInfoEO.getId());
|
||||
pageInfo.setFileType("FBGBJBD");
|
||||
|
||||
/**
|
||||
* SarItemVO换为sarItemVOS
|
||||
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
|
||||
*/
|
||||
|
||||
List<SarLawsItems> sarItemVOS = sarLawsItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
if(!sarItemVOS.isEmpty()){
|
||||
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
|
||||
.collect(Collectors.toMap(SarLawsItems::getItemsNum, SarLawsItems::getTermsConditions));
|
||||
sarLawsInfoEO.setMapItems(collectMap);
|
||||
}
|
||||
if (sarLawsInfoEO.getAttrInfoMap() != null) {
|
||||
sarLawsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarLawsInfoEO.getAttrInfoMap()));
|
||||
}
|
||||
createStandMQService.sendLawsMQ(sarLawsInfoEO,"update");
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("重置国内外政策:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)数据");
|
||||
return Result.success("");
|
||||
}else {
|
||||
logger.info("未查询到国内外政策数据");
|
||||
return Result.error("未查询到国内外政策数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetLawsSearchCenter(SarLawsStandInfoPage sarLawsInfoEOPage,SearchCenter searchCenter) throws Exception{
|
||||
Boolean getLawsIndex = elasticsearchService.isIndexExist("laws");
|
||||
@@ -374,7 +604,9 @@ public class ResetSearchCenterService {
|
||||
return Result.error("ES 不存在索引:laws");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("laws");
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("laws",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
@@ -442,6 +674,25 @@ public class ResetSearchCenterService {
|
||||
for(SarLawsStandInfo sarLawsInfoEO : updList){
|
||||
countUpdateSuccess++;
|
||||
lawsAttrInfoShowSearchDetails(sarLawsInfoEO);
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
pageInfo.setStandId(sarLawsInfoEO.getId());
|
||||
pageInfo.setFileType("FBGBJBD");
|
||||
|
||||
/**
|
||||
* SarItemVO换为sarItemVOS
|
||||
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
|
||||
*/
|
||||
|
||||
List<SarLawsItems> sarItemVOS = sarLawsItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
if(!sarItemVOS.isEmpty()){
|
||||
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
|
||||
.collect(Collectors.toMap(SarLawsItems::getItemsNum, SarLawsItems::getTermsConditions));
|
||||
sarLawsInfoEO.setMapItems(collectMap);
|
||||
}
|
||||
if (sarLawsInfoEO.getAttrInfoMap() != null) {
|
||||
sarLawsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarLawsInfoEO.getAttrInfoMap()));
|
||||
}
|
||||
createStandMQService.sendLawsMQ(sarLawsInfoEO,"update");
|
||||
}
|
||||
}
|
||||
@@ -571,6 +822,84 @@ public class ResetSearchCenterService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 文本搜索
|
||||
*/
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetBussStandSearchCenterToSearch(SarBussionessStandEOPage sarBussionessStandEOPage,SearchCenter searchCenter) throws Exception{
|
||||
Boolean getbussstandIndex = elasticsearchService.isIndexExist("fulltextserch");
|
||||
|
||||
if(!getbussstandIndex){
|
||||
logger.info("ES 不存在索引:fulltextserch");
|
||||
return Result.error("ES 不存在索引:fulltextserch");
|
||||
}
|
||||
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
sarBussionessStandEOPage.setValidFlag("0");
|
||||
sarBussionessStandEOPage.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
||||
sarBussionessStandEOPage.setMenuRoleList(null);
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
|
||||
String[] result = searchCenter.getIdList().toArray(new String[0]);
|
||||
sarBussionessStandEOPage.setIdlist(result);
|
||||
}
|
||||
|
||||
int countUpdateSuccess = 0;
|
||||
int countAddSuccess = 0;
|
||||
sarBussionessStandEOPage.setMenuId("0");
|
||||
|
||||
QueryWrapper qw3 = new QueryWrapper();
|
||||
qw3.eq("VALID_FLAG","0");
|
||||
int count3 = iSarBussionessStandService.count(qw3);
|
||||
|
||||
if(count3 > 0){
|
||||
sarBussionessStandEOPage.setPageSize(count3);
|
||||
|
||||
List<SarBussionessStand> rowsStand = iSarBussionessStandService.getSarBussionStandPage(sarBussionessStandEOPage);
|
||||
List<SarBussionessStand> insList = new ArrayList<>();
|
||||
List<SarBussionessStand> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarBussionessStand::getId).collect(Collectors.toList());
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 交集 更新
|
||||
List<SarBussionessStand> intersection = rowsStand.stream()
|
||||
.filter(item -> new ArrayList<>(esIdList)
|
||||
.contains(item.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){
|
||||
List<SarBussionessStand> collect = intersection.stream()
|
||||
.filter(item -> searchCenter.getIdList().contains(item.getId())).collect(Collectors.toList());
|
||||
updList.addAll(collect);
|
||||
}else{
|
||||
updList.addAll(intersection);
|
||||
}
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarBussionessStand sarBussionessStandEO : updList){
|
||||
countUpdateSuccess++;
|
||||
bussAttrInfoShowSearchDetails(sarBussionessStandEO);
|
||||
if (sarBussionessStandEO.getAttrInfoMap() != null) {
|
||||
sarBussionessStandEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarBussionessStandEO.getAttrInfoMap()));
|
||||
}
|
||||
createStandMQService.sendBussStandMQ(sarBussionessStandEO,"update");
|
||||
}
|
||||
}
|
||||
logger.info("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)数据");
|
||||
return Result.success("");
|
||||
}else {
|
||||
logger.info("未查询到企标数据");
|
||||
return Result.error("未查询到企标数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Async
|
||||
public ResponseMessage resetBussStandSearchCenter(SarBussionessStandEOPage sarBussionessStandEOPage,SearchCenter searchCenter) throws Exception{
|
||||
Boolean getbussstandIndex = elasticsearchService.isIndexExist("bussstand");
|
||||
@@ -580,7 +909,9 @@ public class ResetSearchCenterService {
|
||||
return Result.error("ES 不存在索引:bussstand");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("bussstand");
|
||||
String search = getSearch(searchCenter);
|
||||
|
||||
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("bussstand",search);
|
||||
|
||||
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class restSearchSync {
|
||||
private boolean isNotScheduled; //是否开启定时器
|
||||
|
||||
|
||||
// 每天0点1分执行 重置ES 自动更新、新增、删除
|
||||
// 每天0点1分执行 重置ES 自动更新、新增
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
@Scheduled(cron = "0 1 0 * * ?")
|
||||
@Async
|
||||
@@ -54,14 +54,14 @@ public class restSearchSync {
|
||||
if(isNotScheduled){
|
||||
try{
|
||||
Thread.sleep(2000);
|
||||
logger.info("每天0点1分执行 重置ES 自动更新、新增、删除:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
logger.info("每天0点1分执行 重置ES 自动更新、新增:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---START-01");
|
||||
|
||||
SearchCenter searchCenter = new SearchCenter();
|
||||
// ALL 执行全部
|
||||
searchCenter.setExecType("ALL");
|
||||
resetSearchCenterService.syncResetALLSearchCenter(searchCenter);
|
||||
|
||||
logger.info("每天0点1分执行 重置ES 自动更新、新增、删除:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
logger.info("每天0点1分执行 重置ES 自动更新、新增:"+Thread.currentThread().getName() + " cron=0 1 0 * * ? --- " + new Date()+"---End-01");
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
|
||||
+6
@@ -66,6 +66,12 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
return Result.success(iEsRevisePlanService.modPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划-企标技术更新计划状态")
|
||||
@PostMapping("modPlanByState")
|
||||
public ResponseMessage<Object> modPlanByState(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlanByState(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("/modPlanByWk")
|
||||
public ResponseMessage<Object> modPlanByWk(@RequestBody EsRevisePlan esRevisePlan){
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
||||
EsRevisePlan getOnePlan(String id);//查询详情
|
||||
|
||||
String modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
String modPlanByState(EsRevisePlan esRevisePlan);//编辑
|
||||
String addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
int delPlan(String id);//删除
|
||||
int delPlans(String ids);//批量删除
|
||||
|
||||
+6
@@ -75,6 +75,12 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modPlanByState(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlanDao.updateById(esRevisePlan);
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPlan(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlan.setId(UUIDUtils.randomUUID(32));
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.adc.da.slrs.regulationsTDM.controller;
|
||||
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandResult;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandMessageCodeEnum;
|
||||
import com.adc.da.slrs.regulationsTDM.service.IStandDataTDMService;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--TDM查询标准")
|
||||
@RequestMapping("/api/regulationsTDM")
|
||||
public class StandDataTDMController extends BaseController<StandData> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataTDMController.class);
|
||||
|
||||
@Autowired
|
||||
private IStandDataTDMService iStandDataTDMService;
|
||||
/**
|
||||
* 标准查询列表接口
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "|regulationsTDM|标准查询列表接口")
|
||||
@PostMapping("/standData")
|
||||
public String searchStandData(@RequestBody SearchStandContext searchStandContext){
|
||||
if(searchStandContext.getPage() == 0
|
||||
|| StringUtils.isEmpty(searchStandContext.getType())){
|
||||
return StandResult.toJson(Result.error(StandMessageCodeEnum.ERROR_PARAM.getCode(),
|
||||
"page/type 为必填项 且page不可为0"));
|
||||
}
|
||||
List<StandData> rows = iStandDataTDMService.searchStandData(searchStandContext);
|
||||
return StandResult.toJson(Result.success(getPageInfo(searchStandContext.getPager(), rows)));
|
||||
}
|
||||
|
||||
private String verifyObj(String str){
|
||||
return (str == null || str.equals("")) ? "" : str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.regulationsTDM.dao;
|
||||
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
@Repository
|
||||
public interface StandDataTDMDao extends BaseMapper<StandData> {
|
||||
|
||||
List<StandData> searchStandData(SearchStandContext searchStandContext);
|
||||
List<StandData> searchBussData(SearchStandContext searchStandContext);
|
||||
|
||||
List<StandData> searchStandDataThree(SearchStandContext searchStandContext);
|
||||
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandContext extends BasePage {
|
||||
|
||||
// 标准查询条件
|
||||
@ApiModelProperty(value = "页数")
|
||||
private Integer page;
|
||||
|
||||
@ApiModelProperty(value = "区分类别(GB:国内外标准 QB:企业标准)")
|
||||
private String type;
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandResult<T> {
|
||||
|
||||
@ApiModelProperty(value = "返回状态 200 正常,-1 系统错误, -10 参数错误")
|
||||
@JSONField(ordinal=1)
|
||||
private String respCode;
|
||||
|
||||
@ApiModelProperty(value = "true:成功 false:失败")
|
||||
@JSONField(ordinal=2)
|
||||
private Boolean ok;
|
||||
|
||||
@ApiModelProperty(value = "正常返回空字符串,系统错误时返回系统异常信息及对应描述")
|
||||
@JSONField(ordinal=3)
|
||||
private String message;
|
||||
|
||||
private T data;
|
||||
|
||||
|
||||
public SearchStandResult(String respCode, String message, boolean ok, T data) {
|
||||
this.respCode = respCode;
|
||||
this.message = message;
|
||||
this.ok = ok;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public SearchStandResult(String respCode, String message, boolean ok) {
|
||||
this.respCode = respCode;
|
||||
this.message = message;
|
||||
this.ok = ok;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class StandData {
|
||||
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
@JSONField(ordinal=1)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@JSONField(ordinal=2)
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty(value = "标准分类")
|
||||
@JSONField(ordinal=3)
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准号")
|
||||
@JSONField(ordinal=4)
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "年代号")
|
||||
@JSONField(ordinal=5)
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@JSONField(ordinal=6)
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准英文名称")
|
||||
@JSONField(ordinal=7)
|
||||
private String standEnName;
|
||||
|
||||
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||
@JSONField(ordinal=8)
|
||||
private String documentName;
|
||||
|
||||
@ApiModelProperty(value = "当前标准跳转到本系统内的链接地址")
|
||||
@JSONField(ordinal=9)
|
||||
private String documentUrl;
|
||||
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@JSONField(ordinal=10)
|
||||
private String dtbzh;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:58
|
||||
*/
|
||||
public enum StandMessageCodeEnum {
|
||||
SUCCESS("200"),
|
||||
ERROR_SYS("-1"),
|
||||
ERROR_PARAM("-10"),
|
||||
SOURCE("SRMS");
|
||||
|
||||
private String code;
|
||||
|
||||
private StandMessageCodeEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.adc.da.slrs.regulationsTDM.entity;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
public class StandResult {
|
||||
|
||||
public static <T>SearchStandResult<T> success(String code,String message,T t) {
|
||||
return new SearchStandResult(code, message, true, t);
|
||||
}
|
||||
|
||||
public static <T>SearchStandResult<T> error(String code,String message) {
|
||||
return new SearchStandResult(code, message, true);
|
||||
}
|
||||
|
||||
public static String toJson(ResponseMessage searchStandResult){
|
||||
GsonBuilder gsonBuilder = getGsonBuilder();
|
||||
Gson json = gsonBuilder.create();
|
||||
return json.toJson(searchStandResult);
|
||||
}
|
||||
|
||||
private static GsonBuilder getGsonBuilder() {
|
||||
return new GsonBuilder().disableHtmlEscaping().serializeNulls().enableComplexMapKeySerialization().serializeSpecialFloatingPointValues().setLenient();
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.regulationsTDM.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulationsTDM.entity.StandData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
public interface IStandDataTDMService extends IService<StandData> {
|
||||
|
||||
List<StandData> searchStandData(SearchStandContext searchStandContext);
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.adc.da.slrs.regulationsTDM.service.impl;
|
||||
|
||||
import com.adc.da.slrs.regulationsTDM.entity.*;
|
||||
import com.adc.da.slrs.regulationsTDM.dao.StandDataTDMDao;
|
||||
import com.adc.da.slrs.regulationsTDM.service.IStandDataTDMService;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
@Service
|
||||
public class StandDataTDMServiceImpl extends ServiceImpl<StandDataTDMDao, StandData> implements IStandDataTDMService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataTDMServiceImpl.class);
|
||||
|
||||
private String webUrl = "https://srms.foton.com.cn/#/loginStandDetails";
|
||||
|
||||
@Autowired
|
||||
private SarStandardsInfoDao sarStandardInfoDao;
|
||||
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarBussionessStandDao;
|
||||
|
||||
@Override
|
||||
public List<StandData> searchStandData(SearchStandContext searchStandContext){
|
||||
List<StandData> standDataQuery = new ArrayList<>();
|
||||
searchStandContext.setPageSize(100);
|
||||
QueryWrapper queryCount = new QueryWrapper();
|
||||
queryCount.eq("VALID_FLAG","0");
|
||||
if("GB".equals(searchStandContext.getType().toUpperCase())){
|
||||
int count = sarStandardInfoDao.selectCount(queryCount);
|
||||
searchStandContext.getPager().setRowCount(count);
|
||||
standDataQuery = this.baseMapper.searchStandData(searchStandContext);
|
||||
}else if("QB".equals(searchStandContext.getType().toUpperCase())){
|
||||
int count = sarBussionessStandDao.selectCount(queryCount);
|
||||
searchStandContext.getPager().setRowCount(count);
|
||||
standDataQuery = this.baseMapper.searchBussData(searchStandContext);
|
||||
}
|
||||
if(!standDataQuery.isEmpty()){
|
||||
// 重组数据集合 只需documentName 及 documentUrl
|
||||
standDataQuery.stream().peek(standData -> {
|
||||
standData.setDocumentName(verifyObj(standData.getStandSort(),standData.getStandNumber(),standData.getStandName()));
|
||||
standData.setDocumentUrl(webUrl+"?dataId="+standData.getId()+"&datatype="+standData.getStandType());
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
return standDataQuery;
|
||||
}
|
||||
|
||||
private String verifyObj(String str1,String str2,String str3){
|
||||
String res1 = (str1 == null || str1.equals("")) ? "" : (str1+" ");
|
||||
String res2 = (str2 == null || str2.equals("")) ? "" : (str2+" ");
|
||||
String res3 = (str3 == null || str3.equals("")) ? "" : str3;
|
||||
return res1 + res2 + res3;
|
||||
}
|
||||
private String encode(String str){
|
||||
String encodeStr = new BASE64Encoder().encodeBuffer(str.getBytes()).replaceAll("[\r\n]", "");
|
||||
return encodeStr;
|
||||
}
|
||||
|
||||
private String errFilter(String str){
|
||||
if (str.contains("Cause")){
|
||||
str = str.split("Cause")[0].replaceAll("\\r\\n###","");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
+13
@@ -4,9 +4,12 @@ import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -23,6 +26,16 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
String updateStateScheduledSql = "SELECT A.*,B.BDTQBBHBUSS FROM sar_bussioness_stand A LEFT JOIN sar_buss_stand_attr_info B ON B.STAND_ID = A.ID ${ew.customSqlSegment}";
|
||||
|
||||
/**
|
||||
* 自动更新文本状态通用查询
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
@Select(updateStateScheduledSql)
|
||||
List<SarBussionessStand> getStateScheduledList(@Param("ew") QueryWrapper queryWrapper);
|
||||
|
||||
List<SarBussionessStand> queryByBussStateSync(SarBussionessStand sarBussionessStand);
|
||||
|
||||
SarBussionessStand getStandInfoByReviseStatus(String reviseStatus);
|
||||
|
||||
+6
@@ -86,6 +86,12 @@ public class SarBussionessStandState extends BaseEntity {
|
||||
@TableField("PARAM2")
|
||||
private String param2;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String FSRQBUSS;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String QCDW;
|
||||
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
||||
@PostMapping("/importData")
|
||||
public ResponseMessage importData( @RequestParam(value = "file", required = false) MultipartFile file){
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
List<ExportEmptyModel> res=sarLawsDetailedListService.importData(file,stringBuilder);
|
||||
List<ExportEmptyModelDto> res=sarLawsDetailedListService.importData(file,stringBuilder);
|
||||
if (stringBuilder.toString().length()>0){
|
||||
return Result.error("-1","",stringBuilder.toString());
|
||||
}else {
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: qk
|
||||
* @Date: 2022/5/10 0010 14:56
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ExportEmptyModelDto {
|
||||
@Excel(name = "标准编号(必填)",orderNum = "0" ,width = 20.0)
|
||||
private String standNumber;
|
||||
|
||||
@Excel(name = "适用认证(必填,可多选)",orderNum = "1" ,width = 40.0)
|
||||
private String syrz;
|
||||
|
||||
@Excel(name = "标准实施日期",orderNum = "2" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String ssrq;
|
||||
|
||||
@Excel(name = "新车型实施日期",orderNum = "3" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String xcxssrqgj;
|
||||
|
||||
@Excel(name = "在产车实施日期",orderNum = "4" ,width = 20.0)
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private String zccssrqgj;
|
||||
|
||||
private String id;
|
||||
|
||||
private String compareFlag;
|
||||
|
||||
private String syrzCode;
|
||||
//国内海外为1 企标为2 政策为3
|
||||
private String standName;
|
||||
private String standEnName;
|
||||
private String sycx;
|
||||
private String nylx;
|
||||
private String zrbm;
|
||||
private String sycpx;
|
||||
}
|
||||
+1
-1
@@ -32,7 +32,7 @@ public interface ISarLawsDetailedListService extends IService<SarLawsDetailedLis
|
||||
void standardToLaws(String countryArea,TimeDto timeDto);
|
||||
|
||||
|
||||
List<ExportEmptyModel> importData(MultipartFile file , StringBuilder stringBuilder);
|
||||
List<ExportEmptyModelDto> importData(MultipartFile file , StringBuilder stringBuilder);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+57
-19
@@ -49,6 +49,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -649,11 +651,26 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
List<TimeDto> timeDto = new ArrayList<>();
|
||||
if (detailedUpDto.getInforlist().contains(",")) {
|
||||
String[] id = detailedUpDto.getInforlist().split(",");
|
||||
String[] putTime = detailedUpDto.getInforlist1().split(";");
|
||||
String[] zcc = detailedUpDto.getInforlist2().split(";");
|
||||
String[] xcx = detailedUpDto.getInforlist3().split(";");
|
||||
String[] syrz = detailedUpDto.getInforlist4().split(";");
|
||||
String[] id = new String[]{};
|
||||
String[] putTime = new String[]{};
|
||||
String[] zcc = new String[]{};
|
||||
String[] xcx = new String[]{};
|
||||
String[] syrz = new String[]{};
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist())){
|
||||
id = detailedUpDto.getInforlist().split(",");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist1())){
|
||||
putTime = detailedUpDto.getInforlist1().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist2())){
|
||||
zcc = detailedUpDto.getInforlist2().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist3())){
|
||||
xcx = detailedUpDto.getInforlist3().split(";");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(detailedUpDto.getInforlist4())){
|
||||
syrz=detailedUpDto.getInforlist4().split(";");
|
||||
}
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
@@ -825,8 +842,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExportEmptyModel> importData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<ExportEmptyModel> res = ExcelImportUtilByWk.readExcelpublic(ExportEmptyModel.class, file, stringBuilder);
|
||||
public List<ExportEmptyModelDto> importData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<ExportEmptyModelDto> res = ExcelImportUtilByWk.readExcelpublic(ExportEmptyModelDto.class, file, stringBuilder);
|
||||
//数据字典数据组装
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
Map<String, String> dict = new HashMap<>();
|
||||
@@ -840,7 +857,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
//先校验是否存在一堆空数据
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel e : res) {
|
||||
for (ExportEmptyModelDto e : res) {
|
||||
if (null == e.getStandNumber() || e.getStandNumber().isEmpty()) {
|
||||
stringBuilder.append("第" + i + "行标准编号不能为空;");
|
||||
}
|
||||
@@ -852,6 +869,27 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
//数据校验 先做重复交验+再做是否存在校验
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
for (ExportEmptyModelDto re:res) {
|
||||
if(!(re.getSsrq().contains(",")||re.getSsrq().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getSsrq()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setSsrq(format.format(date));
|
||||
}
|
||||
if(!(re.getXcxssrqgj().contains(",")||re.getXcxssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getXcxssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setXcxssrqgj(format.format(date));
|
||||
}
|
||||
if(!(re.getZccssrqgj().contains(",")||re.getZccssrqgj().contains(","))) {
|
||||
Date date = org.apache.poi.ss.usermodel.DateUtil
|
||||
.getJavaDate(Double.valueOf(re.getZccssrqgj()));
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
re.setZccssrqgj(format.format(date));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < res.size(); i++) {
|
||||
for (int j = 0; j < res.size(); j++) {
|
||||
String a = res.get(i).getStandNumber().replaceAll(" ", "").replaceAll(" ", "");
|
||||
@@ -865,7 +903,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
//如果没有重复 那么错误提示标识应该为空 现在开始验证标准是否存在
|
||||
if ("".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel exportEmptyModel : res) {
|
||||
for (ExportEmptyModelDto exportEmptyModel : res) {
|
||||
SearchStandContext searchStandContext = new SearchStandContext();
|
||||
searchStandContext.setStandCode(exportEmptyModel.getStandNumber());
|
||||
List<StandData> standData = standDateDao.searchStandDataThree(searchStandContext);
|
||||
@@ -920,15 +958,15 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
}
|
||||
|
||||
public List<ExportEmptyModel> dealWithData(List<ExportEmptyModel> res) {
|
||||
List<ExportEmptyModel> result = new ArrayList<>();
|
||||
public List<ExportEmptyModelDto> dealWithData(List<ExportEmptyModelDto> res) {
|
||||
List<ExportEmptyModelDto> result = new ArrayList<>();
|
||||
//判定是不是存在于国内海外标准中
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Map<String, ExportEmptyModel> map = new HashMap<>();
|
||||
res.forEach(exportEmptyModel -> {
|
||||
if (null != exportEmptyModel.getId() && !exportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append(exportEmptyModel.getId() + ",");
|
||||
map.put(exportEmptyModel.getId(), exportEmptyModel);
|
||||
Map<String, ExportEmptyModelDto> map = new HashMap<>();
|
||||
res.forEach(ExportEmptyModel -> {
|
||||
if (null != ExportEmptyModel.getId() && !ExportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append(ExportEmptyModel.getId() + ",");
|
||||
map.put(ExportEmptyModel.getId(), ExportEmptyModel);
|
||||
}
|
||||
});
|
||||
String[] ids = stringBuilder.toString().substring(0, stringBuilder.toString().length() - 1).split(",");
|
||||
@@ -948,7 +986,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != infos && infos.size() > 0) {
|
||||
infos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
@@ -975,7 +1013,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != sarBussionessStands && sarBussionessStands.size() > 0) {
|
||||
sarBussionessStands.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
@@ -1001,7 +1039,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
if (null != sarLawsStandInfos && sarLawsStandInfos.size() > 0) {
|
||||
sarLawsStandInfos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
ExportEmptyModelDto model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getLawsName());
|
||||
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws") ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
||||
|
||||
+16
@@ -736,6 +736,22 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
saveUpdateLog(sarLawsStandInfo,beforeStandEO);
|
||||
if (elasflag) {
|
||||
attrInfoShowSearchDetails(sarLawsStandInfo,"upd");
|
||||
FindSarItemsPageReqDTO pageInfo = new FindSarItemsPageReqDTO();
|
||||
pageInfo.setStandId(sarLawsStandInfo.getId());
|
||||
pageInfo.setFileType("FBGBJBD");
|
||||
|
||||
/**
|
||||
* SarItemVO换为sarItemVOS
|
||||
* List<SarItemVO> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
* .collect(Collectors.toMap(SarItemVO::getItemsNum, SarItemVO::getItemsName));
|
||||
*/
|
||||
|
||||
List<SarLawsItems> sarItemVOS = sarLawsItemsDao.querySarItemAndInterpretation(pageInfo);
|
||||
if(!sarItemVOS.isEmpty()){
|
||||
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
|
||||
.collect(Collectors.toMap(SarLawsItems::getItemsNum, SarLawsItems::getTermsConditions));
|
||||
sarLawsStandInfo.setMapItems(collectMap);
|
||||
}
|
||||
createStandMQService.sendLawsMQ(sarLawsStandInfo, "update");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.adc.da.slrs.sarQaInfo.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准法规问答信息表
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-05-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarQaInfo对象", description="标准法规问答信息表")
|
||||
public class SarQaInfoPage extends BasePage {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "资源类型-标准、法规、企标")
|
||||
@TableField("RES_TYPE")
|
||||
private String resType;
|
||||
|
||||
@ApiModelProperty(value = "资源ID")
|
||||
@TableField("RES_ID")
|
||||
private String resId;
|
||||
|
||||
@TableField("QUE_USER")
|
||||
private String queUser;
|
||||
|
||||
@TableField("ANSWER_USER")
|
||||
private String answerUser;
|
||||
|
||||
@TableField("RE_ANSWER_USER")
|
||||
private String reAnswerUser;
|
||||
|
||||
@ApiModelProperty(value = "提问时间")
|
||||
@TableField("QUE_TIME")
|
||||
private LocalDateTime queTime;
|
||||
|
||||
@ApiModelProperty(value = "是否解答")
|
||||
@TableField("ANSWER_FLAG")
|
||||
private BigDecimal answerFlag;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private BigDecimal validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATED_TIME")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
@TableField("CREATED_USER")
|
||||
private String createdUser;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
|
||||
|
||||
}
|
||||
+9
-7
@@ -220,13 +220,15 @@ public class SarStandardComplianceAssessResultController {
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String[] as=(s.getStandardItem()+".").split("\\.");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
if(StringUtils.isNumeric(as[0].trim())){
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (null!=stringMap.get(0)) {
|
||||
|
||||
+1
-1
@@ -829,7 +829,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
return "1";
|
||||
}
|
||||
|
||||
|
||||
//处理 代替被代替数据 关系
|
||||
@ApiOperation(value = "国内海外数据处理接口")
|
||||
@GetMapping("/replaceBdtbzhforDtbzh")
|
||||
public String replaceBdtbzhforDtbzh(SarStandardsInfo sarStandardsInfo) {
|
||||
|
||||
+15
@@ -1,10 +1,13 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -21,6 +24,16 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
String updateStateScheduledSql = "SELECT A.*,B.SSRQ,B.BDTBZH FROM sar_standards_info A LEFT JOIN sar_stand_attr_info B ON B.STAND_ID = A.ID ${ew.customSqlSegment}";
|
||||
|
||||
/**
|
||||
* 自动更新文本状态通用查询
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
@Select(updateStateScheduledSql)
|
||||
List<SarStandardsInfo> getStateScheduledList(@Param("ew") QueryWrapper queryWrapper);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoByNum(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
@@ -84,4 +97,6 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<String> selectIdFormDTBZH(String DTBZHCode);
|
||||
|
||||
List<DSarStandardDTO> dealWithDS(@Param("type") String standType, @Param("status")List<String> strings);
|
||||
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class DSarStandardDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String SSRQ;
|
||||
|
||||
// 新添加字段
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
@TableField("TEXT_STATUS")
|
||||
private String textStatus;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+2
@@ -224,6 +224,8 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
private String ZCCSSRQ;
|
||||
@TableField(exist = false)
|
||||
private String XCXSSRQ;
|
||||
@TableField(exist = false)
|
||||
private String BDTBZH;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTime2;
|
||||
|
||||
@@ -408,12 +408,12 @@
|
||||
<select id="querySarItemAndInterpretation" resultMap="sarItemVOResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandItems.entity.FindSarItemsPageReqDTO">
|
||||
SELECT
|
||||
sar_stand_items.*,split_pid(sar_stand_items.ITEMS_NUM,'.') as tt
|
||||
sar_stand_items.*
|
||||
FROM
|
||||
sar_stand_items
|
||||
<include refid="sarItemWhere"/>
|
||||
<if test="orderBy !=null and orderBy!=''">
|
||||
order by tt ${order}
|
||||
order by sar_stand_items.ITEMS_NUM ${order}
|
||||
</if>
|
||||
LIMIT ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.regulationsTDM.dao.StandDataTDMDao">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.regulationsTDM.entity.StandData">
|
||||
</resultMap>
|
||||
|
||||
<select id="searchStandData" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.regulationsTDM.entity.SearchStandContext">
|
||||
SELECT
|
||||
t.id,
|
||||
t.standType,
|
||||
t.standSort,
|
||||
t.standNumber,
|
||||
t.standYear,
|
||||
t.standName,
|
||||
t.standEnName,
|
||||
t.dtbzh
|
||||
FROM (
|
||||
SELECT
|
||||
sar_standards_info.id AS id,
|
||||
sar_standards_info.STAND_TYPE AS standType,
|
||||
sar_standards_info.STAND_SORT AS standSort,
|
||||
sar_standards_info.STAND_NUMBER AS standNumber,
|
||||
sar_standards_info.STAND_YEAR AS standYear,
|
||||
sar_standards_info.STAND_NAME AS standName,
|
||||
sar_standards_info.STAND_EN_NAME AS standEnName,
|
||||
SAR_STAND_ATTR_INFO.DTBJH AS dtbzh
|
||||
FROM
|
||||
sar_standards_info
|
||||
LEFT JOIN SAR_STAND_ATTR_INFO ON (
|
||||
SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id
|
||||
AND SAR_STAND_ATTR_INFO.valid_flag = 0
|
||||
)
|
||||
WHERE sar_standards_info.valid_flag = 0
|
||||
) t
|
||||
ORDER BY t.standSort ASC,CAST(t.standNumber AS decimal(9,2)) ASC,t.standYear DESC,t.id
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
<select id="searchBussData" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.regulationsTDM.entity.SearchStandContext">
|
||||
SELECT
|
||||
t.id,
|
||||
t.standType,
|
||||
t.standSort,
|
||||
t.standNumber,
|
||||
t.standYear,
|
||||
t.standName,
|
||||
t.standEnName,
|
||||
t.dtbzh
|
||||
FROM (
|
||||
SELECT
|
||||
DISTINCT
|
||||
sar_bussioness_stand.id AS id,
|
||||
'BUSINESS_STAND' AS standType,
|
||||
sar_bussioness_stand.STAND_SORT AS standSort,
|
||||
sar_bussioness_stand.STAND_NUMBER AS standNumber,
|
||||
sar_bussioness_stand.STAND_YEAR AS standYear,
|
||||
sar_bussioness_stand.STAND_NAME AS standName,
|
||||
sar_bussioness_stand.STAND_EN_NAME AS standEnName,
|
||||
sar_buss_stand_attr_info.DTQBBHBUSS AS dtbzh
|
||||
FROM
|
||||
sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON (
|
||||
sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
AND sar_buss_stand_attr_info.valid_flag = 0
|
||||
)
|
||||
WHERE sar_bussioness_stand.valid_flag = 0
|
||||
) t
|
||||
ORDER BY t.standSort ASC,CAST(t.standNumber AS decimal(9,2)) ASC,t.standYear DESC,t.id
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
</mapper>
|
||||
+51
-17
@@ -20,7 +20,45 @@
|
||||
sar_bussioness_stand_state.PARAM1,
|
||||
sar_bussioness_stand_state.PARAM2
|
||||
</sql>
|
||||
<sql id="Base_Column_List_buss" >
|
||||
DISTINCT sar_bussioness_stand.ID,
|
||||
sar_bussioness_stand.ID AS STAND_ID,
|
||||
sar_bussioness_stand.stand_sort AS standSort,
|
||||
sar_bussioness_stand.STAND_NAME,
|
||||
sar_bussioness_stand.STAND_CODE,
|
||||
sar_bussioness_stand.ISSUE_TIME,
|
||||
sar_bussioness_stand.PUT_TIME,
|
||||
sar_bussioness_stand.CREATION_TIME,
|
||||
sar_bussioness_stand.MODIFY_TIME,
|
||||
sar_bussioness_stand.VALID_FLAG
|
||||
</sql>
|
||||
|
||||
<sql id="SarBussionInfoRole_Where_Clause_Review_Results_Buss">
|
||||
where sar_bussioness_stand.TEXT_STATUS_BUSS = '9z741h2m3j' AND sar_bussioness_stand.ISSUE_TIME IS NOT NULL
|
||||
<trim suffixOverrides="," >
|
||||
<if test="standCode != null and standCode != '' " >
|
||||
and STAND_CODE like concat(concat('%',#{standCode}),'%')
|
||||
</if>
|
||||
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd != null and reviewTimeEnd != ''">
|
||||
and DATE_FORMAT(sar_buss_stand_attr_info.FSRQBUSS, '%Y-%m-%d') between DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd == null and reviewTimeEnd == ''">
|
||||
and DATE_FORMAT(sar_buss_stand_attr_info.FSRQBUSS,'%Y-%m-%d') >= DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="reviewTimeStart == null and reviewTimeStart == '' and reviewTimeEnd != null and reviewTimeEnd != ''">
|
||||
and DATE_FORMAT(sar_buss_stand_attr_info.FSRQBUSS,'%Y-%m-%d') <= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(sar_bussioness_stand.ISSUE_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd == null and issueTimeEnd == ''">
|
||||
and DATE_FORMAT(sar_bussioness_stand.ISSUE_TIME,'%Y-%m-%d') >= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(sar_bussioness_stand.ISSUE_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<sql id="SarBussionInfoRole_Where_Clause_Review_Results_N">
|
||||
where REVIEW_RESULTS IS NULL
|
||||
AND DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(current_timestamp(), '%Y-%m-%d') AND DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
||||
@@ -84,38 +122,34 @@
|
||||
A.STAND_CODE,
|
||||
A.REVIEW_TIME,
|
||||
A.ISSUE_TIME,
|
||||
A.REVIEW_RESULTS,
|
||||
A.REVIEW_PROCESS_NUM,
|
||||
A.PUT_TIME,
|
||||
A.CREATION_TIME,
|
||||
A.MODIFY_TIME,
|
||||
A.VALID_FLAG,
|
||||
A.PARAM1,
|
||||
A.PARAM2,
|
||||
A.QCDW,
|
||||
A.QCRBUSS,
|
||||
A.standSort
|
||||
FROM (
|
||||
select
|
||||
<include refid="Base_Column_List" />,
|
||||
<include refid="Base_Column_List_buss" />,
|
||||
sar_buss_stand_attr_info.FSRQBUSS AS REVIEW_TIME,
|
||||
sar_buss_stand_attr_info.QCDW,
|
||||
sar_buss_stand_attr_info.QCRBUSS,
|
||||
sar_bussioness_stand.stand_sort AS standSort
|
||||
from sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN sar_bussioness_stand ON sar_bussioness_stand.id = sar_bussioness_stand_state.stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_N"/>
|
||||
ORDER BY
|
||||
REVIEW_RESULTS ASC,
|
||||
REVIEW_TIME DESC,
|
||||
ISSUE_TIME DESC
|
||||
sar_buss_stand_attr_info.QCRBUSS
|
||||
from sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_Buss"/>
|
||||
) A
|
||||
ORDER BY
|
||||
A.REVIEW_TIME DESC,
|
||||
A.ISSUE_TIME DESC
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
<select id="getBussionessStandStateCountNo" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandStatePage">
|
||||
select count(1) from (
|
||||
select id from sar_bussioness_stand_state
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_N"/>
|
||||
select distinct sar_bussioness_stand.id from sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_Buss"/>
|
||||
) a
|
||||
</select>
|
||||
|
||||
|
||||
+16
@@ -1844,5 +1844,21 @@
|
||||
) = REPLACE ( #{DTBZHCode},' ', '')
|
||||
)
|
||||
</select>
|
||||
<select id="dealWithDS" resultType="com.adc.da.slrs.sarStandardsInfo.entity.DSarStandardDTO">
|
||||
SELECT ss.ID , ss.TEXT_STATUS , ssa.SSRQ from sar_standards_info ss
|
||||
LEFT JOIN sar_stand_attr_info ssa ON ssa.STAND_ID = ss.id
|
||||
<where>
|
||||
1=1 and ss.valid_flag = 0 and ssa.valid_flag = 0
|
||||
<if test="type != null">
|
||||
and ss.STAND_TYPE = #{type}
|
||||
</if>
|
||||
<if test=" null != status and status.size() >0 ">
|
||||
and ss.TEXT_STATUS in
|
||||
<foreach item="texts" collection="status" open="(" separator="," close=")" index="index">
|
||||
#{texts}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@
|
||||
SAR_STANDARDS_INFO.STAND_TYPE AS standType,
|
||||
SAR_FILE_SPLIT_INFO.*,
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR IS NULL,
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) AS showNumber,
|
||||
|
||||
+2
-2
@@ -274,7 +274,7 @@
|
||||
SAR_STAND_FILE.file_name,
|
||||
(
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR IS NULL,
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) ) AS standNumber,
|
||||
@@ -294,7 +294,7 @@
|
||||
<if test="standNumber != null">
|
||||
and
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR IS NULL,
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{standNumber}),'%')
|
||||
|
||||
@@ -381,7 +381,7 @@ public class AttFileEOServiceImpl extends ServiceImpl<AttFileEODao, AttFileEO> i
|
||||
for(int i=0;i<idList.length;i++){
|
||||
AttFileEO attFileEO = new AttFileEO();
|
||||
try {
|
||||
if(StringUtils.isNotEmpty(idList[i])){
|
||||
if(StringUtils.isNotEmpty(idList[i]) && (idList[i].contains("att") || idList[i].contains("ATT"))){
|
||||
attFileEO.setId(idList[i]);
|
||||
AttFileEO getFile = this.baseMapper.selectFileInfoById(attFileEO);
|
||||
if(attFileEO != null && getFile != null){
|
||||
|
||||
@@ -23,6 +23,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"BDTQBBHBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -32,6 +34,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"BDTQBBHBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -41,6 +45,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"BZSMBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -50,6 +56,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"BZSMBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -59,6 +67,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CDZD": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -68,6 +78,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CSZD": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -77,6 +89,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYBZ": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -86,6 +100,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYBZName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -95,6 +111,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCD": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -104,6 +122,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCDName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -113,6 +133,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCDYBXHBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -122,6 +144,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCDYBXHBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -131,6 +155,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCDYMCBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -140,6 +166,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCDYMCBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -149,6 +177,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCVPPSBMBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -158,6 +188,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCVPPSBMBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -167,6 +199,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCVPPSCNBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -176,6 +210,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYCVPPSCNBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -185,6 +221,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DTQBBHBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -194,6 +232,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DTQBBHBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -203,6 +243,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DYBXHBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -212,6 +254,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DYBXHBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -221,6 +265,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DYMCBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -230,6 +276,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DYMCBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -239,6 +287,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FBGBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -248,6 +298,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FBGBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -257,6 +309,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FSRQBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -266,6 +320,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FSRQBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -275,6 +331,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FZRQBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -284,6 +342,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FZRQBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -293,6 +353,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GLWJBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -302,6 +364,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GLWJBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -311,6 +375,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"KCVPPSBMBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -320,6 +386,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"KCVPPSBMBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -329,6 +397,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"KCVPPSCNBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -338,6 +408,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"KCVPPSCNBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -347,6 +419,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"LSBBBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -356,6 +430,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"LSBBBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -365,6 +441,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"NYLXCLASS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -374,6 +452,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"NYLXCLASSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -383,6 +463,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QCDW": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -392,6 +474,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QCDWName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -401,6 +485,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QCDWShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -410,6 +496,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QCRBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -419,6 +507,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QCRBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -428,6 +518,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QTWJBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -437,6 +529,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"QTWJBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -455,6 +549,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SYCPXCLASS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -464,6 +560,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SYCPXCLASSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -473,6 +571,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SYCXCLASS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -482,6 +582,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SYCXCLASSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -491,6 +593,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TXLBBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -500,6 +604,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TXLBBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -509,6 +615,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"VPPSBMBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -518,6 +626,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"VPPSBMBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -527,6 +637,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"VPPSCNBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -536,6 +648,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"VPPSCNBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -545,6 +659,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"WJSCRYBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -554,6 +670,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"WJSCRYBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -563,6 +681,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XCSJBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -572,6 +692,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XCSJBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -581,6 +703,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGD": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -590,6 +714,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGDName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -599,6 +725,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGJLBUSS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -608,6 +736,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGJLBUSSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -617,6 +747,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGLC": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -626,6 +758,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGLCName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -635,6 +769,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYBZ": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -644,6 +780,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYBZName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -653,6 +791,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZFCDXZ": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -662,6 +802,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"content": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -671,6 +813,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"country": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -709,6 +853,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"nameshow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -718,6 +864,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"numberExpNull": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -727,6 +875,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"numbershow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -754,6 +904,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"replaceStandNum": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -763,6 +915,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"replace_stand_num": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -772,6 +926,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"replacedStandNum": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -781,6 +937,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"replaced_stand_num": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -790,6 +948,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"standEnName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -799,6 +959,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"standNumber": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -808,6 +970,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"standSort": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -817,6 +981,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"standSortShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -836,6 +1002,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"stand_code": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -845,6 +1013,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"stand_en_name": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -854,6 +1024,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"stand_name": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -863,6 +1035,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"stand_sort": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -872,6 +1046,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"stand_status": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -890,6 +1066,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"standstateshow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -899,6 +1077,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"statecode": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -908,6 +1088,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"textStatusBuss": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -917,6 +1099,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"textStatusBussName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -926,6 +1110,8 @@ bussstand/bussstand/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"type": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
|
||||
@@ -53,6 +53,8 @@ fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"numberTitle": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -63,6 +65,8 @@ fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"nameTitle": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -81,8 +85,30 @@ fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"fielddata": true
|
||||
},
|
||||
"standSortOrder": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
},
|
||||
"fielddata": true
|
||||
},
|
||||
"standTypeOrder": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
},
|
||||
"fielddata": true
|
||||
},
|
||||
"textContent": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -92,6 +118,8 @@ fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"textItems": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -101,6 +129,8 @@ fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"title": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
|
||||
@@ -5,6 +5,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
"properties": {
|
||||
"BDTWJHLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -14,6 +16,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"BDTWJHLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -23,6 +27,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CHJLLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -32,6 +38,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CHJLLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -41,6 +49,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYSDLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -50,6 +60,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYSDLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -59,6 +71,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"CYSDLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -68,6 +82,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DTWJHLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -77,6 +93,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"DTWJHLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -86,6 +104,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"FBJGLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -95,6 +115,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GCWBLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -104,6 +126,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GCWBLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -113,6 +137,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GLWJLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -122,6 +148,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"GLWJLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -131,6 +159,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"JDWJLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -140,6 +170,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"JDWJLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -149,6 +181,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"NYLXLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -158,6 +192,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"NYLXLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -167,6 +203,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"NYLXLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -176,6 +214,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SSRQLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -185,6 +225,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"SSRQLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -194,6 +236,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGDWLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -203,6 +247,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGDWLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -212,6 +258,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGDWLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -221,6 +269,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGRLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -230,6 +280,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGRLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -239,6 +291,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"TGRLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -248,6 +302,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XCXSSRQLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -257,6 +313,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XCXSSRQLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -266,6 +324,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGLC": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -275,6 +335,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"XGLCName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -284,6 +346,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYBZZCLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -293,6 +357,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYBZZCLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -302,6 +368,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYRZLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -311,6 +379,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYRZLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -320,6 +390,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"YYRZLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -329,6 +401,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZCWBLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -338,6 +412,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZCWBLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -347,6 +423,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZCXSSRQLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -356,6 +434,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZCXSSRQLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -365,6 +445,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRBMLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -374,6 +456,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRBMLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -383,6 +467,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRBMLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -392,6 +478,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRGCSLAWS": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -401,6 +489,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRGCSLAWSName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -410,6 +500,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"ZRGCSLAWSShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -455,6 +547,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"content": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -464,6 +558,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"country": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -473,6 +569,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"countryShow": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -491,6 +589,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"isRelateAccess": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -500,6 +600,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"isRelateAccessName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -509,6 +611,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"issueCompany": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -538,6 +642,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsBulletin": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -547,6 +653,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsEnName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -556,6 +664,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsLabel": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -565,6 +675,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsLabelName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -574,6 +686,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -583,6 +697,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsNo": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -592,6 +708,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsNotisyncNum": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -610,6 +728,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsRemark": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -619,6 +739,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsSycx": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -628,6 +750,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsSycxName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -637,6 +761,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsSyqy": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -646,6 +772,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsSyqyName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -655,6 +783,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsTextState": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -664,6 +794,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsTextStateName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -673,6 +805,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsType": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -682,6 +816,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"lawsTypeName": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
@@ -719,6 +855,8 @@ laws/laws/_mapping?pretty&include_type_name=true
|
||||
},
|
||||
"type": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
"search_analyzer": "ik_max_word",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `sar_standards_info` ADD COLUMN `BUILD_ID` varchar(200) NULL COMMENT '关联绑定老系统ID' AFTER `NYLX`;
|
||||
ALTER TABLE `sar_bussioness_stand` ADD COLUMN `BUILD_ID` varchar(200) NULL COMMENT '绑定老系统ID' AFTER `STAND_SN`;
|
||||
@@ -1,2 +1,9 @@
|
||||
4.13------------------
|
||||
INSERT INTO `foton_slrs_test2`.`sar_menu`(`ID`, `SOR_DIVIDE`, `MENU_NAME`, `PARENT_ID`, `PARENT_IDS`, `LEVEL`, `DISPLAY_SEQ`, `HREF`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`, `REMARKS`) VALUES ('asdzcfgk', NULL, '政策法规库', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
5-7 -----新增文本状态
|
||||
INSERT INTO `foton_slrs`.`ts_dictype`(`ID`, `DIC_ID`, `DIC_TYPE_NAME`, `DIC_TYPE_CODE`, `DESCRIBES`, `SHOW_INDEX`, `PARENT_ID`, `TREE_PID`, `OTHERS`, `CREATION_USER`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`) VALUES ('gycree7258tly7fhrs1n', 'd1c9oygu5yvrtj8qt6w2', '发布', 'hc99551723c', '', 10, NULL, NULL, NULL, 'WY8J26MH23', '0', '2022-05-7 08:08:48', '2022-05-7 08:08:48');
|
||||
|
||||
5.12------------------- 新增企标文本状态 发布、即将实施
|
||||
INSERT INTO `foton_slrs`.`ts_dictype` (`ID`, `DIC_ID`, `DIC_TYPE_NAME`, `DIC_TYPE_CODE`, `DESCRIBES`, `SHOW_INDEX`, `PARENT_ID`, `TREE_PID`, `OTHERS`, `CREATION_USER`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`) VALUES ('yxje11vu7hngvakm6xor', 'qybmpmpvykzpwy511xai', '发布', '6jnqba2mby', '', '7', NULL, NULL, NULL, 'chenchunmei', '0', '2022-05-12 01:45:21', '2022-05-12 01:45:21');
|
||||
INSERT INTO `foton_slrs`.`ts_dictype` (`ID`, `DIC_ID`, `DIC_TYPE_NAME`, `DIC_TYPE_CODE`, `DESCRIBES`, `SHOW_INDEX`, `PARENT_ID`, `TREE_PID`, `OTHERS`, `CREATION_USER`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`) VALUES ('n4wyayhkmbhc58wi21rs', 'qybmpmpvykzpwy511xai', '即将实施', 'rpvoxsvr60', '', '8', NULL, NULL, NULL, 'chenchunmei', '0', '2022-05-12 01:45:56', '2022-05-12 01:45:56');
|
||||
|
||||
Reference in New Issue
Block a user