Merge branch 'dev'

This commit is contained in:
wangliwen 2022-10-28 15:00:23 +08:00
commit cbbd57e410
7 changed files with 17 additions and 19 deletions

View File

@ -3,8 +3,6 @@ package io.renren.modules.enke.service;
import io.renren.common.service.CrudService;
import io.renren.modules.enke.dto.HostInfoDTO;
import io.renren.modules.enke.entity.HostInfoEntity;
import io.renren.modules.fuse.dto.TbFuseDTO;
import io.renren.modules.fuse.entity.TbFuseEntity;
/**
* @Auther:lizhicheng2@hisense.com

View File

@ -8,7 +8,6 @@ import io.renren.modules.enke.dao.HostInfoDao;
import io.renren.modules.enke.dto.HostInfoDTO;
import io.renren.modules.enke.entity.HostInfoEntity;
import io.renren.modules.enke.service.EnkeService;
import io.renren.modules.fuse.dto.TbFuseDTO;
import org.springframework.stereotype.Service;
import java.util.List;

View File

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import io.renren.common.constant.Constant;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.JhlDAPTool;
import io.renren.modules.gateway.dao.ApiCountHistoryDao;
@ -33,7 +32,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.StringUtils;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
@ -409,7 +407,7 @@ public class MonitorControllerV2 {
LambdaQueryWrapper<SysNoticeEntity> queryWrapper = new QueryWrapper<SysNoticeEntity>()
.lambda()
.select(SysNoticeEntity::getId,SysNoticeEntity::getJumpUrl,SysNoticeEntity::getApplyState,SysNoticeEntity::getType)
.select(SysNoticeEntity::getId, SysNoticeEntity::getJumpUrl, SysNoticeEntity::getApplyState, SysNoticeEntity::getType)
.isNull(SysNoticeEntity::getJumpUrl);
long current = 1L;
@ -425,7 +423,7 @@ public class MonitorControllerV2 {
sysNoticeDao.update(null, updateWrapper);
}
}
}while (entityPage.hasNext());
} while (entityPage.hasNext());
}

View File

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@ -139,7 +139,6 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
}
//更新发送者信息
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
entity.setSenderName(SecurityUser.getUser().getRealName());
@ -296,7 +295,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
" <sendpersonGuid>BE604908-D7A3-4947-9CAD-A70FF2E48AB1</sendpersonGuid>\n" + //没有发送人定义先写死
" <typeName>其他</typeName>\n" +
" <isout>1</isout>\n" +
(StringUtils.isNotBlank(notice.getJumpUrl()) ? "<url>" + notice.getJumpUrl() +"</url>\n" : "<url>http://15.72.183.90:7008</url>\n") +
(StringUtils.isNotBlank(notice.getJumpUrl()) ? "<url>" + notice.getJumpUrl() + "</url>\n" : "<url>http://15.72.183.90:7008</url>\n") +
" <openFlag>1</openFlag>\n" +
" <isReply>0</isReply>\n" +
" <isTop>0</isTop>\n" +

View File

@ -10,7 +10,7 @@ import java.util.Map;
@Component
public class NoticeUntil {
static Map<String, Map<Integer,String>> routeMap;
static Map<String, Map<Integer, String>> routeMap;
static Map<Integer, String> typeMap;
static Map<String, String> tabMap;
@ -60,7 +60,7 @@ public class NoticeUntil {
" 12: \"其他\"" +
"}";
typeMap = JSONObject.parseObject(typeString, HashMap.class);
String tabString = "{" +
" \"申请前台\": \"能力申请\"," +
" \"上架前台\": \"能力上架\"," +
@ -81,11 +81,12 @@ public class NoticeUntil {
/**
* 先根据type取通知类型前台根据tab区分不同param后台根据待办已办状态区分不同路由
* 这个逻辑好费劲哈哈
*
* @param type
* @param applyState
* @return
*/
public String convertJumpUrl(Integer type, Integer applyState){
public String convertJumpUrl(Integer type, Integer applyState) {
String typeName = typeMap.get(type);
if (typeName == null) return null;
@ -93,10 +94,10 @@ public class NoticeUntil {
if (typeName.indexOf("后台") > -1) {//后台根据待办已办状态区分不同路由
Map<Integer, String> todoMap = routeMap.get(typeName);
String route = todoMap.get(applyState);
if (route != null){
if (route != null) {
return manageUrl + "/#/" + route;
}
}else if (typeName.equals("会议室前台")){//会议室单独处理
} else if (typeName.equals("会议室前台")) {//会议室单独处理
return portalUrl + "/#/DetailsPageconetent?select=基础设施&formPage=noticePage";
} else {//前台根据tab区分不同param
String tabName = tabMap.get(typeName);

View File

@ -2154,7 +2154,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return index;
}).collect(Collectors.toList());
Map<String, List<Map<String, Object>>> typeCountListMap1 = // 区级部门
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3")).collect(Collectors.groupingBy(m -> m.get("district").toString()));
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
resultList = resultList.stream().map(index -> {
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
@ -2171,7 +2172,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}).collect(Collectors.toList());
Map<String, List<Map<String, Object>>> typeCountListMap2 = // 企业部门
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4")).collect(Collectors.groupingBy(m -> m.get("district").toString()));
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
resultList = resultList.stream().map(index -> {
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
@ -2327,7 +2329,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return index;
}).collect(Collectors.toList());
Map<String, List<Map<String, Object>>> typeCountListMap1 = // 区级部门
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3")).collect(Collectors.groupingBy(m -> m.get("district").toString()));
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
resultList = resultList.stream().map(index -> {
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
@ -2343,7 +2346,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return index;
}).collect(Collectors.toList());
Map<String, List<Map<String, Object>>> typeCountListMap2 = // 企业部门
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4")).collect(Collectors.groupingBy(m -> m.get("district").toString()));
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
resultList = resultList.stream().map(index -> {
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());