diff --git a/config/db/V7.0__enke_hostinfo_add_table.sql b/config/db/V7.0__enke_hostinfo_add_table.sql new file mode 100644 index 00000000..9a4b6e86 --- /dev/null +++ b/config/db/V7.0__enke_hostinfo_add_table.sql @@ -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'); diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index 5f1b7696..83ab710e 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -375,6 +375,7 @@ public class CensusController { @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"), }) public Result selectApplyDeptDetailTypeCountList(@RequestParam Map 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 = "deptId", value = "所属部门", paramType = "query", dataType = "long"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"), }) public void exportSelectApplyDeptDetailTypeCountList(@RequestParam Map params, HttpServletResponse response) throws IOException { ArrayList resultList = (ArrayList) resourceService.selectApplyDeptDetailTypeCountList(params); @@ -421,6 +423,7 @@ public class CensusController { @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"), }) public Result selectDeptDetailTypeCountList(@RequestParam Map 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 = "deptId", value = "所属部门", paramType = "query", dataType = "long"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "region", value = "所属区域id", paramType = "query", dataType = "String"), }) public void exportSelectDeptDetailTypeCountList(@RequestParam Map params, HttpServletResponse response) throws IOException { ArrayList resultList = (ArrayList) resourceService.selectDeptDetailTypeCountList(params); diff --git a/renren-admin/src/main/java/io/renren/modules/enke/EnkeController.java b/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java similarity index 74% rename from renren-admin/src/main/java/io/renren/modules/enke/EnkeController.java rename to renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java index b629bda5..f568d775 100644 --- a/renren-admin/src/main/java/io/renren/modules/enke/EnkeController.java +++ b/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java @@ -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.enke.dto.HostInfoDTO; +import io.renren.modules.enke.service.EnkeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; -import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; import sw.vc3term.contingencyplan.ContingencyPlanUtil; +import java.io.UnsupportedEncodingException; import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; @@ -21,6 +24,7 @@ import java.net.SocketException; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; +import java.util.Map; /** * @Auther:lizhicheng2@hisense.com @@ -39,6 +43,9 @@ public class EnkeController { private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class); + @Autowired + private EnkeService enkeService; + static { 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); } + /** + * 第二步:发起会议前将同步过来的用户返回给前端选择 + * + * @return 是否成功同步 + * @throws UnsupportedEncodingException + * @author libin + */ + @ApiOperation(value = "getEnkeUsers") + @RequestMapping(value = "/getEnkeUsers", method = RequestMethod.GET) + public Result> getEnkeUsers(@ApiIgnore @RequestParam Map params) { + PageData page = enkeService.page(params); + return new Result>().ok(page); + } + @ApiOperation(value = "正式启动会议") @PostMapping("/initiateMeet") public boolean initiateMeet(@RequestBody String attender) { diff --git a/renren-admin/src/main/java/io/renren/modules/enke/dao/HostInfoDao.java b/renren-admin/src/main/java/io/renren/modules/enke/dao/HostInfoDao.java new file mode 100644 index 00000000..fccc913f --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/enke/dao/HostInfoDao.java @@ -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 { + + List getHostInfoDTOList(Map params); + +} diff --git a/renren-admin/src/main/java/io/renren/modules/enke/dto/HostInfoDTO.java b/renren-admin/src/main/java/io/renren/modules/enke/dto/HostInfoDTO.java new file mode 100644 index 00000000..466a578a --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/enke/dto/HostInfoDTO.java @@ -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; + +} diff --git a/renren-admin/src/main/java/io/renren/modules/enke/entity/HostInfoEntity.java b/renren-admin/src/main/java/io/renren/modules/enke/entity/HostInfoEntity.java new file mode 100644 index 00000000..e49b951e --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/enke/entity/HostInfoEntity.java @@ -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; + +} diff --git a/renren-admin/src/main/java/io/renren/modules/enke/service/EnkeService.java b/renren-admin/src/main/java/io/renren/modules/enke/service/EnkeService.java new file mode 100644 index 00000000..4e6d967e --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/enke/service/EnkeService.java @@ -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 { + + +} diff --git a/renren-admin/src/main/java/io/renren/modules/enke/service/impl/EnkeServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/enke/service/impl/EnkeServiceImpl.java new file mode 100644 index 00000000..ba7d3443 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/enke/service/impl/EnkeServiceImpl.java @@ -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 implements EnkeService { + + @Override + public QueryWrapper getWrapper(Map params) { + return null; + } + + @Override + public PageData page(Map 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 dtoList = baseDao.getHostInfoDTOList(params); + List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList()); + return new PageData(result, dtoList.size()); + } +} diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index c3e6e84f..ac0403a3 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -671,4 +671,11 @@ public class ResourceController { 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)); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 770903c0..5eaa24d4 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -205,4 +205,11 @@ public interface ResourceDao extends BaseDao { List getPotentialList(@Param("halfMonthDay") String halfMonthDay, @Param("monthDay") String monthDay); List getStarList(); + + Integer selectAppListCount(@Param("type") Integer type, @Param("area") String area); + + List 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); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index bfb902fc..a6caed9b 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -157,4 +157,6 @@ public interface ResourceService extends CrudService maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area); 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 @@ -2040,7 +2044,36 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); + Map>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); + ArrayList resultList = new ArrayList<>(); + Map countMap = new HashMap<>(); + typeCountListMap.forEach((k, v) -> { + HashMap 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 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> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); Map>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); ArrayList resultList = new ArrayList<>(); @@ -2196,6 +2229,35 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params); + Map>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); + ArrayList resultList = new ArrayList<>(); + Map countMap = new HashMap<>(); + typeCountListMap.forEach((k, v) -> { + HashMap 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 count = new HashMap<>(); + count.put("name", "总计"); + count.putAll(countMap); + resultList.add(count); + return resultList; } else { // 全部部门 List> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params); Map>> typeCountListMap = // 市级部门 @@ -2352,4 +2414,18 @@ public class ResourceServiceImpl extends CrudServiceImpl>().ok(list); } + @GetMapping("listForRegion") + @ApiOperation("查询区域管理员管理的部门") + @LogOperation("查询区域管理员管理的部门") + public Result>> listForRegion() { + List> 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>>().ok(list); + } + @GetMapping("all") @ApiOperation("查询所有部门列表") @LogOperation("查询所有部门列表") diff --git a/renren-admin/src/main/resources/db/V7.0__enke_hostinfo_add_table.sql b/renren-admin/src/main/resources/db/V7.0__enke_hostinfo_add_table.sql new file mode 100644 index 00000000..9a4b6e86 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.0__enke_hostinfo_add_table.sql @@ -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'); diff --git a/renren-admin/src/main/resources/ehcache.xml b/renren-admin/src/main/resources/ehcache.xml index 553c9454..c9379564 100644 --- a/renren-admin/src/main/resources/ehcache.xml +++ b/renren-admin/src/main/resources/ehcache.xml @@ -34,8 +34,8 @@ diff --git a/renren-admin/src/main/resources/mapper/enke/HostInfoDao.xml b/renren-admin/src/main/resources/mapper/enke/HostInfoDao.xml new file mode 100644 index 00000000..b691a0a0 --- /dev/null +++ b/renren-admin/src/main/resources/mapper/enke/HostInfoDao.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index a229dc7f..9763fa3c 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1601,8 +1601,7 @@ AND sd.type = #{type} - AND JSON_CONTAINS( tdr.info_list, JSON_OBJECT( 'attrType', '应用领域' )) - AND JSON_EXTRACT( tdr.info_list, '$[*].attrValue' ) LIKE CONCAT( '%', #{area}, '%' ) + AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' ) ORDER BY sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC @@ -1766,6 +1765,9 @@ AND tdr.type = #{type} + + AND sd.district = #{region} + AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate} @@ -1851,6 +1853,9 @@ AND sd.id = #{deptId} + + AND sd.district = #{region} + AND tdr.type = #{type} @@ -1863,7 +1868,7 @@ SELECT - tdr.id AS "resourceId", - tdr.NAME AS "resourceName", - IFNULL( AVG( trs.score ), 3 ) AS "score", - tdr.create_date AS "createDate" + tdr.id AS "resourceId", + tdr.NAME AS "resourceName", + IFNULL( AVG( trs.score ), 3 ) AS "score", + tdr.create_date AS "createDate" FROM - tb_data_resource tdr LEFT JOIN - tb_resource_score trs ON tdr.id = trs.resource_id + tb_data_resource tdr LEFT JOIN + tb_resource_score trs ON tdr.id = trs.resource_id WHERE - 1 = 1 - AND tdr.del_flag = 0 - AND tdr.type IN('组件服务', '应用资源') + 1 = 1 + AND tdr.del_flag = 0 + AND tdr.type IN('组件服务', '应用资源') GROUP BY - resourceId + resourceId ORDER BY - score DESC, createDate + score DESC, createDate LIMIT 10 @@ -2107,47 +2113,126 @@ + + + + + + + \ No newline at end of file