Merge branch 'develop_master' of http://gitlab.91isoft.com:90/LiuChao/foton-slrs-system-rest into develop_master
This commit is contained in:
+6
-4
@@ -1495,14 +1495,16 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS()) || StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
|
||||
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
"NYLXName"
|
||||
).minimumShouldMatch("100%"));
|
||||
// .field("title",10f));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",10f));
|
||||
"CLLXName"
|
||||
).minimumShouldMatch("100%"));
|
||||
// .field("title",10f));
|
||||
}
|
||||
|
||||
boolQueryBuilder.must(queryBuilder);
|
||||
|
||||
+4
@@ -466,6 +466,10 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
}
|
||||
String title = String.valueOf(fullTextSearchEO.getOrDefault("title",""));
|
||||
fullTextSearchEO.put("titleBig",title.toUpperCase());
|
||||
fullTextSearchEO.put("CLLXName",attrInfoMap.get("CLLXName"));
|
||||
fullTextSearchEO.put("NYLXName",attrInfoMap.get("NYLXName"));
|
||||
fullTextSearchEO.put("CLLX",attrInfoMap.get("CLLX"));
|
||||
fullTextSearchEO.put("NYLX",attrInfoMap.get("NYLX"));
|
||||
return fullTextSearchEO;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.adc.da.utils.util.Utils;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -82,8 +83,10 @@ public class SendStandMQService {
|
||||
}
|
||||
String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||
Map<String,Object> attrInfoMap = new TreeMap<>();
|
||||
Map<String,Object> attrInfoMapForAuth = new TreeMap<>();
|
||||
if(StringUtils.isNotBlank(sarStandAttrEOStr)){
|
||||
attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
attrInfoMapForAuth.putAll(attrInfoMap);
|
||||
}
|
||||
Map<String,Object> infoMap = infoEO.getAttrInfoMap();
|
||||
Map<String,String> infoEOMapItems = infoEO.getMapItems();
|
||||
@@ -274,6 +277,34 @@ public class SendStandMQService {
|
||||
if (!"null".equals(standEnName) && StringUtils.isNotBlank(standEnName)) {
|
||||
saveMap.put("standEnNameBig", standEnName.toUpperCase());
|
||||
}
|
||||
if ("1".equals(attrInfoMapForAuth.get("updateAuth"))) {
|
||||
Map<String, Object> getAttrMap = new TreeMap<>(attrInfoMapForAuth);
|
||||
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 = null;
|
||||
if (Utils.isJson(entry.getValue().toString())) {
|
||||
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, "");
|
||||
}
|
||||
}
|
||||
saveMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if("add".equals(addOrUpdate)){
|
||||
sarStandardsInfoService.insertIntoIndexForMap(saveMap);
|
||||
} else {
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandardsInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
@@ -37,6 +38,7 @@ import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.adc.da.utils.util.Utils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
@@ -107,6 +109,9 @@ public class ResetSearchCenterService {
|
||||
@Autowired
|
||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
@@ -854,36 +859,39 @@ public class ResetSearchCenterService {
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
getAttrMap.put("updateAuth","1");
|
||||
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 = null;
|
||||
if(Utils.isJson(entry.getValue().toString())){
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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 = null;
|
||||
// if(Utils.isJson(entry.getValue().toString())){
|
||||
// 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);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (getAttrMap != null) {
|
||||
// row.setSarStandAttrEOStr(JSONObject.toJSONString(getAttrMap));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -150,7 +150,13 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
|
||||
// List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
List<WarningExportVO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
|
||||
for (WarningExportVO warningExportVO : exportExcel){
|
||||
String condition = warningExportVO.getTermsConditions();
|
||||
if (condition != null && condition.length() > 32001){
|
||||
condition = condition.substring(0,32000);
|
||||
warningExportVO.setTermsConditions(condition);
|
||||
}
|
||||
}
|
||||
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), WarningExportVO.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
|
||||
+7
-1
@@ -60,7 +60,7 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
|
||||
@ExcelProperty(value = "发布日期",index = 5)
|
||||
@ExcelProperty(value = "发布日期",index = 6)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("发布日期")
|
||||
@TableField(exist = false)
|
||||
@@ -98,6 +98,12 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String itemsName;
|
||||
|
||||
@ExcelProperty(value = "条款内容",index = 5)
|
||||
@ColumnWidth(60)
|
||||
@ApiModelProperty("条款内容")
|
||||
@TableField(exist = false)
|
||||
private String termsConditions;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("POLICY_ID")
|
||||
private String policyId;
|
||||
|
||||
+4
-4
@@ -11,18 +11,18 @@ public class WarningExportVO extends EarlyWarningEO {
|
||||
|
||||
|
||||
|
||||
@ExcelProperty(value = "实施日期",index = 6)
|
||||
@ExcelProperty(value = "实施日期",index = 7)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("实施日期")
|
||||
private String SSRQ;
|
||||
|
||||
|
||||
@ExcelProperty(value = "新车型实施日期",index = 7)
|
||||
@ExcelProperty(value = "新车型实施日期",index = 8)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("新车型实施日期")
|
||||
private String XCXSSRQ;
|
||||
|
||||
@ExcelProperty(value = "在产车实施日期",index = 8)
|
||||
@ExcelProperty(value = "在产车实施日期",index = 9)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("在产车实施日期")
|
||||
private String ZCCSSRQ;
|
||||
@@ -31,7 +31,7 @@ public class WarningExportVO extends EarlyWarningEO {
|
||||
@ApiModelProperty("标准类别显示")
|
||||
private String standTypeShow;
|
||||
|
||||
@ExcelProperty(value = "适用车型",index = 9)
|
||||
@ExcelProperty(value = "适用车型",index = 10)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("适用车型展示")
|
||||
private String applyTypeShow;
|
||||
|
||||
+9
-9
@@ -768,15 +768,15 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:list")
|
||||
public ResponseMessage queryInfoByStandNum(SarStandardsInfoEOPage page) throws Exception {
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getStandNumber())){
|
||||
String sort = "";
|
||||
if (page.getStandNumber().length()>3) {
|
||||
sort = page.getStandNumber().substring(0, 3);
|
||||
}
|
||||
if ("ECE".equals(sort)) {
|
||||
int length = page.getStandNumber().length();
|
||||
String number = page.getStandNumber().substring(3,length);
|
||||
page.setStandNumber("UN(ECE)" + number);
|
||||
}
|
||||
// String sort = "";
|
||||
// if (page.getStandNumber().length()>3) {
|
||||
// sort = page.getStandNumber().substring(0, 3);
|
||||
// }
|
||||
// if ("ECE".equals(sort)) {
|
||||
// int length = page.getStandNumber().length();
|
||||
// String number = page.getStandNumber().substring(3,length);
|
||||
// page.setStandNumber("UN(ECE)" + number);
|
||||
// }
|
||||
}
|
||||
List<SarStandardsInfo> getList = sarStandardsInfoEOService.selectStandardsByStandnumber(page.getStandNumber(),page.getStandType());
|
||||
SarBussionessStandEOPage sarBussionessStandEOPage = new SarBussionessStandEOPage();
|
||||
|
||||
Reference in New Issue
Block a user