Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
* 'dev' of http://221.0.232.152:9393/ability-center/share-platform: 1.能力广场应用广场bug修复,返回结果增加查询结果总数 2.算法广场和gis广场查询接口重写,增加按区市筛选条件,赶回结果增加查询结果总数 查询区域管理员管理的部门 接口 导出时间格式调整 应用广场按应用领域搜索不正确的处理 调整左侧树缓存时间 能力统计增加区域参数 enke:查询用户列表
This commit is contained in:
commit
444284c473
|
@ -0,0 +1,44 @@
|
||||||
|
DROP TABLE IF EXISTS `enke_hostinfo`;
|
||||||
|
CREATE TABLE `enke_hostinfo`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
|
`hostName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'hostName',
|
||||||
|
`owner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'owner',
|
||||||
|
`ipAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'ipAddress',
|
||||||
|
`multicastAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'multicastAddress',
|
||||||
|
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 100
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='enke_hostinfo';
|
||||||
|
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (1, '市预警信息发布中心', '市预警信息发布中心', '127.0.0.1', '127.0.0.1', '2022-09-22 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (2, '市园林和林业局', '市园林和林业局', '127.0.0.1', '127.0.0.1', '2022-09-21 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (3, '城阳区应急指挥中心', '城阳区应急指挥中心', '127.0.0.1', '127.0.0.1', '2022-09-20 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (4, '地铁集团', '地铁集团', '127.0.0.1', '127.0.0.1', '2022-09-19 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (5, '市市场监管局', '市市场监管局', '127.0.0.1', '127.0.0.1', '2022-09-18 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (6, '市教育局(值班室)', '市教育局(值班室)', '127.0.0.1', '127.0.0.1', '2022-09-17 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (7, '青岛市政府总值班室', '青岛市政府总值班室', '127.0.0.1', '127.0.0.1', '2022-09-16 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (8, '市教育局', '市教育局', '127.0.0.1', '127.0.0.1', '2022-09-15 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (9, '高新区管委(值班室)', '高新区管委(值班室)', '127.0.0.1', '127.0.0.1', '2022-09-14 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (10, '市人防办', '市人防办', '127.0.0.1', '127.0.0.1', '2022-09-13 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (11, '市公安局', '市公安局', '127.0.0.1', '127.0.0.1', '2022-09-12 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (12, '市交通运输局', '市交通运输局', '127.0.0.1', '127.0.0.1', '2022-09-11 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (13, '一网统揽平台组', '一网统揽平台组', '127.0.0.1', '127.0.0.1', '2022-09-10 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (14, '青岛市一网统揽项目组', '青岛市一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-09 09:20:07');
|
|
@ -375,6 +375,7 @@ public class CensusController {
|
||||||
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
||||||
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
public Result selectApplyDeptDetailTypeCountList(@RequestParam Map<String, Object> params) {
|
public Result selectApplyDeptDetailTypeCountList(@RequestParam Map<String, Object> params) {
|
||||||
return new Result().ok(resourceService.selectApplyDeptDetailTypeCountList(params));
|
return new Result().ok(resourceService.selectApplyDeptDetailTypeCountList(params));
|
||||||
|
@ -388,6 +389,7 @@ public class CensusController {
|
||||||
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
||||||
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
public void exportSelectApplyDeptDetailTypeCountList(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
|
public void exportSelectApplyDeptDetailTypeCountList(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
|
||||||
ArrayList<Map> resultList = (ArrayList<Map>) resourceService.selectApplyDeptDetailTypeCountList(params);
|
ArrayList<Map> resultList = (ArrayList<Map>) resourceService.selectApplyDeptDetailTypeCountList(params);
|
||||||
|
@ -421,6 +423,7 @@ public class CensusController {
|
||||||
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
||||||
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
public Result selectDeptDetailTypeCountList(@RequestParam Map<String, Object> params) {
|
public Result selectDeptDetailTypeCountList(@RequestParam Map<String, Object> params) {
|
||||||
return new Result().ok(resourceService.selectDeptDetailTypeCountList(params));
|
return new Result().ok(resourceService.selectDeptDetailTypeCountList(params));
|
||||||
|
@ -434,6 +437,7 @@ public class CensusController {
|
||||||
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
@ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"),
|
||||||
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"),
|
||||||
})
|
})
|
||||||
public void exportSelectDeptDetailTypeCountList(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
|
public void exportSelectDeptDetailTypeCountList(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException {
|
||||||
ArrayList<Map> resultList = (ArrayList<Map>) resourceService.selectDeptDetailTypeCountList(params);
|
ArrayList<Map> resultList = (ArrayList<Map>) resourceService.selectDeptDetailTypeCountList(params);
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
package io.renren.modules.enke;
|
package io.renren.modules.enke.controller;
|
||||||
|
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.modules.activiti.service.ActHistoryService;
|
import io.renren.modules.activiti.service.ActHistoryService;
|
||||||
|
import io.renren.modules.enke.dto.HostInfoDTO;
|
||||||
|
import io.renren.modules.enke.service.EnkeService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.json.JSONObject;
|
|
||||||
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.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import sw.vc3term.contingencyplan.ContingencyPlanUtil;
|
import sw.vc3term.contingencyplan.ContingencyPlanUtil;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
|
@ -21,6 +24,7 @@ import java.net.SocketException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Auther:lizhicheng2@hisense.com
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
@ -39,6 +43,9 @@ public class EnkeController {
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class);
|
private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EnkeService enkeService;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
cp = ContingencyPlanUtil.getInstance();
|
cp = ContingencyPlanUtil.getInstance();
|
||||||
// 初始化会议
|
// 初始化会议
|
||||||
|
@ -47,6 +54,20 @@ public class EnkeController {
|
||||||
cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT);
|
cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第二步:发起会议前将同步过来的用户返回给前端选择
|
||||||
|
*
|
||||||
|
* @return 是否成功同步
|
||||||
|
* @throws UnsupportedEncodingException
|
||||||
|
* @author libin
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "getEnkeUsers")
|
||||||
|
@RequestMapping(value = "/getEnkeUsers", method = RequestMethod.GET)
|
||||||
|
public Result<PageData<HostInfoDTO>> getEnkeUsers(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
|
PageData<HostInfoDTO> page = enkeService.page(params);
|
||||||
|
return new Result<PageData<HostInfoDTO>>().ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "正式启动会议")
|
@ApiOperation(value = "正式启动会议")
|
||||||
@PostMapping("/initiateMeet")
|
@PostMapping("/initiateMeet")
|
||||||
public boolean initiateMeet(@RequestBody String attender) {
|
public boolean initiateMeet(@RequestBody String attender) {
|
|
@ -0,0 +1,21 @@
|
||||||
|
package io.renren.modules.enke.dao;
|
||||||
|
|
||||||
|
import io.renren.common.dao.BaseDao;
|
||||||
|
import io.renren.modules.enke.dto.HostInfoDTO;
|
||||||
|
import io.renren.modules.enke.entity.HostInfoEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
* @date:2022/10/24
|
||||||
|
* @des
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HostInfoDao extends BaseDao<HostInfoEntity> {
|
||||||
|
|
||||||
|
List<HostInfoDTO> getHostInfoDTOList(Map params);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package io.renren.modules.enke.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
* @date:2022/10/24
|
||||||
|
* @des
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "hostInfo")
|
||||||
|
public class HostInfoDTO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty(value = "hostName")
|
||||||
|
private String hostName;
|
||||||
|
@ApiModelProperty(value = "owner")
|
||||||
|
private String owner;
|
||||||
|
@ApiModelProperty(value = "ipAddress")
|
||||||
|
private String ipAddress;
|
||||||
|
@ApiModelProperty(value = "multicastAddress")
|
||||||
|
private String multicastAddress;
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package io.renren.modules.enke.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.renren.common.entity.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
* @date:2022/10/24
|
||||||
|
* @des
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("enke_hostinfo")
|
||||||
|
public class HostInfoEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 融合服务名称
|
||||||
|
*/
|
||||||
|
private String hostName;
|
||||||
|
/**
|
||||||
|
* 融合服务名称
|
||||||
|
*/
|
||||||
|
private String owner;
|
||||||
|
/**
|
||||||
|
* 融合服务名称
|
||||||
|
*/
|
||||||
|
private String ipAddress;
|
||||||
|
/**
|
||||||
|
* 融合服务名称
|
||||||
|
*/
|
||||||
|
private String multicastAddress;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
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
|
||||||
|
* @date:2022/10/24
|
||||||
|
* @des
|
||||||
|
*/
|
||||||
|
public interface EnkeService extends CrudService<HostInfoEntity, HostInfoDTO> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package io.renren.modules.enke.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.renren.common.constant.Constant;
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
|
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;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther:lizhicheng2@hisense.com
|
||||||
|
* @date:2022/10/24
|
||||||
|
* @des
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EnkeServiceImpl extends CrudServiceImpl<HostInfoDao, HostInfoEntity, HostInfoDTO> implements EnkeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QueryWrapper<HostInfoEntity> getWrapper(Map<String, Object> params) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageData<HostInfoDTO> page(Map<String, Object> params) {
|
||||||
|
long curPage = 1;
|
||||||
|
long limit = 10;
|
||||||
|
if (params.get(Constant.PAGE) != null) {
|
||||||
|
curPage = Long.parseLong((String) params.get(Constant.PAGE));
|
||||||
|
}
|
||||||
|
if (params.get(Constant.LIMIT) != null) {
|
||||||
|
limit = Long.parseLong((String) params.get(Constant.LIMIT));
|
||||||
|
}
|
||||||
|
List<HostInfoDTO> dtoList = baseDao.getHostInfoDTOList(params);
|
||||||
|
List<HostInfoDTO> result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
|
||||||
|
return new PageData(result, dtoList.size());
|
||||||
|
}
|
||||||
|
}
|
|
@ -671,4 +671,11 @@ public class ResourceController {
|
||||||
return new Result<>().ok(resourceService.getPotentialList());
|
return new Result<>().ok(resourceService.getPotentialList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getSquareList")
|
||||||
|
@ApiOperation("/算法广场获取算法或Gis列表")
|
||||||
|
@LogOperation("/算法广场获取算法或Gis列表")
|
||||||
|
public Result getSquareList(@RequestBody JSONObject jsonObject) {
|
||||||
|
return new Result().ok(resourceService.getSquareList(jsonObject));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -205,4 +205,11 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
||||||
List<Map> getPotentialList(@Param("halfMonthDay") String halfMonthDay, @Param("monthDay") String monthDay);
|
List<Map> getPotentialList(@Param("halfMonthDay") String halfMonthDay, @Param("monthDay") String monthDay);
|
||||||
|
|
||||||
List<Map> getStarList();
|
List<Map> getStarList();
|
||||||
|
|
||||||
|
Integer selectAppListCount(@Param("type") Integer type, @Param("area") String area);
|
||||||
|
|
||||||
|
List<Map> getSquareList(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area,
|
||||||
|
@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
|
Integer getSquareListCount(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area);
|
||||||
}
|
}
|
|
@ -157,4 +157,6 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
|
||||||
Object getStarList();
|
Object getStarList();
|
||||||
|
|
||||||
Object getPotentialList();
|
Object getPotentialList();
|
||||||
|
|
||||||
|
Object getSquareList(JSONObject jsonObject);
|
||||||
}
|
}
|
|
@ -1494,12 +1494,16 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object selectAppList(Map params) {
|
public Object selectAppList(Map params) {
|
||||||
|
|
||||||
int pageNum = Integer.parseInt(params.get("pageNum").toString());
|
int pageNum = Integer.parseInt(params.get("pageNum").toString());
|
||||||
Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null;
|
Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null;
|
||||||
String area = params.containsKey("area") ? params.get("area").toString() : null;
|
String area = params.containsKey("area") ? params.get("area").toString() : null;
|
||||||
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area);
|
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area);
|
||||||
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString())));
|
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString())));
|
||||||
return maps;
|
return new HashMap() {{
|
||||||
|
put("appList",maps);
|
||||||
|
put("total", resourceDao.selectAppListCount(type, area));
|
||||||
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2040,7 +2044,36 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object selectApplyDeptDetailTypeCountList(Map params) {
|
public Object selectApplyDeptDetailTypeCountList(Map params) {
|
||||||
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())) {
|
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())) { // 部门精准查
|
||||||
|
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||||
|
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
|
ArrayList<Map> resultList = new ArrayList<>();
|
||||||
|
Map<String, Integer> countMap = new HashMap<>();
|
||||||
|
typeCountListMap.forEach((k, v) -> {
|
||||||
|
HashMap<Object, Object> map = new HashMap<>();
|
||||||
|
map.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
|
map.put("name", k);
|
||||||
|
v.forEach(item -> {
|
||||||
|
map.put(item.get("type").toString(), item.get("count"));
|
||||||
|
if (countMap.containsKey(item.get("type"))) {
|
||||||
|
countMap.replace(item.get("type").toString(), Integer.parseInt(item.get("count").toString()) + countMap.get(item.get("type")));
|
||||||
|
} else {
|
||||||
|
countMap.put(item.get("type").toString(), Integer.parseInt(item.get("count").toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
resultList.add(map);
|
||||||
|
});
|
||||||
|
Integer total = 0;
|
||||||
|
for (Integer count : countMap.values()) {
|
||||||
|
total += count;
|
||||||
|
}
|
||||||
|
countMap.put("count", total);
|
||||||
|
HashMap<String, Object> count = new HashMap<>();
|
||||||
|
count.put("name", "总计");
|
||||||
|
count.putAll(countMap);
|
||||||
|
resultList.add(count);
|
||||||
|
return resultList;
|
||||||
|
} else if (params.containsKey("region") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("region").toString())) { // 查区域
|
||||||
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
ArrayList<Map> resultList = new ArrayList<>();
|
ArrayList<Map> resultList = new ArrayList<>();
|
||||||
|
@ -2196,6 +2229,35 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
count.putAll(countMap);
|
count.putAll(countMap);
|
||||||
resultList.add(count);
|
resultList.add(count);
|
||||||
return resultList;
|
return resultList;
|
||||||
|
} else if (params.containsKey("region") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("region").toString())) { // 按区域出数据
|
||||||
|
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
||||||
|
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
|
ArrayList<Map> resultList = new ArrayList<>();
|
||||||
|
Map<String, Integer> countMap = new HashMap<>();
|
||||||
|
typeCountListMap.forEach((k, v) -> {
|
||||||
|
HashMap<Object, Object> map = new HashMap<>();
|
||||||
|
map.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
|
map.put("name", k);
|
||||||
|
v.forEach(item -> {
|
||||||
|
map.put(item.get("type").toString(), item.get("count"));
|
||||||
|
if (countMap.containsKey(item.get("type"))) {
|
||||||
|
countMap.replace(item.get("type").toString(), Integer.parseInt(item.get("count").toString()) + countMap.get(item.get("type")));
|
||||||
|
} else {
|
||||||
|
countMap.put(item.get("type").toString(), Integer.parseInt(item.get("count").toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
resultList.add(map);
|
||||||
|
});
|
||||||
|
Integer total = 0;
|
||||||
|
for (Integer count : countMap.values()) {
|
||||||
|
total += count;
|
||||||
|
}
|
||||||
|
countMap.put("count", total);
|
||||||
|
HashMap<String, Object> count = new HashMap<>();
|
||||||
|
count.put("name", "总计");
|
||||||
|
count.putAll(countMap);
|
||||||
|
resultList.add(count);
|
||||||
|
return resultList;
|
||||||
} else { // 全部部门
|
} else { // 全部部门
|
||||||
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap = // 市级部门
|
Map<String, List<Map<String, Object>>> typeCountListMap = // 市级部门
|
||||||
|
@ -2352,4 +2414,18 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return potentialList;
|
return potentialList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getSquareList(JSONObject jsonObject) {
|
||||||
|
Integer deptType = jsonObject.getInteger("deptType");
|
||||||
|
String area = jsonObject.getString("area");
|
||||||
|
String type = jsonObject.getString("type");
|
||||||
|
Integer pageNum = jsonObject.getInteger("pageNum");
|
||||||
|
Integer pageSize = jsonObject.getInteger("pageSize");
|
||||||
|
Integer i = (pageNum - 1) * pageSize;
|
||||||
|
return new HashMap() {{
|
||||||
|
put("list", resourceDao.getSquareList(type, deptType, area, i, pageSize));
|
||||||
|
put("total", resourceDao.getSquareListCount(type, deptType, area));
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -7,8 +7,11 @@ import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
import io.renren.common.validator.group.DefaultGroup;
|
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.security.user.SecurityUser;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||||
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.service.SysDeptService;
|
import io.renren.modules.sys.service.SysDeptService;
|
||||||
|
import io.renren.modules.sys.service.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -30,6 +33,8 @@ public class SysDeptController {
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JdbcTemplate jdbcTemplate;
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
@ApiOperation("查询部门列表")
|
@ApiOperation("查询部门列表")
|
||||||
|
@ -41,6 +46,21 @@ public class SysDeptController {
|
||||||
return new Result<List<SysDeptDTO>>().ok(list);
|
return new Result<List<SysDeptDTO>>().ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("listForRegion")
|
||||||
|
@ApiOperation("查询区域管理员管理的部门")
|
||||||
|
@LogOperation("查询区域管理员管理的部门")
|
||||||
|
public Result<List<Map<String, Object>>> listForRegion() {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
SysUserDTO userDTO = sysUserService.get(SecurityUser.getUserId());
|
||||||
|
if (userDTO.getDeptId() != null) { // 区域管理员
|
||||||
|
SysDeptDTO sysDeptDTO = sysDeptService.get(userDTO.getDeptId());
|
||||||
|
list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `district` = %d", sysDeptDTO.getDistrict()));
|
||||||
|
} else if (userDTO.getSuperAdmin() == 1) { // 超级管理员
|
||||||
|
list = jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept;");
|
||||||
|
}
|
||||||
|
return new Result<List<Map<String, Object>>>().ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("all")
|
@GetMapping("all")
|
||||||
@ApiOperation("查询所有部门列表")
|
@ApiOperation("查询所有部门列表")
|
||||||
@LogOperation("查询所有部门列表")
|
@LogOperation("查询所有部门列表")
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
DROP TABLE IF EXISTS `enke_hostinfo`;
|
||||||
|
CREATE TABLE `enke_hostinfo`
|
||||||
|
(
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
|
`hostName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'hostName',
|
||||||
|
`owner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'owner',
|
||||||
|
`ipAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'ipAddress',
|
||||||
|
`multicastAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'multicastAddress',
|
||||||
|
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
AUTO_INCREMENT = 100
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci
|
||||||
|
ROW_FORMAT = DYNAMIC COMMENT ='enke_hostinfo';
|
||||||
|
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (1, '市预警信息发布中心', '市预警信息发布中心', '127.0.0.1', '127.0.0.1', '2022-09-22 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (2, '市园林和林业局', '市园林和林业局', '127.0.0.1', '127.0.0.1', '2022-09-21 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (3, '城阳区应急指挥中心', '城阳区应急指挥中心', '127.0.0.1', '127.0.0.1', '2022-09-20 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (4, '地铁集团', '地铁集团', '127.0.0.1', '127.0.0.1', '2022-09-19 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (5, '市市场监管局', '市市场监管局', '127.0.0.1', '127.0.0.1', '2022-09-18 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (6, '市教育局(值班室)', '市教育局(值班室)', '127.0.0.1', '127.0.0.1', '2022-09-17 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (7, '青岛市政府总值班室', '青岛市政府总值班室', '127.0.0.1', '127.0.0.1', '2022-09-16 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (8, '市教育局', '市教育局', '127.0.0.1', '127.0.0.1', '2022-09-15 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (9, '高新区管委(值班室)', '高新区管委(值班室)', '127.0.0.1', '127.0.0.1', '2022-09-14 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (10, '市人防办', '市人防办', '127.0.0.1', '127.0.0.1', '2022-09-13 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (11, '市公安局', '市公安局', '127.0.0.1', '127.0.0.1', '2022-09-12 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (12, '市交通运输局', '市交通运输局', '127.0.0.1', '127.0.0.1', '2022-09-11 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (13, '一网统揽平台组', '一网统揽平台组', '127.0.0.1', '127.0.0.1', '2022-09-10 09:20:07');
|
||||||
|
INSERT INTO `enke_hostinfo`
|
||||||
|
VALUES (14, '青岛市一网统揽项目组', '青岛市一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-09 09:20:07');
|
|
@ -34,8 +34,8 @@
|
||||||
<cache name="selectDeptList"
|
<cache name="selectDeptList"
|
||||||
maxElementsInMemory="10000"
|
maxElementsInMemory="10000"
|
||||||
eternal="false"
|
eternal="false"
|
||||||
timeToIdleSeconds="600"
|
timeToIdleSeconds="60"
|
||||||
timeToLiveSeconds="6000"
|
timeToLiveSeconds="600"
|
||||||
overflowToDisk="true"
|
overflowToDisk="true"
|
||||||
diskPersistent="true"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="io.renren.modules.enke.dao.HostInfoDao">
|
||||||
|
|
||||||
|
<select id="getHostInfoDTOList" resultType="io.renren.modules.enke.dto.HostInfoDTO">
|
||||||
|
select * from enke_hostinfo order by create_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -1601,8 +1601,7 @@
|
||||||
AND sd.type = #{type}
|
AND sd.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
<if test=" area != null and area != ''">
|
<if test=" area != null and area != ''">
|
||||||
AND JSON_CONTAINS( tdr.info_list, JSON_OBJECT( 'attrType', '应用领域' ))
|
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
|
||||||
AND JSON_EXTRACT( tdr.info_list, '$[*].attrValue' ) LIKE CONCAT( '%', #{area}, '%' )
|
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
|
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
|
||||||
|
@ -1766,6 +1765,9 @@
|
||||||
<if test="type != null and type != ''">
|
<if test="type != null and type != ''">
|
||||||
AND tdr.type = #{type}
|
AND tdr.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="region != null and region != ''">
|
||||||
|
AND sd.district = #{region}
|
||||||
|
</if>
|
||||||
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
||||||
AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
|
AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
|
||||||
</if>
|
</if>
|
||||||
|
@ -1851,6 +1853,9 @@
|
||||||
<if test="deptId != null and deptId != ''">
|
<if test="deptId != null and deptId != ''">
|
||||||
AND sd.id = #{deptId}
|
AND sd.id = #{deptId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="region != null and region != ''">
|
||||||
|
AND sd.district = #{region}
|
||||||
|
</if>
|
||||||
<if test="type != null and type != ''">
|
<if test="type != null and type != ''">
|
||||||
AND tdr.type = #{type}
|
AND tdr.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
|
@ -1863,7 +1868,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
||||||
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate,
|
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate,
|
||||||
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS
|
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS
|
||||||
approveStatus, trma.instance_id AS applyNumber
|
approveStatus, trma.instance_id AS applyNumber
|
||||||
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
||||||
|
@ -1906,7 +1911,7 @@
|
||||||
tdr.NAME AS resourceName,
|
tdr.NAME AS resourceName,
|
||||||
dept.`name` AS resourceDeptName,
|
dept.`name` AS resourceDeptName,
|
||||||
tdr.type,
|
tdr.type,
|
||||||
taa.create_date AS createDate,
|
DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate,
|
||||||
taa.approve_status AS approveStatus,
|
taa.approve_status AS approveStatus,
|
||||||
taa.apply_flag AS applyNumber
|
taa.apply_flag AS applyNumber
|
||||||
FROM
|
FROM
|
||||||
|
@ -1960,7 +1965,8 @@
|
||||||
'青岛市大数据发展管理局' AS 'resourceDeptName',
|
'青岛市大数据发展管理局' AS 'resourceDeptName',
|
||||||
'会议室' AS 'type',
|
'会议室' AS 'type',
|
||||||
tmb.create_date AS 'createDate',
|
tmb.create_date AS 'createDate',
|
||||||
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS 'approveStatus',
|
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS
|
||||||
|
'approveStatus',
|
||||||
'' AS 'applyNumber'
|
'' AS 'applyNumber'
|
||||||
FROM
|
FROM
|
||||||
t_meetingroom_book tmb,
|
t_meetingroom_book tmb,
|
||||||
|
@ -2123,24 +2129,32 @@
|
||||||
FROM
|
FROM
|
||||||
tb_data_resource tdr
|
tb_data_resource tdr
|
||||||
|
|
||||||
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM t_ability_application WHERE 1 = 1 AND del_flag = 0 AND camera_list IS NULL GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM t_ability_application WHERE 1 = 1 AND del_flag = 0 AND
|
||||||
|
camera_list IS NULL GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
|
||||||
|
|
||||||
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 GROUP BY resource_id) trc
|
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0
|
||||||
|
GROUP BY resource_id) trc
|
||||||
ON tdr.id = trc.resource_id
|
ON tdr.id = trc.resource_id
|
||||||
|
|
||||||
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM tb_resource_browse WHERE 1 = 1 GROUP BY resource_id) trb
|
LEFT JOIN (SELECT COUNT(id) AS "count", resource_id FROM tb_resource_browse WHERE 1 = 1 GROUP BY resource_id)
|
||||||
|
trb
|
||||||
ON tdr.id = trb.resource_id
|
ON tdr.id = trb.resource_id
|
||||||
|
|
||||||
LEFT JOIN (SELECT AVG(score) AS "score", resource_id FROM tb_resource_score WHERE 1 = 1 GROUP BY resource_id) trs
|
LEFT JOIN (SELECT AVG(score) AS "score", resource_id FROM tb_resource_score WHERE 1 = 1 GROUP BY resource_id)
|
||||||
|
trs
|
||||||
ON tdr.id = trs.resource_id
|
ON tdr.id = trs.resource_id
|
||||||
|
|
||||||
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxApplyCount" FROM (SELECT COUNT(id) AS "count" FROM t_ability_application WHERE 1 = 1 AND del_flag = 0 AND camera_list IS NULL GROUP BY resource_id ) taa) temp1
|
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxApplyCount" FROM (SELECT COUNT(id) AS "count" FROM
|
||||||
|
t_ability_application WHERE 1 = 1 AND del_flag = 0 AND camera_list IS NULL GROUP BY resource_id ) taa) temp1
|
||||||
|
|
||||||
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxCopllectCount" FROM(SELECT COUNT(id) AS "count" FROM tb_resource_collection WHERE 1 = 1 AND del_flag = 0 GROUP BY resource_id)trc) temp2
|
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxCopllectCount" FROM(SELECT COUNT(id) AS "count" FROM
|
||||||
|
tb_resource_collection WHERE 1 = 1 AND del_flag = 0 GROUP BY resource_id)trc) temp2
|
||||||
|
|
||||||
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxBrowseCount" FROM(SELECT COUNT(id) AS "count" FROM tb_resource_browse WHERE 1 = 1 GROUP BY resource_id) trb) temp3
|
JOIN (SELECT IFNULL(MAX(count), 0) AS "maxBrowseCount" FROM(SELECT COUNT(id) AS "count" FROM tb_resource_browse
|
||||||
|
WHERE 1 = 1 GROUP BY resource_id) trb) temp3
|
||||||
|
|
||||||
JOIN (SELECT IFNULL(MAX(score), 0) AS "maxScore" FROM(SELECT AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 GROUP BY resource_id) trs) temp4
|
JOIN (SELECT IFNULL(MAX(score), 0) AS "maxScore" FROM(SELECT AVG(score) AS "score" FROM tb_resource_score WHERE
|
||||||
|
1 = 1 GROUP BY resource_id) trs) temp4
|
||||||
|
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
AND tdr.del_flag = 0
|
AND tdr.del_flag = 0
|
||||||
|
@ -2150,4 +2164,75 @@
|
||||||
|
|
||||||
ORDER BY fireNum DESC, create_date DESC LIMIT 10
|
ORDER BY fireNum DESC, create_date DESC LIMIT 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAppListCount" resultType="java.lang.Integer">
|
||||||
|
SELECT IFNULL(COUNT(1), 0)
|
||||||
|
FROM
|
||||||
|
tb_data_resource tdr
|
||||||
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||||
|
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND MATCH (tdr.type) AGAINST ( '应用资源' IN BOOLEAN MODE)
|
||||||
|
AND tdr.del_flag = 0
|
||||||
|
<if test=" type != null and type != ''">
|
||||||
|
AND sd.type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test=" area != null and area != ''">
|
||||||
|
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSquareList" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
tdr.id,
|
||||||
|
tdr.`name`,
|
||||||
|
tdr.dept_id,
|
||||||
|
sd.NAME AS "deptName",
|
||||||
|
sd.sort AS "deptSort",
|
||||||
|
sd.type AS "deptType",
|
||||||
|
sr.sort AS "regionSort",
|
||||||
|
IFNULL( tdr.visitor, 0 ) AS visitor
|
||||||
|
FROM
|
||||||
|
tb_data_resource tdr
|
||||||
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||||
|
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND MATCH ( tdr.type ) AGAINST ( '组件服务' IN BOOLEAN MODE )
|
||||||
|
AND tdr.del_flag = 0
|
||||||
|
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type} AND del_flag = 0 )
|
||||||
|
<if test = " deptType != null and deptType != ''">
|
||||||
|
AND sd.type = #{deptType}
|
||||||
|
</if>
|
||||||
|
<if test = " area != null and area != ''">
|
||||||
|
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
sd.type,
|
||||||
|
sr.sort,
|
||||||
|
sd.sort,
|
||||||
|
tdr.dept_id,
|
||||||
|
tdr.visitor DESC,
|
||||||
|
tdr.id DESC
|
||||||
|
LIMIT ${pageNum}, 9
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSquareListCount" resultType="java.lang.Integer">
|
||||||
|
SELECT IFNULL(COUNT(1), 0) FROM tb_data_resource tdr
|
||||||
|
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||||
|
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND MATCH ( tdr.type ) AGAINST ( '组件服务' IN BOOLEAN MODE )
|
||||||
|
AND tdr.del_flag = 0
|
||||||
|
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type} AND del_flag = 0 )
|
||||||
|
<if test = " deptType != null and deptType != ''">
|
||||||
|
AND sd.type = #{deptType}
|
||||||
|
</if>
|
||||||
|
<if test = " area != null and area != ''">
|
||||||
|
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue