|
@@ -52,6 +52,7 @@ import org.springblade.core.log.exception.ServiceException;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
import org.springblade.core.redis.cache.BladeRedis;
|
|
import org.springblade.core.redis.cache.BladeRedis;
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
|
+import org.springblade.core.secure.utils.SecureUtil;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.node.ForestNodeMerger;
|
|
import org.springblade.core.tool.node.ForestNodeMerger;
|
|
import org.springblade.core.tool.utils.*;
|
|
import org.springblade.core.tool.utils.*;
|
|
@@ -72,6 +73,7 @@ import org.springblade.websocket.feign.WebSocketClient;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.core.io.ByteArrayResource;
|
|
import org.springframework.core.io.ByteArrayResource;
|
|
import org.springframework.core.io.Resource;
|
|
import org.springframework.core.io.Resource;
|
|
|
|
+import org.springframework.dao.DataAccessException;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.http.ContentDisposition;
|
|
import org.springframework.http.ContentDisposition;
|
|
import org.springframework.http.HttpHeaders;
|
|
import org.springframework.http.HttpHeaders;
|
|
@@ -632,7 +634,23 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
// if(info!=null){
|
|
// if(info!=null){
|
|
// resultTabs.forEach(tab->tab.setFileName(info.getName()));
|
|
// resultTabs.forEach(tab->tab.setFileName(info.getName()));
|
|
// }
|
|
// }
|
|
-
|
|
|
|
|
|
+ //同步标识
|
|
|
|
+ if (CollectionUtil.isNotEmpty(resultTabs) && SecureUtil.isAdministrator()) {
|
|
|
|
+ List<Long> collect1 = resultTabs.stream().map(WbsTreeContract::getPKeyId).collect(Collectors.toList());
|
|
|
|
+ List<Long> longs = null;
|
|
|
|
+ try {
|
|
|
|
+ longs = jdbcTemplate.queryForList("select p_key_id from m_wbs_tree_contract_extend where is_sync = 1 and is_deleted = 0 and p_key_id in (" + StringUtils.join(collect1, ",") + ")", Long.class);
|
|
|
|
+ } catch (DataAccessException e) {
|
|
|
|
+ //TODO 暂时忽略异常,避免表不存在报错
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ if (CollectionUtil.isNotEmpty(longs)) {
|
|
|
|
+ List<Long> finalLongs = longs;
|
|
|
|
+ resultTabs.forEach(f -> {
|
|
|
|
+ f.setIsSync(finalLongs.contains(f.getPKeyId()) && f.getIsBussShow() != 2 ? 1 : 0);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (Optional.ofNullable(wbsTreeContract.getIsUseSort()).orElse(0) == 0) {
|
|
if (Optional.ofNullable(wbsTreeContract.getIsUseSort()).orElse(0) == 0) {
|
|
//表单排序
|
|
//表单排序
|
|
if (resultTabs.size() > 0) {
|
|
if (resultTabs.size() > 0) {
|