feat: There is no way the,
This commit is contained in:
@@ -267,6 +267,7 @@ public class SeniorSearchInfoEO extends BasePage {
|
||||
private String lawsLabel;
|
||||
private String lawsRemark;
|
||||
private String CYSDLAWS;
|
||||
private String NYLXCLASS;
|
||||
|
||||
|
||||
|
||||
|
||||
+83
-21
@@ -7,7 +7,9 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
@@ -32,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -386,6 +389,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
collectAttrMap.put("CYSDLAWS",array);
|
||||
}
|
||||
|
||||
if(searchInfoEO.getNYLXCLASS() != null && StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
|
||||
List<String> fieldList = Arrays.asList(searchInfoEO.getNYLXCLASS() .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
JSONArray array= JSONArray.parseArray(JSON.toJSONString(fieldList));
|
||||
collectAttrMap.put("NYLXCLASS",array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<String> fieldList = getStringField(searchInfoEO);
|
||||
@@ -503,11 +512,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(list.size() > 1){
|
||||
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
|
||||
list.forEach(s -> {
|
||||
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+s+" "+"*"));
|
||||
boolQueryBuilderShould.should(QueryBuilders.termQuery("standSort.keyword", s));
|
||||
});
|
||||
boolQueryBuilder.must(boolQueryBuilderShould);
|
||||
}else {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("numbershow.keyword", "*"+searchInfoEO.getStandSort()+" "+"*"));
|
||||
boolQueryBuilder.must(QueryBuilders.termQuery("standSort.keyword", searchInfoEO.getStandSort()));
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
@@ -776,22 +785,36 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 循环统计各种类型数据
|
||||
String[] seniortype;
|
||||
if("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||
String[] seniortypeStand = {"standSort", "statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName"};
|
||||
String[] seniortypeStand = {"standSort", "numbershow","statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS"};
|
||||
seniortype = seniortypeStand.clone();
|
||||
} else if("laws".equals(searchInfoEO.getSelectIndex())){
|
||||
String[] seniortypeLaws = {"lawsSyqy","lawsSycx","CYSDLAWS"};
|
||||
seniortype = seniortypeLaws.clone();
|
||||
} else if ("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
||||
String[] seniortypeBuss = {"textStatusBuss","QCDW"};
|
||||
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS"};
|
||||
seniortype = seniortypeBuss.clone();
|
||||
} else {
|
||||
String[] seniortypeMsg = {"module"};
|
||||
seniortype = seniortypeMsg.clone();
|
||||
}
|
||||
String standType = searchInfoEO.getStandType();
|
||||
String[] standVerify = {"GB","GB/T","QC/T","JT","JB","GA","GJB","HJ"};
|
||||
String[] standEnVerify = {"ECE","EU","EC","EEC","ISO","IEC","GTR","CFR",
|
||||
"JASO","JIS","GSO","GOST","ΓOCT","TP","SASO","UAE","CONTRAN","DENATRAN","ABNT NBR","NBR","INMETRO","CONAMA","Normative Instruction","ADR"};
|
||||
String[] bussStandVerify = {"Q/FT A","Q/FT B","Q/FT E","Q/FT F","Q/FT G","Q/FT M","Q/FT Q","Q/FT R","Q/FT S","Q/FT T","Q/FT V","Q/FT X","Q/FT Y","Q/FT Z","Q/QCBFC"};
|
||||
List<String> list = new ArrayList<>();
|
||||
if(standType.equals("INLAND")){
|
||||
list = Stream.of(standVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("bussstand")){
|
||||
list = Stream.of(bussStandVerify).collect(Collectors.toList());
|
||||
}else if(standType.equals("FOREIGN")){
|
||||
list = Stream.of(standEnVerify).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
for (int i = 0; i < seniortype.length; i++) {
|
||||
//分组依靠关键字terms
|
||||
TermsAggregationBuilder aggregationBuilders = AggregationBuilders.terms("by_" + seniortype[i]).field(seniortype[i] + ".keyword").size(1000);
|
||||
TermsAggregationBuilder aggregationBuilders = AggregationBuilders.terms("by_" + seniortype[i]).field(seniortype[i] + ".keyword").size(100000);
|
||||
searchRequestBuilder.addAggregation(aggregationBuilders);
|
||||
}
|
||||
// 获取查询到的结果
|
||||
@@ -808,27 +831,17 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
Map<String, Object> submap = new HashMap<>();
|
||||
for (StringTerms.Bucket bucket : stResult.getBuckets()) {
|
||||
// 多选处理,当前全部允许多选
|
||||
String keyname = bucket.getKeyAsString();
|
||||
String[] keynamelist = keyname.split(",");
|
||||
String keyName = bucket.getKeyAsString();
|
||||
String[] keyNameList = keyName.split(",");
|
||||
// 对于属性允许多选,此处做出处理
|
||||
if(keynamelist.length>0){
|
||||
for (String itemkeyname: keynamelist){
|
||||
if(keyNameList.length>0){
|
||||
for (String itemKeyName: keyNameList){
|
||||
// put 之前判断是否已存在该key ,如果不存在,直接放入值,如果存在,需要进行一个累加
|
||||
if(submap.containsKey(itemkeyname)){
|
||||
submap.put(itemkeyname.trim(), (long)submap.get(itemkeyname)+ bucket.getDocCount());
|
||||
}
|
||||
else {
|
||||
submap.put(itemkeyname.trim(), bucket.getDocCount());
|
||||
}
|
||||
keyNameFilter(standType, list, submap, bucket, itemKeyName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(submap.containsKey(keyname)){
|
||||
submap.put(keyname.trim(), (long)submap.get(keyname)+ bucket.getDocCount());
|
||||
}
|
||||
else {
|
||||
submap.put(keyname.trim(), bucket.getDocCount());
|
||||
}
|
||||
keyNameFilter(standType, list, submap, bucket, keyName);
|
||||
}
|
||||
}
|
||||
map.put(seniortype[i], submap);
|
||||
@@ -839,11 +852,60 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
|
||||
}
|
||||
if(standType.equals("bussstand")){
|
||||
map.forEach((s, o) -> {
|
||||
if(s.equals("numbershow")){
|
||||
map.put("standSort",o);
|
||||
}
|
||||
});
|
||||
}
|
||||
result.get(0).put("groupdata", map);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String, Object> objectToMap(Object obj){
|
||||
if(obj == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
Field[] declaredFields = obj.getClass().getDeclaredFields();
|
||||
try {
|
||||
for (Field field : declaredFields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(obj));
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.getMessage();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private void keyNameFilter(String standType, List<String> list, Map<String, Object> submap, StringTerms.Bucket bucket, String keyname) {
|
||||
if(standType.equals("bussstand")){
|
||||
if(!list.isEmpty()){
|
||||
String finalKeyName = keyname;
|
||||
List<String> list1 = list.stream().filter(string-> (finalKeyName.contains(string))).collect(Collectors.toList());
|
||||
if(!list1.isEmpty()){
|
||||
if(submap.containsKey(list1.get(0))){
|
||||
submap.put(list1.get(0).trim(), (long)submap.get(list1.get(0).trim())+ bucket.getDocCount());
|
||||
}else {
|
||||
submap.put(list1.get(0).trim(), bucket.getDocCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if(submap.containsKey(keyname)){
|
||||
submap.put(keyname.trim(), (long)submap.get(keyname)+ bucket.getDocCount());
|
||||
}else {
|
||||
submap.put(keyname.trim(), bucket.getDocCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> SearchResponseToList(SearchResponse searchResponse) {
|
||||
List<Map<String, Object>> sourceList = new ArrayList<Map<String, Object>>();
|
||||
|
||||
+98
-52
@@ -279,7 +279,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarBussionessStand> getList = sarBussionessStandEODao.getSarBussionessStand(page);
|
||||
attrInfoShow(getList);
|
||||
attrInfoShowExport(getList);
|
||||
return getList;
|
||||
}
|
||||
|
||||
@@ -332,6 +332,55 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object svpps = entry.getValue();
|
||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||
svppsTip = svpps.toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(svppsTip)) {
|
||||
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
|
||||
}
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
}else{
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception {
|
||||
String standId = sarBussionessStandEO.getId();
|
||||
SarBussionessStand beforeStandEO = this.baseMapper.selectByPrimaryKey(standId);
|
||||
@@ -724,57 +773,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
|
||||
public void attrInfoShowDetails(List<SarBussionessStand> sarlist) throws Exception {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (SarBussionessStand row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
@@ -1042,6 +1040,54 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarBussionessStand row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
+21
@@ -230,6 +230,27 @@ public class SarLawsStandInfoPage extends BasePage {
|
||||
private String GLWJBUSS;
|
||||
private String XCSJBUSS;
|
||||
|
||||
private String SSRQLAWS;
|
||||
private String XCXSSRQLAWS;
|
||||
private String ZCXSSRQLAWS;
|
||||
private String ZCWBLAWS;
|
||||
private String GCWBLAWS;
|
||||
private String JDWJLAWS;
|
||||
private String FBJGLAWS;
|
||||
private String CYSDLAWS;
|
||||
private String TGRLAWS;
|
||||
private String TGDWLAWS;
|
||||
private String NYLXLAWS;
|
||||
private String YYRZLAWS;
|
||||
private String ZRBMLAWS;
|
||||
private String ZRGCSLAWS;
|
||||
private String DTWJHLAWS;
|
||||
private String BDTWJHLAWS;
|
||||
private String YYBZZCLAWS;
|
||||
private String CHJLLAWS;
|
||||
private String GLWJLAWS;
|
||||
|
||||
|
||||
//页面排序
|
||||
private String paixu;
|
||||
private String shunxu;
|
||||
|
||||
+89
-2
@@ -298,6 +298,54 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarLawsStandInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
@@ -382,14 +430,14 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
|
||||
// page.setOrderBy("SAR_LAWS_ATTR_INFO.issue_time is null,SAR_LAWS_ATTR_INFO.issue_time desc,SAR_LAWS_ATTR_INFO.id");
|
||||
if(userId != null){
|
||||
page.setUserId(userId);
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
attrInfoShow(rows);
|
||||
attrInfoShowExport(rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
@@ -432,6 +480,45 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
}else{
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips",svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO) {
|
||||
SarLawsMenu sarStandMenuEO = new SarLawsMenu();
|
||||
|
||||
+114
-15
@@ -413,6 +413,53 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport(SarStandardsInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
// 查询属性表数据
|
||||
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);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String, Object> newMap = new HashMap<>();
|
||||
if (getAttrMap != null) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
if ("\"null\"".equals(entry.getValue())) {
|
||||
entry.setValue("");
|
||||
}
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarStandardsInfo row,String type) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
@@ -604,6 +651,55 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
String svppsTip = "";
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object svpps = entry.getValue();
|
||||
if (svpps != null && StringUtils.isNotBlank(svpps.toString())) {
|
||||
svppsTip = svpps.toString();
|
||||
}
|
||||
if (StringUtils.isNotBlank(svppsTip)) {
|
||||
svppsTip = sysInfoEOService.getSvppsNamesTipByIds(svppsTip);
|
||||
}
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if ("GZZXX".equals(name)) {
|
||||
value = sysInfoEOService.getGroupNamesByIds(value);
|
||||
} else {
|
||||
String selVal = InitStandAttrUtil.selectFieldMap.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if (getAttrMap.get(name + "Name") != null) {
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
getAttrMap.put("SVPPSTips", svppsTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* @Description: 新增标准
|
||||
@@ -1456,19 +1552,23 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
page = (SarStandardsInfoEOPage) JSONObject.toBean(jsonObject, SarStandardsInfoEOPage.class);
|
||||
page.setStandType(standardsInfoExcelVO.getStandType());
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
List<String> getMenuIdList = new ArrayList<>();
|
||||
if(standardsInfoExcelVO.getUserId() != null){
|
||||
getMenuIdList= tsUserService.getResourceUserId(standardsInfoExcelVO.getUserId());
|
||||
}
|
||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(), SarAdvanceSearchVO.class);
|
||||
@@ -1480,14 +1580,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setOrderBy("SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id");
|
||||
if(standardsInfoExcelVO.getUserId() != null){
|
||||
page.setUserId(standardsInfoExcelVO.getUserId());
|
||||
}else {
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> getList = dao.getSarStandardsExportInfo(page);
|
||||
attrInfoShow(getList);
|
||||
attrInfoShowExport(getList);
|
||||
return getList;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public class LawsStandExportUtil {
|
||||
break;
|
||||
case "征集意见周期-起始时间":
|
||||
String commentCycleStart="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleStart().getClass())){
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleStart())){
|
||||
commentCycleStart = sdf.format(sarStandardsInfoEO.getCommentCycleStart());
|
||||
}else {
|
||||
commentCycleStart=sarStandardsInfoEO.getCommentCycleStart();
|
||||
@@ -129,7 +129,7 @@ public class LawsStandExportUtil {
|
||||
break;
|
||||
case "征集意见周期-结束时间":
|
||||
String commentCycleEnd="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleEnd().getClass())){
|
||||
if (Date.class.equals(sarStandardsInfoEO.getCommentCycleEnd())){
|
||||
commentCycleEnd = sdf.format(sarStandardsInfoEO.getCommentCycleEnd());
|
||||
}else {
|
||||
commentCycleEnd=sarStandardsInfoEO.getCommentCycleEnd();
|
||||
|
||||
+59
-8
@@ -348,6 +348,55 @@
|
||||
|
||||
|
||||
<!-- 分页查询条件 -->
|
||||
<sql id="standSort_in">
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'Q/FT A' THEN 0
|
||||
when 'Q/FT B' THEN 1
|
||||
when 'Q/FT E' THEN 2
|
||||
when 'Q/FT F' THEN 3
|
||||
when 'Q/FT G' THEN 4
|
||||
when 'Q/FT M' THEN 5
|
||||
when 'Q/FT Q' THEN 6
|
||||
when 'Q/FT R' THEN 7
|
||||
when 'Q/FT S' THEN 8
|
||||
when 'Q/FT T' THEN 9
|
||||
when 'Q/FT V' THEN 10
|
||||
when 'Q/FT X' THEN 11
|
||||
when 'Q/FT Y' THEN 12
|
||||
when 'Q/FT Z' THEN 13
|
||||
when 'Q/QCBFC' THEN 14
|
||||
when '雷萨企标Q/FL' THEN 15
|
||||
when 'Q/QCFLC' THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'Q/FT A' THEN 0
|
||||
when 'Q/FT B' THEN 1
|
||||
when 'Q/FT E' THEN 2
|
||||
when 'Q/FT F' THEN 3
|
||||
when 'Q/FT G' THEN 4
|
||||
when 'Q/FT M' THEN 5
|
||||
when 'Q/FT Q' THEN 6
|
||||
when 'Q/FT R' THEN 7
|
||||
when 'Q/FT S' THEN 8
|
||||
when 'Q/FT T' THEN 9
|
||||
when 'Q/FT V' THEN 10
|
||||
when 'Q/FT X' THEN 11
|
||||
when 'Q/FT Y' THEN 12
|
||||
when 'Q/FT Z' THEN 13
|
||||
when 'Q/QCBFC' THEN 14
|
||||
when '雷萨企标Q/FL' THEN 15
|
||||
when 'Q/QCFLC' THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC,
|
||||
tmp_tb.issue_time is null,tmp_tb.issue_time desc,tmp_tb.id
|
||||
</sql>
|
||||
<sql id="SarBussionInfo_Where_Clause">
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
left join TS_RESOURCE on SAR_BUSS_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||
@@ -585,7 +634,9 @@
|
||||
<if test="sql != null and sql != ''" >
|
||||
ORDER BY ${sql}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<!-- 企标复审使用-->
|
||||
@@ -626,13 +677,13 @@
|
||||
|
||||
<!-- 条件查询后,用于导出标准信息数据-->
|
||||
<select id="getSarBussionessStand" resultMap="BaseResultMapExcel" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
SELECT * FROM (
|
||||
select <include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@
|
||||
a.*,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
|
||||
from (select <include refid="Base_Column_List_Show"/>
|
||||
from SAR_LAWS_ATTR_INFO
|
||||
from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>) a
|
||||
<include refid="SarStandardsInfo_out_left"/>
|
||||
order by a.issue_time is null,a.issue_time desc,a.id
|
||||
|
||||
+130
-55
@@ -54,6 +54,27 @@
|
||||
SAR_STANDARDS_INFO.synopsis, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,SAR_STANDARDS_INFO.is_relate_access,SAR_STANDARDS_INFO.cite_stand,SAR_STANDARDS_INFO.cited_stand,SAR_STANDARDS_INFO.text_status,SAR_STANDARDS_INFO.STAND_SYSTEM
|
||||
</sql>
|
||||
<sql id="Base_Column_List_DIS" >
|
||||
DISTINCT SAR_STANDARDS_INFO.id,
|
||||
SAR_STANDARDS_INFO.stand_type,
|
||||
SAR_STANDARDS_INFO.country,
|
||||
SAR_STANDARDS_INFO.stand_sort,
|
||||
SAR_STANDARDS_INFO.stand_number,
|
||||
SAR_STANDARDS_INFO.stand_year,
|
||||
SAR_STANDARDS_INFO.stand_name,
|
||||
SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state,
|
||||
SAR_STANDARDS_INFO.stand_nature,
|
||||
SAR_STANDARDS_INFO.issue_time,
|
||||
SAR_STANDARDS_INFO.put_time,
|
||||
SAR_STANDARDS_INFO.text_status,
|
||||
SAR_STANDARDS_INFO.creation_user,
|
||||
SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time,
|
||||
SAR_STANDARDS_INFO.modify_time,
|
||||
SAR_STANDARDS_INFO.STAND_SYSTEM,
|
||||
SAR_STANDARDS_INFO.IS_RELATE_ACCESS
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_Show" >
|
||||
SAR_STANDARDS_INFO.id, SAR_STANDARDS_INFO.stand_type, SAR_STANDARDS_INFO.country, SAR_STANDARDS_INFO.stand_sort,
|
||||
@@ -544,6 +565,100 @@
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<sql id="standSort_in">
|
||||
<if test='standType != null and standType == "INLAND"'>
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'GB' THEN 0
|
||||
when 'GB/T' THEN 1
|
||||
when 'QC/T' THEN 2
|
||||
when 'JT' THEN 3
|
||||
when 'JB' THEN 4
|
||||
when 'GA' THEN 5
|
||||
when 'GJB' THEN 6
|
||||
when 'HJ' THEN 7
|
||||
ELSE 8
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
</if>
|
||||
<if test='standType != null and standType == "FOREIGN"'>
|
||||
ORDER BY
|
||||
CASE tmp_tb.stand_sort
|
||||
when 'ECE' THEN 0
|
||||
when 'EU' THEN 1
|
||||
when 'EC' THEN 2
|
||||
when 'EEC' THEN 3
|
||||
when 'ISO' THEN 4
|
||||
when 'IEC' THEN 5
|
||||
when 'GTR' THEN 6
|
||||
when 'CFR' THEN 7
|
||||
when 'JASO' THEN 8
|
||||
when 'JIS' THEN 9
|
||||
when 'GSO' THEN 10
|
||||
when 'GOST' THEN 11
|
||||
when 'ΓOCT' THEN 12
|
||||
when 'TP' THEN 13
|
||||
when 'SASO' THEN 14
|
||||
when 'UAE' THEN 15
|
||||
when 'CONTRAN' THEN 16
|
||||
when 'DENATRAN' THEN 17
|
||||
when 'ABNT NBR' THEN 18
|
||||
when 'NBR' THEN 19
|
||||
when 'INMETRO' THEN 20
|
||||
when 'CONAMA' THEN 21
|
||||
when 'Normative Instruction' THEN 22
|
||||
when 'ADR' THEN 23
|
||||
ELSE 24
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
<if test='standType != null and standType == "INLAND"'>
|
||||
CASE a.stand_sort
|
||||
when 'GB' THEN 0
|
||||
when 'GB/T' THEN 1
|
||||
when 'QC/T' THEN 2
|
||||
when 'JT' THEN 3
|
||||
when 'JB' THEN 4
|
||||
when 'GA' THEN 5
|
||||
when 'GJB' THEN 6
|
||||
when 'HJ' THEN 7
|
||||
ELSE 8
|
||||
END,
|
||||
a.stand_sort ASC,
|
||||
</if>
|
||||
<if test='standType != null and standType == "FOREIGN"'>
|
||||
CASE a.stand_sort
|
||||
when 'ECE' THEN 0
|
||||
when 'EU' THEN 1
|
||||
when 'EC' THEN 2
|
||||
when 'EEC' THEN 3
|
||||
when 'ISO' THEN 4
|
||||
when 'IEC' THEN 5
|
||||
when 'GTR' THEN 6
|
||||
when 'CFR' THEN 7
|
||||
when 'JASO' THEN 8
|
||||
when 'JIS' THEN 9
|
||||
when 'GSO' THEN 10
|
||||
when 'GOST' THEN 11
|
||||
when 'ΓOCT' THEN 12
|
||||
when 'TP' THEN 13
|
||||
when 'SASO' THEN 14
|
||||
when 'UAE' THEN 15
|
||||
when 'CONTRAN' THEN 16
|
||||
when 'DENATRAN' THEN 17
|
||||
when 'ABNT NBR' THEN 18
|
||||
when 'NBR' THEN 19
|
||||
when 'INMETRO' THEN 20
|
||||
when 'CONAMA' THEN 21
|
||||
when 'Normative Instruction' THEN 22
|
||||
when 'ADR' THEN 23
|
||||
ELSE 24
|
||||
END,
|
||||
a.stand_sort ASC,
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="SarStandardsInfo_in_left">
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
|
||||
@@ -605,36 +720,6 @@
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu' and standType =='INLAND'">
|
||||
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
|
||||
='INLAND_STAND')
|
||||
<!–-查询游离态标准,编号和名称是分开的 –>
|
||||
<if test="standNumber != null">
|
||||
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR is null))
|
||||
</if>
|
||||
</if>
|
||||
<if test="menuId != null and menuId =='nomenu' and standType =='FOREIGN'">
|
||||
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
|
||||
='FOREIGN_STAND')
|
||||
<if test="standNumber != null">
|
||||
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR is null))
|
||||
</if>
|
||||
</if> -->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and standType =='INLAND'">-->
|
||||
<!-- and SAR_STAND_MENU.MENU_ID in (-->
|
||||
<!-- select TS_RESOURCE.id from TS_RESOURCE start with id=(select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null-->
|
||||
<!-- and sor_divide-->
|
||||
<!-- ='INLAND_STAND') connect by prior id= parent_id-->
|
||||
<!-- )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
@@ -747,30 +832,15 @@
|
||||
(select tmp_tb.* from
|
||||
(
|
||||
SELECT
|
||||
DISTINCT SAR_STANDARDS_INFO.id,
|
||||
SAR_STANDARDS_INFO.stand_type,
|
||||
SAR_STANDARDS_INFO.country,
|
||||
SAR_STANDARDS_INFO.stand_sort,
|
||||
SAR_STANDARDS_INFO.stand_number,
|
||||
SAR_STANDARDS_INFO.stand_year,
|
||||
SAR_STANDARDS_INFO.stand_name,
|
||||
SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state,
|
||||
SAR_STANDARDS_INFO.stand_nature,
|
||||
SAR_STANDARDS_INFO.issue_time,
|
||||
SAR_STANDARDS_INFO.put_time,
|
||||
SAR_STANDARDS_INFO.text_status,
|
||||
SAR_STANDARDS_INFO.creation_user,
|
||||
SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time,
|
||||
SAR_STANDARDS_INFO.modify_time,
|
||||
SAR_STANDARDS_INFO.STAND_SYSTEM,
|
||||
SAR_STANDARDS_INFO.IS_RELATE_ACCESS
|
||||
<include refid="Base_Column_List_DIS"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
limit ${pager.startIndex-1},${pageSize}) a
|
||||
<include refid="SarStandardsInfo_out_left"/>
|
||||
order by
|
||||
<include refid="standSort_out"/>
|
||||
${orderByA} ${order1},a.id
|
||||
</select>
|
||||
<!--FIELD(SAR_STANDARDS_INFO.issue_time,'已发布'), FIELD(SAR_STANDARDS_INFO.issue_time,'TBD'), FIELD(SAR_STANDARDS_INFO.issue_time,'N/A') ,-->
|
||||
@@ -901,11 +971,16 @@
|
||||
|
||||
<select id="getSarStandardsExportInfo" resultMap="BaseResultMapExcel"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select<include refid="Base_Column_List_Show"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>
|
||||
order by SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id
|
||||
select a.* from (
|
||||
select<include refid="Base_Column_List_Show"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>
|
||||
) a
|
||||
order by
|
||||
<include refid="standSort_out"/>
|
||||
a.issue_time is null
|
||||
,a.issue_time desc,a.id
|
||||
</select>
|
||||
|
||||
<select id="selectStandardsInfoByKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
|
||||
Reference in New Issue
Block a user