Merge branch 'dev' of http://192.168.124.50/wangliwen/share-platform into dev
* 'dev' of http://192.168.124.50/wangliwen/share-platform: 500 字典类型内也返回对应字典值 bug fix 消息通知接口优化 ... 能力统计增加企业部门信息 能力申请被拒绝时 删除申请记录 del_flg 置1 1.门户首页基础设施统计会客厅数量错误修复 npe npe ... pageWithAttrs 非中文数量不正确的处理 我的待办列表 增加会议室 屮
This commit is contained in:
commit
cb353085b5
|
@ -1,5 +1,6 @@
|
||||||
package io.renren.modules.activiti.controller;
|
package io.renren.modules.activiti.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
|
@ -30,6 +31,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务管理
|
* 任务管理
|
||||||
|
@ -98,6 +100,35 @@ public class ActTaskController {
|
||||||
taskDTO.setAssigneeName(userDTO.getRealName());
|
taskDTO.setAssigneeName(userDTO.getRealName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
|
||||||
|
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state = 1;", Integer.class);
|
||||||
|
page.setTotal(page.getTotal() + meetingroom_book);
|
||||||
|
Integer limit = 10;
|
||||||
|
if (params.get(Constant.LIMIT) != null) {
|
||||||
|
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
||||||
|
}
|
||||||
|
if (page.getList().size() < limit) {
|
||||||
|
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
|
||||||
|
" t_meetingroom_book.id AS `taskId`, " +
|
||||||
|
" t_meetingroom_book.dept AS `userDeptName`, " +
|
||||||
|
" t_meetingroom.`name` AS `userName`, " +
|
||||||
|
" '会议室审核' AS `taskName `, " +
|
||||||
|
" t_meetingroom.create_date AS `createTime` " +
|
||||||
|
"FROM " +
|
||||||
|
" t_meetingroom_book " +
|
||||||
|
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
|
||||||
|
"WHERE " +
|
||||||
|
" state = 1;");
|
||||||
|
List<TaskDTO> meetingroom_bookTaskDto = meetingroom_bookTask
|
||||||
|
.stream().map(index -> {
|
||||||
|
TaskDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), TaskDTO.class);
|
||||||
|
return taskDTO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
List<TaskDTO> temp = page.getList();
|
||||||
|
temp.addAll(meetingroom_bookTaskDto);
|
||||||
|
page.setList(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
return new Result<PageData<TaskDTO>>().ok(page);
|
return new Result<PageData<TaskDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class HistoryController {
|
||||||
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
|
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
|
||||||
activityDTO.setStartUserName(userDTO != null ? userDTO.getRealName() : "");
|
activityDTO.setStartUserName(userDTO != null ? userDTO.getRealName() : "");
|
||||||
activityDTO.setStartUserDeptName(sysUserDao.getDeptNameByUserId(userDTO.getId().toString()));
|
activityDTO.setStartUserDeptName(userDTO != null ? sysUserDao.getDeptNameByUserId(userDTO.getId().toString()) : "");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(activityDTO.getAssignee())) {
|
if (StringUtils.isNotEmpty(activityDTO.getAssignee())) {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
|
||||||
|
|
|
@ -59,6 +59,7 @@ import org.codehaus.jackson.map.ObjectMapper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -122,6 +123,8 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
private ResourceDao resourceDao;
|
private ResourceDao resourceDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeService sysNoticeService;
|
private SysNoticeService sysNoticeService;
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据参数获取当前运行的任务信息
|
* 根据参数获取当前运行的任务信息
|
||||||
|
@ -685,6 +688,7 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
pvmTransitionListC.clear();
|
pvmTransitionListC.clear();
|
||||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||||
}
|
}
|
||||||
|
jdbcTemplate.update(String.format("UPDATE t_ability_application SET del_flag = 1 WHERE instance_id = %s ;", task.getProcessInstanceId()));
|
||||||
sysNoticeService.updateApplyStateById(task.getProcessInstanceId(), 1);
|
sysNoticeService.updateApplyStateById(task.getProcessInstanceId(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,6 +747,7 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
pvmTransitionListC.clear();
|
pvmTransitionListC.clear();
|
||||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||||
}
|
}
|
||||||
|
jdbcTemplate.update(String.format("UPDATE t_ability_application SET del_flag = 1 WHERE instance_id = %s ;", instanceId));
|
||||||
sysNoticeService.updateApplyStateById(instanceId, 1);
|
sysNoticeService.updateApplyStateById(instanceId, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package io.renren.modules.enke.service;
|
||||||
import io.renren.common.service.CrudService;
|
import io.renren.common.service.CrudService;
|
||||||
import io.renren.modules.enke.dto.HostInfoDTO;
|
import io.renren.modules.enke.dto.HostInfoDTO;
|
||||||
import io.renren.modules.enke.entity.HostInfoEntity;
|
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
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
|
|
@ -8,7 +8,6 @@ import io.renren.modules.enke.dao.HostInfoDao;
|
||||||
import io.renren.modules.enke.dto.HostInfoDTO;
|
import io.renren.modules.enke.dto.HostInfoDTO;
|
||||||
import io.renren.modules.enke.entity.HostInfoEntity;
|
import io.renren.modules.enke.entity.HostInfoEntity;
|
||||||
import io.renren.modules.enke.service.EnkeService;
|
import io.renren.modules.enke.service.EnkeService;
|
||||||
import io.renren.modules.fuse.dto.TbFuseDTO;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.renren.common.constant.Constant;
|
|
||||||
import io.renren.common.utils.ExcelUtils;
|
import io.renren.common.utils.ExcelUtils;
|
||||||
import io.renren.common.utils.JhlDAPTool;
|
import io.renren.common.utils.JhlDAPTool;
|
||||||
import io.renren.modules.gateway.dao.ApiCountHistoryDao;
|
import io.renren.modules.gateway.dao.ApiCountHistoryDao;
|
||||||
|
@ -33,7 +32,6 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
@ -409,7 +407,7 @@ public class MonitorControllerV2 {
|
||||||
|
|
||||||
LambdaQueryWrapper<SysNoticeEntity> queryWrapper = new QueryWrapper<SysNoticeEntity>()
|
LambdaQueryWrapper<SysNoticeEntity> queryWrapper = new QueryWrapper<SysNoticeEntity>()
|
||||||
.lambda()
|
.lambda()
|
||||||
.select(SysNoticeEntity::getId,SysNoticeEntity::getJumpUrl,SysNoticeEntity::getApplyState,SysNoticeEntity::getType)
|
.select(SysNoticeEntity::getId, SysNoticeEntity::getJumpUrl, SysNoticeEntity::getApplyState, SysNoticeEntity::getType)
|
||||||
.isNull(SysNoticeEntity::getJumpUrl);
|
.isNull(SysNoticeEntity::getJumpUrl);
|
||||||
|
|
||||||
long current = 1L;
|
long current = 1L;
|
||||||
|
@ -425,7 +423,7 @@ public class MonitorControllerV2 {
|
||||||
sysNoticeDao.update(null, updateWrapper);
|
sysNoticeDao.update(null, updateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}while (entityPage.hasNext());
|
} while (entityPage.hasNext());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,9 @@ public interface SysNoticeDao extends BaseDao<SysNoticeEntity> {
|
||||||
* 获取我的通知列表
|
* 获取我的通知列表
|
||||||
*/
|
*/
|
||||||
List<SysNoticeEntity> getMyNoticeList(Map<String, Object> params);
|
List<SysNoticeEntity> getMyNoticeList(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新 apply state
|
||||||
|
*/
|
||||||
|
int updateApplyState(Long userId, Integer applyState, String applyId);
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateApplyStateById(String id, Integer state) {
|
public void updateApplyStateById(String id, Integer state) {
|
||||||
Map params = new HashMap();
|
baseDao.updateApplyState(SecurityUser.getUserId(), state, id);
|
||||||
params.put("apply_id", id);
|
|
||||||
List<SysNoticeDTO> list = this.list(params);
|
|
||||||
list.stream().filter(it -> it.getReceiverTypeIds().contains(SecurityUser.getUserId().toString())).forEach(it -> {
|
|
||||||
it.setApplyState(state);
|
|
||||||
this.update(it);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -139,7 +133,6 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//更新发送者信息
|
//更新发送者信息
|
||||||
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {
|
||||||
entity.setSenderName(SecurityUser.getUser().getRealName());
|
entity.setSenderName(SecurityUser.getUser().getRealName());
|
||||||
|
@ -296,7 +289,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
" <sendpersonGuid>BE604908-D7A3-4947-9CAD-A70FF2E48AB1</sendpersonGuid>\n" + //没有发送人定义,先写死
|
" <sendpersonGuid>BE604908-D7A3-4947-9CAD-A70FF2E48AB1</sendpersonGuid>\n" + //没有发送人定义,先写死
|
||||||
" <typeName>其他</typeName>\n" +
|
" <typeName>其他</typeName>\n" +
|
||||||
" <isout>1</isout>\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" +
|
" <openFlag>1</openFlag>\n" +
|
||||||
" <isReply>0</isReply>\n" +
|
" <isReply>0</isReply>\n" +
|
||||||
" <isTop>0</isTop>\n" +
|
" <isTop>0</isTop>\n" +
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Map;
|
||||||
@Component
|
@Component
|
||||||
public class NoticeUntil {
|
public class NoticeUntil {
|
||||||
|
|
||||||
static Map<String, Map<Integer,String>> routeMap;
|
static Map<String, Map<Integer, String>> routeMap;
|
||||||
static Map<Integer, String> typeMap;
|
static Map<Integer, String> typeMap;
|
||||||
static Map<String, String> tabMap;
|
static Map<String, String> tabMap;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class NoticeUntil {
|
||||||
" 12: \"其他\"" +
|
" 12: \"其他\"" +
|
||||||
"}";
|
"}";
|
||||||
typeMap = JSONObject.parseObject(typeString, HashMap.class);
|
typeMap = JSONObject.parseObject(typeString, HashMap.class);
|
||||||
|
|
||||||
String tabString = "{" +
|
String tabString = "{" +
|
||||||
" \"申请前台\": \"能力申请\"," +
|
" \"申请前台\": \"能力申请\"," +
|
||||||
" \"上架前台\": \"能力上架\"," +
|
" \"上架前台\": \"能力上架\"," +
|
||||||
|
@ -81,11 +81,12 @@ public class NoticeUntil {
|
||||||
/**
|
/**
|
||||||
* 先根据type取通知类型,前台根据tab区分不同param,后台根据待办已办状态区分不同路由
|
* 先根据type取通知类型,前台根据tab区分不同param,后台根据待办已办状态区分不同路由
|
||||||
* 这个逻辑好费劲哈哈
|
* 这个逻辑好费劲哈哈
|
||||||
|
*
|
||||||
* @param type
|
* @param type
|
||||||
* @param applyState
|
* @param applyState
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String convertJumpUrl(Integer type, Integer applyState){
|
public String convertJumpUrl(Integer type, Integer applyState) {
|
||||||
|
|
||||||
String typeName = typeMap.get(type);
|
String typeName = typeMap.get(type);
|
||||||
if (typeName == null) return null;
|
if (typeName == null) return null;
|
||||||
|
@ -93,10 +94,10 @@ public class NoticeUntil {
|
||||||
if (typeName.indexOf("后台") > -1) {//后台根据待办已办状态区分不同路由
|
if (typeName.indexOf("后台") > -1) {//后台根据待办已办状态区分不同路由
|
||||||
Map<Integer, String> todoMap = routeMap.get(typeName);
|
Map<Integer, String> todoMap = routeMap.get(typeName);
|
||||||
String route = todoMap.get(applyState);
|
String route = todoMap.get(applyState);
|
||||||
if (route != null){
|
if (route != null) {
|
||||||
return manageUrl + "/#/" + route;
|
return manageUrl + "/#/" + route;
|
||||||
}
|
}
|
||||||
}else if (typeName.equals("会议室前台")){//会议室单独处理
|
} else if (typeName.equals("会议室前台")) {//会议室单独处理
|
||||||
return portalUrl + "/#/DetailsPageconetent?select=基础设施&formPage=noticePage";
|
return portalUrl + "/#/DetailsPageconetent?select=基础设施&formPage=noticePage";
|
||||||
} else {//前台根据tab区分不同param
|
} else {//前台根据tab区分不同param
|
||||||
String tabName = tabMap.get(typeName);
|
String tabName = tabMap.get(typeName);
|
||||||
|
|
|
@ -53,7 +53,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
||||||
*/
|
*/
|
||||||
List<Map> selectDTOPageSpecilTotal(@Param("dto") ResourceDTO resourceDTO);
|
List<Map> selectDTOPageSpecilTotal(@Param("dto") ResourceDTO resourceDTO);
|
||||||
|
|
||||||
Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO);
|
Long selectDTOPageCount(@Param("dto") ResourceDTO resourceDTO, @Param("nonChinese") Boolean nonChinese);
|
||||||
|
|
||||||
List<Map> selectApplyArea(Long userId);
|
List<Map> selectApplyArea(Long userId);
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ import okhttp3.*;
|
||||||
import org.activiti.engine.HistoryService;
|
import org.activiti.engine.HistoryService;
|
||||||
import org.activiti.engine.history.HistoricProcessInstance;
|
import org.activiti.engine.history.HistoricProcessInstance;
|
||||||
import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -553,7 +554,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null, nonChinese);
|
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null, nonChinese);
|
||||||
}
|
}
|
||||||
resultPage.setRecords(resourceDTOS);
|
resultPage.setRecords(resourceDTOS);
|
||||||
resultPage.setTotal(resourceDao.selectDTOPageCount(resourceDTO));
|
resultPage.setTotal(resourceDao.selectDTOPageCount(resourceDTO, nonChinese));
|
||||||
} else {
|
} else {
|
||||||
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
|
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
|
||||||
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese);
|
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese);
|
||||||
|
@ -1898,6 +1899,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
//会客厅
|
//会客厅
|
||||||
CompletableFuture<Void> hkt = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> hkt = CompletableFuture.runAsync(() -> {
|
||||||
QueryWrapper<TMeetingroom> wrapper = new QueryWrapper<>();
|
QueryWrapper<TMeetingroom> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("del_flag", 0);
|
||||||
resultMap.put("会客厅", tMeetingroomMapper.selectCount(wrapper));
|
resultMap.put("会客厅", tMeetingroomMapper.selectCount(wrapper));
|
||||||
|
|
||||||
}, executor);
|
}, executor);
|
||||||
|
@ -2002,8 +2004,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getCountByFuzzyQuery(String keyWorld, String nonChinese) {
|
public Object getCountByFuzzyQuery(String keyWorld, String nonChinese) {
|
||||||
ArrayList<Map> resultList = new ArrayList<>();
|
List<Map> resultList = new CopyOnWriteArrayList<>();
|
||||||
Boolean nonChinese_ = Boolean.getBoolean(nonChinese);// 不传默认为中文走全文索引
|
Boolean nonChinese_ = BooleanUtils.toBoolean(nonChinese.toLowerCase());// 不传默认为中文走全文索引
|
||||||
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld, nonChinese_)));
|
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld, nonChinese_)));
|
||||||
final Integer[] meetCountNew = new Integer[1];
|
final Integer[] meetCountNew = new Integer[1];
|
||||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||||
|
@ -2132,6 +2134,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||||
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
||||||
resultList.addAll(getDeptTemp2());
|
resultList.addAll(getDeptTemp2());
|
||||||
|
resultList.addAll(getDeptTemp4());
|
||||||
Map<String, Integer> countMap = new HashMap<>();
|
Map<String, Integer> countMap = new HashMap<>();
|
||||||
|
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap = // 市级部门
|
Map<String, List<Map<String, Object>>> typeCountListMap = // 市级部门
|
||||||
|
@ -2151,7 +2154,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap1 = // 区级部门
|
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 -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
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());
|
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
|
@ -2167,12 +2171,13 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap2 = // 会议室
|
Map<String, List<Map<String, Object>>> typeCountListMap2 = // 企业部门
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("99")).collect(Collectors.groupingBy(m -> m.get("deptName").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 -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap2.keySet().contains(index.get("name").toString())) { // 该部门存在上架信息
|
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", Integer.parseInt(index.get("count").toString()) + typeCountListMap2.get(index.get("name").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap2.get(index.get("name").toString()).stream().forEach(count -> {
|
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
||||||
if (countMap.containsKey(count.get("type"))) {
|
if (countMap.containsKey(count.get("type"))) {
|
||||||
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||||
|
@ -2180,15 +2185,32 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
typeCountListMap2.remove(index.get("name").toString());// 去除
|
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
if (!typeCountListMap2.isEmpty()) { // 仍然有会议室信息
|
Map<String, List<Map<String, Object>>> typeCountListMap3 = // 会议室
|
||||||
List<HashMap<String, Object>> temp = typeCountListMap2.keySet().stream().map(index_ -> {
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("99")).collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
|
resultList = resultList.stream().map(index -> {
|
||||||
|
if (typeCountListMap3.keySet().contains(index.get("name").toString())) { // 该部门存在上架信息
|
||||||
|
index.put("count", Integer.parseInt(index.get("count").toString()) + typeCountListMap3.get(index.get("name").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
|
typeCountListMap3.get(index.get("name").toString()).stream().forEach(count -> {
|
||||||
|
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
||||||
|
if (countMap.containsKey(count.get("type"))) {
|
||||||
|
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||||
|
} else {
|
||||||
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
typeCountListMap3.remove(index.get("name").toString());// 去除
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (!typeCountListMap3.isEmpty()) { // 仍然有会议室信息
|
||||||
|
List<HashMap<String, Object>> temp = typeCountListMap3.keySet().stream().map(index_ -> {
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
typeCountListMap2.get(index_).stream().forEach(count -> {
|
typeCountListMap3.get(index_).stream().forEach(count -> {
|
||||||
map.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
map.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
if (countMap.containsKey(count.get("type"))) {
|
if (countMap.containsKey(count.get("type"))) {
|
||||||
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||||
|
@ -2290,6 +2312,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("2")).collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("2")).collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||||
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
||||||
resultList.addAll(getDeptTemp2());
|
resultList.addAll(getDeptTemp2());
|
||||||
|
resultList.addAll(getDeptTemp4());
|
||||||
Map<String, Integer> countMap = new HashMap<>();
|
Map<String, Integer> countMap = new HashMap<>();
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
|
@ -2306,7 +2329,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap1 = // 区级部门
|
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 -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
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());
|
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
|
@ -2321,6 +2345,23 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).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("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());
|
||||||
|
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
||||||
|
if (countMap.containsKey(count.get("type"))) {
|
||||||
|
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||||
|
} else {
|
||||||
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
Integer total = 0;
|
Integer total = 0;
|
||||||
for (Integer count : countMap.values()) {
|
for (Integer count : countMap.values()) {
|
||||||
total += count;
|
total += count;
|
||||||
|
@ -2385,6 +2426,30 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return 返回企业级部门的初级构造
|
||||||
|
*/
|
||||||
|
private List<HashMap<String, Object>> getDeptTemp4() {
|
||||||
|
List<HashMap<String, Object>> resultList;
|
||||||
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT id,`name`,type,pid,district FROM sys_dept WHERE type = 4 AND `name` != '访客部门' ORDER BY sys_dept.sort;");
|
||||||
|
resultList = maps.stream().map(index -> {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("count", 0); //
|
||||||
|
map.put("name", index.get("name").toString());
|
||||||
|
map.put("dept_id", index.get("id").toString());
|
||||||
|
map.put("yyzy", "0");
|
||||||
|
map.put("znsf", "0");
|
||||||
|
map.put("tcfw", "0");
|
||||||
|
map.put("kfzj", "0");
|
||||||
|
map.put("ywzj", "0");
|
||||||
|
map.put("jcss", "0");
|
||||||
|
map.put("zsk", "0");
|
||||||
|
map.put("sjzy", "0");
|
||||||
|
return map;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object selectCensusResourceTable(Map params) {
|
public Object selectCensusResourceTable(Map params) {
|
||||||
int curPage = 1;
|
int curPage = 1;
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class TResourceMountApplyController {
|
||||||
// @RequiresPermissions("resourceMountApply:tresourcemountapply:info")
|
// @RequiresPermissions("resourceMountApply:tresourcemountapply:info")
|
||||||
public Result<TResourceMountApplyDTO> get(@PathVariable("id") Long id) {
|
public Result<TResourceMountApplyDTO> get(@PathVariable("id") Long id) {
|
||||||
TResourceMountApplyDTO data = tResourceMountApplyService.get(id);
|
TResourceMountApplyDTO data = tResourceMountApplyService.get(id);
|
||||||
if (data.getDeptId() != null) {
|
if (data != null && data.getDeptId() != null) {
|
||||||
SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId()));
|
SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId()));
|
||||||
if (sysDeptDTO != null) {
|
if (sysDeptDTO != null) {
|
||||||
ResourceDTO resourceDTO = data.getResourceDTO();
|
ResourceDTO resourceDTO = data.getResourceDTO();
|
||||||
|
|
|
@ -10,6 +10,7 @@ import io.renren.common.validator.group.DefaultGroup;
|
||||||
import io.renren.common.validator.group.UpdateGroup;
|
import io.renren.common.validator.group.UpdateGroup;
|
||||||
import io.renren.modules.sys.dto.SysDictTypeDTO;
|
import io.renren.modules.sys.dto.SysDictTypeDTO;
|
||||||
import io.renren.modules.sys.entity.DictType;
|
import io.renren.modules.sys.entity.DictType;
|
||||||
|
import io.renren.modules.sys.service.SysDictDataService;
|
||||||
import io.renren.modules.sys.service.SysDictTypeService;
|
import io.renren.modules.sys.service.SysDictTypeService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
@ -21,6 +22,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型
|
* 字典类型
|
||||||
|
@ -31,6 +33,8 @@ import java.util.Map;
|
||||||
public class SysDictTypeController {
|
public class SysDictTypeController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDictTypeService sysDictTypeService;
|
private SysDictTypeService sysDictTypeService;
|
||||||
|
@Autowired
|
||||||
|
private SysDictDataService sysDictDataService;
|
||||||
|
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("字典类型分页查询")
|
@ApiOperation("字典类型分页查询")
|
||||||
|
@ -41,13 +45,18 @@ public class SysDictTypeController {
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "dictType", value = "字典类型", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "dictType", value = "字典类型", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "dictName", value = "字典名称", paramType = "query", dataType = "String")
|
@ApiImplicitParam(name = "dictName", value = "字典名称", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "dictLabel", value = "字典标签", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "dictValue", value = "字典值", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:dict:page")
|
// @RequiresPermissions("sys:dict:page")
|
||||||
public Result<PageData<SysDictTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<SysDictTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
//字典类型
|
//字典类型
|
||||||
PageData<SysDictTypeDTO> page = sysDictTypeService.page(params);
|
PageData<SysDictTypeDTO> page = sysDictTypeService.page(params);
|
||||||
|
page.setList(page.getList().stream().map(index -> {
|
||||||
|
index.setSysDictDataDTOList(sysDictDataService.selectByDictTypeId(index.getId().toString()));
|
||||||
|
return index;
|
||||||
|
}).collect(Collectors.toList())); //
|
||||||
return new Result<PageData<SysDictTypeDTO>>().ok(page);
|
return new Result<PageData<SysDictTypeDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +66,7 @@ public class SysDictTypeController {
|
||||||
// @RequiresPermissions("sys:dict:info")
|
// @RequiresPermissions("sys:dict:info")
|
||||||
public Result<SysDictTypeDTO> get(@PathVariable("id") Long id) {
|
public Result<SysDictTypeDTO> get(@PathVariable("id") Long id) {
|
||||||
SysDictTypeDTO data = sysDictTypeService.get(id);
|
SysDictTypeDTO data = sysDictTypeService.get(id);
|
||||||
|
data.setSysDictDataDTOList(sysDictDataService.selectByDictTypeId(data.getId().toString()));
|
||||||
return new Result<SysDictTypeDTO>().ok(data);
|
return new Result<SysDictTypeDTO>().ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Null;
|
import javax.validation.constraints.Null;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型
|
* 字典类型
|
||||||
|
@ -50,4 +51,9 @@ public class SysDictTypeDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "对应字典数据")
|
||||||
|
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||||
|
List<SysDictDataDTO> sysDictDataDTOList;
|
||||||
}
|
}
|
|
@ -5,6 +5,7 @@ import io.renren.common.service.BaseService;
|
||||||
import io.renren.modules.sys.dto.SysDictDataDTO;
|
import io.renren.modules.sys.dto.SysDictDataDTO;
|
||||||
import io.renren.modules.sys.entity.SysDictDataEntity;
|
import io.renren.modules.sys.entity.SysDictDataEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,4 +23,6 @@ public interface SysDictDataService extends BaseService<SysDictDataEntity> {
|
||||||
|
|
||||||
void delete(Long[] ids);
|
void delete(Long[] ids);
|
||||||
|
|
||||||
|
List<SysDictDataDTO> selectByDictTypeId(String dictTypeId);
|
||||||
|
|
||||||
}
|
}
|
|
@ -14,7 +14,9 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型
|
* 字典类型
|
||||||
|
@ -75,4 +77,11 @@ public class SysDictDataServiceImpl extends BaseServiceImpl<SysDictDataDao, SysD
|
||||||
deleteBatchIds(Arrays.asList(ids));
|
deleteBatchIds(Arrays.asList(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysDictDataDTO> selectByDictTypeId(String dictTypeId) {
|
||||||
|
QueryWrapper<SysDictDataEntity> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("dict_type_id", dictTypeId);
|
||||||
|
return baseDao.selectList(wrapper).stream().map(index -> ConvertUtils.sourceToTarget(index, SysDictDataDTO.class)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -31,10 +31,7 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageData<SysDictTypeDTO> page(Map<String, Object> params) {
|
public PageData<SysDictTypeDTO> page(Map<String, Object> params) {
|
||||||
IPage<SysDictTypeEntity> page = baseDao.selectPage(
|
IPage<SysDictTypeEntity> page = baseDao.selectPage(getPage(params, "sort", true), getWrapper(params));
|
||||||
getPage(params, "sort", true),
|
|
||||||
getWrapper(params)
|
|
||||||
);
|
|
||||||
|
|
||||||
return getPageData(page, SysDictTypeDTO.class);
|
return getPageData(page, SysDictTypeDTO.class);
|
||||||
}
|
}
|
||||||
|
@ -42,11 +39,14 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
private QueryWrapper<SysDictTypeEntity> getWrapper(Map<String, Object> params) {
|
private QueryWrapper<SysDictTypeEntity> getWrapper(Map<String, Object> params) {
|
||||||
String dictType = (String) params.get("dictType");
|
String dictType = (String) params.get("dictType");
|
||||||
String dictName = (String) params.get("dictName");
|
String dictName = (String) params.get("dictName");
|
||||||
|
String dictLabel = params.containsKey("dictLabel") ? (String) params.get("dictLabel") : "";
|
||||||
|
String dictValue = params.containsKey("dictValue") ? (String) params.get("dictValue") : "";
|
||||||
|
|
||||||
QueryWrapper<SysDictTypeEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<SysDictTypeEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.like(StringUtils.isNotBlank(dictType), "dict_type", dictType);
|
wrapper.like(StringUtils.isNotBlank(dictType), "dict_type", dictType);
|
||||||
wrapper.like(StringUtils.isNotBlank(dictName), "dict_name", dictName);
|
wrapper.like(StringUtils.isNotBlank(dictName), "dict_name", dictName);
|
||||||
|
wrapper.exists(StringUtils.isNotEmpty(dictLabel), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_label LIKE CONCAT( '%%', '%s', '%%' ) ", dictLabel));
|
||||||
|
wrapper.exists(StringUtils.isNotEmpty(dictValue), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_value =1", dictValue));
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ spring:
|
||||||
#MySQL
|
#MySQL
|
||||||
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.124.236:3306/share_platform?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
url: jdbc:mysql://192.168.124.46:3306/share_platform?useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: Hisense2019
|
password: Liwen073898!
|
||||||
#Hisense2019
|
#Hisense2019
|
||||||
# #Oracle
|
# #Oracle
|
||||||
# driver-class-name: oracle.jdbc.OracleDriver
|
# driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
|
|
@ -23,4 +23,8 @@
|
||||||
</if>
|
</if>
|
||||||
order by t2.create_date desc
|
order by t2.create_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateApplyState">
|
||||||
|
update sys_notice set apply_state = #{applyState} where receiver_type_ids like concat('%', #{userId}, '%') and apply_id=#{applyId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -274,6 +274,7 @@
|
||||||
AND t_ability_application.user_id = #{userId}
|
AND t_ability_application.user_id = #{userId}
|
||||||
AND t_ability_application.resource_id = #{resourceId}
|
AND t_ability_application.resource_id = #{resourceId}
|
||||||
AND tb_data_resource.type != '基础设施'
|
AND tb_data_resource.type != '基础设施'
|
||||||
|
AND t_ability_application.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeptInfrastructureApply" resultType="java.lang.Integer">
|
<select id="getDeptInfrastructureApply" resultType="java.lang.Integer">
|
||||||
|
|
|
@ -539,9 +539,12 @@
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdr.del_flag = 0
|
AND tdr.del_flag = 0
|
||||||
<if test="dto.name != null and dto.name != ''">
|
<if test="dto.name != null and dto.name != '' and nonChinese == false">
|
||||||
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
|
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dto.name != null and dto.name != '' and nonChinese == true">
|
||||||
|
AND tdr.name LIKE CONCAT( '%', #{dto.name}, '%' )
|
||||||
|
</if>
|
||||||
<if test="dto.type != null and dto.type != ''">
|
<if test="dto.type != null and dto.type != ''">
|
||||||
AND tdr.type = #{dto.type}
|
AND tdr.type = #{dto.type}
|
||||||
</if>
|
</if>
|
||||||
|
@ -1621,14 +1624,14 @@
|
||||||
tb_data_attr tda
|
tb_data_attr tda
|
||||||
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
|
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<if test="resourceType == '应用资源'" >
|
<if test="resourceType == '应用资源'">
|
||||||
AND tda.attr_type = '应用图片'
|
AND tda.attr_type = '应用图片'
|
||||||
</if>
|
</if>
|
||||||
<if test="resourceType == '图层服务'" >
|
<if test="resourceType == '图层服务'">
|
||||||
AND tda.attr_type = '图层缩略图'
|
AND tda.attr_type = '图层缩略图'
|
||||||
</if>
|
</if>
|
||||||
<if test="resourceType == '智能算法'" >
|
<if test="resourceType == '智能算法'">
|
||||||
AND tda.attr_type = '应用场景'
|
AND tda.attr_type = '应用场景'
|
||||||
</if>
|
</if>
|
||||||
AND tdr.id = #{id}
|
AND tdr.id = #{id}
|
||||||
AND tda.del_flag = 0
|
AND tda.del_flag = 0
|
||||||
|
@ -1760,17 +1763,19 @@
|
||||||
END
|
END
|
||||||
) AS "type"
|
) AS "type"
|
||||||
FROM
|
FROM
|
||||||
(SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag FROM tb_data_resource d LEFT JOIN
|
(SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.dept_id, d.del_flag FROM tb_data_resource d LEFT JOIN
|
||||||
tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND a.del_flag=0) tdr,
|
tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND a.del_flag=0) tdr,
|
||||||
sys_dept sd,
|
sys_dept sd,
|
||||||
sys_user su,
|
sys_user su,
|
||||||
t_ability_application taa
|
t_ability_application taa,
|
||||||
|
sys_dept dept
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdr.del_flag = 0
|
AND tdr.del_flag = 0
|
||||||
AND taa.user_id = su.id
|
AND taa.user_id = su.id
|
||||||
AND su.dept_id = sd.id
|
AND su.dept_id = sd.id
|
||||||
AND taa.resource_id = tdr.id
|
AND taa.resource_id = tdr.id
|
||||||
|
AND dept.id = tdr.dept_id
|
||||||
AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR
|
AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR
|
||||||
tdr.type = '业务组件')
|
tdr.type = '业务组件')
|
||||||
<if test="approveStatus != null and approveStatus != ''">
|
<if test="approveStatus != null and approveStatus != ''">
|
||||||
|
|
Loading…
Reference in New Issue