Merge branch 'fix_foton_20231031' into 'dev_20230829_change'
Fix foton 20231031 See merge request laws-foton-slrs/foton-slrs-system-rest!135
This commit is contained in:
+19
-15
@@ -246,15 +246,15 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
sortField2 = "lawsYear";
|
sortField2 = "lawsYear";
|
||||||
sortField3 = "lawsType.keyword";
|
sortField3 = "lawsType.keyword";
|
||||||
} else if("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
} else if("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
||||||
sortField1 = "put_time_data";
|
// sortField1 = "put_time_data";
|
||||||
sortField2 = "standNumber";
|
sortField1 = "standNumber";
|
||||||
sortField3 = "standYear";
|
sortField2 = "standYear";
|
||||||
sortField4 = "standSort.keyword";
|
sortField3 = "standSort.keyword";
|
||||||
} else if ("stand".equals(searchInfoEO.getSelectIndex())) {
|
} else if ("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||||
sortField1 = "SSRQName";
|
sortField1 = "SSRQName";
|
||||||
sortField2 = "standNumber";
|
// sortField2 = "standNumber";
|
||||||
sortField3 = "standYear";
|
// sortField3 = "standYear";
|
||||||
sortField4 = "standSort.keyword";
|
// sortField4 = "standSort.keyword";
|
||||||
} else {
|
} else {
|
||||||
sortField1 = "standNumber";
|
sortField1 = "standNumber";
|
||||||
sortField2 = "standYear";
|
sortField2 = "standYear";
|
||||||
@@ -305,15 +305,19 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchRequestBuilder = client.prepareSearch(searchInfoEO.getSelectIndex())
|
searchRequestBuilder = client.prepareSearch(searchInfoEO.getSelectIndex())
|
||||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH);
|
||||||
.addSort(new ScoreSortBuilder().order(SortOrder.DESC))
|
if ("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||||
.addSort(sortField1, SortOrder.DESC)
|
searchRequestBuilder.addSort(sortField1,SortOrder.DESC);
|
||||||
|
} else {
|
||||||
|
searchRequestBuilder.addSort(new ScoreSortBuilder().order(SortOrder.DESC))
|
||||||
.addSort("standSortOrder", SortOrder.ASC)
|
.addSort("standSortOrder", SortOrder.ASC)
|
||||||
.addSort(sortField2, SortOrder.ASC)
|
.addSort(sortField1, SortOrder.ASC)
|
||||||
.addSort(sortField3, SortOrder.DESC)
|
.addSort(sortField2, SortOrder.DESC)
|
||||||
.addSort(sortField4, SortOrder.ASC)
|
.addSort(sortField3, SortOrder.ASC)
|
||||||
.addSort("issue_time_data", SortOrder.DESC)
|
.addSort("issue_time_data", SortOrder.DESC);
|
||||||
.setFrom((searchInfoEO.getPage()-1) * searchInfoEO.getPageSize())
|
}
|
||||||
|
|
||||||
|
searchRequestBuilder.setFrom((searchInfoEO.getPage()-1) * searchInfoEO.getPageSize())
|
||||||
.setSize(searchInfoEO.getPageSize());
|
.setSize(searchInfoEO.getPageSize());
|
||||||
|
|
||||||
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
package com.adc.da.mq;
|
package com.adc.da.mq;
|
||||||
|
|
||||||
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||||
|
import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
||||||
|
import com.adc.da.slrs.sarBussStandMenu.service.ISarBussStandMenuService;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
import com.adc.da.sys.dao.DicTypeEODao;
|
import com.adc.da.sys.dao.DicTypeEODao;
|
||||||
import com.adc.da.sys.entity.DicTypeEO;
|
import com.adc.da.sys.entity.DicTypeEO;
|
||||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -22,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.messaging.Message;
|
import org.springframework.messaging.Message;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -33,6 +39,12 @@ public class SendBussMQService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarStandardsInfoService sarStandardsInfoService;
|
private ISarStandardsInfoService sarStandardsInfoService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISarBussStandMenuService sarBussMenusService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITsResourceService tsResourceService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysInfoEOService sysInfoEOService;
|
private SysInfoEOService sysInfoEOService;
|
||||||
|
|
||||||
@@ -103,7 +115,7 @@ public class SendBussMQService {
|
|||||||
if (issue_time_data != null) {
|
if (issue_time_data != null) {
|
||||||
saveMap.put("issue_time_data",issue_time_data.getTime());
|
saveMap.put("issue_time_data",issue_time_data.getTime());
|
||||||
}else{
|
}else{
|
||||||
saveMap.put("issue_time_data",-1000000000000000000L);
|
saveMap.put("issue_time_data",-100000000L);
|
||||||
}
|
}
|
||||||
|
|
||||||
//实施日期 高级查询
|
//实施日期 高级查询
|
||||||
@@ -117,11 +129,34 @@ public class SendBussMQService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (put_time_data != null) {
|
if (put_time_data != null) {
|
||||||
saveMap.put("put_time_data",put_time_data.getTime());
|
// ES对比按照字符串比较,因此9位时间戳前加0
|
||||||
|
Date putTime = null;
|
||||||
|
try {
|
||||||
|
putTime = sdf.parse(infoEO.getPutTime());
|
||||||
|
String putTimeStr = String.valueOf(putTime.getTime());
|
||||||
|
saveMap.put("putDate",sdf.format(putTime));
|
||||||
|
if (putTimeStr.length() > 12) {
|
||||||
|
saveMap.put("put_time_data",putTimeStr);
|
||||||
|
} else {
|
||||||
|
saveMap.put("put_time_data","0" + putTimeStr);
|
||||||
|
logger.info("前面加零的put_time_data:"+saveMap.get("put_time_data"));
|
||||||
|
}
|
||||||
|
} catch (ParseException e) {
|
||||||
|
saveMap.put("put_time_data",-100000000L);
|
||||||
|
saveMap.put("putDate",null);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
saveMap.put("put_time_data",-1000000000000000000L);
|
saveMap.put("put_time_data",-100000000L);
|
||||||
|
saveMap.put("putDate",null);
|
||||||
}
|
}
|
||||||
|
logger.info("saveMap实施日期:"+saveMap.get("put_time_data"));
|
||||||
saveMap.put("warehousingTime",sdf.format(infoEO.getCreationTime())); // 入库时间
|
saveMap.put("warehousingTime",sdf.format(infoEO.getCreationTime())); // 入库时间
|
||||||
|
if (infoEO.getCreationTime().getTime() > 12) {
|
||||||
|
saveMap.put("warehousingTimeStamp",infoEO.getCreationTime().getTime()); // 入库时间戳
|
||||||
|
}else {
|
||||||
|
saveMap.put("warehousingTimeStamp", "0" + infoEO.getCreationTime().getTime()); // 入库时间戳
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//查询字典表,形成Hash映射提升速度
|
//查询字典表,形成Hash映射提升速度
|
||||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_id","dic_type_code", "dic_type_name","show_index");
|
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_id","dic_type_code", "dic_type_name","show_index");
|
||||||
@@ -140,8 +175,10 @@ public class SendBussMQService {
|
|||||||
saveMap.put("id",infoEO.getId());
|
saveMap.put("id",infoEO.getId());
|
||||||
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
||||||
|
|
||||||
saveMap.put("standSort",infoEO.getStandSort());
|
// saveMap.put("standSort",infoEO.getStandSort());
|
||||||
saveMap.put("stand_sort",infoEO.getStandSort());
|
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||||
|
saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||||
|
saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||||
if(StringUtils.isNotEmpty(infoEO.getStandSort())){
|
if(StringUtils.isNotEmpty(infoEO.getStandSort())){
|
||||||
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
||||||
saveMap.put("standSortShow",codeName);
|
saveMap.put("standSortShow",codeName);
|
||||||
@@ -314,4 +351,38 @@ public class SendBussMQService {
|
|||||||
return saveMap;
|
return saveMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String convertStandSort(String standId) {
|
||||||
|
QueryWrapper<SarBussStandMenu> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("BUSS_STAND_ID", standId);
|
||||||
|
wrapper.gt("length(MENU_ID)", 0);
|
||||||
|
wrapper.select("MENU_ID");
|
||||||
|
List<SarBussStandMenu> sarStandMenuList = sarBussMenusService.list(wrapper);
|
||||||
|
if (sarStandMenuList.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<String> standMenuIdSet = sarStandMenuList.stream().map(SarBussStandMenu::getMenuId).collect(Collectors.toList());
|
||||||
|
List<String> standMenuList = new ArrayList<>();
|
||||||
|
for (String menuId : standMenuIdSet) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
recursivelyFetchParentNodes(menuId, result);
|
||||||
|
standMenuList.add(String.join("/", result));
|
||||||
|
}
|
||||||
|
return String.join(",", standMenuList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void recursivelyFetchParentNodes(String currentId, List<String> result) {
|
||||||
|
TsResource menu = null;
|
||||||
|
try {
|
||||||
|
menu = tsResourceService.getById(currentId);
|
||||||
|
if (menu != null) {
|
||||||
|
result.add(0,menu.getMenuName());
|
||||||
|
if (StringUtils.isNotEmpty(menu.getParentId())) {
|
||||||
|
recursivelyFetchParentNodes(menu.getParentId(), result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package com.adc.da.mq;
|
package com.adc.da.mq;
|
||||||
|
|
||||||
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||||
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
|
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||||
|
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||||
@@ -8,6 +12,7 @@ import com.adc.da.sys.dao.DicTypeEODao;
|
|||||||
import com.adc.da.sys.entity.DicTypeEO;
|
import com.adc.da.sys.entity.DicTypeEO;
|
||||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
import com.adc.da.utils.util.Utils;
|
import com.adc.da.utils.util.Utils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.rabbitmq.client.Channel;
|
import com.rabbitmq.client.Channel;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -23,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.messaging.Message;
|
import org.springframework.messaging.Message;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -34,6 +40,12 @@ public class SendStandMQService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarStandardsInfoService sarStandardsInfoService;
|
private ISarStandardsInfoService sarStandardsInfoService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISarStandMenuService sarStandMenuService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITsResourceService tsResourceService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysInfoEOService sysInfoEOService;
|
private SysInfoEOService sysInfoEOService;
|
||||||
|
|
||||||
@@ -120,8 +132,10 @@ public class SendStandMQService {
|
|||||||
saveMap.put("countryShow",codeName);
|
saveMap.put("countryShow",codeName);
|
||||||
}
|
}
|
||||||
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
||||||
saveMap.put("standSort",infoEO.getStandSort());
|
// saveMap.put("standSort",infoEO.getStandSort());
|
||||||
saveMap.put("stand_sort",infoEO.getStandSort());
|
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||||
|
saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||||
|
saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||||
if (StringUtils.isNotEmpty(infoEO.getStandSort())) {
|
if (StringUtils.isNotEmpty(infoEO.getStandSort())) {
|
||||||
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
||||||
saveMap.put("standSortShow",codeName);
|
saveMap.put("standSortShow",codeName);
|
||||||
@@ -154,7 +168,7 @@ public class SendStandMQService {
|
|||||||
if (issue_time_data != null) {
|
if (issue_time_data != null) {
|
||||||
saveMap.put("issue_time_data",issue_time_data.getTime());
|
saveMap.put("issue_time_data",issue_time_data.getTime());
|
||||||
}else{
|
}else{
|
||||||
saveMap.put("issue_time_data",-1000000000000000000L);
|
saveMap.put("issue_time_data",-100000000L);
|
||||||
}
|
}
|
||||||
String standNatureName = "";
|
String standNatureName = "";
|
||||||
if(infoEO.getStandNature() != null && StringUtils.isNotBlank(infoEO.getStandNature())){
|
if(infoEO.getStandNature() != null && StringUtils.isNotBlank(infoEO.getStandNature())){
|
||||||
@@ -196,6 +210,11 @@ public class SendStandMQService {
|
|||||||
saveMap.put("CHJL",infoEO.getCHJL());
|
saveMap.put("CHJL",infoEO.getCHJL());
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
saveMap.put("warehousingTime",sdf.format(infoEO.getCreationTime())); // 入库时间
|
saveMap.put("warehousingTime",sdf.format(infoEO.getCreationTime())); // 入库时间
|
||||||
|
if (infoEO.getCreationTime().getTime() > 12) {
|
||||||
|
saveMap.put("warehousingTimeStamp",infoEO.getCreationTime().getTime()); // 入库时间戳
|
||||||
|
}else {
|
||||||
|
saveMap.put("warehousingTimeStamp", "0" + infoEO.getCreationTime().getTime()); // 入库时间戳
|
||||||
|
}
|
||||||
|
|
||||||
String fieldInfo = InitStandAttrUtil.queryField;
|
String fieldInfo = InitStandAttrUtil.queryField;
|
||||||
List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
List<String> fieldInfoList = Arrays.asList(fieldInfo .split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||||
@@ -217,6 +236,20 @@ public class SendStandMQService {
|
|||||||
if(fieldValue.contains("null")){
|
if(fieldValue.contains("null")){
|
||||||
fieldValue = fieldValue.replace("null","");
|
fieldValue = fieldValue.replace("null","");
|
||||||
}
|
}
|
||||||
|
if ("SSRQ".equals(field)) {
|
||||||
|
if (infoMap.get(field) != null && StringUtils.isNotBlank(infoMap.get(field).toString())) {
|
||||||
|
try {
|
||||||
|
Date parse = sdf.parse(infoMap.get(field).toString());
|
||||||
|
fieldValue = String.valueOf(parse.getTime());
|
||||||
|
// ES中的排序问题,时间戳需要补0
|
||||||
|
if (fieldValue.length() <= 12) {
|
||||||
|
fieldValue = "0" + fieldValue;
|
||||||
|
}
|
||||||
|
} catch (ParseException e) {
|
||||||
|
fieldValue = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
saveMap.put(field+"Name",fieldValue);
|
saveMap.put(field+"Name",fieldValue);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
@@ -301,12 +334,50 @@ public class SendStandMQService {
|
|||||||
if (!valArr.isEmpty()) {
|
if (!valArr.isEmpty()) {
|
||||||
value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
||||||
}
|
}
|
||||||
|
if ("SSRQ".equals(name)) {
|
||||||
|
if (entry.getValue() != null && StringUtils.isNotBlank(entry.getValue().toString())) {
|
||||||
|
try {
|
||||||
|
Date parse = sdf.parse(entry.getValue().toString());
|
||||||
|
value = String.valueOf(parse.getTime());
|
||||||
|
// ES中的排序问题,时间戳需要补0
|
||||||
|
if (value.length() <= 12) {
|
||||||
|
value = "0" + value;
|
||||||
|
}
|
||||||
|
} catch (ParseException e) {
|
||||||
|
value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
saveMap.put(name + "Name",value);
|
saveMap.put(name + "Name",value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 确保SSRQ字段加入ES中
|
||||||
|
Map<String, Object> attrInfoCaseMap = infoEO.getAttrInfoCaseMap();
|
||||||
|
logger.info("saveMap.get(SSRQ) = " + saveMap.get("SSRQ"));
|
||||||
|
if (attrInfoCaseMap.get("SSRQ") != null && StringUtils.isNotBlank(attrInfoCaseMap.get("SSRQ").toString())) {
|
||||||
|
String ssrqName = "";
|
||||||
|
try {
|
||||||
|
Date parse = sdf.parse(attrInfoCaseMap.get("SSRQ").toString());
|
||||||
|
ssrqName = String.valueOf(parse.getTime());
|
||||||
|
saveMap.put("putDate", sdf.format(parse));
|
||||||
|
// ES中的排序问题,时间戳需要补0
|
||||||
|
if (ssrqName.length() <= 12) {
|
||||||
|
ssrqName = "0" + ssrqName;
|
||||||
|
}
|
||||||
|
} catch (ParseException e) {
|
||||||
|
saveMap.put("putDate", null);
|
||||||
|
ssrqName = "";
|
||||||
|
}
|
||||||
|
logger.info("SSRQName="+ ssrqName);
|
||||||
|
saveMap.put("SSRQName", ssrqName);
|
||||||
|
}else {
|
||||||
|
saveMap.put("putDate", null);
|
||||||
|
}
|
||||||
|
logger.info("attrInfoCaseMap:"+ attrInfoCaseMap);
|
||||||
|
logger.info("SSRQName转换结束");
|
||||||
if("add".equals(addOrUpdate)){
|
if("add".equals(addOrUpdate)){
|
||||||
sarStandardsInfoService.insertIntoIndexForMap(saveMap);
|
sarStandardsInfoService.insertIntoIndexForMap(saveMap);
|
||||||
} else {
|
} else {
|
||||||
@@ -379,5 +450,36 @@ public class SendStandMQService {
|
|||||||
return saveMap;
|
return saveMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String convertStandSort(String standId) {
|
||||||
|
LambdaQueryWrapper<SarStandMenu> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(SarStandMenu::getStandId,standId);
|
||||||
|
wrapper.select(SarStandMenu::getMenuId);
|
||||||
|
List<SarStandMenu> sarStandMenuList = sarStandMenuService.list(wrapper);
|
||||||
|
if (sarStandMenuList.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<String> standMenuIdSet = sarStandMenuList.stream().map(SarStandMenu::getMenuId).collect(Collectors.toList());
|
||||||
|
List<String> standMenuList = new ArrayList<>();
|
||||||
|
for (String menuId : standMenuIdSet) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
recursivelyFetchParentNodes(menuId, result);
|
||||||
|
standMenuList.add(String.join("/", result));
|
||||||
|
}
|
||||||
|
return String.join(",", standMenuList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void recursivelyFetchParentNodes(String currentId, List<String> result) {
|
||||||
|
TsResource menu = null;
|
||||||
|
try {
|
||||||
|
menu = tsResourceService.getById(currentId);
|
||||||
|
if (menu != null) {
|
||||||
|
result.add(0,menu.getMenuName());
|
||||||
|
if (StringUtils.isNotEmpty(menu.getParentId())) {
|
||||||
|
recursivelyFetchParentNodes(menu.getParentId(), result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,21 @@ public class UserEOController extends BaseController<UserEO> {
|
|||||||
return Result.success(userVO);
|
return Result.success(userVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "|UserEO|详情接口包含被禁用用户")
|
||||||
|
@GetMapping("/getByIdWithDisabled")
|
||||||
|
public ResponseMessage<UserVO> getByIdFeignClientWithDisabled(String id) throws Exception {
|
||||||
|
UserEO userEO = userEOService.getUserWithRolesWithDisabled(id);
|
||||||
|
UserVO userVO= new UserVO();
|
||||||
|
if(userEO!=null){
|
||||||
|
userVO = BeanUtil.toBean(userEO,UserVO.class);
|
||||||
|
userVO.setRoles(userEO.getRoleEOList());
|
||||||
|
userVO.setOrgsstr(userEO.getOrgIdList());
|
||||||
|
userVO.setOrgs(userEO.getOrgEOList());
|
||||||
|
userVO.setPassword(userEO.getPassword());
|
||||||
|
}
|
||||||
|
return Result.success(userVO);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.util.http.PageInfo < com.adc.da.sys.entity.UserEO>>
|
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.util.http.PageInfo < com.adc.da.sys.entity.UserEO>>
|
||||||
* @Author liwenxuan
|
* @Author liwenxuan
|
||||||
|
|||||||
@@ -96,6 +96,11 @@ public interface UserEODao extends BaseMapper<UserEO> {
|
|||||||
*/
|
*/
|
||||||
public UserEO getUserWithRoles(String id);
|
public UserEO getUserWithRoles(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户及用户所对应的角色包含已禁用的用户
|
||||||
|
*/
|
||||||
|
public UserEO getUserWithRolesWithDisabled(String id);
|
||||||
|
|
||||||
public UserEO getUserWithRolesAll(String id);
|
public UserEO getUserWithRolesAll(String id);
|
||||||
|
|
||||||
public UserEO get(String id);
|
public UserEO get(String id);
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public interface IUserEOService extends IService<UserEO> {
|
|||||||
|
|
||||||
public UserEO getUserWithRoles(String id);
|
public UserEO getUserWithRoles(String id);
|
||||||
|
|
||||||
|
public UserEO getUserWithRolesWithDisabled(String id);
|
||||||
|
|
||||||
public UserEO getUserWithRolesAll(String id);
|
public UserEO getUserWithRolesAll(String id);
|
||||||
|
|
||||||
public int saveUserRole(UserEO userEO);
|
public int saveUserRole(UserEO userEO);
|
||||||
|
|||||||
@@ -248,6 +248,16 @@ public class UserEOServiceImpl extends ServiceImpl<UserEODao, UserEO> implements
|
|||||||
return this.baseMapper.getUserWithRoles(id);
|
return this.baseMapper.getUserWithRoles(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户及用户所对应的角色,包含已禁用用户
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||||
|
public UserEO getUserWithRolesWithDisabled(String id) {
|
||||||
|
return this.baseMapper.getUserWithRolesWithDisabled(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||||
public UserEO getUserWithRolesAll(String id) {
|
public UserEO getUserWithRolesAll(String id) {
|
||||||
return this.baseMapper.getUserWithRolesAll(id);
|
return this.baseMapper.getUserWithRolesAll(id);
|
||||||
|
|||||||
@@ -427,6 +427,18 @@
|
|||||||
where u.usid = #{id} and u.DISABLE_FLAG = '0'
|
where u.usid = #{id} and u.DISABLE_FLAG = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据用户ID获取用户信息及角色、组织机构信息,包含已禁用的用户 -->
|
||||||
|
<select id="getUserWithRolesWithDisabled" resultMap="UserRoleMap" parameterType="java.lang.String">
|
||||||
|
select
|
||||||
|
<include refid="User_Role_List"/>
|
||||||
|
from TS_USER u
|
||||||
|
left join TS_USER_ROLE ur on u.usid = ur.user_id
|
||||||
|
left join TS_ROLE r on ur.role_id = r.id
|
||||||
|
left join TS_USER_ORG UORG on u.usid = UORG.user_id
|
||||||
|
left join TS_ORG ORG on UORG.org_id = ORG.id
|
||||||
|
where u.usid = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getUserWithRolesAll" resultMap="UserRoleMap" parameterType="java.lang.String">
|
<select id="getUserWithRolesAll" resultMap="UserRoleMap" parameterType="java.lang.String">
|
||||||
select
|
select
|
||||||
<include refid="User_Role_List"/>
|
<include refid="User_Role_List"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user