Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5b88c15aca
|
@ -116,7 +116,7 @@ public class CensusControllerV3 {
|
||||||
//以下是组件服务发布情况点击详情
|
//以下是组件服务发布情况点击详情
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件评分情况 1 2 3 4 5评分分布
|
* 发布组件评分情况 1 2 3 4 5评分分布
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -152,6 +152,7 @@ public class CensusControllerV3 {
|
||||||
@LogOperation("TOP5被调用的组件和数量")
|
@LogOperation("TOP5被调用的组件和数量")
|
||||||
@ApiImplicitParam(name = "id", value = "部门id", paramType = "query", required = true, dataType = "long")
|
@ApiImplicitParam(name = "id", value = "部门id", paramType = "query", required = true, dataType = "long")
|
||||||
public Result<List<Map<String, Object>>> assemblerUsedTopInfo(Long id){
|
public Result<List<Map<String, Object>>> assemblerUsedTopInfo(Long id){
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,12 +188,21 @@ public class CensusControllerV3 {
|
||||||
@GetMapping("/assemblerUsedInfo")
|
@GetMapping("/assemblerUsedInfo")
|
||||||
@ApiOperation("算法、图层、开发、业务发布量情况分布")
|
@ApiOperation("算法、图层、开发、业务发布量情况分布")
|
||||||
@LogOperation("算法、图层、开发、业务发布量情况分布")
|
@LogOperation("算法、图层、开发、业务发布量情况分布")
|
||||||
@ApiImplicitParam(name = "id", value = "部门id", paramType = "query", required = true, dataType = "long")
|
@ApiImplicitParams({
|
||||||
public Result<List<Map<String, Object>>> assemblerUsedInfo(Long id){
|
@ApiImplicitParam(name = "id", value = "部门id", paramType = "query", required = true, dataType = "long"),
|
||||||
return null;
|
@ApiImplicitParam(name = "resourceType",value = "资源类型(组件服务、应用资源、基础设施、数据资源、知识库)", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
public Result<List<Map<String, Object>>> assemblerUsedInfo(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||||
|
Object[] ps = {params.get("id"),params.get("resourceType")};
|
||||||
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT count(b.attr_value) as nums,b.attr_value FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id\n" +
|
||||||
|
"WHERE a.dept_id = ? and a.type = ? and b.attr_type = '组件类型'\n" +
|
||||||
|
"GROUP BY b.attr_value", ps);
|
||||||
|
|
||||||
|
return new Result<List<Map<String,Object>>>().ok(maps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//以下是组件使用情况点击详情
|
//以下是组件使用情况点击详情
|
||||||
|
|
||||||
@GetMapping("/assemblerUseTopInfo")
|
@GetMapping("/assemblerUseTopInfo")
|
||||||
|
@ -224,21 +234,6 @@ public class CensusControllerV3 {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("resourceAttrReleaseDetail")
|
|
||||||
@ApiOperation("算法、图层、开发、业务发布量情况分布")
|
|
||||||
@LogOperation("算法、图层、开发、业务发布量情况分布")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "id", value = "部门id", paramType = "query", required = true, dataType = "long"),
|
|
||||||
@ApiImplicitParam(name = "resourceType",value = "资源类型(组件服务、应用资源、基础设施、数据资源、知识库)", paramType = "query", dataType = "String")
|
|
||||||
})
|
|
||||||
public Result<List<Map<String, Object>>> resourceAttrReleaseDetail(@ApiIgnore @RequestParam Map<String, Object> params){
|
|
||||||
Object[] ps = {params.get("resourceType"),params.get("id")};
|
|
||||||
List<Map<String, Object>> result = jdbcTemplate.queryForList("SELECT b.attr_value,COUNT(b.id) AS num from tb_data_resource a inner join tb_data_attr b on a.id = b.data_resource_id\n" +
|
|
||||||
"where a.type = ? and a.dept_id = ? and (INSTR( b.attr_value , '算法' ) > 0 OR INSTR( b.attr_value , '图层' ) > 0\n" +
|
|
||||||
" OR INSTR( b.attr_value , '开发' ) > 0 OR INSTR( b.attr_value , '业务' ) > 0 )\n" +
|
|
||||||
"group by b.attr_value", ps);
|
|
||||||
return new Result<List<Map<String,Object>>>().ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("applicationAreaCapabilityList")
|
@GetMapping("applicationAreaCapabilityList")
|
||||||
@ApiOperation("应用领域分布情况")
|
@ApiOperation("应用领域分布情况")
|
||||||
|
@ -362,12 +357,12 @@ public class CensusControllerV3 {
|
||||||
/**
|
/**
|
||||||
* 测试获取部门树
|
* 测试获取部门树
|
||||||
* @param keywords
|
* @param keywords
|
||||||
* @param deptId
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("treeList")
|
@GetMapping("treeList")
|
||||||
@ApiOperation("根据当前用户所在部门查询下属部门tree,可以根据部门名称模糊查询")
|
@ApiOperation("根据当前用户所在部门查询下属部门tree,可以根据部门名称模糊查询")
|
||||||
public Result<List<SysDeptDTO>> treeList(@RequestParam(required = false,value = "模糊查询,部门名称") String keywords,Long deptId){
|
public Result<List<SysDeptDTO>> treeList(@RequestParam(required = false,value = "keywords") String keywords,Long deptId){
|
||||||
List<SysDeptDTO> result = new ArrayList<>();
|
List<SysDeptDTO> result = new ArrayList<>();
|
||||||
SysDeptDTO sysDeptDTO = sysDeptService.get(deptId);
|
SysDeptDTO sysDeptDTO = sysDeptService.get(deptId);
|
||||||
|
|
||||||
|
@ -375,16 +370,16 @@ public class CensusControllerV3 {
|
||||||
if(StringUtils.contains(sysDeptDTO.getName(),"青岛市大数据发展管理局")){//市大数据局
|
if(StringUtils.contains(sysDeptDTO.getName(),"青岛市大数据发展管理局")){//市大数据局
|
||||||
List<Map<String,Object>> deptMaps = jdbcTemplate.queryForList("SELECT id FROM sys_dept where pid = 0");
|
List<Map<String,Object>> deptMaps = jdbcTemplate.queryForList("SELECT id FROM sys_dept where pid = 0");
|
||||||
deptMaps.forEach(dept->{
|
deptMaps.forEach(dept->{
|
||||||
List<SysDeptDTO> depts = sysDeptService.getDeptListByPid(Long.valueOf(dept.get("id").toString()));
|
SysDeptDTO depts = sysDeptService.getDeptListByPid(Long.valueOf(dept.get("id").toString()));
|
||||||
result.addAll(depts);
|
result.add(depts);
|
||||||
});
|
});
|
||||||
}else if(StringUtils.contains(sysDeptDTO.getName(),"大数据") && sysDeptDTO.getType() == 3){//各区大数据局
|
}else if(StringUtils.contains(sysDeptDTO.getName(),"大数据") && sysDeptDTO.getType() == 3){//各区大数据局
|
||||||
|
|
||||||
List<SysDeptDTO> depts = sysDeptService.getDeptListByPid(sysDeptDTO.getPid());
|
SysDeptDTO depts = sysDeptService.getDeptListByPid(sysDeptDTO.getPid());
|
||||||
result.addAll(depts);
|
result.add(depts);
|
||||||
}else{
|
}else{
|
||||||
List<SysDeptDTO> deptListByPid = sysDeptService.getDeptListByPid(deptId);
|
SysDeptDTO deptListByPid = sysDeptService.getDeptListByPid(deptId);
|
||||||
result.addAll(deptListByPid);
|
result.add(deptListByPid);
|
||||||
}
|
}
|
||||||
if(keywords != null){
|
if(keywords != null){
|
||||||
treeMatch(result,keywords);
|
treeMatch(result,keywords);
|
||||||
|
@ -393,6 +388,7 @@ public class CensusControllerV3 {
|
||||||
return new Result<List<SysDeptDTO>>().ok(result);
|
return new Result<List<SysDeptDTO>>().ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void treeMatch(List<SysDeptDTO> anyLevelCategoryList, String keyword) {
|
private void treeMatch(List<SysDeptDTO> anyLevelCategoryList, String keyword) {
|
||||||
Iterator<SysDeptDTO> iter = anyLevelCategoryList.iterator();
|
Iterator<SysDeptDTO> iter = anyLevelCategoryList.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
|
|
|
@ -52,8 +52,8 @@ public class TbProjectContribController {
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("project:tbprojectcontrib:page")
|
// @RequiresPermissions("project:tbprojectcontrib:page")
|
||||||
public Result<PageData<TbProjectContribDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<TbProjectContribDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||||
PageData<TbProjectContribDTO> page = tbProjectContribService.page(params);
|
// PageData<TbProjectContribDTO> page = tbProjectContribService.page(params);
|
||||||
|
PageData<TbProjectContribDTO> page = tbProjectContribService.queryList(params);
|
||||||
return new Result<PageData<TbProjectContribDTO>>().ok(page);
|
return new Result<PageData<TbProjectContribDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ public class TbProjectUseController {
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("project:tbprojectuse:page")
|
// @RequiresPermissions("project:tbprojectuse:page")
|
||||||
public Result<PageData<TbProjectUseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<TbProjectUseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||||
PageData<TbProjectUseDTO> page = tbProjectUseService.page(params);
|
// PageData<TbProjectUseDTO> page = tbProjectUseService.page(params);
|
||||||
|
PageData<TbProjectUseDTO> page = tbProjectUseService.queryList(params);
|
||||||
return new Result<PageData<TbProjectUseDTO>>().ok(page);
|
return new Result<PageData<TbProjectUseDTO>>().ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package io.renren.modules.project.dao;
|
package io.renren.modules.project.dao;
|
||||||
|
|
||||||
import io.renren.common.dao.BaseDao;
|
import io.renren.common.dao.BaseDao;
|
||||||
|
import io.renren.modules.project.dto.TbProjectContribDTO;
|
||||||
import io.renren.modules.project.entity.TbProjectContribEntity;
|
import io.renren.modules.project.entity.TbProjectContribEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.security.core.parameters.P;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目贡献表
|
* 项目贡献表
|
||||||
|
@ -12,5 +17,12 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbProjectContribDao extends BaseDao<TbProjectContribEntity> {
|
public interface TbProjectContribDao extends BaseDao<TbProjectContribEntity> {
|
||||||
|
|
||||||
|
int queryCount(@Param("projectName")String projectName,
|
||||||
|
@Param("resourceName")String resourceName);
|
||||||
|
|
||||||
|
List<TbProjectContribDTO> queryList(@Param("currentNum") int currentNum,
|
||||||
|
@Param("pageSize")int pageSize,
|
||||||
|
@Param("projectName")String projectName,
|
||||||
|
@Param("resourceName")String resourceName);
|
||||||
}
|
}
|
|
@ -1,8 +1,12 @@
|
||||||
package io.renren.modules.project.dao;
|
package io.renren.modules.project.dao;
|
||||||
|
|
||||||
import io.renren.common.dao.BaseDao;
|
import io.renren.common.dao.BaseDao;
|
||||||
|
import io.renren.modules.project.dto.TbProjectUseDTO;
|
||||||
import io.renren.modules.project.entity.TbProjectUseEntity;
|
import io.renren.modules.project.entity.TbProjectUseEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目使用表
|
* 项目使用表
|
||||||
|
@ -12,5 +16,12 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbProjectUseDao extends BaseDao<TbProjectUseEntity> {
|
public interface TbProjectUseDao extends BaseDao<TbProjectUseEntity> {
|
||||||
|
|
||||||
|
int queryCount(@Param("projectName")String projectName,
|
||||||
|
@Param("resourceName")String resourceName);
|
||||||
|
|
||||||
|
List<TbProjectUseDTO> queryList(@Param("currentNum") int currentNum,
|
||||||
|
@Param("pageSize")int pageSize,
|
||||||
|
@Param("projectName")String projectName,
|
||||||
|
@Param("resourceName")String resourceName);
|
||||||
}
|
}
|
|
@ -42,9 +42,9 @@ public class TbProjectContribDTO implements Serializable {
|
||||||
private Long updater;
|
private Long updater;
|
||||||
@ApiModelProperty(value = "修改时间")
|
@ApiModelProperty(value = "修改时间")
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "项目id")
|
||||||
private String note1;
|
private String note1;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "应用资源id")
|
||||||
private String note2;
|
private String note2;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "备用字段")
|
||||||
private String note3;
|
private String note3;
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class TbProjectUseDTO implements Serializable {
|
||||||
private Long updater;
|
private Long updater;
|
||||||
@ApiModelProperty(value = "修改时间")
|
@ApiModelProperty(value = "修改时间")
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "项目id")
|
||||||
private String note1;
|
private String note1;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "应用资源id")
|
||||||
private String note2;
|
private String note2;
|
||||||
@ApiModelProperty(value = "备用字段")
|
@ApiModelProperty(value = "备用字段")
|
||||||
private String note3;
|
private String note3;
|
||||||
|
|
|
@ -57,11 +57,11 @@ public class TbProjectContribEntity extends BaseEntity {
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
/**
|
/**
|
||||||
* 备用字段
|
* 项目id
|
||||||
*/
|
*/
|
||||||
private String note1;
|
private String note1;
|
||||||
/**
|
/**
|
||||||
* 备用字段
|
* 应用资源id
|
||||||
*/
|
*/
|
||||||
private String note2;
|
private String note2;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,11 +57,11 @@ public class TbProjectUseEntity extends BaseEntity {
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
/**
|
/**
|
||||||
* 备用字段
|
* 项目id
|
||||||
*/
|
*/
|
||||||
private String note1;
|
private String note1;
|
||||||
/**
|
/**
|
||||||
* 备用字段
|
* 应用资源id
|
||||||
*/
|
*/
|
||||||
private String note2;
|
private String note2;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class TbProjectContribExcel {
|
||||||
private Long updater;
|
private Long updater;
|
||||||
@ExcelProperty(value = "修改时间", index = 11)
|
@ExcelProperty(value = "修改时间", index = 11)
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
@ExcelProperty(value = "备用字段", index = 12)
|
@ExcelProperty(value = "项目id", index = 12)
|
||||||
private String note1;
|
private String note1;
|
||||||
@ExcelProperty(value = "备用字段", index = 13)
|
@ExcelProperty(value = "应用资源id", index = 13)
|
||||||
private String note2;
|
private String note2;
|
||||||
@ExcelProperty(value = "备用字段", index = 14)
|
@ExcelProperty(value = "备用字段", index = 14)
|
||||||
private String note3;
|
private String note3;
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class TbProjectUseExcel {
|
||||||
private Long updater;
|
private Long updater;
|
||||||
@ExcelProperty(value = "修改时间", index = 11)
|
@ExcelProperty(value = "修改时间", index = 11)
|
||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
@ExcelProperty(value = "备用字段", index = 12)
|
@ExcelProperty(value = "项目id", index = 12)
|
||||||
private String note1;
|
private String note1;
|
||||||
@ExcelProperty(value = "备用字段", index = 13)
|
@ExcelProperty(value = "应用资源id", index = 13)
|
||||||
private String note2;
|
private String note2;
|
||||||
@ExcelProperty(value = "备用字段", index = 14)
|
@ExcelProperty(value = "备用字段", index = 14)
|
||||||
private String note3;
|
private String note3;
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
package io.renren.modules.project.service;
|
package io.renren.modules.project.service;
|
||||||
|
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
import io.renren.common.service.CrudService;
|
import io.renren.common.service.CrudService;
|
||||||
import io.renren.modules.project.dto.TbProjectContribDTO;
|
import io.renren.modules.project.dto.TbProjectContribDTO;
|
||||||
import io.renren.modules.project.entity.TbProjectContribEntity;
|
import io.renren.modules.project.entity.TbProjectContribEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目贡献表
|
* 项目贡献表
|
||||||
*
|
*
|
||||||
|
@ -12,4 +15,5 @@ import io.renren.modules.project.entity.TbProjectContribEntity;
|
||||||
*/
|
*/
|
||||||
public interface TbProjectContribService extends CrudService<TbProjectContribEntity, TbProjectContribDTO> {
|
public interface TbProjectContribService extends CrudService<TbProjectContribEntity, TbProjectContribDTO> {
|
||||||
|
|
||||||
|
PageData<TbProjectContribDTO> queryList(Map<String, Object> params);
|
||||||
}
|
}
|
|
@ -1,9 +1,12 @@
|
||||||
package io.renren.modules.project.service;
|
package io.renren.modules.project.service;
|
||||||
|
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
import io.renren.common.service.CrudService;
|
import io.renren.common.service.CrudService;
|
||||||
import io.renren.modules.project.dto.TbProjectUseDTO;
|
import io.renren.modules.project.dto.TbProjectUseDTO;
|
||||||
import io.renren.modules.project.entity.TbProjectUseEntity;
|
import io.renren.modules.project.entity.TbProjectUseEntity;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目使用表
|
* 项目使用表
|
||||||
*
|
*
|
||||||
|
@ -12,4 +15,5 @@ import io.renren.modules.project.entity.TbProjectUseEntity;
|
||||||
*/
|
*/
|
||||||
public interface TbProjectUseService extends CrudService<TbProjectUseEntity, TbProjectUseDTO> {
|
public interface TbProjectUseService extends CrudService<TbProjectUseEntity, TbProjectUseDTO> {
|
||||||
|
|
||||||
|
PageData<TbProjectUseDTO> queryList(Map<String, Object> params);
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package io.renren.modules.project.service.impl;
|
package io.renren.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
import io.renren.modules.project.dao.TbProjectContribDao;
|
import io.renren.modules.project.dao.TbProjectContribDao;
|
||||||
|
@ -9,8 +10,10 @@ import io.renren.modules.project.entity.TbProjectContribEntity;
|
||||||
import io.renren.modules.project.service.TbProjectContribService;
|
import io.renren.modules.project.service.TbProjectContribService;
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +25,9 @@ import java.util.Map;
|
||||||
@Service
|
@Service
|
||||||
public class TbProjectContribServiceImpl extends CrudServiceImpl<TbProjectContribDao, TbProjectContribEntity, TbProjectContribDTO> implements TbProjectContribService {
|
public class TbProjectContribServiceImpl extends CrudServiceImpl<TbProjectContribDao, TbProjectContribEntity, TbProjectContribDTO> implements TbProjectContribService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TbProjectContribDao tbProjectContribDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<TbProjectContribEntity> getWrapper(Map<String, Object> params){
|
public QueryWrapper<TbProjectContribEntity> getWrapper(Map<String, Object> params){
|
||||||
QueryWrapper<TbProjectContribEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<TbProjectContribEntity> wrapper = new QueryWrapper<>();
|
||||||
|
@ -36,5 +42,32 @@ public class TbProjectContribServiceImpl extends CrudServiceImpl<TbProjectContri
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageData<TbProjectContribDTO> queryList(Map<String, Object> params) {
|
||||||
|
//分页参数
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
if(params.containsKey("limit") && StringUtils.isNotBlank(params.get("limit").toString())){
|
||||||
|
pageSize = Integer.valueOf(params.get("limit").toString());
|
||||||
|
}
|
||||||
|
if(params.containsKey("page") && StringUtils.isNotBlank(params.get("page").toString())){
|
||||||
|
page = Integer.valueOf(params.get("page").toString());
|
||||||
|
}
|
||||||
|
int currentNum = (page-1)*pageSize;
|
||||||
|
|
||||||
|
//查询参数
|
||||||
|
String projectName = null;
|
||||||
|
String resourceName = null;
|
||||||
|
if(params.containsKey("projectName") && StringUtils.isNotBlank(params.get("projectName").toString())){
|
||||||
|
projectName = params.get("projectName").toString();
|
||||||
|
}
|
||||||
|
if(params.containsKey("resourceName") && StringUtils.isNotBlank(params.get("resourceName").toString())){
|
||||||
|
resourceName = params.get("resourceName").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = tbProjectContribDao.queryCount(projectName,resourceName);
|
||||||
|
List<TbProjectContribDTO> list = tbProjectContribDao.queryList(currentNum,pageSize,projectName,resourceName);
|
||||||
|
|
||||||
|
return new PageData<>(list,count);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package io.renren.modules.project.service.impl;
|
package io.renren.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import io.renren.common.page.PageData;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.common.constant.Constant;
|
import io.renren.common.constant.Constant;
|
||||||
import io.renren.modules.project.dao.TbProjectUseDao;
|
import io.renren.modules.project.dao.TbProjectUseDao;
|
||||||
|
@ -9,8 +10,10 @@ import io.renren.modules.project.entity.TbProjectUseEntity;
|
||||||
import io.renren.modules.project.service.TbProjectUseService;
|
import io.renren.modules.project.service.TbProjectUseService;
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +25,9 @@ import java.util.Map;
|
||||||
@Service
|
@Service
|
||||||
public class TbProjectUseServiceImpl extends CrudServiceImpl<TbProjectUseDao, TbProjectUseEntity, TbProjectUseDTO> implements TbProjectUseService {
|
public class TbProjectUseServiceImpl extends CrudServiceImpl<TbProjectUseDao, TbProjectUseEntity, TbProjectUseDTO> implements TbProjectUseService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TbProjectUseDao tbProjectUseDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<TbProjectUseEntity> getWrapper(Map<String, Object> params){
|
public QueryWrapper<TbProjectUseEntity> getWrapper(Map<String, Object> params){
|
||||||
QueryWrapper<TbProjectUseEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<TbProjectUseEntity> wrapper = new QueryWrapper<>();
|
||||||
|
@ -37,4 +43,32 @@ public class TbProjectUseServiceImpl extends CrudServiceImpl<TbProjectUseDao, Tb
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageData<TbProjectUseDTO> queryList(Map<String, Object> params) {
|
||||||
|
//分页参数
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
if(params.containsKey("limit") && StringUtils.isNotBlank(params.get("limit").toString())){
|
||||||
|
pageSize = Integer.valueOf(params.get("limit").toString());
|
||||||
|
}
|
||||||
|
if(params.containsKey("page") && StringUtils.isNotBlank(params.get("page").toString())){
|
||||||
|
page = Integer.valueOf(params.get("page").toString());
|
||||||
|
}
|
||||||
|
int currentNum = (page-1)*pageSize;
|
||||||
|
|
||||||
|
//查询参数
|
||||||
|
String projectName = null;
|
||||||
|
String resourceName = null;
|
||||||
|
if(params.containsKey("projectName") && StringUtils.isNotBlank(params.get("projectName").toString())){
|
||||||
|
projectName = params.get("projectName").toString();
|
||||||
|
}
|
||||||
|
if(params.containsKey("resourceName") && StringUtils.isNotBlank(params.get("resourceName").toString())){
|
||||||
|
resourceName = params.get("resourceName").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = tbProjectUseDao.queryCount(projectName,resourceName);
|
||||||
|
List<TbProjectUseDTO> list = tbProjectUseDao.queryList(currentNum,pageSize,projectName,resourceName);
|
||||||
|
|
||||||
|
return new PageData<>(list,count);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -33,6 +33,7 @@ import okhttp3.FormBody;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.bytedeco.opencv.presets.opencv_core;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
@ -1190,4 +1191,5 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -20,10 +20,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,12 +39,31 @@ public class SysDeptController {
|
||||||
/** ytl 2022-06-23 新增 start **/
|
/** ytl 2022-06-23 新增 start **/
|
||||||
@GetMapping("treeList")
|
@GetMapping("treeList")
|
||||||
@ApiOperation("根据当前用户所在部门查询下属部门tree,可以根据部门名称模糊查询")
|
@ApiOperation("根据当前用户所在部门查询下属部门tree,可以根据部门名称模糊查询")
|
||||||
public Result<List<SysDeptDTO>> treeList(@RequestParam(required = false,value = "模糊查询,部门名称") String keywords){
|
public Result<List<SysDeptDTO>> treeList(@RequestParam(required = false,value = "keywords") String keywords){
|
||||||
Long deptId = SecurityUser.getDeptId();
|
Long deptId = SecurityUser.getDeptId();
|
||||||
List<SysDeptDTO> deptListByPid = sysDeptService.getDeptListByPid(deptId);
|
List<SysDeptDTO> result = new ArrayList<>();
|
||||||
treeMatch(deptListByPid,keywords);
|
SysDeptDTO sysDeptDTO = sysDeptService.get(deptId);
|
||||||
|
|
||||||
return new Result<List<SysDeptDTO>>().ok(deptListByPid);
|
//市大数据局展示全部部门,区大数据局展示本区所有部门,委办局展示自己部门及下级部门
|
||||||
|
if(StringUtils.contains(sysDeptDTO.getName(),"青岛市大数据发展管理局")){//市大数据局
|
||||||
|
List<Map<String,Object>> deptMaps = jdbcTemplate.queryForList("SELECT id FROM sys_dept where pid = 0");
|
||||||
|
deptMaps.forEach(dept->{
|
||||||
|
SysDeptDTO depts = sysDeptService.getDeptListByPid(Long.valueOf(dept.get("id").toString()));
|
||||||
|
result.add(depts);
|
||||||
|
});
|
||||||
|
}else if(StringUtils.contains(sysDeptDTO.getName(),"大数据") && sysDeptDTO.getType() == 3){//各区大数据局
|
||||||
|
|
||||||
|
SysDeptDTO depts = sysDeptService.getDeptListByPid(sysDeptDTO.getPid());
|
||||||
|
result.add(depts);
|
||||||
|
}else{
|
||||||
|
SysDeptDTO deptListByPid = sysDeptService.getDeptListByPid(deptId);
|
||||||
|
result.add(deptListByPid);
|
||||||
|
}
|
||||||
|
if(keywords != null){
|
||||||
|
treeMatch(result,keywords);
|
||||||
|
}
|
||||||
|
System.out.println("部门树--》"+result.size());
|
||||||
|
return new Result<List<SysDeptDTO>>().ok(result);
|
||||||
}
|
}
|
||||||
/** ytl 2022-06-23 新增 end **/
|
/** ytl 2022-06-23 新增 end **/
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
|
|
|
@ -31,5 +31,6 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
|
||||||
|
|
||||||
SysDeptDTO getByName(String name);
|
SysDeptDTO getByName(String name);
|
||||||
|
|
||||||
List<SysDeptDTO> getDeptListByPid(Long id);
|
//List<SysDeptDTO> getDeptListByPid(Long id);
|
||||||
|
SysDeptDTO getDeptListByPid(Long id);
|
||||||
}
|
}
|
|
@ -165,7 +165,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDeptDTO> getDeptListByPid(Long id) {
|
public SysDeptDTO getDeptListByPid(Long id) {
|
||||||
SysDeptEntity sysDeptEntity = baseDao.getById(id);//当前部门
|
SysDeptEntity sysDeptEntity = baseDao.getById(id);//当前部门
|
||||||
SysDeptDTO sysDeptDTO = ConvertUtils.sourceToTarget(sysDeptEntity, SysDeptDTO.class);//转换为DTO
|
SysDeptDTO sysDeptDTO = ConvertUtils.sourceToTarget(sysDeptEntity, SysDeptDTO.class);//转换为DTO
|
||||||
|
|
||||||
|
@ -175,16 +175,18 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
|
||||||
if(sysDeptList.size() > 0){
|
if(sysDeptList.size() > 0){
|
||||||
sysDeptList.forEach(dept->sysDeptDTOList.add(ConvertUtils.sourceToTarget(dept, SysDeptDTO.class)));
|
sysDeptList.forEach(dept->sysDeptDTOList.add(ConvertUtils.sourceToTarget(dept, SysDeptDTO.class)));
|
||||||
for(int i = 0; i<sysDeptList.size(); i++){
|
for(int i = 0; i<sysDeptList.size(); i++){
|
||||||
List<SysDeptDTO> list = getDeptListByPid(sysDeptList.get(i).getId());
|
SysDeptDTO list = getDeptListByPid(sysDeptList.get(i).getId());
|
||||||
sysDeptDTOList.get(i).setChildren(list);
|
//sysDeptDTOList.get(i).setChildren(list);
|
||||||
}
|
}
|
||||||
sysDeptDTO.setChildren(sysDeptDTOList);
|
sysDeptDTO.setChildren(sysDeptDTOList);
|
||||||
sysDeptDTOList.add(sysDeptDTO);
|
//sysDeptDTOList.add(sysDeptDTO);
|
||||||
}else{
|
|
||||||
sysDeptDTOList.add(sysDeptDTO);
|
|
||||||
}
|
}
|
||||||
|
// else{
|
||||||
|
// sysDeptDTOList.add(sysDeptDTO);
|
||||||
|
// }
|
||||||
|
|
||||||
return sysDeptDTOList;
|
//return sysDeptDTOList;
|
||||||
|
return sysDeptDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE `tb_project_contrib`
|
||||||
|
MODIFY COLUMN `note1` bigint(20) DEFAULT NULL COMMENT '项目id,tb_project主键',
|
||||||
|
MODIFY COLUMN `note2` bigint(20) DEFAULT NULL COMMENT '应用id,tb_data_resource中类型为应用资源的主键id';
|
||||||
|
|
||||||
|
ALTER TABLE `tb_project_use`
|
||||||
|
MODIFY COLUMN `note1` bigint(20) DEFAULT NULL COMMENT '项目id,tb_project主键',
|
||||||
|
MODIFY COLUMN `note2` bigint(20) DEFAULT NULL COMMENT '应用id,tb_data_resource中类型为应用资源的主键id';
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?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.project.dao.TbProjectContribDao">
|
||||||
|
|
||||||
|
<resultMap type="io.renren.modules.project.entity.TbProjectContribEntity" id="tbProjectContribMap">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="projectName" column="project_name"/>
|
||||||
|
<result property="resourceName" column="resource_name"/>
|
||||||
|
<result property="abilityName" column="ability_name"/>
|
||||||
|
<result property="abilityType" column="ability_type"/>
|
||||||
|
<result property="applyTime" column="apply_time"/>
|
||||||
|
<result property="applyNum" column="apply_num"/>
|
||||||
|
<result property="browseNum" column="browse_num"/>
|
||||||
|
<result property="creator" column="creator"/>
|
||||||
|
<result property="createDate" column="create_date"/>
|
||||||
|
<result property="updater" column="updater"/>
|
||||||
|
<result property="updateDate" column="update_date"/>
|
||||||
|
<result property="note1" column="note1"/>
|
||||||
|
<result property="note2" column="note2"/>
|
||||||
|
<result property="note3" column="note3"/>
|
||||||
|
<result property="note4" column="note4"/>
|
||||||
|
<result property="note5" column="note5"/>
|
||||||
|
</resultMap>
|
||||||
|
<select id="queryCount" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM tb_project_contrib tpc
|
||||||
|
left join tb_project tp on tpc.note1 = tp.id
|
||||||
|
left join tb_data_resource tdrapp on tpc.note2 = tdrapp.id
|
||||||
|
left join tb_data_resource_rel tdrr on tpc.note2 = tdrr.key_id
|
||||||
|
left join tb_data_resource tdrother on tdrr.reference_id = tdrother.id
|
||||||
|
left join (select resource_id,count(*) as num from t_ability_application GROUP BY resource_id) applynum on applynum.resource_id = tdrr.reference_id
|
||||||
|
where tdrother.name is not null and tdrr.del_flag = 0
|
||||||
|
<if test="projectName != null and projectName != ''">
|
||||||
|
and tp.project_name like CONCAT('%',#{projectName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="resourceName != null and resourceName != ''">
|
||||||
|
and tdrapp.name like CONCAT('%',#{resourceName},'%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="queryList" resultMap="tbProjectContribMap">
|
||||||
|
SELECT
|
||||||
|
tp.project_name,
|
||||||
|
tdrapp.name as resource_name,
|
||||||
|
tdrother.name as ability_name,
|
||||||
|
tdrother.type as ability_type,
|
||||||
|
tdrother.create_date as apply_time,
|
||||||
|
IFNULL(applynum.num,0)as apply_num,
|
||||||
|
tdrother.visits as browse_num
|
||||||
|
FROM tb_project_contrib tpc
|
||||||
|
left join tb_project tp on tpc.note1 = tp.id
|
||||||
|
left join tb_data_resource tdrapp on tpc.note2 = tdrapp.id
|
||||||
|
left join tb_data_resource_rel tdrr on tpc.note2 = tdrr.key_id
|
||||||
|
left join tb_data_resource tdrother on tdrr.reference_id = tdrother.id
|
||||||
|
left join (select resource_id,count(*) as num from t_ability_application GROUP BY resource_id) applynum on applynum.resource_id = tdrr.reference_id
|
||||||
|
where tdrother.name is not null and tdrr.del_flag = 0
|
||||||
|
<if test="projectName != null and projectName != ''">
|
||||||
|
and tp.project_name like CONCAT('%',#{projectName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="resourceName != null and resourceName != ''">
|
||||||
|
and tdrapp.name like CONCAT('%',#{resourceName},'%')
|
||||||
|
</if>
|
||||||
|
ORDER BY tdrother.create_date desc
|
||||||
|
limit #{currentNum},#{pageSize}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?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.project.dao.TbProjectDao">
|
||||||
|
|
||||||
|
<resultMap type="io.renren.modules.project.entity.TbProjectEntity" id="tbProjectMap">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="projectName" column="project_name"/>
|
||||||
|
<result property="applyDep" column="apply_dep"/>
|
||||||
|
<result property="applyUser" column="apply_user"/>
|
||||||
|
<result property="applyTime" column="apply_time"/>
|
||||||
|
<result property="regionName" column="region_name"/>
|
||||||
|
<result property="respDep" column="resp_dep"/>
|
||||||
|
<result property="businessUser" column="business_user"/>
|
||||||
|
<result property="businessPhone" column="business_phone"/>
|
||||||
|
<result property="techUser" column="tech_user"/>
|
||||||
|
<result property="techPhone" column="tech_phone"/>
|
||||||
|
<result property="creator" column="creator"/>
|
||||||
|
<result property="createDate" column="create_date"/>
|
||||||
|
<result property="updater" column="updater"/>
|
||||||
|
<result property="updateDate" column="update_date"/>
|
||||||
|
<result property="note1" column="note1"/>
|
||||||
|
<result property="note2" column="note2"/>
|
||||||
|
<result property="note3" column="note3"/>
|
||||||
|
<result property="note4" column="note4"/>
|
||||||
|
<result property="note5" column="note5"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?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.project.dao.TbProjectUseDao">
|
||||||
|
|
||||||
|
<resultMap type="io.renren.modules.project.entity.TbProjectUseEntity" id="tbProjectUseMap">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="projectName" column="project_name"/>
|
||||||
|
<result property="resourceName" column="resource_name"/>
|
||||||
|
<result property="abilityName" column="ability_name"/>
|
||||||
|
<result property="abilityType" column="ability_type"/>
|
||||||
|
<result property="applyTime" column="apply_time"/>
|
||||||
|
<result property="applyNum" column="apply_num"/>
|
||||||
|
<result property="browseNum" column="browse_num"/>
|
||||||
|
<result property="creator" column="creator"/>
|
||||||
|
<result property="createDate" column="create_date"/>
|
||||||
|
<result property="updater" column="updater"/>
|
||||||
|
<result property="updateDate" column="update_date"/>
|
||||||
|
<result property="note1" column="note1"/>
|
||||||
|
<result property="note2" column="note2"/>
|
||||||
|
<result property="note3" column="note3"/>
|
||||||
|
<result property="note4" column="note4"/>
|
||||||
|
<result property="note5" column="note5"/>
|
||||||
|
</resultMap>
|
||||||
|
<select id="queryCount" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM tb_project_use tpu
|
||||||
|
left join tb_project tp on tpu.note1 = tp.id
|
||||||
|
left join tb_data_resource tdrapp on tpu.note2 = tdrapp.id
|
||||||
|
left join tb_data_resource_rel tdrr on tpu.note2 = tdrr.key_id
|
||||||
|
left join tb_data_resource tdrother on tdrr.reference_id = tdrother.id
|
||||||
|
left join (select resource_id,count(*) as num from t_ability_application GROUP BY resource_id) applynum on applynum.resource_id = tdrr.reference_id
|
||||||
|
where tdrother.name is not null and tdrr.del_flag = 0
|
||||||
|
<if test="projectName != null and projectName != ''">
|
||||||
|
and tp.project_name like CONCAT('%',#{projectName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="resourceName != null and resourceName != ''">
|
||||||
|
and tdrapp.name like CONCAT('%',#{resourceName},'%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="queryList" resultMap="tbProjectUseMap">
|
||||||
|
SELECT
|
||||||
|
tp.project_name,
|
||||||
|
tdrapp.name as resource_name,
|
||||||
|
tdrother.name as ability_name,
|
||||||
|
tdrother.type as ability_type,
|
||||||
|
tdrother.create_date as apply_time,
|
||||||
|
IFNULL(applynum.num,0)as apply_num,
|
||||||
|
tdrother.visits as browse_num
|
||||||
|
FROM tb_project_use tpu
|
||||||
|
left join tb_project tp on tpu.note1 = tp.id
|
||||||
|
left join tb_data_resource tdrapp on tpu.note2 = tdrapp.id
|
||||||
|
left join tb_data_resource_rel tdrr on tpu.note2 = tdrr.key_id
|
||||||
|
left join tb_data_resource tdrother on tdrr.reference_id = tdrother.id
|
||||||
|
left join (select resource_id,count(*) as num from t_ability_application GROUP BY resource_id) applynum on applynum.resource_id = tdrr.reference_id
|
||||||
|
where tdrother.name is not null and tdrr.del_flag = 0
|
||||||
|
<if test="projectName != null and projectName != ''">
|
||||||
|
and tp.project_name like CONCAT('%',#{projectName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="resourceName != null and resourceName != ''">
|
||||||
|
and tdrapp.name like CONCAT('%',#{resourceName},'%')
|
||||||
|
</if>
|
||||||
|
ORDER BY tdrother.create_date desc
|
||||||
|
limit #{currentNum},#{pageSize}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -930,9 +930,7 @@
|
||||||
GROUP BY
|
GROUP BY
|
||||||
type
|
type
|
||||||
</select>
|
</select>
|
||||||
<select id="applicationUsedAreaCapabilityList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectTopFiveComponentServiceApplications" resultType="java.util.Map">
|
<select id="selectTopFiveComponentServiceApplications" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
Loading…
Reference in New Issue