Merge branch 'master' of code.gitlink.org.cn:Gitlink/microservices
This commit is contained in:
commit
9786975fe1
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-modules</artifactId>
|
||||
<version>3.6.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>microservices-modules-dms</artifactId>
|
||||
|
||||
<description>
|
||||
microservices-modules-dms数据管理体系模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Microservices Common Async -->
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-async</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Microservices Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Microservices Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Microservices Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Microservices Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-log</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<!-- 处理访问Gitlink相关接口 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microservices</groupId>
|
||||
<artifactId>microservices-common-httpClient</artifactId>
|
||||
<version>3.6.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.coobird</groupId>
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.shibing624</groupId>
|
||||
<artifactId>similarity</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
package com.microservices.dms;
|
||||
|
||||
import com.microservices.common.security.annotation.EnableCustomConfig;
|
||||
import com.microservices.common.security.annotation.EnableRyFeignClients;
|
||||
import com.microservices.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 项目管理模块
|
||||
*
|
||||
* @author otto
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
public class MicroservicesDmsApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MicroservicesDmsApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 数据管理体系模块启动成功 ლ(´ڡ`ლ)゙ \n");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.system.api.domain.SysDictData;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementDictDataService;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 成果相关字典Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Api(tags = "数据管理体系-成果字典管理")
|
||||
@RestController
|
||||
@RequestMapping("/achDict")
|
||||
public class AchievementDictDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAchievementDictDataService achievementDictDataService;
|
||||
|
||||
/**
|
||||
* 查询成果相关字典列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AchievementDictData achievementDictData)
|
||||
{
|
||||
startPage();
|
||||
List<AchievementDictData> list = achievementDictDataService.selectAchievementDictDataList(achievementDictData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成果相关字典列表
|
||||
*/
|
||||
@Log(title = "成果相关字典", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AchievementDictData achievementDictData)
|
||||
{
|
||||
List<AchievementDictData> list = achievementDictDataService.selectAchievementDictDataList(achievementDictData);
|
||||
ExcelUtil<AchievementDictData> util = new ExcelUtil<AchievementDictData>(AchievementDictData.class);
|
||||
util.exportExcel(response, list, "成果相关字典数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成果相关字典详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{dictCode}")
|
||||
public AjaxResult getInfo(@PathVariable("dictCode") Long dictCode)
|
||||
{
|
||||
return success(achievementDictDataService.selectAchievementDictDataByDictCode(dictCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果相关字典
|
||||
*/
|
||||
@Log(title = "成果相关字典", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AchievementDictData achievementDictData)
|
||||
{
|
||||
return toAjax(achievementDictDataService.insertAchievementDictData(achievementDictData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果相关字典
|
||||
*/
|
||||
@Log(title = "成果相关字典", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AchievementDictData achievementDictData)
|
||||
{
|
||||
return toAjax(achievementDictDataService.updateAchievementDictData(achievementDictData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果相关字典
|
||||
*/
|
||||
@Log(title = "成果相关字典", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
return toAjax(achievementDictDataService.deleteAchievementDictDataByDictCodes(dictCodes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息
|
||||
*/
|
||||
@ApiOperation("根据成果字典分类查询成果值")
|
||||
@GetMapping(value = "/getDictDateByType")
|
||||
public AjaxResult getDictDateByType(String dictType)
|
||||
{
|
||||
List<KeyValueVo> data = achievementDictDataService.selectDictDataByType(dictType);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
@ApiOperation("根据成果字典分类")
|
||||
@GetMapping(value = "/getDictTypes")
|
||||
public AjaxResult getDictTypes()
|
||||
{
|
||||
List<String> data = achievementDictDataService.getDictTypes();
|
||||
return success(data);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementTeamService;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 成果团队Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "数据管理体系-成果团队接口")
|
||||
@RequestMapping("/achievementsTeam")
|
||||
public class AchievementTeamController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAchievementTeamService achievementTeamService;
|
||||
|
||||
/**
|
||||
* 查询成果团队列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AchievementTeam achievementTeam)
|
||||
{
|
||||
startPage();
|
||||
List<AchievementTeam> list = achievementTeamService.selectAchievementTeamList(achievementTeam);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成果团队列表
|
||||
*/
|
||||
@Log(title = "成果团队", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AchievementTeam achievementTeam)
|
||||
{
|
||||
List<AchievementTeam> list = achievementTeamService.selectAchievementTeamList(achievementTeam);
|
||||
ExcelUtil<AchievementTeam> util = new ExcelUtil<AchievementTeam>(AchievementTeam.class);
|
||||
util.exportExcel(response, list, "成果团队数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成果团队详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(achievementTeamService.selectAchievementTeamById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果团队
|
||||
*/
|
||||
@Log(title = "成果团队", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AchievementTeam achievementTeam)
|
||||
{
|
||||
return toAjax(achievementTeamService.insertAchievementTeam(achievementTeam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果团队
|
||||
*/
|
||||
@Log(title = "成果团队", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AchievementTeam achievementTeam)
|
||||
{
|
||||
return toAjax(achievementTeamService.updateAchievementTeam(achievementTeam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果团队
|
||||
*/
|
||||
@Log(title = "成果团队", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(achievementTeamService.deleteAchievementTeamByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,277 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchQueryVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.Achievements;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 成果Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/achievements")
|
||||
@Api(tags = "数据管理体系-成果库接口")
|
||||
public class AchievementsController extends BaseController {
|
||||
@Autowired
|
||||
private IAchievementsService achievementsService;
|
||||
|
||||
/**
|
||||
* 查询成果列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Achievements achievements) {
|
||||
startPage();
|
||||
List<Achievements> list = achievementsService.selectAchievementsList(achievements);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成果列表
|
||||
*/
|
||||
@Log(title = "成果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Achievements achievements) {
|
||||
List<Achievements> list = achievementsService.selectAchievementsList(achievements);
|
||||
ExcelUtil<Achievements> util = new ExcelUtil<Achievements>(Achievements.class);
|
||||
util.exportExcel(response, list, "成果数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成果详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(achievementsService.selectAchievementsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果
|
||||
*/
|
||||
@Log(title = "成果", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Achievements achievements) {
|
||||
return toAjax(achievementsService.insertAchievements(achievements));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果
|
||||
*/
|
||||
@Log(title = "成果", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Achievements achievements) {
|
||||
return toAjax(achievementsService.updateAchievements(achievements));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果
|
||||
*/
|
||||
@Log(title = "成果", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(achievementsService.deleteAchievementsByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取精选成果
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取精选成果")
|
||||
@GetMapping("/getChoiceImport")
|
||||
public AjaxResult getChoiceImport() {
|
||||
return success(achievementsService.getChoiceImport());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据成果来源对成果数据进行分类统计
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("根据成果来源对成果数据进行分类统计")
|
||||
@GetMapping("/getTjBySources")
|
||||
public AjaxResult getTjBySources() {
|
||||
return success(achievementsService.getTjBySources());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据成果领域对成功数据进行汇总
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("根据成果领域对成果数据进行汇总")
|
||||
@GetMapping("/getTjByAreas")
|
||||
public AjaxResult getTjByAreas() {
|
||||
return success(achievementsService.getTjByAreas());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据领域分类名称,获取领域相关数据(创客任务、开放竞赛、校企成果)
|
||||
*/
|
||||
@ApiOperation("根据领域分类名称,获取领域相关数据")
|
||||
@GetMapping("/getAreasByName")
|
||||
public AjaxResult getAreasByName(String areaName) {
|
||||
return success(achievementsService.getAreasByName(areaName));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据领域分类名称,获取项目领域")
|
||||
@GetMapping("/getProjectAreasByName")
|
||||
public AjaxResult getProjectAreasByName(String areaName) {
|
||||
return success(achievementsService.getProjectAreasByName(areaName));
|
||||
}
|
||||
|
||||
@ApiOperation("根据领域分类名称,获取专家领域")
|
||||
@GetMapping("/getExpertAreasByName")
|
||||
public AjaxResult getExpertAreasByName(String areaName) {
|
||||
return success(achievementsService.getExpertAreasByName(areaName));
|
||||
}
|
||||
|
||||
|
||||
/* 获取全部成果,根据成果名称、成果领域、成果来源进行查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取全部成果,根据成果名称、成果领域、成果来源进行查询")
|
||||
@GetMapping("/getAllResult")
|
||||
public TableDataInfo getAllResult(AchQueryVo achQueryVo) {
|
||||
startPage();
|
||||
return getDataTable(achievementsService.getAllResult(achQueryVo));
|
||||
}
|
||||
|
||||
@ApiOperation("近七日用户行为数据")
|
||||
@GetMapping("/getUerActionData")
|
||||
public AjaxResult getUerActionData() {
|
||||
return success(achievementsService.getUerActionData());
|
||||
}
|
||||
|
||||
@ApiOperation("热门成果")
|
||||
@GetMapping("/getHotAchievement")
|
||||
public AjaxResult getHotAchievement() {
|
||||
return success(achievementsService.getHotAchievement());
|
||||
}
|
||||
|
||||
@ApiOperation("七日新增")
|
||||
@GetMapping("/get7DayAdd")
|
||||
public AjaxResult get7DayAdd(AchQueryVo achQueryVo) {
|
||||
return success(achievementsService.get7DayAdd(achQueryVo));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("首页项目统计")
|
||||
@GetMapping("/indexProjectStatistic")
|
||||
public AjaxResult indexProjectStatistic() {
|
||||
return success(achievementsService.indexProjectStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页task统计")
|
||||
@GetMapping("/indexTaskStatistic")
|
||||
public AjaxResult indexTaskStatistic() {
|
||||
return success(achievementsService.indexTaskStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页Competition统计")
|
||||
@GetMapping("/indexCompetitionStatistic")
|
||||
public AjaxResult indexCompetitionStatistic() {
|
||||
return success(achievementsService.indexCompetitionStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页SchoolEnterprise统计")
|
||||
@GetMapping("/indexSchoolEnterpriseStatistic")
|
||||
public AjaxResult indexSchoolEnterpriseStatistic() {
|
||||
return success(achievementsService.indexSchoolEnterpriseStatistic());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("首页专家统计")
|
||||
@GetMapping("/indexExpertStatistic")
|
||||
public AjaxResult indexExpertStatistic() {
|
||||
return success(achievementsService.indexExpertStatistic());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据当前用户以及成果ID,获取当前成果的 是否收藏与关注状态")
|
||||
@GetMapping("/getWatchFavoriteStatusById")
|
||||
public AjaxResult getWatchFavoriteStatusById(Long id, Long userId) {
|
||||
return success(achievementsService.getWatchFavoriteStatusById(id, userId));
|
||||
}
|
||||
@ApiOperation("根据成果ID,获取近7日成果点击数量(折线图)")
|
||||
@GetMapping("/get7AddClickById")
|
||||
public AjaxResult get7AddClickById(String id,@RequestParam(value = "clickType",required = false, defaultValue = "Achievements")
|
||||
String clickType) {
|
||||
return success(achievementsService.get7AddClickById(id,clickType));
|
||||
}
|
||||
|
||||
@ApiOperation("根据成果ID,获取成果的相关行为数据统计(点击量、搜索量、附件下载量、收藏、关注)")
|
||||
@GetMapping("/getActDataStatisticById")
|
||||
public AjaxResult getActDataStatisticById(Long id) {
|
||||
return success(achievementsService.getActDataStatisticById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据领域,将成果数据进行分类")
|
||||
@GetMapping("/getAreaStatistic")
|
||||
public AjaxResult getAreaStatistic(String areaKey)
|
||||
{
|
||||
return success(achievementsService.getAreaStatistic(areaKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开源项目的相关成果
|
||||
*/
|
||||
@ApiOperation(value = "获取开源项目的相关成果")
|
||||
@GetMapping("/getRelatedAch")
|
||||
public AjaxResult getRelatedAch(Long id,Long sourceId)
|
||||
{
|
||||
return success(achievementsService.getRelatedAch(id,sourceId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取开源竞赛的相关成果")
|
||||
@GetMapping("/getRelatedAchCompetition")
|
||||
public AjaxResult getRelatedAchCompetition(Long id,Long sourceId)
|
||||
{
|
||||
return success(achievementsService.getRelatedAchCompetition(id,sourceId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取创客任务的相关成果")
|
||||
@GetMapping("/getRelatedAchTask")
|
||||
public AjaxResult getRelatedAchTask(Long id,Long sourceId)
|
||||
{
|
||||
return success(achievementsService.getRelatedAchTask(id,sourceId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取专家-创客任务的相关成果")
|
||||
@GetMapping("/getRelatedAchTaskOfExpert")
|
||||
public AjaxResult getRelatedAchTaskOfExpert(Long expertId)
|
||||
{
|
||||
return success(achievementsService.getRelatedAchTaskOfExpert(expertId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取专家-开源竞赛的相关成果")
|
||||
@GetMapping("/getRelatedAchCompetitionOfExpert")
|
||||
public AjaxResult getRelatedAchCompetitionOfExpert(Long expertId)
|
||||
{
|
||||
return success(achievementsService.getRelatedAchCompetitionOfExpert(expertId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "搜索行为数据记录")
|
||||
@GetMapping("/getSearchResult")
|
||||
public AjaxResult getSearchResult(String achName,Long userId)
|
||||
{
|
||||
return success(achievementsService.getSearchResult(achName,userId));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.dms.achievementLibrary.service.BigScreenStatisticService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "数据管理体系-大屏统计接口")
|
||||
@RequestMapping("/bigScreenStatistic")
|
||||
public class BigScreenStatisticController {
|
||||
|
||||
private final BigScreenStatisticService bigScreenStatisticService;
|
||||
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementTopStatistic")
|
||||
@ApiOperation(value = "成果任务统计顶部折线图")
|
||||
public AjaxResult getAchievementTopStatistic(String source) {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementTopStatistic(source));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementDataYearly")
|
||||
@ApiOperation(value = "年度成果数据")
|
||||
public AjaxResult getAchievementDataYearly() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementDataYearly());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementType")
|
||||
@ApiOperation(value = "成果类型")
|
||||
public AjaxResult getAchievementType() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementType());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementDomain")
|
||||
@ApiOperation(value = "成果领域分布")
|
||||
public AjaxResult getAchievementDomain() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementDomain());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementAddYearly")
|
||||
@ApiOperation(value = "近1年新增成果数")
|
||||
public AjaxResult getAchievementAddYearly() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementAddYearly());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementActData")
|
||||
@ApiOperation(value = "成果行为数据展示")
|
||||
public AjaxResult getAchievementActData() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementActData());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/achievement/getAchievementHotRank")
|
||||
@ApiOperation(value = "成果热度排行")
|
||||
public AjaxResult getAchievementHotRank() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getAchievementHotRank());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/competition/getCompetitionTopStatistic")
|
||||
@ApiOperation(value = "competition统计顶部")
|
||||
public AjaxResult getAchievementTopStatistic() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getCompetitionTopStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/competition/getCompetitionStatisticYearly")
|
||||
@ApiOperation(value = "竞赛数据统计")
|
||||
public AjaxResult getCompetitionStatisticYearly() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getCompetitionStatisticYearly());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/competition/getCompetitionHot")
|
||||
@ApiOperation(value = "热门竞赛统计")
|
||||
public AjaxResult getCompetitionHot() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getCompetitionHot());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/competition/getCompetitionYearlyPaperAdd")
|
||||
@ApiOperation(value = "年度竞赛作品新增数")
|
||||
public AjaxResult getCompetitionYearlyPaperAdd() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getCompetitionYearlyPaperAdd());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/competition/getCompetitionYearlyFinish")
|
||||
@ApiOperation(value = "近1年竞赛完成情况")
|
||||
public AjaxResult getCompetitionYearlyFinish() {
|
||||
return AjaxResult.success(bigScreenStatisticService.getCompetitionYearlyFinish());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.dms.achievementLibrary.domain.TokenListVo;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/blockChain")
|
||||
@Api(tags = "数据产权子系统")
|
||||
public class BlockChainController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IAchievementsService achievementsService;
|
||||
|
||||
// @GetMapping("/projectTokenList")
|
||||
// @ApiOperation(value = "项目token列表")
|
||||
// public TableDataInfo projectTokenList() {
|
||||
// startPage();
|
||||
// List<TokenListVo> list = achievementsService.projectTokenList();
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.dms.achievementLibrary.service.ExpertDashboardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "数据管理体系-专家可视化接口")
|
||||
@RequestMapping("/expertDashboard")
|
||||
public class ExpertDashboardController {
|
||||
@Autowired
|
||||
private ExpertDashboardService expertDashboardService;
|
||||
|
||||
@GetMapping(value = "getExpertTotal")
|
||||
@ApiOperation(value = "获取专家总数")
|
||||
public AjaxResult getExpertTotal() {
|
||||
return AjaxResult.success(expertDashboardService.getExpertTotal());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getAuthenticationStatistic")
|
||||
@ApiOperation(value = "专家实名完成度")
|
||||
public AjaxResult getAuthenticationStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getAuthenticationStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getTitleRankStatistic")
|
||||
@ApiOperation(value = "专家职称级分布")
|
||||
public AjaxResult getTitleRankStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getTitleRankStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getExpertAduit")
|
||||
@ApiOperation(value = "专家评审作品数排序")
|
||||
public AjaxResult getExpertAduit() {
|
||||
return AjaxResult.success(expertDashboardService.getExpertAduit());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getExpertTypeStatistic")
|
||||
@ApiOperation(value = "专家专业类别")
|
||||
public AjaxResult getExpertTypeStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getExpertTypeStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getWorkplaceTypeStatistic")
|
||||
@ApiOperation(value = "专家单位类别分布")
|
||||
public AjaxResult getWorkplaceTypeStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getWorkplaceTypeStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getHighestDegreeStatistic")
|
||||
@ApiOperation(value = "专家学历分布")
|
||||
public AjaxResult getHighestDegreeStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getHighestDegreeStatistic());
|
||||
}
|
||||
|
||||
//7、年度专家数据统计 cretate_on
|
||||
@GetMapping(value = "getExpertTotalByYear")
|
||||
@ApiOperation(value = "年度专家数据统计")
|
||||
public AjaxResult getExpertTotalByYear() {
|
||||
return AjaxResult.success(expertDashboardService.getExpertTotalByYear());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getReviewAreasStatistic")
|
||||
@ApiOperation(value = "热门专家领域")
|
||||
public AjaxResult getReviewAreasStatistic() {
|
||||
return AjaxResult.success(expertDashboardService.getReviewAreasStatistic());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.dms.achievementLibrary.service.MemoDashboardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "数据管理体系-社区动态可视化接口")
|
||||
@RequestMapping("/memoDashboard")
|
||||
public class MemoDashboardController {
|
||||
@Autowired
|
||||
private MemoDashboardService memoDashboardService;
|
||||
|
||||
@GetMapping(value = "getMemoAduit")
|
||||
@ApiOperation(value = "帖子审核通过率、帖子总数")
|
||||
public AjaxResult getMemoAduit() {
|
||||
return AjaxResult.success(memoDashboardService.getMemoAduit());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getIsOriginalStatistic")
|
||||
@ApiOperation(value = "帖子原创、非原创")
|
||||
public AjaxResult getIsOriginalStatistic() {
|
||||
return AjaxResult.success(memoDashboardService.getIsOriginalStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getMemoTotalByYear")
|
||||
@ApiOperation(value = "年度论坛帖子总数")
|
||||
public AjaxResult getMemoTotalByYear() {
|
||||
return AjaxResult.success(memoDashboardService.getMemoTotalByYear());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getForumSectionStatistic")
|
||||
@ApiOperation(value = "帖子分类")
|
||||
public AjaxResult getForumSectionStatistic() {
|
||||
return AjaxResult.success(memoDashboardService.getForumSectionStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getAddMemoStatistic")
|
||||
@ApiOperation(value = "近一年新增帖子数")
|
||||
public AjaxResult getAddMemoStatistic() {
|
||||
return AjaxResult.success(memoDashboardService.getAddMemoStatistic());
|
||||
}
|
||||
|
||||
@GetMapping(value = "getTop5Memos")
|
||||
@ApiOperation(value = "年度帖子热度top5")
|
||||
public AjaxResult getTop5Memos() {
|
||||
return AjaxResult.success(memoDashboardService.getTop5Memos());
|
||||
}
|
||||
|
||||
@GetMapping(value = "get7DayPaise")
|
||||
@ApiOperation(value = "近7日帖子点赞数")
|
||||
public AjaxResult get7DayPaise() {
|
||||
return AjaxResult.success(memoDashboardService.get7DayPaise());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
package com.microservices.dms.achievementLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.dms.achievementLibrary.domain.SchoolEnterpriseAchievements;
|
||||
import com.microservices.dms.achievementLibrary.service.ISchoolEnterpriseAchievementsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 校企成果Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
@Api(tags = "数据管理体系-校企成果接口")
|
||||
@RestController
|
||||
@RequestMapping("/schoolEnterpriseAchievements")
|
||||
public class SchoolEnterpriseAchievementsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISchoolEnterpriseAchievementsService schoolEnterpriseAchievementsService;
|
||||
|
||||
/**
|
||||
* 查询校企成果列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
startPage();
|
||||
List<SchoolEnterpriseAchievements> list = schoolEnterpriseAchievementsService.selectSchoolEnterpriseAchievementsList(schoolEnterpriseAchievements);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询校企成果列表
|
||||
*/
|
||||
@GetMapping("/listFront")
|
||||
public TableDataInfo listFront(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
startPage();
|
||||
List<SchoolEnterpriseAchievements> list = schoolEnterpriseAchievementsService.listFront(schoolEnterpriseAchievements);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出校企成果列表
|
||||
*/
|
||||
@Log(title = "校企成果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
List<SchoolEnterpriseAchievements> list = schoolEnterpriseAchievementsService.selectSchoolEnterpriseAchievementsList(schoolEnterpriseAchievements);
|
||||
ExcelUtil<SchoolEnterpriseAchievements> util = new ExcelUtil<SchoolEnterpriseAchievements>(SchoolEnterpriseAchievements.class);
|
||||
util.exportExcel(response, list, "校企成果数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取校企成果详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(schoolEnterpriseAchievementsService.selectSchoolEnterpriseAchievementsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增校企成果
|
||||
*/
|
||||
@Log(title = "校企成果", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
return AjaxResult.success(schoolEnterpriseAchievementsService.insertSchoolEnterpriseAchievements(schoolEnterpriseAchievements));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改校企成果
|
||||
*/
|
||||
@Log(title = "校企成果", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
return AjaxResult.success(schoolEnterpriseAchievementsService.updateSchoolEnterpriseAchievements(schoolEnterpriseAchievements));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除校企成果
|
||||
*/
|
||||
@Log(title = "校企成果", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return AjaxResult.success(schoolEnterpriseAchievementsService.deleteSchoolEnterpriseAchievementsByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 顶部统计
|
||||
*/
|
||||
@GetMapping("/topStatistic")
|
||||
@ApiOperation(value = "顶部统计数据")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "tags", value = "成果标签", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "status", value = "成果状态", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public AjaxResult topStatistic(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
|
||||
Long value = schoolEnterpriseAchievementsService.topStatistic(schoolEnterpriseAchievements);
|
||||
return AjaxResult.success(value);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class AchQueryVo {
|
||||
|
||||
private String areaQuery;//领域
|
||||
private String source;//来源
|
||||
private String achievementName;//名称
|
||||
private Long userId;
|
||||
private String showAchievementName;
|
||||
public String getAreaQuery() {
|
||||
return areaQuery;
|
||||
}
|
||||
|
||||
public void setAreaQuery(String areaQuery) {
|
||||
this.areaQuery = areaQuery;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getAchievementName() {
|
||||
return achievementName;
|
||||
}
|
||||
|
||||
public void setAchievementName(String achievementName) {
|
||||
this.achievementName = achievementName;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getShowAchievementName() {
|
||||
return showAchievementName;
|
||||
}
|
||||
|
||||
public void setShowAchievementName(String showAchievementName) {
|
||||
this.showAchievementName = showAchievementName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AchRelatedResult {
|
||||
private String year;
|
||||
private List<AchRelatedVo> achRelatedVoList;
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public List<AchRelatedVo> getAchRelatedVoList() {
|
||||
return achRelatedVoList;
|
||||
}
|
||||
|
||||
public void setAchRelatedVoList(List<AchRelatedVo> achRelatedVoList) {
|
||||
this.achRelatedVoList = achRelatedVoList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class AchRelatedVo {
|
||||
private Long id;
|
||||
private String attachments;
|
||||
private String summary;
|
||||
private String achievementType;
|
||||
private String achMonthDay;
|
||||
private String source;
|
||||
private Long sourceId;
|
||||
private String achRelateName;
|
||||
private String showAchievementName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getAchievementType() {
|
||||
return achievementType;
|
||||
}
|
||||
|
||||
public void setAchievementType(String achievementType) {
|
||||
this.achievementType = achievementType;
|
||||
}
|
||||
|
||||
public String getAchMonthDay() {
|
||||
return achMonthDay;
|
||||
}
|
||||
|
||||
public void setAchMonthDay(String achMonthDay) {
|
||||
this.achMonthDay = achMonthDay;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Long getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceId(Long sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public String getAchRelateName() {
|
||||
return achRelateName;
|
||||
}
|
||||
|
||||
public void setAchRelateName(String achRelateName) {
|
||||
this.achRelateName = achRelateName;
|
||||
}
|
||||
|
||||
public String getShowAchievementName() {
|
||||
return showAchievementName;
|
||||
}
|
||||
|
||||
public void setShowAchievementName(String showAchievementName) {
|
||||
this.showAchievementName = showAchievementName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 成果相关字典对象 achievement_dict_data
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class AchievementDictData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 字典编码 */
|
||||
private Long dictCode;
|
||||
|
||||
/** 字典排序 */
|
||||
@Excel(name = "字典排序")
|
||||
private Integer dictSort;
|
||||
|
||||
/** 字典标签 */
|
||||
@Excel(name = "字典标签")
|
||||
private String dictLabel;
|
||||
|
||||
/** 字典键值 */
|
||||
@Excel(name = "字典键值")
|
||||
private String dictValue;
|
||||
|
||||
/** 字典类型 */
|
||||
@Excel(name = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
public void setDictCode(Long dictCode)
|
||||
{
|
||||
this.dictCode = dictCode;
|
||||
}
|
||||
|
||||
public Long getDictCode()
|
||||
{
|
||||
return dictCode;
|
||||
}
|
||||
public void setDictSort(Integer dictSort)
|
||||
{
|
||||
this.dictSort = dictSort;
|
||||
}
|
||||
|
||||
public Integer getDictSort()
|
||||
{
|
||||
return dictSort;
|
||||
}
|
||||
public void setDictLabel(String dictLabel)
|
||||
{
|
||||
this.dictLabel = dictLabel;
|
||||
}
|
||||
|
||||
public String getDictLabel()
|
||||
{
|
||||
return dictLabel;
|
||||
}
|
||||
public void setDictValue(String dictValue)
|
||||
{
|
||||
this.dictValue = dictValue;
|
||||
}
|
||||
|
||||
public String getDictValue()
|
||||
{
|
||||
return dictValue;
|
||||
}
|
||||
public void setDictType(String dictType)
|
||||
{
|
||||
this.dictType = dictType;
|
||||
}
|
||||
|
||||
public String getDictType()
|
||||
{
|
||||
return dictType;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("dictCode", getDictCode())
|
||||
.append("dictSort", getDictSort())
|
||||
.append("dictLabel", getDictLabel())
|
||||
.append("dictValue", getDictValue())
|
||||
.append("dictType", getDictType())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,195 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 成果团队对象 achievement_team
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class AchievementTeam extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 成果ld */
|
||||
@Excel(name = "成果ld")
|
||||
private Long achievementId;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String username;
|
||||
|
||||
/** 所属单位 */
|
||||
@Excel(name = "所属单位")
|
||||
private String company;
|
||||
|
||||
/** 职称 */
|
||||
@Excel(name = "职称")
|
||||
private String technicalTitle;
|
||||
|
||||
/** 专业 */
|
||||
@Excel(name = "专业")
|
||||
private String professionalTitle;
|
||||
|
||||
/** 研究方向 */
|
||||
@Excel(name = "研究方向")
|
||||
private String researchDirection;
|
||||
|
||||
/** 联系方式 */
|
||||
@Excel(name = "联系方式")
|
||||
private String phone;
|
||||
|
||||
/** 个人简介 */
|
||||
@Excel(name = "个人简介")
|
||||
private String summary;
|
||||
|
||||
/** 本项成果中主要承担工作 */
|
||||
@Excel(name = "本项成果中主要承担工作")
|
||||
private String workContent;
|
||||
|
||||
/** 是否是负责人 */
|
||||
@Excel(name = "是否是负责人")
|
||||
private String isLeader;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAchievementId(Long achievementId)
|
||||
{
|
||||
this.achievementId = achievementId;
|
||||
}
|
||||
|
||||
public Long getAchievementId()
|
||||
{
|
||||
return achievementId;
|
||||
}
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
public void setCompany(String company)
|
||||
{
|
||||
this.company = company;
|
||||
}
|
||||
|
||||
public String getCompany()
|
||||
{
|
||||
return company;
|
||||
}
|
||||
public void setTechnicalTitle(String technicalTitle)
|
||||
{
|
||||
this.technicalTitle = technicalTitle;
|
||||
}
|
||||
|
||||
public String getTechnicalTitle()
|
||||
{
|
||||
return technicalTitle;
|
||||
}
|
||||
public void setProfessionalTitle(String professionalTitle)
|
||||
{
|
||||
this.professionalTitle = professionalTitle;
|
||||
}
|
||||
|
||||
public String getProfessionalTitle()
|
||||
{
|
||||
return professionalTitle;
|
||||
}
|
||||
public void setResearchDirection(String researchDirection)
|
||||
{
|
||||
this.researchDirection = researchDirection;
|
||||
}
|
||||
|
||||
public String getResearchDirection()
|
||||
{
|
||||
return researchDirection;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setSummary(String summary)
|
||||
{
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getSummary()
|
||||
{
|
||||
return summary;
|
||||
}
|
||||
public void setWorkContent(String workContent)
|
||||
{
|
||||
this.workContent = workContent;
|
||||
}
|
||||
|
||||
public String getWorkContent()
|
||||
{
|
||||
return workContent;
|
||||
}
|
||||
public void setIsLeader(String isLeader)
|
||||
{
|
||||
this.isLeader = isLeader;
|
||||
}
|
||||
|
||||
public String getIsLeader()
|
||||
{
|
||||
return isLeader;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("achievementId", getAchievementId())
|
||||
.append("username", getUsername())
|
||||
.append("company", getCompany())
|
||||
.append("technicalTitle", getTechnicalTitle())
|
||||
.append("professionalTitle", getProfessionalTitle())
|
||||
.append("researchDirection", getResearchDirection())
|
||||
.append("phone", getPhone())
|
||||
.append("summary", getSummary())
|
||||
.append("workContent", getWorkContent())
|
||||
.append("isLeader", getIsLeader())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,505 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 成果对象 achievementsll
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-02
|
||||
*/
|
||||
public class Achievements extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 成果唯一标识
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 成果名称
|
||||
*/
|
||||
@Excel(name = "成果名称")
|
||||
private String achievementName;
|
||||
/**
|
||||
* 成果展示名称
|
||||
*/
|
||||
private String showAchievementName;
|
||||
|
||||
/**
|
||||
* 成果领域1
|
||||
*/
|
||||
@Excel(name = "成果领域1")
|
||||
private String field1;
|
||||
//成果领域名称
|
||||
private String field1Name;
|
||||
|
||||
/**
|
||||
* 成果领域2
|
||||
*/
|
||||
@Excel(name = "成果领域2")
|
||||
private String field2;
|
||||
|
||||
/**
|
||||
* 成果领域3
|
||||
*/
|
||||
@Excel(name = "成果领域3")
|
||||
private String field3;
|
||||
|
||||
/**
|
||||
* 成果类型
|
||||
*/
|
||||
@Excel(name = "成果类型")
|
||||
private String achievementType;
|
||||
|
||||
/**
|
||||
* 成果来源
|
||||
*/
|
||||
@Excel(name = "成果来源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 成果来源ID
|
||||
*/
|
||||
@Excel(name = "成果来源ID")
|
||||
private Long sourceId;
|
||||
|
||||
/**
|
||||
* 成果来源跳转链接
|
||||
*/
|
||||
@Excel(name = "成果来源跳转链接")
|
||||
private String sourceLink;
|
||||
|
||||
/**
|
||||
* 成果标签
|
||||
*/
|
||||
@Excel(name = "成果标签")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 成果摘要
|
||||
*/
|
||||
@Excel(name = "成果摘要")
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* 发布单位
|
||||
*/
|
||||
@Excel(name = "发布单位")
|
||||
private String publishingUnit;
|
||||
|
||||
/**
|
||||
* 成果地址
|
||||
*/
|
||||
@Excel(name = "成果地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 是否精选成果
|
||||
*/
|
||||
@Excel(name = "是否精选成果")
|
||||
private Integer isFeatured;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话")
|
||||
private String contactNumber;
|
||||
|
||||
/**
|
||||
* 成果所属人ID
|
||||
*/
|
||||
@Excel(name = "成果所属人ID")
|
||||
private String ownerId;
|
||||
|
||||
/**
|
||||
* 成果所属人名称
|
||||
*/
|
||||
@Excel(name = "成果所属人名称")
|
||||
private String ownerName;
|
||||
|
||||
/**
|
||||
* 成果状态
|
||||
*/
|
||||
@Excel(name = "成果状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 成果详情
|
||||
*/
|
||||
@Excel(name = "成果详情")
|
||||
private String details;
|
||||
|
||||
/**
|
||||
* 成果审核人
|
||||
*/
|
||||
@Excel(name = "成果审核人")
|
||||
private String reviewer;
|
||||
|
||||
/**
|
||||
* 成果审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "成果审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
|
||||
/**
|
||||
* 成果审核意见
|
||||
*/
|
||||
@Excel(name = "成果审核意见")
|
||||
private String reviewComments;
|
||||
|
||||
/**
|
||||
* 成果图片
|
||||
*/
|
||||
@Excel(name = "成果图片")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 成果附件
|
||||
*/
|
||||
@Excel(name = "成果附件")
|
||||
private String attachments;
|
||||
|
||||
private Long clickSum;
|
||||
private Long watcherSum;
|
||||
private Long favoriteSum;
|
||||
private Float hotRank;
|
||||
private Long attachmentCount;
|
||||
private Integer isExpertAudit;
|
||||
private String userImg;
|
||||
private String userNickName;
|
||||
public String gender;
|
||||
private String userLogin;
|
||||
private List<Map<String,Object>> dockingUserInfo;
|
||||
|
||||
public List<Map<String, Object>> getDockingUserInfo() {
|
||||
return dockingUserInfo;
|
||||
}
|
||||
|
||||
public void setDockingUserInfo(List<Map<String, Object>> dockingUserInfo) {
|
||||
this.dockingUserInfo = dockingUserInfo;
|
||||
}
|
||||
|
||||
public String getShowAchievementName() {
|
||||
return showAchievementName;
|
||||
}
|
||||
|
||||
public void setShowAchievementName(String showAchievementName) {
|
||||
this.showAchievementName = showAchievementName;
|
||||
}
|
||||
|
||||
public String getUserImg() {
|
||||
return userImg;
|
||||
}
|
||||
|
||||
public void setUserImg(String userImg) {
|
||||
this.userImg = userImg;
|
||||
}
|
||||
|
||||
public String getUserNickName() {
|
||||
return userNickName;
|
||||
}
|
||||
|
||||
public void setUserNickName(String userNickName) {
|
||||
this.userNickName = userNickName;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getUserLogin() {
|
||||
return userLogin;
|
||||
}
|
||||
|
||||
public void setUserLogin(String userLogin) {
|
||||
this.userLogin = userLogin;
|
||||
}
|
||||
|
||||
public String getField1Name() {
|
||||
return field1Name;
|
||||
}
|
||||
|
||||
public void setField1Name(String field1Name) {
|
||||
this.field1Name = field1Name;
|
||||
}
|
||||
|
||||
public Long getWatcherSum() {
|
||||
return watcherSum;
|
||||
}
|
||||
|
||||
public void setWatcherSum(Long watcherSum) {
|
||||
this.watcherSum = watcherSum;
|
||||
}
|
||||
|
||||
public Long getFavoriteSum() {
|
||||
return favoriteSum;
|
||||
}
|
||||
|
||||
public void setFavoriteSum(Long favoriteSum) {
|
||||
this.favoriteSum = favoriteSum;
|
||||
}
|
||||
|
||||
public Float getHotRank() {
|
||||
return hotRank;
|
||||
}
|
||||
|
||||
public void setHotRank(Float hotRank) {
|
||||
this.hotRank = hotRank;
|
||||
}
|
||||
|
||||
public Integer getIsExpertAudit() {
|
||||
return isExpertAudit;
|
||||
}
|
||||
|
||||
public void setIsExpertAudit(Integer isExpertAudit) {
|
||||
this.isExpertAudit = isExpertAudit;
|
||||
}
|
||||
|
||||
public Long getAttachmentCount() {
|
||||
return attachmentCount;
|
||||
}
|
||||
|
||||
public void setAttachmentCount(Long attachmentCount) {
|
||||
this.attachmentCount = attachmentCount;
|
||||
}
|
||||
|
||||
public Long getClickSum() {
|
||||
return clickSum;
|
||||
}
|
||||
|
||||
public void setClickSum(Long clickSum) {
|
||||
this.clickSum = clickSum;
|
||||
}
|
||||
|
||||
private List<KeyValVo> attachmentList;
|
||||
|
||||
public List<KeyValVo> getAttachmentList() {
|
||||
return attachmentList;
|
||||
}
|
||||
|
||||
public void setAttachmentList(List<KeyValVo> attachmentList) {
|
||||
this.attachmentList = attachmentList;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setAchievementName(String achievementName) {
|
||||
this.achievementName = achievementName;
|
||||
}
|
||||
|
||||
public String getAchievementName() {
|
||||
return achievementName;
|
||||
}
|
||||
|
||||
public void setField1(String field1) {
|
||||
this.field1 = field1;
|
||||
}
|
||||
|
||||
public String getField1() {
|
||||
return field1;
|
||||
}
|
||||
|
||||
public void setField2(String field2) {
|
||||
this.field2 = field2;
|
||||
}
|
||||
|
||||
public String getField2() {
|
||||
return field2;
|
||||
}
|
||||
|
||||
public void setField3(String field3) {
|
||||
this.field3 = field3;
|
||||
}
|
||||
|
||||
public String getField3() {
|
||||
return field3;
|
||||
}
|
||||
|
||||
public void setAchievementType(String achievementType) {
|
||||
this.achievementType = achievementType;
|
||||
}
|
||||
|
||||
public String getAchievementType() {
|
||||
return achievementType;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSourceId(Long sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public Long getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceLink(String sourceLink) {
|
||||
this.sourceLink = sourceLink;
|
||||
}
|
||||
|
||||
public String getSourceLink() {
|
||||
return sourceLink;
|
||||
}
|
||||
|
||||
public void setTags(String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setPublishingUnit(String publishingUnit) {
|
||||
this.publishingUnit = publishingUnit;
|
||||
}
|
||||
|
||||
public String getPublishingUnit() {
|
||||
return publishingUnit;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setIsFeatured(Integer isFeatured) {
|
||||
this.isFeatured = isFeatured;
|
||||
}
|
||||
|
||||
public Integer getIsFeatured() {
|
||||
return isFeatured;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactNumber(String contactNumber) {
|
||||
this.contactNumber = contactNumber;
|
||||
}
|
||||
|
||||
public String getContactNumber() {
|
||||
return contactNumber;
|
||||
}
|
||||
|
||||
public void setOwnerId(String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public String getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setDetails(String details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public String getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setReviewer(String reviewer) {
|
||||
this.reviewer = reviewer;
|
||||
}
|
||||
|
||||
public String getReviewer() {
|
||||
return reviewer;
|
||||
}
|
||||
|
||||
public void setReviewDate(Date reviewDate) {
|
||||
this.reviewDate = reviewDate;
|
||||
}
|
||||
|
||||
public Date getReviewDate() {
|
||||
return reviewDate;
|
||||
}
|
||||
|
||||
public void setReviewComments(String reviewComments) {
|
||||
this.reviewComments = reviewComments;
|
||||
}
|
||||
|
||||
public String getReviewComments() {
|
||||
return reviewComments;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class AreaStatisticVo {
|
||||
//领域名称
|
||||
private String areaName;
|
||||
//领域key
|
||||
private String areaKey;
|
||||
//领域说明
|
||||
private String remark;
|
||||
//开源项目汇总
|
||||
private Long kyxmSum;
|
||||
//创客任务汇总
|
||||
private Long ckrwSum;
|
||||
//开放竞赛汇总
|
||||
private Long kfjsSum;
|
||||
//校企成果汇总
|
||||
private Long xqcgSum;
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaKey() {
|
||||
return areaKey;
|
||||
}
|
||||
|
||||
public void setAreaKey(String areaKey) {
|
||||
this.areaKey = areaKey;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Long getKyxmSum() {
|
||||
return kyxmSum;
|
||||
}
|
||||
|
||||
public void setKyxmSum(Long kyxmSum) {
|
||||
this.kyxmSum = kyxmSum;
|
||||
}
|
||||
|
||||
public Long getCkrwSum() {
|
||||
return ckrwSum;
|
||||
}
|
||||
|
||||
public void setCkrwSum(Long ckrwSum) {
|
||||
this.ckrwSum = ckrwSum;
|
||||
}
|
||||
|
||||
public Long getKfjsSum() {
|
||||
return kfjsSum;
|
||||
}
|
||||
|
||||
public void setKfjsSum(Long kfjsSum) {
|
||||
this.kfjsSum = kfjsSum;
|
||||
}
|
||||
|
||||
public Long getXqcgSum() {
|
||||
return xqcgSum;
|
||||
}
|
||||
|
||||
public void setXqcgSum(Long xqcgSum) {
|
||||
this.xqcgSum = xqcgSum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class AreasTjVo {
|
||||
private Long areaSum;
|
||||
private List<KeyValueVo> areaDetails;
|
||||
|
||||
public Long getAreaSum() {
|
||||
return areaSum;
|
||||
}
|
||||
|
||||
public void setAreaSum(Long areaSum) {
|
||||
this.areaSum = areaSum;
|
||||
}
|
||||
|
||||
public List<KeyValueVo> getAreaDetails() {
|
||||
return areaDetails;
|
||||
}
|
||||
|
||||
public void setAreaDetails(List<KeyValueVo> areaDetails) {
|
||||
this.areaDetails = areaDetails;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class ExpertTotallVo {
|
||||
//专家名称
|
||||
private String name;
|
||||
//任务审核数
|
||||
private Long taskAuditSum;
|
||||
//竞赛审核数
|
||||
private Long competitionAuditSum;
|
||||
//总数
|
||||
private Long total;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getTaskAuditSum() {
|
||||
return taskAuditSum;
|
||||
}
|
||||
|
||||
public void setTaskAuditSum(Long taskAuditSum) {
|
||||
this.taskAuditSum = taskAuditSum;
|
||||
}
|
||||
|
||||
public Long getCompetitionAuditSum() {
|
||||
return competitionAuditSum;
|
||||
}
|
||||
|
||||
public void setCompetitionAuditSum(Long competitionAuditSum) {
|
||||
this.competitionAuditSum = competitionAuditSum;
|
||||
}
|
||||
|
||||
public Long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Long total) {
|
||||
this.total = total;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class HotAchVo {
|
||||
|
||||
private int watcher;
|
||||
private int faviter;
|
||||
private int total;
|
||||
private String gender;
|
||||
private String name;
|
||||
private String showAchievementName;
|
||||
private Long id;
|
||||
private String userNickName;
|
||||
private String userName;
|
||||
private String userImg;
|
||||
|
||||
public String getUserImg() {
|
||||
return userImg;
|
||||
}
|
||||
|
||||
public void setUserImg(String userImg) {
|
||||
this.userImg = userImg;
|
||||
}
|
||||
|
||||
public int getWatcher() {
|
||||
return watcher;
|
||||
}
|
||||
|
||||
public void setWatcher(int watcher) {
|
||||
this.watcher = watcher;
|
||||
}
|
||||
|
||||
public int getFaviter() {
|
||||
return faviter;
|
||||
}
|
||||
|
||||
public void setFaviter(int faviter) {
|
||||
this.faviter = faviter;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserNickName() {
|
||||
return userNickName;
|
||||
}
|
||||
|
||||
public void setUserNickName(String userNickName) {
|
||||
this.userNickName = userNickName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getShowAchievementName() {
|
||||
return showAchievementName;
|
||||
}
|
||||
|
||||
public void setShowAchievementName(String showAchievementName) {
|
||||
this.showAchievementName = showAchievementName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
public class KeyValueVo {
|
||||
private String key;
|
||||
private String name;
|
||||
private String result;
|
||||
private Long value;
|
||||
private Long value2;
|
||||
private Long total;
|
||||
|
||||
public Long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Long getValue2() {
|
||||
return value2;
|
||||
}
|
||||
|
||||
public void setValue2(Long value2) {
|
||||
this.value2 = value2;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public Long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Long value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MemoTotalVo {
|
||||
private Long id;
|
||||
private String subject;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "发布时间", hidden = true)
|
||||
private Date publishedAt;
|
||||
private Long viewedCount;
|
||||
private Long praisesCount;
|
||||
private Long repliesCount;
|
||||
private Long behavioreSum;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public Date getPublishedAt() {
|
||||
return publishedAt;
|
||||
}
|
||||
|
||||
public void setPublishedAt(Date publishedAt) {
|
||||
this.publishedAt = publishedAt;
|
||||
}
|
||||
|
||||
public Long getViewedCount() {
|
||||
return viewedCount;
|
||||
}
|
||||
|
||||
public void setViewedCount(Long viewedCount) {
|
||||
this.viewedCount = viewedCount;
|
||||
}
|
||||
|
||||
public Long getPraisesCount() {
|
||||
return praisesCount;
|
||||
}
|
||||
|
||||
public void setPraisesCount(Long praisesCount) {
|
||||
this.praisesCount = praisesCount;
|
||||
}
|
||||
|
||||
public Long getRepliesCount() {
|
||||
return repliesCount;
|
||||
}
|
||||
|
||||
public void setRepliesCount(Long repliesCount) {
|
||||
this.repliesCount = repliesCount;
|
||||
}
|
||||
|
||||
public Long getBehavioreSum() {
|
||||
return behavioreSum;
|
||||
}
|
||||
|
||||
public void setBehavioreSum(Long behavioreSum) {
|
||||
this.behavioreSum = behavioreSum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,454 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 校企成果对象 school_enterprise_achievements
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public class SchoolEnterpriseAchievements extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 成果唯一标识
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 成果名称
|
||||
*/
|
||||
@Excel(name = "成果名称")
|
||||
private String achievementName;
|
||||
|
||||
/**
|
||||
* 成果领域1
|
||||
*/
|
||||
@Excel(name = "成果领域1")
|
||||
private String field1;
|
||||
|
||||
/**
|
||||
* 成果领域2
|
||||
*/
|
||||
@Excel(name = "成果领域2")
|
||||
private String field2;
|
||||
|
||||
/**
|
||||
* 成果领域3
|
||||
*/
|
||||
@Excel(name = "成果领域3")
|
||||
private String field3;
|
||||
|
||||
/**
|
||||
* 成果类型
|
||||
*/
|
||||
@Excel(name = "成果类型")
|
||||
private String achievementType;
|
||||
|
||||
/**
|
||||
* 成果来源
|
||||
*/
|
||||
@Excel(name = "成果来源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 成果来源ID
|
||||
*/
|
||||
@Excel(name = "成果来源ID")
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* 成果来源跳转链接
|
||||
*/
|
||||
@Excel(name = "成果来源跳转链接")
|
||||
private String sourceLink;
|
||||
|
||||
/**
|
||||
* 成果标签
|
||||
*/
|
||||
@Excel(name = "成果标签")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 成果摘要
|
||||
*/
|
||||
@Excel(name = "成果摘要")
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* 发布单位
|
||||
*/
|
||||
@Excel(name = "发布单位")
|
||||
private String publishingUnit;
|
||||
|
||||
/**
|
||||
* 成果地址
|
||||
*/
|
||||
@Excel(name = "成果地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 是否精选成果
|
||||
*/
|
||||
@Excel(name = "是否精选成果")
|
||||
private Integer isFeatured;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话")
|
||||
private String contactNumber;
|
||||
|
||||
/**
|
||||
* 成果所属人ID
|
||||
*/
|
||||
@Excel(name = "成果所属人ID")
|
||||
private String ownerId;
|
||||
|
||||
/**
|
||||
* 成果所属人名称
|
||||
*/
|
||||
@Excel(name = "成果所属人名称")
|
||||
private String ownerName;
|
||||
|
||||
/**
|
||||
* 成果状态
|
||||
*/
|
||||
@Excel(name = "校企成果的状态 1是通过,3是不通过")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 成果详情
|
||||
*/
|
||||
@Excel(name = "成果详情")
|
||||
private String details;
|
||||
|
||||
/**
|
||||
* 成果审核人
|
||||
*/
|
||||
@Excel(name = "成果审核人")
|
||||
private String reviewer;
|
||||
|
||||
/**
|
||||
* 成果审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "成果审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
|
||||
/**
|
||||
* 成果审核意见
|
||||
*/
|
||||
@Excel(name = "成果审核意见")
|
||||
private String reviewComments;
|
||||
|
||||
/**
|
||||
* 成果图片
|
||||
*/
|
||||
@Excel(name = "成果图片")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 成果附件
|
||||
*/
|
||||
@Excel(name = "成果附件")
|
||||
private String attachments;
|
||||
private Integer achievementStatus;
|
||||
//成果小类型
|
||||
private String achievementLittleType;
|
||||
//成果状态
|
||||
private String achievementCurStatus;
|
||||
//团队名称
|
||||
private String teamName;
|
||||
|
||||
private List<AchievementTeam> teamList;
|
||||
|
||||
public List<AchievementTeam> getTeamList() {
|
||||
return teamList;
|
||||
}
|
||||
|
||||
public void setTeamList(List<AchievementTeam> teamList) {
|
||||
this.teamList = teamList;
|
||||
}
|
||||
|
||||
public String getTeamName() {
|
||||
return teamName;
|
||||
}
|
||||
|
||||
public void setTeamName(String teamName) {
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getAchievementLittleType() {
|
||||
return achievementLittleType;
|
||||
}
|
||||
|
||||
public void setAchievementLittleType(String achievementLittleType) {
|
||||
this.achievementLittleType = achievementLittleType;
|
||||
}
|
||||
|
||||
public String getAchievementCurStatus() {
|
||||
return achievementCurStatus;
|
||||
}
|
||||
|
||||
public void setAchievementCurStatus(String achievementCurStatus) {
|
||||
this.achievementCurStatus = achievementCurStatus;
|
||||
}
|
||||
|
||||
public Integer getAchievementStatus() {
|
||||
return achievementStatus;
|
||||
}
|
||||
|
||||
public void setAchievementStatus(Integer achievementStatus) {
|
||||
this.achievementStatus = achievementStatus;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setAchievementName(String achievementName) {
|
||||
this.achievementName = achievementName;
|
||||
}
|
||||
|
||||
public String getAchievementName() {
|
||||
return achievementName;
|
||||
}
|
||||
|
||||
public void setField1(String field1) {
|
||||
this.field1 = field1;
|
||||
}
|
||||
|
||||
public String getField1() {
|
||||
return field1;
|
||||
}
|
||||
|
||||
public void setField2(String field2) {
|
||||
this.field2 = field2;
|
||||
}
|
||||
|
||||
public String getField2() {
|
||||
return field2;
|
||||
}
|
||||
|
||||
public void setField3(String field3) {
|
||||
this.field3 = field3;
|
||||
}
|
||||
|
||||
public String getField3() {
|
||||
return field3;
|
||||
}
|
||||
|
||||
public void setAchievementType(String achievementType) {
|
||||
this.achievementType = achievementType;
|
||||
}
|
||||
|
||||
public String getAchievementType() {
|
||||
return achievementType;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSourceId(String sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public String getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceLink(String sourceLink) {
|
||||
this.sourceLink = sourceLink;
|
||||
}
|
||||
|
||||
public String getSourceLink() {
|
||||
return sourceLink;
|
||||
}
|
||||
|
||||
public void setTags(String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setPublishingUnit(String publishingUnit) {
|
||||
this.publishingUnit = publishingUnit;
|
||||
}
|
||||
|
||||
public String getPublishingUnit() {
|
||||
return publishingUnit;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setIsFeatured(Integer isFeatured) {
|
||||
this.isFeatured = isFeatured;
|
||||
}
|
||||
|
||||
public Integer getIsFeatured() {
|
||||
return isFeatured;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactNumber(String contactNumber) {
|
||||
this.contactNumber = contactNumber;
|
||||
}
|
||||
|
||||
public String getContactNumber() {
|
||||
return contactNumber;
|
||||
}
|
||||
|
||||
public void setOwnerId(String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public String getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerName(String ownerName) {
|
||||
this.ownerName = ownerName;
|
||||
}
|
||||
|
||||
public String getOwnerName() {
|
||||
return ownerName;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setDetails(String details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public String getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setReviewer(String reviewer) {
|
||||
this.reviewer = reviewer;
|
||||
}
|
||||
|
||||
public String getReviewer() {
|
||||
return reviewer;
|
||||
}
|
||||
|
||||
public void setReviewDate(Date reviewDate) {
|
||||
this.reviewDate = reviewDate;
|
||||
}
|
||||
|
||||
public Date getReviewDate() {
|
||||
return reviewDate;
|
||||
}
|
||||
|
||||
public void setReviewComments(String reviewComments) {
|
||||
this.reviewComments = reviewComments;
|
||||
}
|
||||
|
||||
public String getReviewComments() {
|
||||
return reviewComments;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("achievementName", getAchievementName())
|
||||
.append("field1", getField1())
|
||||
.append("field2", getField2())
|
||||
.append("field3", getField3())
|
||||
.append("achievementType", getAchievementType())
|
||||
.append("source", getSource())
|
||||
.append("sourceId", getSourceId())
|
||||
.append("sourceLink", getSourceLink())
|
||||
.append("tags", getTags())
|
||||
.append("summary", getSummary())
|
||||
.append("publishingUnit", getPublishingUnit())
|
||||
.append("address", getAddress())
|
||||
.append("isFeatured", getIsFeatured())
|
||||
.append("contactPerson", getContactPerson())
|
||||
.append("contactNumber", getContactNumber())
|
||||
.append("ownerId", getOwnerId())
|
||||
.append("ownerName", getOwnerName())
|
||||
.append("status", getStatus())
|
||||
.append("details", getDetails())
|
||||
.append("reviewer", getReviewer())
|
||||
.append("reviewDate", getReviewDate())
|
||||
.append("reviewComments", getReviewComments())
|
||||
.append("images", getImages())
|
||||
.append("attachments", getAttachments())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.microservices.dms.achievementLibrary.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TokenListVo {
|
||||
|
||||
private Long id; // 项目ID
|
||||
private String name; // 项目名称
|
||||
private Long totalToken; // 项目总Token
|
||||
private String createBy; // 创建人
|
||||
private Long currentToken; // 当前Token
|
||||
private String repositoryName; // 仓库名称
|
||||
private Long repositoryId; // 仓库名称
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Data createdOn; // 项目创建时间(以毫秒为单位)
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.microservices.dms.achievementLibrary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 成果相关字典Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface AchievementDictDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询成果相关字典
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 成果相关字典
|
||||
*/
|
||||
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode);
|
||||
|
||||
/**
|
||||
* 查询成果相关字典列表
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 成果相关字典集合
|
||||
*/
|
||||
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 新增成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievementDictData(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 修改成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievementDictData(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 删除成果相关字典
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementDictDataByDictCode(Long dictCode);
|
||||
|
||||
/**
|
||||
* 批量删除成果相关字典
|
||||
*
|
||||
* @param dictCodes 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes);
|
||||
|
||||
List<KeyValueVo> selectDictDataByType(@Param("dictType") String dictType);
|
||||
|
||||
int selectDictDataByLabel(@Param("label") String label,@Param("type") String type);
|
||||
|
||||
List<String> getDictTypes();
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.microservices.dms.achievementLibrary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 成果团队Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface AchievementTeamMapper
|
||||
{
|
||||
/**
|
||||
* 查询成果团队
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 成果团队
|
||||
*/
|
||||
public AchievementTeam selectAchievementTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成果团队列表
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 成果团队集合
|
||||
*/
|
||||
public List<AchievementTeam> selectAchievementTeamList(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 新增成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievementTeam(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 修改成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievementTeam(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 删除成果团队
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除成果团队
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementTeamByIds(Long[] ids);
|
||||
|
||||
void deleteAchievementTeamByAId(@Param("aid") Long aid);
|
||||
|
||||
List<AchievementTeam> selectAchievementTeamByAchId(@Param("achId") Long achId);
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
package com.microservices.dms.achievementLibrary.mapper;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Master;
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.*;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.TaskResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 成果Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-02
|
||||
*/
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface AchievementsMapper {
|
||||
/**
|
||||
* 查询成果
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 成果
|
||||
*/
|
||||
public Achievements selectAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成果列表
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 成果集合
|
||||
*/
|
||||
public List<Achievements> selectAchievementsList(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 新增成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievements(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 修改成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievements(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 删除成果
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除成果
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementsByIds(Long[] ids);
|
||||
|
||||
@MapKey("k")
|
||||
@Master
|
||||
List<Map<String, String>> getFileInfoByIdents(@Param("idents") Set<String> idents);
|
||||
|
||||
List<Achievements> getChoiceImport();
|
||||
|
||||
List<KeyValueVo> getTjBySources();
|
||||
|
||||
List<KeyValueVo> getTjByAreas();
|
||||
|
||||
List<Achievements> selectAchievementsByParam(AchQueryVo achQueryVo);
|
||||
|
||||
Long getAchievementClickSum(@Param("id") Long id);
|
||||
|
||||
List<KeyValVo<String, Long>> getaWatcher(@Param("s") Date s, @Param("e") Date e, @Param("t") String achievements);
|
||||
|
||||
List<KeyValVo<String, Long>> getFavorite(@Param("s") Date s, @Param("e") Date e, @Param("t") String achievements);
|
||||
|
||||
List<KeyValVo<String, Long>> getAchievement(@Param("s") Date s, @Param("e") Date e, @Param("t") String source);
|
||||
|
||||
List<HotAchVo> getHotAchievement();
|
||||
|
||||
Map<String, Long> indexProjectStatistic();
|
||||
|
||||
Map<String, Object> indexTaskStatistic();
|
||||
|
||||
Map<String, Long> indexCompetitionStatistic();
|
||||
|
||||
Long indexSchoolEnterpriseStatistic(@Param("s") String s, @Param("t") String tags);
|
||||
|
||||
List<KeyValueVo> getAreasByName(@Param("areaName") String areaName);
|
||||
|
||||
AchievementBehaviorSumVo getActDataStatisticById(@Param("id") Long id);
|
||||
|
||||
List<KeyValVo<String, Long>> get7AddClickById(@Param("s") Date s, @Param("e") Date e, @Param("t") String achievements, @Param("id") String id);
|
||||
|
||||
AchievementBehaviorSumVo getWatchFavoriteStatusById(@Param("id") Long id, @Param("userId")Long userId);
|
||||
|
||||
Long countAchievementBySource(@Param("s") Date s, @Param("e") Date e, @Param("t") String achievements);
|
||||
|
||||
List<Map<String, Object>> getAchievementDataYearly();
|
||||
|
||||
List<Map<String, Object>> getAchievementType();
|
||||
|
||||
List<KeyValueVo> getAchievementActData(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<Map<String, Object>> getAchievementDomain();
|
||||
|
||||
List<Map<String, Object>> getAchievementAddYearly();
|
||||
|
||||
List<Map<String, Object>> getAchievementHotRank();
|
||||
|
||||
List<Long> getAllId();
|
||||
|
||||
List<AreaStatisticVo> getAreaStatistic(@Param("areaKey") String areaKey);
|
||||
|
||||
List<AchRelatedVo> getRelatedAch(@Param("id")Long id, @Param("sourceId") List<Long> sourceId, @Param("paramYear")String paramYear);
|
||||
|
||||
List<String> getDistinctYear(@Param("id")Long id, @Param("sourceId")List<Long> sourceId);
|
||||
|
||||
List<Long> selectAchievementsByName(@Param("achName") String achName);
|
||||
|
||||
String getField1NameByParam(@Param("source")String source, @Param("id") Long id);
|
||||
|
||||
List<KeyValueVo> getProjectAreasByName(@Param("areaName") String areaName);
|
||||
|
||||
List<String> getExpertAreasByName(@Param("areaName") String areaName);
|
||||
|
||||
List<Long> getAllSourceId(@Param("id")Long id, @Param("sourceId")Long sourceId);
|
||||
|
||||
List<Long> getAllSourceIdCompetition(@Param("id")Long id, @Param("sourceId")Long sourceId);
|
||||
|
||||
List<Long> getAllSourceIdTask(@Param("id")Long id, @Param("sourceId")Long sourceId);
|
||||
|
||||
List<TaskResourceLibrary> getRelatedAchTaskOfExpert(@Param("id")Long id);
|
||||
|
||||
List<CompetitionResourceLibrary> getRelatedAchCompetitionOfExpert(@Param("id")Long id);
|
||||
|
||||
List<KeyValVo<String,Long>> getAchievementAddYearlyData(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<KeyValueVo> getAchievementActDataW(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<KeyValueVo> getAchievementActDataC(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<KeyValueVo> getAchievementActDataD(@Param("s") Date s, @Param("e") Date e);
|
||||
List<KeyValueVo> getAchievementActDataF(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<Map<String, Object>> getDockingUserInfo(@Param("id") Long id);
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.microservices.dms.achievementLibrary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.SchoolEnterpriseAchievements;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 校企成果Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface SchoolEnterpriseAchievementsMapper
|
||||
{
|
||||
/**
|
||||
* 查询校企成果
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 校企成果
|
||||
*/
|
||||
public SchoolEnterpriseAchievements selectSchoolEnterpriseAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询校企成果列表
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 校企成果集合
|
||||
*/
|
||||
public List<SchoolEnterpriseAchievements> selectSchoolEnterpriseAchievementsList(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 新增校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 修改校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 删除校企成果
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSchoolEnterpriseAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除校企成果
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSchoolEnterpriseAchievementsByIds(Long[] ids);
|
||||
|
||||
Long topStatistic(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Maps;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementsMapper;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.CompetitionResourceLibraryMapper;
|
||||
import com.microservices.dms.utils.DateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BigScreenStatisticService {
|
||||
|
||||
private final AchievementsMapper achievementsMapper;
|
||||
private final CompetitionResourceLibraryMapper competitionResourceLibraryMapper;
|
||||
|
||||
public Map<String, Object> getAchievementTopStatistic(String source) {
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> m = achievementsMapper.getAchievement(days[0], days[1], source)
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
Date[] lastDays = DateUtil.getDays(7, 13);
|
||||
long lastSum = Optional.ofNullable(achievementsMapper.countAchievementBySource(lastDays[0], lastDays[1], source)).orElse(0L);
|
||||
long sum = Optional.ofNullable(achievementsMapper.countAchievementBySource(null, null, source)).orElse(0L);
|
||||
long cSum = m.values().stream().mapToLong(Long::longValue).sum();
|
||||
double rate;
|
||||
if (lastSum == 0) rate = 100D;
|
||||
else {
|
||||
rate = (double) (cSum - lastSum) / lastSum;
|
||||
}
|
||||
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
for (String s : dateStr) {
|
||||
Long a = m.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("list", res);
|
||||
map.put("sum", sum);
|
||||
map.put("rate", rate);
|
||||
return map;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getAchievementDataYearly() {
|
||||
return achievementsMapper.getAchievementDataYearly();
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getAchievementType() {
|
||||
return achievementsMapper.getAchievementType();
|
||||
}
|
||||
|
||||
public List<Map<String,Object>> getAchievementActData() {
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> wlist = achievementsMapper.getAchievementActDataW(days[0], days[1]).stream().collect(Collectors.toMap(KeyValueVo::getName, KeyValueVo::getValue));
|
||||
Map<String, Long> clist = achievementsMapper.getAchievementActDataC(days[0], days[1]).stream().collect(Collectors.toMap(KeyValueVo::getName, KeyValueVo::getValue));
|
||||
Map<String, Long> dlist = achievementsMapper.getAchievementActDataD(days[0], days[1]).stream().collect(Collectors.toMap(KeyValueVo::getName, KeyValueVo::getValue));
|
||||
Map<String, Long> flist = achievementsMapper.getAchievementActDataF(days[0], days[1]).stream().collect(Collectors.toMap(KeyValueVo::getName, KeyValueVo::getValue));
|
||||
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
List<KeyValueVo> wres = new ArrayList<>();
|
||||
List<KeyValueVo> cres = new ArrayList<>();
|
||||
List<KeyValueVo> dres = new ArrayList<>();
|
||||
List<KeyValueVo> fres = new ArrayList<>();
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = wlist.getOrDefault(s, 0L);
|
||||
KeyValueVo k1 = new KeyValueVo();
|
||||
k1.setKey(s);
|
||||
k1.setValue(a);
|
||||
k1.setName("关注");
|
||||
wres.add(k1);
|
||||
}
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = clist.getOrDefault(s, 0L);
|
||||
KeyValueVo k1 = new KeyValueVo();
|
||||
k1.setKey(s);
|
||||
k1.setValue(a);
|
||||
k1.setName("浏览");
|
||||
cres.add(k1);
|
||||
}
|
||||
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = dlist.getOrDefault(s, 0L);
|
||||
KeyValueVo k1 = new KeyValueVo();
|
||||
k1.setKey(s);
|
||||
k1.setValue(a);
|
||||
k1.setName("下载");
|
||||
dres.add(k1);
|
||||
}
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = flist.getOrDefault(s, 0L);
|
||||
KeyValueVo k1 = new KeyValueVo();
|
||||
k1.setKey(s);
|
||||
k1.setValue(a);
|
||||
k1.setName("收藏");
|
||||
fres.add(k1);
|
||||
}
|
||||
|
||||
List<Map<String, Object>> r = new ArrayList<>();
|
||||
Map<String, Object> w = new HashMap<>();
|
||||
w.put("key", "关注");
|
||||
w.put("value", wres);
|
||||
Map<String, Object> c = new HashMap<>();
|
||||
c.put("key","浏览");
|
||||
c.put("value", cres);
|
||||
Map<String, Object> d = new HashMap<>();
|
||||
d.put("key","下载");
|
||||
d.put("value", dres);
|
||||
Map<String, Object> f = new HashMap<>();
|
||||
f.put("key", "收藏");
|
||||
f.put("value", fres);
|
||||
|
||||
|
||||
r.add(w);
|
||||
r.add(c);
|
||||
r.add(d);
|
||||
r.add(f);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getAchievementDomain() {
|
||||
return achievementsMapper.getAchievementDomain();
|
||||
}
|
||||
|
||||
public Object getAchievementAddYearly() {
|
||||
|
||||
Date[] currentYear = DateUtil.getLast12Months();
|
||||
|
||||
Map<String, Long> m = achievementsMapper.getAchievementAddYearlyData(currentYear[0],currentYear[1])
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
List<String> dateStr = DateUtil.getDateStrYYYYMM(currentYear[0], currentYear[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
for (String s : dateStr) {
|
||||
Long a = m.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getAchievementHotRank() {
|
||||
return achievementsMapper.getAchievementHotRank();
|
||||
}
|
||||
|
||||
public Map<String, Object> getCompetitionTopStatistic() {
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
Long finish = competitionResourceLibraryMapper.getCompetitionFinish();
|
||||
res.put("finish", finish);
|
||||
Long enroll = competitionResourceLibraryMapper.getCompetitionEnroll();
|
||||
res.put("enroll", enroll);
|
||||
Long underway = competitionResourceLibraryMapper.getCompetitionUnderway();
|
||||
res.put("underway", underway);
|
||||
Long submitCount = competitionResourceLibraryMapper.getCompetitionSubmitCount();
|
||||
res.put("submitCount", submitCount);
|
||||
Long transfer = competitionResourceLibraryMapper.getCompetitionTransferCount();
|
||||
res.put("transfer", transfer);
|
||||
Long needAudit = competitionResourceLibraryMapper.getCompetitionNeedAuditCount();
|
||||
res.put("needAudit", needAudit);
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<KeyValueVo> getCompetitionStatisticYearly() {
|
||||
return competitionResourceLibraryMapper.getCompetitionStatisticYearly();
|
||||
}
|
||||
|
||||
public Object getCompetitionHot() {
|
||||
return competitionResourceLibraryMapper.getCompetitionHot();
|
||||
}
|
||||
|
||||
public List<KeyValVo<String, Long>> getCompetitionYearlyPaperAdd() {
|
||||
Date[] currentYear = DateUtil.getLast12Months();
|
||||
|
||||
Map<String, Long> m = competitionResourceLibraryMapper.getCompetitionYearlyPaperAdd(currentYear[0],currentYear[1])
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
List<String> dateStr = DateUtil.getDateStrYYYYMM(currentYear[0], currentYear[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
for (String s : dateStr) {
|
||||
Long a = m.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<KeyValVo<String, Long>> getCompetitionYearlyFinish() {
|
||||
Date[] currentYear = DateUtil.getLast12Months();
|
||||
|
||||
Map<String, Long> m = competitionResourceLibraryMapper.getCompetitionYearlyFinish(currentYear[0],currentYear[1])
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
List<String> dateStr = DateUtil.getDateStrYYYYMM(currentYear[0], currentYear[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
for (String s : dateStr) {
|
||||
Long a = m.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
|
||||
import com.microservices.dms.achievementLibrary.domain.ExpertTotallVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ExpertResourceLibraryMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ExpertDashboardService {
|
||||
@Autowired
|
||||
private ExpertResourceLibraryMapper expertResourceLibraryMapper;
|
||||
/**
|
||||
* 专家职称级分布
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getTitleRankStatistic() {
|
||||
return expertResourceLibraryMapper.getTitleRankStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 专家专业类别
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getExpertTypeStatistic() {
|
||||
return expertResourceLibraryMapper.getExpertTypeStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 专家学历分布
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getHighestDegreeStatistic() {
|
||||
return expertResourceLibraryMapper.getHighestDegreeStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 专家单位类别分布
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getWorkplaceTypeStatistic() {
|
||||
return expertResourceLibraryMapper.getWorkplaceTypeStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专家总数
|
||||
* @return
|
||||
*/
|
||||
public Long getExpertTotal() {
|
||||
return expertResourceLibraryMapper.getExpertTotal();
|
||||
}
|
||||
/**
|
||||
* 专家实名完成度 userId users.authentication
|
||||
* @return
|
||||
*/
|
||||
public KeyValueVo getAuthenticationStatistic() {
|
||||
return expertResourceLibraryMapper.getAuthenticationStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 年度专家数据统计 cretate_on
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getExpertTotalByYear() {
|
||||
return expertResourceLibraryMapper.getExpertTotalByYear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 热门专家领域
|
||||
* reviewAreaOne、reviewAreaTwo、reviewAreaThree
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getReviewAreasStatistic() {
|
||||
return expertResourceLibraryMapper.getReviewAreasStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 近一年专家评审数
|
||||
* @return
|
||||
*/
|
||||
public List<ExpertTotallVo> getExpertAduit() {
|
||||
return expertResourceLibraryMapper.getExpertAduit();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 成果相关字典Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IAchievementDictDataService
|
||||
{
|
||||
/**
|
||||
* 查询成果相关字典
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 成果相关字典
|
||||
*/
|
||||
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode);
|
||||
|
||||
/**
|
||||
* 查询成果相关字典列表
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 成果相关字典集合
|
||||
*/
|
||||
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 新增成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievementDictData(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 修改成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievementDictData(AchievementDictData achievementDictData);
|
||||
|
||||
/**
|
||||
* 批量删除成果相关字典
|
||||
*
|
||||
* @param dictCodes 需要删除的成果相关字典主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes);
|
||||
|
||||
/**
|
||||
* 删除成果相关字典信息
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementDictDataByDictCode(Long dictCode);
|
||||
|
||||
List<KeyValueVo> selectDictDataByType(String dictType);
|
||||
|
||||
List<String> getDictTypes();
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
|
||||
|
||||
/**
|
||||
* 成果团队Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public interface IAchievementTeamService
|
||||
{
|
||||
/**
|
||||
* 查询成果团队
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 成果团队
|
||||
*/
|
||||
public AchievementTeam selectAchievementTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成果团队列表
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 成果团队集合
|
||||
*/
|
||||
public List<AchievementTeam> selectAchievementTeamList(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 新增成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievementTeam(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 修改成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievementTeam(AchievementTeam achievementTeam);
|
||||
|
||||
/**
|
||||
* 批量删除成果团队
|
||||
*
|
||||
* @param ids 需要删除的成果团队主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementTeamByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除成果团队信息
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementTeamById(Long id);
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.microservices.dms.achievementLibrary.domain.*;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.TaskResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
||||
/**
|
||||
* 成果Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-02
|
||||
*/
|
||||
public interface IAchievementsService {
|
||||
/**
|
||||
* 查询成果
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 成果
|
||||
*/
|
||||
public Achievements selectAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成果列表
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 成果集合
|
||||
*/
|
||||
public List<Achievements> selectAchievementsList(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 新增成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAchievements(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 修改成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAchievements(Achievements achievements);
|
||||
|
||||
/**
|
||||
* 批量删除成果
|
||||
*
|
||||
* @param ids 需要删除的成果主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除成果信息
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAchievementsById(Long id);
|
||||
|
||||
String buildFileInfoByIdents(String aStr, String source);
|
||||
|
||||
List<Achievements> selectAchievementsFrontList(Achievements achievements);
|
||||
|
||||
List<Achievements> getChoiceImport();
|
||||
|
||||
List<KeyValueVo> getTjBySources();
|
||||
|
||||
List<KeyValueVo> getTjByAreas();
|
||||
|
||||
List<Achievements> getAllResult(AchQueryVo achQueryVo);
|
||||
|
||||
Map<String, Object> getUerActionData();
|
||||
|
||||
List<HotAchVo> getHotAchievement();
|
||||
|
||||
List<KeyValVo<String, Long>> get7DayAdd(AchQueryVo achQueryVo);
|
||||
|
||||
Map<String,Long> indexProjectStatistic();
|
||||
|
||||
Map<String,Object> indexTaskStatistic();
|
||||
|
||||
Map<String,Long> indexCompetitionStatistic();
|
||||
|
||||
Map<String,Long> indexSchoolEnterpriseStatistic();
|
||||
|
||||
Map<String,Long> indexExpertStatistic();
|
||||
|
||||
List<KeyValueVo> getAreasByName(String areaName);
|
||||
|
||||
AchievementBehaviorSumVo getActDataStatisticById(Long id);
|
||||
|
||||
List<KeyValVo<String, Long>> get7AddClickById(String id, String clickType);
|
||||
|
||||
AchievementBehaviorSumVo getWatchFavoriteStatusById(Long id, Long userId);
|
||||
|
||||
List<AreaStatisticVo> getAreaStatistic(String areaKey);
|
||||
|
||||
List<AchRelatedResult> getRelatedAch(Long id, Long sourceId);
|
||||
|
||||
int getSearchResult(String achName, Long userId);
|
||||
|
||||
List<KeyValueVo> getProjectAreasByName(String areaName);
|
||||
|
||||
List<String> getExpertAreasByName(String areaName);
|
||||
|
||||
List<AchRelatedResult> getRelatedAchCompetition(Long id, Long sourceId);
|
||||
|
||||
List<AchRelatedResult> getRelatedAchTask(Long id, Long sourceId);
|
||||
|
||||
List<TaskResourceLibrary> getRelatedAchTaskOfExpert(Long id);
|
||||
|
||||
List<CompetitionResourceLibrary> getRelatedAchCompetitionOfExpert(Long id);
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.microservices.dms.achievementLibrary.domain.SchoolEnterpriseAchievements;
|
||||
|
||||
/**
|
||||
* 校企成果Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public interface ISchoolEnterpriseAchievementsService
|
||||
{
|
||||
/**
|
||||
* 查询校企成果
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 校企成果
|
||||
*/
|
||||
public SchoolEnterpriseAchievements selectSchoolEnterpriseAchievementsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询校企成果列表
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 校企成果集合
|
||||
*/
|
||||
public List<SchoolEnterpriseAchievements> selectSchoolEnterpriseAchievementsList(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 新增校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 修改校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
/**
|
||||
* 批量删除校企成果
|
||||
*
|
||||
* @param ids 需要删除的校企成果主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSchoolEnterpriseAchievementsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除校企成果信息
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSchoolEnterpriseAchievementsById(Long id);
|
||||
|
||||
Long topStatistic(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
|
||||
List<SchoolEnterpriseAchievements> listFront(SchoolEnterpriseAchievements schoolEnterpriseAchievements);
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.microservices.dms.achievementLibrary.service;
|
||||
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchQueryVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.MemoTotalVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ExpertResourceLibraryMapper;
|
||||
import com.microservices.dms.utils.DateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MemoDashboardService {
|
||||
@Autowired
|
||||
private ExpertResourceLibraryMapper memoResourceLibraryMapper;
|
||||
/**
|
||||
* 审核通过率
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getMemoAduit() {
|
||||
return memoResourceLibraryMapper.getMemoAduit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 原创、非原创
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getIsOriginalStatistic() {
|
||||
return memoResourceLibraryMapper.getIsOriginalStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 年度动态数据统计
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getMemoTotalByYear() {
|
||||
return memoResourceLibraryMapper.getMemoTotalByYear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据帖子类型汇总
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getForumSectionStatistic() {
|
||||
return memoResourceLibraryMapper.getForumSectionStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 近一年新增帖子数
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValueVo> getAddMemoStatistic() {
|
||||
return memoResourceLibraryMapper.getAddMemoStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 本年帖子热度top5(论坛评论、点击、点赞)
|
||||
* @return
|
||||
*/
|
||||
public List<MemoTotalVo> getTop5Memos() {
|
||||
return memoResourceLibraryMapper.getTop5Memos();
|
||||
}
|
||||
|
||||
/**
|
||||
* 近7日帖子点赞数
|
||||
* @return
|
||||
*/
|
||||
public List<KeyValVo<String, Long>> get7DayPaise() {
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> w = memoResourceLibraryMapper.get7DayPaise(days[0], days[1])
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = w.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package com.microservices.dms.achievementLibrary.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementDictDataMapper;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementDictDataService;
|
||||
|
||||
/**
|
||||
* 成果相关字典Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class AchievementDictDataServiceImpl implements IAchievementDictDataService
|
||||
{
|
||||
@Autowired
|
||||
private AchievementDictDataMapper achievementDictDataMapper;
|
||||
|
||||
/**
|
||||
* 查询成果相关字典
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 成果相关字典
|
||||
*/
|
||||
@Override
|
||||
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode)
|
||||
{
|
||||
return achievementDictDataMapper.selectAchievementDictDataByDictCode(dictCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成果相关字典列表
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 成果相关字典
|
||||
*/
|
||||
@Override
|
||||
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData)
|
||||
{
|
||||
return achievementDictDataMapper.selectAchievementDictDataList(achievementDictData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAchievementDictData(AchievementDictData achievementDictData)
|
||||
{
|
||||
//判断字典是否存在,存在则不管,不存在则新增
|
||||
String label = achievementDictData.getDictLabel();
|
||||
String type = achievementDictData.getDictType();
|
||||
int num = achievementDictDataMapper.selectDictDataByLabel(label,type);
|
||||
if (num > 0){
|
||||
return 0;
|
||||
}else{
|
||||
achievementDictData.setCreateTime(DateUtils.getNowDate());
|
||||
return achievementDictDataMapper.insertAchievementDictData(achievementDictData);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果相关字典
|
||||
*
|
||||
* @param achievementDictData 成果相关字典
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAchievementDictData(AchievementDictData achievementDictData)
|
||||
{
|
||||
achievementDictData.setUpdateTime(DateUtils.getNowDate());
|
||||
return achievementDictDataMapper.updateAchievementDictData(achievementDictData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成果相关字典
|
||||
*
|
||||
* @param dictCodes 需要删除的成果相关字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes)
|
||||
{
|
||||
return achievementDictDataMapper.deleteAchievementDictDataByDictCodes(dictCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果相关字典信息
|
||||
*
|
||||
* @param dictCode 成果相关字典主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementDictDataByDictCode(Long dictCode)
|
||||
{
|
||||
return achievementDictDataMapper.deleteAchievementDictDataByDictCode(dictCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValueVo> selectDictDataByType(String dictType) {
|
||||
return achievementDictDataMapper.selectDictDataByType(dictType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDictTypes() {
|
||||
return achievementDictDataMapper.getDictTypes();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.microservices.dms.achievementLibrary.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementTeamMapper;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementTeamService;
|
||||
|
||||
/**
|
||||
* 成果团队Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
@Service
|
||||
public class AchievementTeamServiceImpl implements IAchievementTeamService
|
||||
{
|
||||
@Autowired
|
||||
private AchievementTeamMapper achievementTeamMapper;
|
||||
|
||||
/**
|
||||
* 查询成果团队
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 成果团队
|
||||
*/
|
||||
@Override
|
||||
public AchievementTeam selectAchievementTeamById(Long id)
|
||||
{
|
||||
return achievementTeamMapper.selectAchievementTeamById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成果团队列表
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 成果团队
|
||||
*/
|
||||
@Override
|
||||
public List<AchievementTeam> selectAchievementTeamList(AchievementTeam achievementTeam)
|
||||
{
|
||||
return achievementTeamMapper.selectAchievementTeamList(achievementTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAchievementTeam(AchievementTeam achievementTeam)
|
||||
{
|
||||
achievementTeam.setCreateTime(DateUtils.getNowDate());
|
||||
return achievementTeamMapper.insertAchievementTeam(achievementTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果团队
|
||||
*
|
||||
* @param achievementTeam 成果团队
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAchievementTeam(AchievementTeam achievementTeam)
|
||||
{
|
||||
achievementTeam.setUpdateTime(DateUtils.getNowDate());
|
||||
return achievementTeamMapper.updateAchievementTeam(achievementTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成果团队
|
||||
*
|
||||
* @param ids 需要删除的成果团队主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementTeamByIds(Long[] ids)
|
||||
{
|
||||
return achievementTeamMapper.deleteAchievementTeamByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果团队信息
|
||||
*
|
||||
* @param id 成果团队主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementTeamById(Long id)
|
||||
{
|
||||
return achievementTeamMapper.deleteAchievementTeamById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,551 @@
|
|||
package com.microservices.dms.achievementLibrary.service.impl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.common.httpClient.service.HttpAPIService;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.*;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementImageVo;
|
||||
import com.microservices.dms.behaviorImage.service.IBehaviorImageService;
|
||||
import com.microservices.dms.resourceLibrary.domain.Clicker;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.Searcher;
|
||||
import com.microservices.dms.resourceLibrary.domain.TaskResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ExpertResourceLibraryMapper;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ProjectResourceLibraryMapper;
|
||||
import com.microservices.dms.resourceLibrary.mapper.TaskResourceLibraryMapper;
|
||||
import com.microservices.dms.utils.DateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementsMapper;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
|
||||
import static com.microservices.dms.constant.BlockChainFunConstants.QUERY_REPO;
|
||||
import static com.microservices.dms.utils.UrlUtil.getUrlPath;
|
||||
|
||||
/**
|
||||
* 成果Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-02
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AchievementsServiceImpl implements IAchievementsService {
|
||||
@Autowired
|
||||
private AchievementsMapper achievementsMapper;
|
||||
|
||||
@Autowired
|
||||
private TaskResourceLibraryMapper taskResourceLibraryMapper;
|
||||
|
||||
@Autowired
|
||||
private ExpertResourceLibraryMapper expertResourceLibraryMapper;
|
||||
|
||||
@Autowired
|
||||
private IBehaviorImageService behaviorImageService;
|
||||
|
||||
@Value("${markerSpaceUrl}")
|
||||
public String markerSpaceUrl;
|
||||
|
||||
@Value("${http.gitLinkUrl}")
|
||||
public String gitLinkUrl;
|
||||
|
||||
@Value("${http.gatewayUrl}")
|
||||
public String gatewayUrl;
|
||||
|
||||
/**
|
||||
* 查询成果
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 成果
|
||||
*/
|
||||
@Override
|
||||
public Achievements selectAchievementsById(Long id) {
|
||||
Achievements a = achievementsMapper.selectAchievementsById(id);
|
||||
if (StringUtils.isNotNull(a)) {
|
||||
String gender = a.getGender();
|
||||
String img = "";
|
||||
if (StringUtils.isNotEmpty(gender) && gender.equals("1")) {
|
||||
img = "images/avatars/User/girl.jpg";
|
||||
} else if (StringUtils.isNotEmpty(gender) && gender.equals("0")) {
|
||||
img = "images/avatars/User/boy.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
if (StringUtils.isNotEmpty(a.getField1())) {
|
||||
String field1Name = achievementsMapper.getField1NameByParam(a.getSource(), a.getId());
|
||||
if (StringUtils.isNotNull(field1Name)) {
|
||||
a.setField1Name(field1Name);
|
||||
}
|
||||
}
|
||||
a.setUserImg(img);
|
||||
|
||||
a.setImages(buildFileInfoByIdents(a.getImages(), a.getSource()));
|
||||
a.setAttachments(buildFileInfoByIdents(a.getAttachments(), a.getSource()));
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成果列表
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 成果
|
||||
*/
|
||||
@Override
|
||||
public List<Achievements> selectAchievementsList(Achievements achievements) {
|
||||
List<Achievements> list = achievementsMapper.selectAchievementsList(achievements);
|
||||
for (Achievements a : list) {
|
||||
String gender = a.getGender();
|
||||
String img = "";
|
||||
if (StringUtils.isNotEmpty(gender) && gender.equals("1")) {
|
||||
img = "images/avatars/User/girl.jpg";
|
||||
} else if (StringUtils.isNotEmpty(gender) && gender.equals("0")) {
|
||||
img = "images/avatars/User/boy.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
//根据id获取领域名称
|
||||
if (StringUtils.isNotEmpty(a.getField1())) {
|
||||
String field1Name = achievementsMapper.getField1NameByParam(a.getSource(), a.getId());
|
||||
if (StringUtils.isNotNull(field1Name)) {
|
||||
a.setField1Name(field1Name);
|
||||
}
|
||||
}
|
||||
a.setImages(buildFileInfoByIdents(a.getImages(), a.getSource()));
|
||||
a.setAttachments(buildFileInfoByIdents(a.getAttachments(), a.getSource()));
|
||||
|
||||
//拼接对接的用户信息
|
||||
List<Map<String,Object>> dockingUserInfo = achievementsMapper.getDockingUserInfo(a.getId());
|
||||
a.setDockingUserInfo(dockingUserInfo);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Achievements> selectAchievementsFrontList(Achievements achievements) {
|
||||
List<Achievements> list = achievementsMapper.selectAchievementsList(achievements);
|
||||
for (Achievements a : list) {
|
||||
a.setDetails(null);
|
||||
a.setImages(buildFileInfoByIdents(a.getImages(), a.getSource()));
|
||||
a.setAttachments(buildFileInfoByIdents(a.getAttachments(), a.getSource()));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAchievements(Achievements achievements) {
|
||||
achievements.setCreateTime(DateUtils.getNowDate());
|
||||
achievements.setCreateBy(SecurityUtils.getUsername());
|
||||
return achievementsMapper.insertAchievements(achievements);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成果
|
||||
*
|
||||
* @param achievements 成果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAchievements(Achievements achievements) {
|
||||
achievements.setUpdateTime(DateUtils.getNowDate());
|
||||
achievements.setUpdateBy(SecurityUtils.getUsername());
|
||||
return achievementsMapper.updateAchievements(achievements);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成果
|
||||
*
|
||||
* @param ids 需要删除的成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementsByIds(Long[] ids) {
|
||||
return achievementsMapper.deleteAchievementsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成果信息
|
||||
*
|
||||
* @param id 成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAchievementsById(Long id) {
|
||||
return achievementsMapper.deleteAchievementsById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String buildFileInfoByIdents(String aStr, String source) {
|
||||
if (StringUtils.isEmpty(aStr) || StringUtils.isEmpty(source)) {
|
||||
return aStr;
|
||||
}
|
||||
|
||||
List<Map<String, String>> list = JSON.parseObject(aStr, new TypeReference<List<Map<String, String>>>() {
|
||||
});
|
||||
|
||||
if (Objects.equals(source, "1") || Objects.equals(source, "3")) {
|
||||
concatUrl(list, gitLinkUrl);
|
||||
}
|
||||
|
||||
if (Objects.equals(source, "2")) {
|
||||
concatUrl(list, markerSpaceUrl);
|
||||
}
|
||||
|
||||
if (Objects.equals(source, "4")) {
|
||||
concatUrl(list, gatewayUrl);
|
||||
}
|
||||
|
||||
return JSON.toJSONString(list);
|
||||
}
|
||||
|
||||
private void concatUrl(List<Map<String, String>> list, String url) {
|
||||
for (Map<String, String> map : list) {
|
||||
String v = map.getOrDefault("v", "");
|
||||
String urlPath = getUrlPath(v);
|
||||
map.put("v", url + urlPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Achievements> getChoiceImport() {
|
||||
return achievementsMapper.getChoiceImport();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValueVo> getTjBySources() {
|
||||
return achievementsMapper.getTjBySources();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValueVo> getTjByAreas() {
|
||||
return achievementsMapper.getTjByAreas();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Achievements> getAllResult(AchQueryVo achQueryVo) {
|
||||
//根据查询条件获取所有的成果数据
|
||||
List<Achievements> list = achievementsMapper.selectAchievementsByParam(achQueryVo);
|
||||
//遍历成果数据,获取对应成果的点击数
|
||||
for (Achievements a : list) {
|
||||
String gender = a.getGender();
|
||||
String img = "";
|
||||
if (StringUtils.isNotEmpty(gender) && gender.equals("1")) {
|
||||
img = "images/avatars/User/girl.jpg";
|
||||
} else if (StringUtils.isNotEmpty(gender) && gender.equals("0")) {
|
||||
img = "images/avatars/User/boy.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
//根据id获取领域名称
|
||||
if (StringUtils.isEmpty(achQueryVo.getSource()) && StringUtils.isNotEmpty(a.getField1())) {
|
||||
String field1Name = achievementsMapper.getField1NameByParam(a.getSource(), a.getId());
|
||||
if (StringUtils.isNotNull(field1Name)) {
|
||||
a.setField1Name(field1Name);
|
||||
}
|
||||
}
|
||||
Long clickSum = achievementsMapper.getAchievementClickSum(a.getId());
|
||||
a.setClickSum(clickSum);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getUerActionData() {
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> w = achievementsMapper.getaWatcher(days[0], days[1], "Achievements")
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
Map<String, Long> g = achievementsMapper.getFavorite(days[0], days[1], "Achievements")
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
List<KeyValVo<String, Long>> wRes = new ArrayList<>();
|
||||
List<KeyValVo<String, Long>> gRes = new ArrayList<>();
|
||||
for (String s : dateStr) {
|
||||
Long a = w.getOrDefault(s, 0L);
|
||||
Long b = g.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
KeyValVo<String, Long> k2 = new KeyValVo<>();
|
||||
k2.setK(s);
|
||||
k2.setV(b);
|
||||
|
||||
wRes.add(k1);
|
||||
gRes.add(k2);
|
||||
}
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
res.put("watcher", wRes);
|
||||
res.put("favorite", gRes);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HotAchVo> getHotAchievement() {
|
||||
//根据查询条件获取所有的成果数据
|
||||
List<HotAchVo> resultList = achievementsMapper.getHotAchievement();
|
||||
//遍历成果数据,获取对应成果的点击数
|
||||
for (HotAchVo a : resultList) {
|
||||
String gender = a.getGender();
|
||||
String img = "";
|
||||
if (StringUtils.isNotEmpty(gender) && gender.equals("1")) {
|
||||
img = "images/avatars/User/girl.jpg";
|
||||
} else if (StringUtils.isNotEmpty(gender) && gender.equals("0")) {
|
||||
img = "images/avatars/User/boy.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValVo<String, Long>> get7DayAdd(AchQueryVo achQueryVo) {
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> w = achievementsMapper.getAchievement(days[0], days[1], achQueryVo.getSource())
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = w.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> indexProjectStatistic() {
|
||||
Map<String, Long> res = achievementsMapper.indexProjectStatistic();
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> indexTaskStatistic() {
|
||||
Map<String, Object> res = achievementsMapper.indexTaskStatistic();
|
||||
double convertedTaskAmount = taskResourceLibraryMapper.getConvertedTaskAmount2();
|
||||
res.put("convertedTaskAmount", convertedTaskAmount);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> indexCompetitionStatistic() {
|
||||
Map<String, Long> res = achievementsMapper.indexCompetitionStatistic();
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> indexSchoolEnterpriseStatistic() {
|
||||
Map<String, Long> res = new HashMap<>();
|
||||
Long schoolEnterpriseCount = achievementsMapper.indexSchoolEnterpriseStatistic("4", "");
|
||||
res.put("schoolEnterpriseCount", schoolEnterpriseCount);
|
||||
Long schoolCount = achievementsMapper.indexSchoolEnterpriseStatistic("4", "1");
|
||||
res.put("schoolCount", schoolCount);
|
||||
Long enterpriseCount = achievementsMapper.indexSchoolEnterpriseStatistic("4", "2");
|
||||
res.put("enterpriseCount", enterpriseCount);
|
||||
Clicker clicker = new Clicker();
|
||||
clicker.setClickType("Achievements");
|
||||
long clickCount = taskResourceLibraryMapper.countClicker(clicker);
|
||||
res.put("clickCount", clickCount);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> indexExpertStatistic() {
|
||||
Map<String, Long> res = new HashMap<>();
|
||||
Long expertResourceCount = expertResourceLibraryMapper.expertResourceCount();
|
||||
res.put("expertResourceCount", expertResourceCount);
|
||||
Long auditTaskAuditExpertCount = expertResourceLibraryMapper.auditTaskAuditExpertCount();
|
||||
res.put("auditTaskAuditExpertCount", auditTaskAuditExpertCount);
|
||||
Long auditCompetitionAuditExpertCount = expertResourceLibraryMapper.auditCompetitionAuditExpertCount();
|
||||
res.put("auditCompetitionAuditExpertCount", auditCompetitionAuditExpertCount);
|
||||
Clicker clicker = new Clicker();
|
||||
clicker.setClickType("Experts");
|
||||
long clickCount = taskResourceLibraryMapper.countClickerSimple(clicker);
|
||||
res.put("clickCount", clickCount);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValueVo> getAreasByName(String areaName) {
|
||||
return achievementsMapper.getAreasByName(areaName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AchievementBehaviorSumVo getActDataStatisticById(Long id) {
|
||||
return achievementsMapper.getActDataStatisticById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValVo<String, Long>> get7AddClickById(String id, String clickType) {
|
||||
|
||||
if (StringUtils.isEmpty(clickType)) {
|
||||
clickType = "Achievements";
|
||||
}
|
||||
Date[] days = DateUtil.getDays(0, 6);
|
||||
Map<String, Long> w = achievementsMapper.get7AddClickById(days[0], days[1], clickType, id)
|
||||
.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV));
|
||||
|
||||
List<String> dateStr = DateUtil.getDateStrMMDD(days[0], days[1]);
|
||||
List<KeyValVo<String, Long>> res = new ArrayList<>();
|
||||
|
||||
for (String s : dateStr) {
|
||||
Long a = w.getOrDefault(s, 0L);
|
||||
KeyValVo<String, Long> k1 = new KeyValVo<>();
|
||||
k1.setK(s);
|
||||
k1.setV(a);
|
||||
res.add(k1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AchievementBehaviorSumVo getWatchFavoriteStatusById(Long id, Long userId) {
|
||||
return achievementsMapper.getWatchFavoriteStatusById(id, userId);
|
||||
}
|
||||
|
||||
|
||||
@Scheduled(cron = "${cron.calculateHotRank}")
|
||||
public void timingCalcHotRank() {
|
||||
List<Long> ids = achievementsMapper.getAllId();
|
||||
for (Long id : ids) {
|
||||
AchievementImageVo image = behaviorImageService.getAchievementImageById(id);
|
||||
float score = image.getScore();
|
||||
Achievements u = new Achievements();
|
||||
u.setId(id);
|
||||
u.setHotRank(score);
|
||||
achievementsMapper.updateAchievements(u);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AreaStatisticVo> getAreaStatistic(String areaKey) {
|
||||
return achievementsMapper.getAreaStatistic(areaKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AchRelatedResult> getRelatedAch(Long id, Long sourceId) {
|
||||
List<AchRelatedResult> relatedResultList = new ArrayList<>();
|
||||
//想根据开源项目id,获取对应的年度信息
|
||||
List<Long> allSourceId = achievementsMapper.getAllSourceId(id, sourceId);
|
||||
List<String> allYear = achievementsMapper.getDistinctYear(id, allSourceId);
|
||||
if (StringUtils.isNotNull(allYear)) {
|
||||
//遍历年度信息,获取年度成果数据
|
||||
for (String paramYear : allYear) {
|
||||
AchRelatedResult relatedResult = new AchRelatedResult();
|
||||
relatedResult.setYear(paramYear);
|
||||
List<AchRelatedVo> tmpList = achievementsMapper.getRelatedAch(id, allSourceId, paramYear);
|
||||
relatedResult.setAchRelatedVoList(tmpList);
|
||||
relatedResultList.add(relatedResult);
|
||||
}
|
||||
}
|
||||
return relatedResultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AchRelatedResult> getRelatedAchCompetition(Long id, Long sourceId) {
|
||||
List<AchRelatedResult> relatedResultList = new ArrayList<>();
|
||||
//想根据开源项目id,获取对应的年度信息
|
||||
List<Long> allSourceId = achievementsMapper.getAllSourceIdCompetition(id, sourceId);
|
||||
List<String> allYear = achievementsMapper.getDistinctYear(id, allSourceId);
|
||||
if (StringUtils.isNotNull(allYear)) {
|
||||
//遍历年度信息,获取年度成果数据
|
||||
for (String paramYear : allYear) {
|
||||
AchRelatedResult relatedResult = new AchRelatedResult();
|
||||
relatedResult.setYear(paramYear);
|
||||
List<AchRelatedVo> tmpList = achievementsMapper.getRelatedAch(id, allSourceId, paramYear);
|
||||
relatedResult.setAchRelatedVoList(tmpList);
|
||||
relatedResultList.add(relatedResult);
|
||||
}
|
||||
}
|
||||
return relatedResultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AchRelatedResult> getRelatedAchTask(Long id, Long sourceId) {
|
||||
List<AchRelatedResult> relatedResultList = new ArrayList<>();
|
||||
//想根据开源项目id,获取对应的年度信息
|
||||
List<Long> allSourceId = achievementsMapper.getAllSourceIdTask(id, sourceId);
|
||||
List<String> allYear = achievementsMapper.getDistinctYear(id, allSourceId);
|
||||
if (StringUtils.isNotNull(allYear)) {
|
||||
//遍历年度信息,获取年度成果数据
|
||||
for (String paramYear : allYear) {
|
||||
AchRelatedResult relatedResult = new AchRelatedResult();
|
||||
relatedResult.setYear(paramYear);
|
||||
List<AchRelatedVo> tmpList = achievementsMapper.getRelatedAch(id, allSourceId, paramYear);
|
||||
relatedResult.setAchRelatedVoList(tmpList);
|
||||
relatedResultList.add(relatedResult);
|
||||
}
|
||||
}
|
||||
return relatedResultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskResourceLibrary> getRelatedAchTaskOfExpert(Long id) {
|
||||
return achievementsMapper.getRelatedAchTaskOfExpert(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitionResourceLibrary> getRelatedAchCompetitionOfExpert(Long id) {
|
||||
return achievementsMapper.getRelatedAchCompetitionOfExpert(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据查询内容,调用搜索行为接口
|
||||
*
|
||||
* @param achName
|
||||
* @param userId
|
||||
*/
|
||||
@Override
|
||||
public int getSearchResult(String achName, Long userId) {
|
||||
int num = 0;
|
||||
if (StringUtils.isEmpty(achName)) {
|
||||
return num;
|
||||
}
|
||||
List<Long> idList = achievementsMapper.selectAchievementsByName(achName);
|
||||
if (StringUtils.isNotNull(idList)) {
|
||||
for (Long searchId : idList) {
|
||||
Searcher e = new Searcher();
|
||||
e.setCreatedAt(DateUtils.getNowDate());
|
||||
e.setUserId(userId);
|
||||
e.setSearchId(searchId);
|
||||
e.setExtInfo(achName);
|
||||
e.setSearchType("Achievements");
|
||||
num = taskResourceLibraryMapper.insertSearcher(e);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValueVo> getProjectAreasByName(String areaName) {
|
||||
return achievementsMapper.getProjectAreasByName(areaName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getExpertAreasByName(String areaName) {
|
||||
return achievementsMapper.getExpertAreasByName(areaName);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.microservices.dms.achievementLibrary.service.impl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchievementTeam;
|
||||
import com.microservices.dms.achievementLibrary.domain.Achievements;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementTeamMapper;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementsMapper;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
import com.microservices.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.microservices.dms.achievementLibrary.mapper.SchoolEnterpriseAchievementsMapper;
|
||||
import com.microservices.dms.achievementLibrary.domain.SchoolEnterpriseAchievements;
|
||||
import com.microservices.dms.achievementLibrary.service.ISchoolEnterpriseAchievementsService;
|
||||
|
||||
/**
|
||||
* 校企成果Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
@Service
|
||||
public class SchoolEnterpriseAchievementsServiceImpl implements ISchoolEnterpriseAchievementsService
|
||||
{
|
||||
@Autowired
|
||||
private SchoolEnterpriseAchievementsMapper schoolEnterpriseAchievementsMapper;
|
||||
|
||||
@Autowired
|
||||
private AchievementTeamMapper achievementTeamMapper;
|
||||
|
||||
@Autowired
|
||||
private IAchievementsService achievementsService;
|
||||
@Autowired
|
||||
private AchievementsMapper achievementsMapper;
|
||||
|
||||
/**
|
||||
* 查询校企成果
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 校企成果
|
||||
*/
|
||||
@Override
|
||||
public SchoolEnterpriseAchievements selectSchoolEnterpriseAchievementsById(Long id)
|
||||
{
|
||||
SchoolEnterpriseAchievements sAchievements = schoolEnterpriseAchievementsMapper.selectSchoolEnterpriseAchievementsById(id);
|
||||
if(StringUtils.isNotNull(sAchievements)){
|
||||
Long achId = sAchievements.getId();
|
||||
List<AchievementTeam> teamList = achievementTeamMapper.selectAchievementTeamByAchId(achId);
|
||||
if(StringUtils.isNotNull(teamList) && teamList.size() > 0){
|
||||
sAchievements.setTeamList(teamList);
|
||||
}
|
||||
}
|
||||
return sAchievements;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询校企成果列表
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 校企成果
|
||||
*/
|
||||
@Override
|
||||
public List<SchoolEnterpriseAchievements> selectSchoolEnterpriseAchievementsList(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// if (loginUser != null){
|
||||
// String username = loginUser.getUsername();
|
||||
// schoolEnterpriseAchievements.setCreateBy(username);
|
||||
// }
|
||||
List<SchoolEnterpriseAchievements> list = schoolEnterpriseAchievementsMapper.selectSchoolEnterpriseAchievementsList(schoolEnterpriseAchievements);
|
||||
for (SchoolEnterpriseAchievements a : list) {
|
||||
a.setImages(achievementsService.buildFileInfoByIdents(a.getImages(), "4"));
|
||||
a.setAttachments(achievementsService.buildFileInfoByIdents(a.getAttachments(), "4"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchoolEnterpriseAchievements> listFront(SchoolEnterpriseAchievements schoolEnterpriseAchievements) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null) {
|
||||
String username = loginUser.getUsername();
|
||||
schoolEnterpriseAchievements.setCreateBy(username);
|
||||
}
|
||||
return selectSchoolEnterpriseAchievementsList(schoolEnterpriseAchievements);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Long insertSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
String username = loginUser.getUsername();
|
||||
schoolEnterpriseAchievements.setCreateBy(username);
|
||||
}
|
||||
schoolEnterpriseAchievements.setCreateTime(DateUtils.getNowDate());
|
||||
schoolEnterpriseAchievementsMapper.insertSchoolEnterpriseAchievements(schoolEnterpriseAchievements);
|
||||
return schoolEnterpriseAchievements.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改校企成果
|
||||
*
|
||||
* @param schoolEnterpriseAchievements 校企成果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
schoolEnterpriseAchievements.setUpdateTime(DateUtils.getNowDate());
|
||||
return schoolEnterpriseAchievementsMapper.updateSchoolEnterpriseAchievements(schoolEnterpriseAchievements);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除校企成果
|
||||
*
|
||||
* @param ids 需要删除的校企成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSchoolEnterpriseAchievementsByIds(Long[] ids)
|
||||
{
|
||||
return schoolEnterpriseAchievementsMapper.deleteSchoolEnterpriseAchievementsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除校企成果信息
|
||||
*
|
||||
* @param id 校企成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSchoolEnterpriseAchievementsById(Long id)
|
||||
{
|
||||
// 校企成果删除前判断数据仓库是否存在数据,存在则不允许删除该数据
|
||||
Achievements achievements = new Achievements();
|
||||
achievements.setSource("4");
|
||||
achievements.setSourceId(id);
|
||||
List<Achievements> ss = achievementsMapper.selectAchievementsList(achievements);
|
||||
if (ss != null && !ss.isEmpty()) {
|
||||
throw new ServiceException("数据仓库是否存在数据,不允许删除");
|
||||
}
|
||||
|
||||
// 校企成果被删除,对应的成员也应该一并删除
|
||||
achievementTeamMapper.deleteAchievementTeamByAId(id);
|
||||
return schoolEnterpriseAchievementsMapper.deleteSchoolEnterpriseAchievementsById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long topStatistic(SchoolEnterpriseAchievements schoolEnterpriseAchievements) {
|
||||
return schoolEnterpriseAchievementsMapper.topStatistic(schoolEnterpriseAchievements);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package com.microservices.dms.behaviorImage.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.dms.behaviorImage.domain.ActivityUserLibrary;
|
||||
import com.microservices.dms.behaviorImage.domain.BehaviorImageWeight;
|
||||
import com.microservices.dms.behaviorImage.service.IBehaviorImageService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
import static com.microservices.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 成果画像Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/behaviorImage")
|
||||
@Api(tags = "数据管理体系-画像接口")
|
||||
public class BehaviorImageController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBehaviorImageService behaviorImageService;
|
||||
/**
|
||||
* 根据成果ID,获取对应的成果画像
|
||||
*/
|
||||
//@RequiresPermissions("dms:achievements:query")
|
||||
@ApiOperation(value = "根据成果ID,获取对应的成果画像")
|
||||
@GetMapping(value = "/achievementImage")
|
||||
public AjaxResult getAchievementImageById(Long id)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getAchievementImageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询画像行为权重列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
startPage();
|
||||
List<BehaviorImageWeight> list = behaviorImageService.selectBehaviorImageWeightList(behaviorImageWeight);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出画像行为权重列表
|
||||
*/
|
||||
@Log(title = "画像行为权重", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
List<BehaviorImageWeight> list = behaviorImageService.selectBehaviorImageWeightList(behaviorImageWeight);
|
||||
ExcelUtil<BehaviorImageWeight> util = new ExcelUtil<BehaviorImageWeight>(BehaviorImageWeight.class);
|
||||
util.exportExcel(response, list, "画像行为权重数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取画像行为权重详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(behaviorImageService.selectBehaviorImageWeightById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增画像行为权重
|
||||
*/
|
||||
@Log(title = "画像行为权重", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
return toAjax(behaviorImageService.insertBehaviorImageWeight(behaviorImageWeight));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改画像行为权重
|
||||
*/
|
||||
@Log(title = "画像行为权重", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
return toAjax(behaviorImageService.updateBehaviorImageWeight(behaviorImageWeight));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除画像行为权重
|
||||
*/
|
||||
@Log(title = "画像行为权重", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(behaviorImageService.deleteBehaviorImageWeightByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃用户数据
|
||||
*/
|
||||
@GetMapping(value = "/activityList")
|
||||
@ApiOperation("获取用户资源库数据")
|
||||
public TableDataInfo activityList(ActivityUserLibrary activityUserLibrary)
|
||||
{
|
||||
startPage();
|
||||
List<ActivityUserLibrary> list = behaviorImageService.selectActivityUserLibraryList(activityUserLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("/根据用户ID,获取用户对应的成果汇总")
|
||||
@GetMapping(value = "/getUserTypeStatistic")
|
||||
public AjaxResult getUserTypeStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserTypeStatistic(userId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping(value = "/getUserProjectStatistic")
|
||||
@ApiOperation("/获取用户开源项目相关数据")
|
||||
public AjaxResult getUserProjectStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserProjectStatistic(userId));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getUserTaskStatistic")
|
||||
@ApiOperation("/获取用户创客任务相关数据")
|
||||
public AjaxResult getUserTaskStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserTaskStatistic(userId));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getUserCompStatistic")
|
||||
@ApiOperation("/获取用户开放竞赛相关数据")
|
||||
public AjaxResult getUserCompStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserCompStatistic(userId));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getUserMemoStatistic")
|
||||
@ApiOperation("/获取用户论坛交流相关数据")
|
||||
public AjaxResult getUserMemoStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserMemoStatistic(userId));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getUserExpertStatistic")
|
||||
@ApiOperation("/获取用户专家资源相关数据")
|
||||
public AjaxResult getUserExpertStatistic(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserExpertStatistic(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃用户相关统计数据
|
||||
*/
|
||||
@GetMapping(value = "/getActivityStatistic")
|
||||
@ApiOperation("获取用户资源库相关统计数据")
|
||||
public AjaxResult getActivityStatistic()
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getActivityStatistic());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getUserBehaviorSum")
|
||||
@ApiOperation("获取用户的所有关注、点赞数")
|
||||
public AjaxResult getUserBehaviorSum(Long userId)
|
||||
{
|
||||
return AjaxResult.success(behaviorImageService.getUserBehaviorSum(userId));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class AchievementBehaviorSumVo {
|
||||
//点击量(浏览量)
|
||||
private Long clickSum;
|
||||
//关注量
|
||||
private Long watchSum;
|
||||
//查询量
|
||||
private Long searchSum;
|
||||
//收藏量
|
||||
private Long favoriteSum;
|
||||
//下载量
|
||||
private Long downloadSum;
|
||||
//成果用户对接
|
||||
private Long userDockingSum;
|
||||
|
||||
public Long getUserDockingSum() {
|
||||
return userDockingSum;
|
||||
}
|
||||
|
||||
public void setUserDockingSum(Long userDockingSum) {
|
||||
this.userDockingSum = userDockingSum;
|
||||
}
|
||||
|
||||
public Long getClickSum() {
|
||||
return clickSum;
|
||||
}
|
||||
|
||||
public void setClickSum(Long clickSum) {
|
||||
this.clickSum = clickSum;
|
||||
}
|
||||
|
||||
public Long getWatchSum() {
|
||||
return watchSum;
|
||||
}
|
||||
|
||||
public void setWatchSum(Long watchSum) {
|
||||
this.watchSum = watchSum;
|
||||
}
|
||||
|
||||
public Long getSearchSum() {
|
||||
return searchSum;
|
||||
}
|
||||
|
||||
public void setSearchSum(Long searchSum) {
|
||||
this.searchSum = searchSum;
|
||||
}
|
||||
|
||||
public Long getFavoriteSum() {
|
||||
return favoriteSum;
|
||||
}
|
||||
|
||||
public void setFavoriteSum(Long favoriteSum) {
|
||||
this.favoriteSum = favoriteSum;
|
||||
}
|
||||
|
||||
public Long getDownloadSum() {
|
||||
return downloadSum;
|
||||
}
|
||||
|
||||
public void setDownloadSum(Long downloadSum) {
|
||||
this.downloadSum = downloadSum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
/**
|
||||
* 成果画像结果
|
||||
*/
|
||||
public class AchievementImageVo {
|
||||
private Long id;
|
||||
private float score;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public float getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(float score) {
|
||||
this.score = score;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
public class ActivityUserLibrary extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
//用户id
|
||||
private Long userId;
|
||||
//登录名称
|
||||
private String loginName;
|
||||
//用户名称
|
||||
private String userName;
|
||||
//是否是专家
|
||||
private String isExpert;
|
||||
//是否已实名
|
||||
private String isAuth;
|
||||
//关注领域
|
||||
private String areasStr;
|
||||
//相关项目数
|
||||
private Long relatedProject;
|
||||
//相关任务数
|
||||
private Long relatedTask;
|
||||
//相关竞赛数
|
||||
private Long relatedCompetition;
|
||||
//相关成果数
|
||||
private Long relatedAch;
|
||||
//相关专家
|
||||
private Long relatedExpert;
|
||||
//相关论坛
|
||||
private Long relatedMemo;
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getLoginName() {
|
||||
return loginName;
|
||||
}
|
||||
|
||||
public void setLoginName(String loginName) {
|
||||
this.loginName = loginName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getIsExpert() {
|
||||
return isExpert;
|
||||
}
|
||||
|
||||
public void setIsExpert(String isExpert) {
|
||||
this.isExpert = isExpert;
|
||||
}
|
||||
|
||||
public String getIsAuth() {
|
||||
return isAuth;
|
||||
}
|
||||
|
||||
public void setIsAuth(String isAuth) {
|
||||
this.isAuth = isAuth;
|
||||
}
|
||||
|
||||
public String getAreasStr() {
|
||||
return areasStr;
|
||||
}
|
||||
|
||||
public void setAreasStr(String areasStr) {
|
||||
this.areasStr = areasStr;
|
||||
}
|
||||
|
||||
public Long getRelatedProject() {
|
||||
return relatedProject;
|
||||
}
|
||||
|
||||
public void setRelatedProject(Long relatedProject) {
|
||||
this.relatedProject = relatedProject;
|
||||
}
|
||||
|
||||
public Long getRelatedTask() {
|
||||
return relatedTask;
|
||||
}
|
||||
|
||||
public void setRelatedTask(Long relatedTask) {
|
||||
this.relatedTask = relatedTask;
|
||||
}
|
||||
|
||||
public Long getRelatedCompetition() {
|
||||
return relatedCompetition;
|
||||
}
|
||||
|
||||
public void setRelatedCompetition(Long relatedCompetition) {
|
||||
this.relatedCompetition = relatedCompetition;
|
||||
}
|
||||
|
||||
public Long getRelatedAch() {
|
||||
return relatedAch;
|
||||
}
|
||||
|
||||
public void setRelatedAch(Long relatedAch) {
|
||||
this.relatedAch = relatedAch;
|
||||
}
|
||||
|
||||
public Long getRelatedExpert() {
|
||||
return relatedExpert;
|
||||
}
|
||||
|
||||
public void setRelatedExpert(Long relatedExpert) {
|
||||
this.relatedExpert = relatedExpert;
|
||||
}
|
||||
|
||||
public Long getRelatedMemo() {
|
||||
return relatedMemo;
|
||||
}
|
||||
|
||||
public void setRelatedMemo(Long relatedMemo) {
|
||||
this.relatedMemo = relatedMemo;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
public class ActivityUserTotal {
|
||||
//活跃用户
|
||||
private Long totalUser;
|
||||
//活跃用户专家数
|
||||
private Long totalExpert;
|
||||
//活跃用户实名认证
|
||||
private Long authTotal;
|
||||
|
||||
public Long getTotalUser() {
|
||||
return totalUser;
|
||||
}
|
||||
|
||||
public void setTotalUser(Long totalUser) {
|
||||
this.totalUser = totalUser;
|
||||
}
|
||||
|
||||
public Long getTotalExpert() {
|
||||
return totalExpert;
|
||||
}
|
||||
|
||||
public void setTotalExpert(Long totalExpert) {
|
||||
this.totalExpert = totalExpert;
|
||||
}
|
||||
|
||||
public Long getAuthTotal() {
|
||||
return authTotal;
|
||||
}
|
||||
|
||||
public void setAuthTotal(Long authTotal) {
|
||||
this.authTotal = authTotal;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class BehaviorContant {
|
||||
/**
|
||||
* 成果画像
|
||||
*/
|
||||
public final static String ACHIEVEMENTS_IMAGE = "Achievements";
|
||||
|
||||
/**
|
||||
* 点击行为
|
||||
*/
|
||||
public final static String CLICK_BEHAVIOR = "click";
|
||||
/**
|
||||
* 收藏行为
|
||||
*/
|
||||
public final static String FAVORITE_BEHAVIOR = "favorite";
|
||||
/**
|
||||
* 搜索行为
|
||||
*/
|
||||
public final static String SEARCH_BEHAVIOR = "search";
|
||||
/**
|
||||
* 关注行为
|
||||
*/
|
||||
public final static String WATCH_BEHAVIOR = "watch";
|
||||
/**
|
||||
* 附件下载行为
|
||||
*/
|
||||
public final static String FILE_DOWNLOAD_BEHAVIOR = "file_download";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 画像行为权重对象 behavior_image_weight
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-23
|
||||
*/
|
||||
public class BehaviorImageWeight extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 行为编码 */
|
||||
@Excel(name = "行为编码")
|
||||
private String behaviorCode;
|
||||
|
||||
/** 画像分类 */
|
||||
@Excel(name = "画像分类")
|
||||
private String imageType;
|
||||
|
||||
/** 行为名称 */
|
||||
@Excel(name = "行为名称")
|
||||
private String behaviorName;
|
||||
|
||||
/** 行为权重 */
|
||||
@Excel(name = "行为权重")
|
||||
private String behaviorWeight;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setBehaviorCode(String behaviorCode)
|
||||
{
|
||||
this.behaviorCode = behaviorCode;
|
||||
}
|
||||
|
||||
public String getBehaviorCode()
|
||||
{
|
||||
return behaviorCode;
|
||||
}
|
||||
public void setImageType(String imageType)
|
||||
{
|
||||
this.imageType = imageType;
|
||||
}
|
||||
|
||||
public String getImageType()
|
||||
{
|
||||
return imageType;
|
||||
}
|
||||
public void setBehaviorName(String behaviorName)
|
||||
{
|
||||
this.behaviorName = behaviorName;
|
||||
}
|
||||
|
||||
public String getBehaviorName()
|
||||
{
|
||||
return behaviorName;
|
||||
}
|
||||
public void setBehaviorWeight(String behaviorWeight)
|
||||
{
|
||||
this.behaviorWeight = behaviorWeight;
|
||||
}
|
||||
|
||||
public String getBehaviorWeight()
|
||||
{
|
||||
return behaviorWeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("behaviorCode", getBehaviorCode())
|
||||
.append("imageType", getImageType())
|
||||
.append("behaviorName", getBehaviorName())
|
||||
.append("behaviorWeight", getBehaviorWeight())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserCompetitionTotalVo {
|
||||
//创建竞赛数
|
||||
private Long joinCompetitionCount;
|
||||
//关注竞赛数
|
||||
private Long watchCompetitionCount;
|
||||
//报名数
|
||||
private Long signUpCount;
|
||||
//提交作品数
|
||||
private Long submitWorkCount;
|
||||
|
||||
|
||||
public Long getJoinCompetitionCount() {
|
||||
return joinCompetitionCount;
|
||||
}
|
||||
|
||||
public void setJoinCompetitionCount(Long joinCompetitionCount) {
|
||||
this.joinCompetitionCount = joinCompetitionCount;
|
||||
}
|
||||
|
||||
public Long getWatchCompetitionCount() {
|
||||
return watchCompetitionCount;
|
||||
}
|
||||
|
||||
public void setWatchCompetitionCount(Long watchCompetitionCount) {
|
||||
this.watchCompetitionCount = watchCompetitionCount;
|
||||
}
|
||||
|
||||
public Long getSignUpCount() {
|
||||
return signUpCount;
|
||||
}
|
||||
|
||||
public void setSignUpCount(Long signUpCount) {
|
||||
this.signUpCount = signUpCount;
|
||||
}
|
||||
|
||||
public Long getSubmitWorkCount() {
|
||||
return submitWorkCount;
|
||||
}
|
||||
|
||||
public void setSubmitWorkCount(Long submitWorkCount) {
|
||||
this.submitWorkCount = submitWorkCount;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserExpertTotalVo {
|
||||
//关注专家数
|
||||
private Long watchExpertCount;
|
||||
//收藏专家数
|
||||
private Long favoriteExpertCount;
|
||||
//评审竞赛数
|
||||
private Long aduitCompetitionCount;
|
||||
//评审任务数
|
||||
private Long aduitTaskCount;
|
||||
|
||||
public Long getWatchExpertCount() {
|
||||
return watchExpertCount;
|
||||
}
|
||||
|
||||
public void setWatchExpertCount(Long watchExpertCount) {
|
||||
this.watchExpertCount = watchExpertCount;
|
||||
}
|
||||
|
||||
public Long getFavoriteExpertCount() {
|
||||
return favoriteExpertCount;
|
||||
}
|
||||
|
||||
public void setFavoriteExpertCount(Long favoriteExpertCount) {
|
||||
this.favoriteExpertCount = favoriteExpertCount;
|
||||
}
|
||||
|
||||
public Long getAduitCompetitionCount() {
|
||||
return aduitCompetitionCount;
|
||||
}
|
||||
|
||||
public void setAduitCompetitionCount(Long aduitCompetitionCount) {
|
||||
this.aduitCompetitionCount = aduitCompetitionCount;
|
||||
}
|
||||
|
||||
public Long getAduitTaskCount() {
|
||||
return aduitTaskCount;
|
||||
}
|
||||
|
||||
public void setAduitTaskCount(Long aduitTaskCount) {
|
||||
this.aduitTaskCount = aduitTaskCount;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserMemoTotalVo {
|
||||
// private Long managerMemoCount;
|
||||
//参与帖子
|
||||
private Long joinMemoCount;
|
||||
//创建帖子
|
||||
private Long createMemoCount;
|
||||
//回复帖子
|
||||
private Long replayMemoCount;
|
||||
//关注帖子
|
||||
private Long watchMemoCount;
|
||||
|
||||
public Long getJoinMemoCount() {
|
||||
return joinMemoCount;
|
||||
}
|
||||
|
||||
public void setJoinMemoCount(Long joinMemoCount) {
|
||||
this.joinMemoCount = joinMemoCount;
|
||||
}
|
||||
|
||||
public Long getCreateMemoCount() {
|
||||
return createMemoCount;
|
||||
}
|
||||
|
||||
public void setCreateMemoCount(Long createMemoCount) {
|
||||
this.createMemoCount = createMemoCount;
|
||||
}
|
||||
|
||||
public Long getReplayMemoCount() {
|
||||
return replayMemoCount;
|
||||
}
|
||||
|
||||
public void setReplayMemoCount(Long replayMemoCount) {
|
||||
this.replayMemoCount = replayMemoCount;
|
||||
}
|
||||
|
||||
public Long getWatchMemoCount() {
|
||||
return watchMemoCount;
|
||||
}
|
||||
|
||||
public void setWatchMemoCount(Long watchMemoCount) {
|
||||
this.watchMemoCount = watchMemoCount;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserProjectTotalVo {
|
||||
//创建项目数
|
||||
private Long createProjectCount;
|
||||
//参与项目数
|
||||
private Long joinProjectCount;
|
||||
//fork项目数
|
||||
private Long forkProjectCount;
|
||||
//点赞项目数
|
||||
private Long praiseProjectCount;
|
||||
//关注项目数
|
||||
private Long watchProjectCount;
|
||||
//提交代码数
|
||||
private Long commitSum;
|
||||
//issue相关数
|
||||
private Long issueSum;
|
||||
//合并代码数
|
||||
private Long prSum;
|
||||
|
||||
public Long getCreateProjectCount() {
|
||||
return createProjectCount;
|
||||
}
|
||||
|
||||
public void setCreateProjectCount(Long createProjectCount) {
|
||||
this.createProjectCount = createProjectCount;
|
||||
}
|
||||
|
||||
public Long getJoinProjectCount() {
|
||||
return joinProjectCount;
|
||||
}
|
||||
|
||||
public void setJoinProjectCount(Long joinProjectCount) {
|
||||
this.joinProjectCount = joinProjectCount;
|
||||
}
|
||||
|
||||
public Long getForkProjectCount() {
|
||||
return forkProjectCount;
|
||||
}
|
||||
|
||||
public void setForkProjectCount(Long forkProjectCount) {
|
||||
this.forkProjectCount = forkProjectCount;
|
||||
}
|
||||
|
||||
public Long getPraiseProjectCount() {
|
||||
return praiseProjectCount;
|
||||
}
|
||||
|
||||
public void setPraiseProjectCount(Long praiseProjectCount) {
|
||||
this.praiseProjectCount = praiseProjectCount;
|
||||
}
|
||||
|
||||
public Long getWatchProjectCount() {
|
||||
return watchProjectCount;
|
||||
}
|
||||
|
||||
public void setWatchProjectCount(Long watchProjectCount) {
|
||||
this.watchProjectCount = watchProjectCount;
|
||||
}
|
||||
|
||||
public Long getCommitSum() {
|
||||
return commitSum;
|
||||
}
|
||||
|
||||
public void setCommitSum(Long commitSum) {
|
||||
this.commitSum = commitSum;
|
||||
}
|
||||
|
||||
public Long getIssueSum() {
|
||||
return issueSum;
|
||||
}
|
||||
|
||||
public void setIssueSum(Long issueSum) {
|
||||
this.issueSum = issueSum;
|
||||
}
|
||||
|
||||
public Long getPrSum() {
|
||||
return prSum;
|
||||
}
|
||||
|
||||
public void setPrSum(Long prSum) {
|
||||
this.prSum = prSum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserTaskTotalVo {
|
||||
//创建任务数
|
||||
private Long createTaskCount;
|
||||
//任务交稿数
|
||||
private Long submitPapersCount;
|
||||
//关注任务数
|
||||
private Long watchTaskCount;
|
||||
//参加任务数
|
||||
private Long joinTaskCount;
|
||||
|
||||
|
||||
public Long getCreateTaskCount() {
|
||||
return createTaskCount;
|
||||
}
|
||||
|
||||
public void setCreateTaskCount(Long createTaskCount) {
|
||||
this.createTaskCount = createTaskCount;
|
||||
}
|
||||
|
||||
public Long getSubmitPapersCount() {
|
||||
return submitPapersCount;
|
||||
}
|
||||
|
||||
public void setSubmitPapersCount(Long submitPapersCount) {
|
||||
this.submitPapersCount = submitPapersCount;
|
||||
}
|
||||
|
||||
public Long getWatchTaskCount() {
|
||||
return watchTaskCount;
|
||||
}
|
||||
|
||||
public void setWatchTaskCount(Long watchTaskCount) {
|
||||
this.watchTaskCount = watchTaskCount;
|
||||
}
|
||||
|
||||
public Long getJoinTaskCount() {
|
||||
return joinTaskCount;
|
||||
}
|
||||
|
||||
public void setJoinTaskCount(Long joinTaskCount) {
|
||||
this.joinTaskCount = joinTaskCount;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package com.microservices.dms.behaviorImage.domain;
|
||||
|
||||
public class UserTypeTotalVo {
|
||||
private String resultType;
|
||||
private Long watchSum;
|
||||
private Long favoriteSum;
|
||||
private Long downloadSum;
|
||||
private Long clickSum;
|
||||
private Long searchSum;
|
||||
private Long praiseSum;
|
||||
|
||||
public String getResultType() {
|
||||
return resultType;
|
||||
}
|
||||
|
||||
public void setResultType(String resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
public Long getWatchSum() {
|
||||
return watchSum;
|
||||
}
|
||||
|
||||
public void setWatchSum(Long watchSum) {
|
||||
this.watchSum = watchSum;
|
||||
}
|
||||
|
||||
public Long getFavoriteSum() {
|
||||
return favoriteSum;
|
||||
}
|
||||
|
||||
public void setFavoriteSum(Long favoriteSum) {
|
||||
this.favoriteSum = favoriteSum;
|
||||
}
|
||||
|
||||
public Long getDownloadSum() {
|
||||
return downloadSum;
|
||||
}
|
||||
|
||||
public void setDownloadSum(Long downloadSum) {
|
||||
this.downloadSum = downloadSum;
|
||||
}
|
||||
|
||||
public Long getClickSum() {
|
||||
return clickSum;
|
||||
}
|
||||
|
||||
public void setClickSum(Long clickSum) {
|
||||
this.clickSum = clickSum;
|
||||
}
|
||||
|
||||
public Long getSearchSum() {
|
||||
return searchSum;
|
||||
}
|
||||
|
||||
public void setSearchSum(Long searchSum) {
|
||||
this.searchSum = searchSum;
|
||||
}
|
||||
|
||||
public Long getPraiseSum() {
|
||||
return praiseSum;
|
||||
}
|
||||
|
||||
public void setPraiseSum(Long praiseSum) {
|
||||
this.praiseSum = praiseSum;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.microservices.dms.behaviorImage.mapper;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.behaviorImage.domain.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface BehaviorImageMapper {
|
||||
AchievementBehaviorSumVo getBehaviorSumListByType();
|
||||
|
||||
List<KeyValueVo> getWeightListByType(@Param("achievementsImage") String achievementsImage);
|
||||
|
||||
Long getFavoriteSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);
|
||||
|
||||
Long getSearchSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);
|
||||
|
||||
Long getWatchSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);
|
||||
|
||||
Long getFileDownloadSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);
|
||||
|
||||
Long getClickSumByAchievementId(@Param("id") Long id, @Param("achievementsImage") String achievementsImage);
|
||||
|
||||
/**
|
||||
* 查询画像行为权重
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 画像行为权重
|
||||
*/
|
||||
public BehaviorImageWeight selectBehaviorImageWeightById(Long id);
|
||||
|
||||
/**
|
||||
* 查询画像行为权重列表
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 画像行为权重集合
|
||||
*/
|
||||
public List<BehaviorImageWeight> selectBehaviorImageWeightList(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 新增画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 修改画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 删除画像行为权重
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBehaviorImageWeightById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除画像行为权重
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBehaviorImageWeightByIds(Long[] ids);
|
||||
|
||||
List<KeyValueVo> getUserProjecttatistic(@Param("userId")Long userId);
|
||||
|
||||
List<KeyValueVo> getUserTaskStatistic(@Param("userId")Long userId);
|
||||
|
||||
List<ActivityUserLibrary> selectActivityUserLibraryList(ActivityUserLibrary activityUserLibrary);
|
||||
|
||||
Long getrelatedProjectCount(@Param("userId")Long userId);
|
||||
|
||||
Long getrelatedTaskCount(@Param("userId")Long userId);
|
||||
|
||||
List<KeyValueVo> getUserCompStatistic(@Param("userId")Long userId);
|
||||
|
||||
Long getrelatedCompetitionCount(@Param("userId")Long userId);
|
||||
|
||||
List<KeyValueVo> getUserMemoStatistic(@Param("userId")Long userId);
|
||||
|
||||
Long getrelatedMemoCount(@Param("userId")Long userId);
|
||||
|
||||
List<KeyValueVo> getUserExperttatistic(@Param("userId")Long userId);
|
||||
|
||||
List<UserTypeTotalVo> getUserTypeStatistic(@Param("userId")Long userId);
|
||||
|
||||
ActivityUserTotal getActivityStatistic();
|
||||
|
||||
List<ActivityUserLibrary> selectActivityUserLibraryListAll(ActivityUserLibrary activityUserLibrary);
|
||||
|
||||
UserTypeTotalVo getUserBehaviorSum(@Param("userId")Long userId);
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.microservices.dms.behaviorImage.service;
|
||||
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.behaviorImage.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IBehaviorImageService {
|
||||
AchievementImageVo getAchievementImageById(Long id);
|
||||
/**
|
||||
* 查询画像行为权重
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 画像行为权重
|
||||
*/
|
||||
public BehaviorImageWeight selectBehaviorImageWeightById(Long id);
|
||||
|
||||
/**
|
||||
* 查询画像行为权重列表
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 画像行为权重集合
|
||||
*/
|
||||
public List<BehaviorImageWeight> selectBehaviorImageWeightList(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 新增画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 修改画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);
|
||||
|
||||
/**
|
||||
* 批量删除画像行为权重
|
||||
*
|
||||
* @param ids 需要删除的画像行为权重主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBehaviorImageWeightByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除画像行为权重信息
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBehaviorImageWeightById(Long id);
|
||||
|
||||
/**
|
||||
* 查询活跃用户资源库列表
|
||||
*
|
||||
* @param activityUserLibrary 活跃用户资源库
|
||||
* @return 活跃用户资源库集合
|
||||
*/
|
||||
List<ActivityUserLibrary> selectActivityUserLibraryList(ActivityUserLibrary activityUserLibrary);
|
||||
|
||||
List<UserTypeTotalVo> getUserTypeStatistic(Long userId);
|
||||
|
||||
UserProjectTotalVo getUserProjectStatistic(Long userId);
|
||||
|
||||
UserTaskTotalVo getUserTaskStatistic(Long userId);
|
||||
|
||||
UserCompetitionTotalVo getUserCompStatistic(Long userId);
|
||||
|
||||
UserMemoTotalVo getUserMemoStatistic(Long userId);
|
||||
|
||||
UserExpertTotalVo getUserExpertStatistic(Long userId);
|
||||
|
||||
ActivityUserTotal getActivityStatistic();
|
||||
|
||||
UserTypeTotalVo getUserBehaviorSum(Long userId);
|
||||
}
|
|
@ -0,0 +1,347 @@
|
|||
package com.microservices.dms.behaviorImage.service.impl;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.behaviorImage.domain.*;
|
||||
import com.microservices.dms.behaviorImage.mapper.BehaviorImageMapper;
|
||||
import com.microservices.dms.behaviorImage.service.IBehaviorImageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BehaviorImageServiceImpl implements IBehaviorImageService {
|
||||
@Autowired
|
||||
private BehaviorImageMapper behaviorImageMapper;
|
||||
@Override
|
||||
public AchievementImageVo getAchievementImageById(Long id) {
|
||||
AchievementImageVo achievementImageVo = new AchievementImageVo();
|
||||
//获取所有行为汇总数据
|
||||
AchievementBehaviorSumVo achievementBehaviorSumVo = behaviorImageMapper.getBehaviorSumListByType();
|
||||
if(StringUtils.isNotNull(achievementBehaviorSumVo)) {
|
||||
float score = 0f;
|
||||
//从行为表中获取成果行为数据权限
|
||||
List<KeyValueVo> behaviorImageWeightList = behaviorImageMapper.getWeightListByType(BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
float clickResult = 0L;
|
||||
float watchResult = 0L;
|
||||
float searchResult = 0L;
|
||||
float favoriteResult = 0L;
|
||||
float fileDownloadResult = 0L;
|
||||
//简单算法
|
||||
for (KeyValueVo keyValueVo : behaviorImageWeightList) {
|
||||
String bhavior = keyValueVo.getKey();
|
||||
Long weight = keyValueVo.getValue();
|
||||
if (bhavior.equals(BehaviorContant.CLICK_BEHAVIOR)) {//点击
|
||||
//根据当前成果ID,获取成果点击行为数量
|
||||
Long clickSum = achievementBehaviorSumVo.getClickSum();
|
||||
if(StringUtils.isNotNull(clickSum) && clickSum > 0) {
|
||||
Long click = behaviorImageMapper.getClickSumByAchievementId(id, BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
if (StringUtils.isNotNull(click)) {
|
||||
clickResult = click * weight / clickSum ;
|
||||
}
|
||||
}
|
||||
} else if (bhavior.equals(BehaviorContant.FAVORITE_BEHAVIOR)) {//收藏
|
||||
//根据当前成果ID,获取成果收藏行为数量
|
||||
Long favoriteSum = achievementBehaviorSumVo.getFavoriteSum();
|
||||
if(StringUtils.isNotNull(favoriteSum) && favoriteSum > 0) {
|
||||
Long favorite = behaviorImageMapper.getFavoriteSumByAchievementId(id,BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
if (StringUtils.isNotNull(favorite)) {
|
||||
favoriteResult = favorite *weight / favoriteSum ;
|
||||
}
|
||||
}
|
||||
} else if (bhavior.equals(BehaviorContant.SEARCH_BEHAVIOR)) {//搜索
|
||||
//根据当前成果ID,获取成果搜索行为数量
|
||||
Long searchSum = achievementBehaviorSumVo.getSearchSum();
|
||||
if(StringUtils.isNotNull(searchSum) && searchSum > 0) {
|
||||
Long search = behaviorImageMapper.getSearchSumByAchievementId(id, BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
if (StringUtils.isNotNull(search)) {
|
||||
searchResult = search *weight / searchSum;
|
||||
}
|
||||
}
|
||||
} else if (bhavior.equals(BehaviorContant.WATCH_BEHAVIOR)) {//关注
|
||||
//根据当前成果ID,获取成果关注行为数量
|
||||
Long watchSum = achievementBehaviorSumVo.getFavoriteSum();
|
||||
if(StringUtils.isNotNull( watchSum) && watchSum > 0) {
|
||||
Long watch = behaviorImageMapper.getWatchSumByAchievementId(id,BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
if (StringUtils.isNotNull( watch) ) {
|
||||
watchResult = watch *weight / watchSum;
|
||||
}
|
||||
}
|
||||
} else if (bhavior.equals(BehaviorContant.FILE_DOWNLOAD_BEHAVIOR)) {//文件下载
|
||||
//根据当前成果ID,获取成果文件下载行为数量
|
||||
Long fileDownloadSum = achievementBehaviorSumVo.getFavoriteSum();
|
||||
if(StringUtils.isNotNull(fileDownloadSum) && fileDownloadSum > 0) {
|
||||
Long fileDownload = behaviorImageMapper.getFileDownloadSumByAchievementId(id, BehaviorContant.ACHIEVEMENTS_IMAGE);
|
||||
if (StringUtils.isNotNull(fileDownload)) {
|
||||
fileDownloadResult = fileDownload *weight / fileDownloadSum ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
score = clickResult+watchResult+searchResult+favoriteResult+fileDownloadResult;
|
||||
achievementImageVo.setScore(score);
|
||||
}
|
||||
return achievementImageVo;
|
||||
}
|
||||
/**
|
||||
* 查询画像行为权重
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 画像行为权重
|
||||
*/
|
||||
@Override
|
||||
public BehaviorImageWeight selectBehaviorImageWeightById(Long id)
|
||||
{
|
||||
return behaviorImageMapper.selectBehaviorImageWeightById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询画像行为权重列表
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 画像行为权重
|
||||
*/
|
||||
@Override
|
||||
public List<BehaviorImageWeight> selectBehaviorImageWeightList(BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
return behaviorImageMapper.selectBehaviorImageWeightList(behaviorImageWeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
behaviorImageWeight.setCreateTime(DateUtils.getNowDate());
|
||||
return behaviorImageMapper.insertBehaviorImageWeight(behaviorImageWeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改画像行为权重
|
||||
*
|
||||
* @param behaviorImageWeight 画像行为权重
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight)
|
||||
{
|
||||
behaviorImageWeight.setUpdateTime(DateUtils.getNowDate());
|
||||
return behaviorImageMapper.updateBehaviorImageWeight(behaviorImageWeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除画像行为权重
|
||||
*
|
||||
* @param ids 需要删除的画像行为权重主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBehaviorImageWeightByIds(Long[] ids)
|
||||
{
|
||||
return behaviorImageMapper.deleteBehaviorImageWeightByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除画像行为权重信息
|
||||
*
|
||||
* @param id 画像行为权重主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBehaviorImageWeightById(Long id)
|
||||
{
|
||||
return behaviorImageMapper.deleteBehaviorImageWeightById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户新增分类数据统计
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<UserTypeTotalVo> getUserTypeStatistic(Long userId) {
|
||||
return behaviorImageMapper.getUserTypeStatistic(userId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户ID,获取开源项目相关汇总
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserProjectTotalVo getUserProjectStatistic(Long userId) {
|
||||
UserProjectTotalVo userProjectTotalVo = new UserProjectTotalVo();
|
||||
List<KeyValueVo> resultVo = behaviorImageMapper.getUserProjecttatistic(userId);
|
||||
if(StringUtils.isNotNull(resultVo)) {
|
||||
for(KeyValueVo temResult : resultVo) {
|
||||
Long result = temResult.getValue();
|
||||
if(temResult.getKey().equals("createProjectCount")) {
|
||||
userProjectTotalVo.setCreateProjectCount(result);
|
||||
}else if(temResult.getKey().equals("joinProjectCount")){
|
||||
userProjectTotalVo.setJoinProjectCount(result);
|
||||
}else if(temResult.getKey().equals("forkProjectCount")){
|
||||
userProjectTotalVo.setForkProjectCount(result);
|
||||
}else if(temResult.getKey().equals("issueSum")){
|
||||
userProjectTotalVo.setIssueSum(result);
|
||||
}else if(temResult.getKey().equals("prSum")){
|
||||
userProjectTotalVo.setPrSum(result);
|
||||
}else if(temResult.getKey().equals("commitSum")){
|
||||
userProjectTotalVo.setCommitSum(result);
|
||||
}else if(temResult.getKey().equals("watchProjectCount")){
|
||||
userProjectTotalVo.setWatchProjectCount(result);
|
||||
}else if(temResult.getKey().equals("praiseProjectCount")){
|
||||
userProjectTotalVo.setPraiseProjectCount(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return userProjectTotalVo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户ID,获取创客任务相关汇总
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserTaskTotalVo getUserTaskStatistic(Long userId) {
|
||||
UserTaskTotalVo userTaskTotalVo = new UserTaskTotalVo();
|
||||
List<KeyValueVo> resultVo = behaviorImageMapper.getUserTaskStatistic(userId);
|
||||
if(StringUtils.isNotNull(resultVo)) {
|
||||
for(KeyValueVo temResult : resultVo) {
|
||||
Long result = temResult.getValue();
|
||||
if(temResult.getKey().equals("createTaskCount")) {
|
||||
userTaskTotalVo.setCreateTaskCount(result);
|
||||
}else if(temResult.getKey().equals("submitPapersCount")){
|
||||
userTaskTotalVo.setSubmitPapersCount(result);
|
||||
}else if(temResult.getKey().equals("watchTaskCount")){
|
||||
userTaskTotalVo.setWatchTaskCount(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return userTaskTotalVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID,获取开放竞赛相关汇总
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserCompetitionTotalVo getUserCompStatistic(Long userId) {
|
||||
UserCompetitionTotalVo userCompetitionTotalVo = new UserCompetitionTotalVo();
|
||||
List<KeyValueVo> resultVo = behaviorImageMapper.getUserCompStatistic(userId);
|
||||
if(StringUtils.isNotNull(resultVo)) {
|
||||
for(KeyValueVo temResult : resultVo) {
|
||||
Long result = temResult.getValue();
|
||||
if(temResult.getKey().equals("joinCompetitionCount")) {
|
||||
userCompetitionTotalVo.setJoinCompetitionCount(result);
|
||||
}else if(temResult.getKey().equals("watchCompetitionCount")){
|
||||
userCompetitionTotalVo.setWatchCompetitionCount(result);
|
||||
}else if(temResult.getKey().equals("signUpCount")){
|
||||
userCompetitionTotalVo.setSignUpCount(result);
|
||||
}else if(temResult.getKey().equals("submitWorkCount")){
|
||||
userCompetitionTotalVo.setSubmitWorkCount(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return userCompetitionTotalVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID, 获取用户论坛交流相关数据
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserMemoTotalVo getUserMemoStatistic(Long userId) {
|
||||
UserMemoTotalVo userMemoTotalVo = new UserMemoTotalVo();
|
||||
List<KeyValueVo> resultVo = behaviorImageMapper.getUserMemoStatistic(userId);
|
||||
if(StringUtils.isNotNull(resultVo)) {
|
||||
for(KeyValueVo temResult : resultVo) {
|
||||
Long result = temResult.getValue();
|
||||
if(temResult.getKey().equals("createMemoCount")) {
|
||||
userMemoTotalVo.setCreateMemoCount(result);
|
||||
}else if(temResult.getKey().equals("replayMemoCount")){
|
||||
userMemoTotalVo.setReplayMemoCount(result);
|
||||
}else if(temResult.getKey().equals("watchMemoCount")){
|
||||
userMemoTotalVo.setWatchMemoCount(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return userMemoTotalVo;
|
||||
}
|
||||
/**
|
||||
* 根据用户ID, 获取用户专家资源相关数据
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserExpertTotalVo getUserExpertStatistic(Long userId) {
|
||||
UserExpertTotalVo userExpertTotalVo = new UserExpertTotalVo();
|
||||
List<KeyValueVo> resultVo = behaviorImageMapper.getUserExperttatistic(userId);
|
||||
if(StringUtils.isNotNull(resultVo)) {
|
||||
for(KeyValueVo temResult : resultVo) {
|
||||
Long result = temResult.getValue();
|
||||
if(temResult.getKey().equals("watchExpertCount")) {
|
||||
userExpertTotalVo.setWatchExpertCount(result);
|
||||
}else if(temResult.getKey().equals("favoriteExpertCount")){
|
||||
userExpertTotalVo.setFavoriteExpertCount(result);
|
||||
}else if(temResult.getKey().equals("aduitCompetitionCount")){
|
||||
userExpertTotalVo.setAduitCompetitionCount(result);
|
||||
}else if(temResult.getKey().equals("aduitTaskCount")){
|
||||
userExpertTotalVo.setAduitTaskCount(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return userExpertTotalVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActivityUserTotal getActivityStatistic() {
|
||||
return behaviorImageMapper.getActivityStatistic();
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户资源库
|
||||
* @param activityUserLibrary 活跃用户资源库
|
||||
* @return
|
||||
*/
|
||||
// @Override
|
||||
// public List<ActivityUserLibrary> selectActivityUserLibraryList(ActivityUserLibrary activityUserLibrary) {
|
||||
// List<ActivityUserLibrary> list = behaviorImageMapper.selectActivityUserLibraryList(activityUserLibrary);
|
||||
// for (ActivityUserLibrary a : list) {
|
||||
// Long relatedProject= behaviorImageMapper.getrelatedProjectCount(a.getUserId());
|
||||
// a.setRelatedProject(relatedProject);
|
||||
// Long relatedTask= behaviorImageMapper.getrelatedTaskCount(a.getUserId());
|
||||
// a.setRelatedTask(relatedTask);
|
||||
// Long relatedCompetition= behaviorImageMapper.getrelatedCompetitionCount(a.getUserId());
|
||||
// a.setRelatedCompetition(relatedCompetition);
|
||||
// Long relatedMemo= behaviorImageMapper.getrelatedMemoCount(a.getUserId());
|
||||
// a.setRelatedMemo(relatedMemo);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<ActivityUserLibrary> selectActivityUserLibraryList(ActivityUserLibrary activityUserLibrary) {
|
||||
List<ActivityUserLibrary> list = behaviorImageMapper.selectActivityUserLibraryListAll(activityUserLibrary);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserTypeTotalVo getUserBehaviorSum(Long userId) {
|
||||
return behaviorImageMapper.getUserBehaviorSum(userId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
package com.microservices.dms.common.controller;
|
||||
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.dms.achievementLibrary.domain.AchQueryVo;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.service.IExpertResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author otto
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "数据管理体系-公开接口")
|
||||
@RequestMapping("/open")
|
||||
@RefreshScope
|
||||
public class OpenController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IAchievementsService achievementsService;
|
||||
|
||||
@Autowired
|
||||
private IExpertResourceLibraryService expertResourceLibraryService;
|
||||
|
||||
/**
|
||||
* 获取精选成果
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取精选成果")
|
||||
@GetMapping("/achievements/getChoiceImport")
|
||||
public AjaxResult getChoiceImport() {
|
||||
return success(achievementsService.getChoiceImport());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据成果来源对成果数据进行分类统计
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("根据成果来源对成果数据进行分类统计")
|
||||
@GetMapping("/achievements/getTjBySources")
|
||||
public AjaxResult getTjBySources() {
|
||||
return success(achievementsService.getTjBySources());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据成果领域对成功数据进行汇总
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("根据成果领域对成果数据进行汇总")
|
||||
@GetMapping("/achievements/getTjByAreas")
|
||||
public AjaxResult getTjByAreas() {
|
||||
return success(achievementsService.getTjByAreas());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据领域分类名称,获取领域相关数据
|
||||
*/
|
||||
@ApiOperation("根据领域分类名称,获取领域相关数据")
|
||||
@GetMapping("/achievements/getAreasByName")
|
||||
public AjaxResult getAreasByName(String areaName) {
|
||||
return success(achievementsService.getAreasByName(areaName));
|
||||
}
|
||||
|
||||
@ApiOperation("根据领域分类名称,获取项目领域")
|
||||
@GetMapping("/achievements/getProjectAreasByName")
|
||||
public AjaxResult getProjectAreasByName(String areaName) {
|
||||
return success(achievementsService.getProjectAreasByName(areaName));
|
||||
}
|
||||
|
||||
@ApiOperation("根据领域分类名称,获取专家领域")
|
||||
@GetMapping("/achievements/getExpertAreasByName")
|
||||
public AjaxResult getExpertAreasByName(String areaName) {
|
||||
return success(achievementsService.getExpertAreasByName(areaName));
|
||||
}
|
||||
|
||||
/* 获取全部成果,根据成果名称、成果领域、成果来源进行查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取全部成果,根据成果名称、成果领域、成果来源进行查询")
|
||||
@GetMapping("/achievements/getAllResult")
|
||||
public TableDataInfo getAllResult(AchQueryVo achQueryVo) {
|
||||
startPage();
|
||||
return getDataTable(achievementsService.getAllResult(achQueryVo));
|
||||
}
|
||||
|
||||
@ApiOperation("近七日用户行为数据")
|
||||
@GetMapping("/achievements/getUerActionData")
|
||||
public AjaxResult getUerActionData() {
|
||||
return success(achievementsService.getUerActionData());
|
||||
}
|
||||
|
||||
@ApiOperation("热门成果")
|
||||
@GetMapping("/achievements/getHotAchievement")
|
||||
public AjaxResult getHotAchievement() {
|
||||
return success(achievementsService.getHotAchievement());
|
||||
}
|
||||
|
||||
@ApiOperation("七日新增")
|
||||
@GetMapping("/achievements/get7DayAdd")
|
||||
public AjaxResult get7DayAdd(AchQueryVo achQueryVo) {
|
||||
return success(achievementsService.get7DayAdd(achQueryVo));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("首页项目统计")
|
||||
@GetMapping("/achievements/indexProjectStatistic")
|
||||
public AjaxResult indexProjectStatistic() {
|
||||
return success(achievementsService.indexProjectStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页task统计")
|
||||
@GetMapping("/achievements/indexTaskStatistic")
|
||||
public AjaxResult indexTaskStatistic() {
|
||||
return success(achievementsService.indexTaskStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页Competition统计")
|
||||
@GetMapping("/achievements/indexCompetitionStatistic")
|
||||
public AjaxResult indexCompetitionStatistic() {
|
||||
return success(achievementsService.indexCompetitionStatistic());
|
||||
}
|
||||
|
||||
@ApiOperation("首页SchoolEnterprise统计")
|
||||
@GetMapping("/achievements/indexSchoolEnterpriseStatistic")
|
||||
public AjaxResult indexSchoolEnterpriseStatistic() {
|
||||
return success(achievementsService.indexSchoolEnterpriseStatistic());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("首页专家统计")
|
||||
@GetMapping("/achievements/indexExpertStatistic")
|
||||
public AjaxResult indexExpertStatistic() {
|
||||
return success(achievementsService.indexExpertStatistic());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*/
|
||||
@GetMapping("/expertResourceLibrary/listFront")
|
||||
public TableDataInfo listFront(ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
startPage();
|
||||
List<ExpertResourceLibrary> list = expertResourceLibraryService.selectExpertResourceLibraryList2(expertResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/downloadAch")
|
||||
@ApiOperation("成果征集信息下载")
|
||||
public ResponseEntity<Resource> downloadAch() throws IOException {
|
||||
String fileName = "红山开源优秀科研成果信息征集.zip";
|
||||
Resource resource = new ClassPathResource(fileName);
|
||||
if (!resource.exists()) {
|
||||
throw new RuntimeException("文件不存在: " + fileName);
|
||||
}
|
||||
String encodedFileName = URLEncoder.encode(fileName, String.valueOf(StandardCharsets.UTF_8))
|
||||
.replace("+", "%20");
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION,
|
||||
"attachment; filename*=UTF-8''" + encodedFileName)
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.body(resource);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.microservices.dms.constant;
|
||||
|
||||
/**
|
||||
* 区块链方法常量
|
||||
*/
|
||||
public class BlockChainFunConstants {
|
||||
public static final String CREATE_REPO = "create repo"; //项目入链
|
||||
public static final String QUERY_REPO = "query repo basic info"; //项目入链信息查询
|
||||
public static final String USER_SINGLE_REPO = "query user balance of single repo"; //单个项目某个用户token
|
||||
public static final String USER_ALL_REPOS = "query user balance of all repos"; //某个用户所有项目token
|
||||
|
||||
public static final String CREATE_COMMIT = "upload commit info"; //Commit新增入链
|
||||
public static final String QUERY_COMMIT = "query commit info"; //Commit入链信息查询
|
||||
|
||||
public static final String CREATE_PR = "upload pull request info"; //Pr新增入链
|
||||
public static final String QUERY_PR_LATEST = "query pull request latest info"; //单个pr入链所有信息
|
||||
public static final String QUERY_PR_ALL = "query pull request all info"; //单个pr最后一次入链信息
|
||||
|
||||
public static final String CREATE_upDATE_issue = "upload issue info"; //Issue新增、修改入链
|
||||
public static final String QUERY_ISSUE_LATEST = "query issue latest info"; //单个Issue最后一次入链信息
|
||||
public static final String QUERY_ISSUE_ALL = "query issue all info"; //单个Issue入链所有信息
|
||||
|
||||
public static final String ADD_USER_BALANCE = "add user balance"; //项目分配token——用户token新增
|
||||
public static final String MINUS_USER_BALANCE = "minus user balance"; //项目分配token-用户token减少
|
||||
public static final String LOCK_USER_BALANCE = "lock user balance"; //用户转账token-将自己token分配给本项目中的其他用户
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package com.microservices.dms.constant;
|
||||
|
||||
public class DmsConstants {
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.microservices.dms.constant;
|
||||
|
||||
public class ReferralConstant {
|
||||
|
||||
public static final Long ISSUE_CLOSED = 5L;
|
||||
public static final Long ISSUE_RESOLVED = 3L;
|
||||
public static final Long ISSUE_RESOLVING = 2L;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.microservices.dms.constant;
|
||||
|
||||
public class TaskConstant {
|
||||
|
||||
private TaskConstant() {
|
||||
}
|
||||
|
||||
public static final String TASK_TYPE_WATCHERS = "MakerTask";
|
||||
public static final String TASK_TYPE_JOURNALS = "makerSpaceTask";
|
||||
public static final String TASK_TYPE_PAPERS = "";
|
||||
public static final String TASK_TYPE_OTHER = "makerSpaceTask";
|
||||
|
||||
public static final String COMPETITION_TYPE_WATCHERS = "CompetitionInfo";
|
||||
public static final String COMPETITION_TYPE_CLICK = "CompetitionInfo";
|
||||
public static final String COMPETITION_TYPE_DOWNLOAD = "CompetitionOpusDownload";
|
||||
|
||||
|
||||
public static final String PROJECT_DOWNLOAD_API = "%s/api/attachments/%s";
|
||||
public static final String MARKER_SPACE_DOWNLOAD_API_BY_NAME = "%s/busiAttachments/downloadAttachment/%s";
|
||||
public static final String MARKER_SPACE_DOWNLOAD_API_BY_ID = "%s/busiAttachments/download/%s";
|
||||
|
||||
//favorites
|
||||
public static final String EXPERTS = "Experts";
|
||||
public static final String ACHIEVEMENTS = "Achievements";
|
||||
|
||||
// task status dict
|
||||
public static final int DRAFT_STATUS = 0; //草稿状态
|
||||
public static final int TO_BE_REVIEWED_STATUS = 1; //待审核状态
|
||||
public static final int REFUSED_STATUS = 2; //已拒绝状态
|
||||
public static final int TASK_PAPER_COLLECTING_STATUS = 3; //成果征集中状态
|
||||
public static final int TASK_PAPER_CHOOSING_STATUS = 4; //成果评选中状态
|
||||
public static final int TASK_RESULT_PROOF_STATUS = 5; //公示中状态
|
||||
public static final int TASK_SIGNING_STATUS = 6; //协议签定中状态
|
||||
public static final int TASK_PAYING_STATUS = 7; //支付中状态
|
||||
public static final int TASK_COMPLETE_STATUS = 8; //任务完成状态
|
||||
public static final int TASK_TO_BE_REPAIRED_STATUS = 9; //待修缮状态
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.microservices.dms.referral.controller;
|
||||
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.dms.referral.service.TalentReferralService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Data
|
||||
@Api(tags = "数据管理体系-推荐接口")
|
||||
@RestController
|
||||
@RequestMapping("/talentReferral")
|
||||
@RequiredArgsConstructor
|
||||
public class TalentReferralController {
|
||||
|
||||
private final TalentReferralService talentReferralService;
|
||||
|
||||
@GetMapping("/issueTalentReferral")
|
||||
@ApiOperation(value = "疑修人才推荐")
|
||||
public AjaxResult issueTalentReferral(@RequestParam("issueId") Long issueId, @RequestParam("projectId") Long projectId) {
|
||||
return AjaxResult.success(talentReferralService.doIssueTalentReferral(issueId, projectId));
|
||||
}
|
||||
|
||||
@GetMapping("/pullRequestTalentReferral")
|
||||
@ApiOperation(value = "PR人才推荐")
|
||||
public AjaxResult pullRequestTalentReferral(@RequestParam("prId") Long prId, @RequestParam("projectId") Long projectId) {
|
||||
return AjaxResult.success(talentReferralService.doPRTalentReferral(prId, projectId));
|
||||
}
|
||||
|
||||
@GetMapping("/taskAchievementTalentReferral")
|
||||
@ApiOperation(value = "任务成果推荐")
|
||||
public AjaxResult taskAchievementTalentReferral(@RequestParam("taskId") Long taskId) {
|
||||
return AjaxResult.success(talentReferralService.taskAchievementTalentReferral(taskId));
|
||||
}
|
||||
|
||||
@GetMapping("/taskExpertTalentReferral")
|
||||
@ApiOperation(value = "任务专家推荐")
|
||||
public AjaxResult taskExpertTalentReferral(@RequestParam("taskId") Long taskId) {
|
||||
return AjaxResult.success(talentReferralService.taskExpertTalentReferral(taskId));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/competitionExpertTalentReferral")
|
||||
@ApiOperation(value = "竞赛专家推荐")
|
||||
public AjaxResult competitionExpertTalentReferral(@RequestParam("competitionId") Long competitionId) {
|
||||
return AjaxResult.success(talentReferralService.competitionExpertTalentReferral(competitionId));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.microservices.dms.referral.mapper;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.referral.vo.*;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface TalentReferralMapper {
|
||||
|
||||
List<IssuesVo> selectIssuesCondition(IssuesVo issuesVo);
|
||||
|
||||
List<IssuesVo> countIssuesAssigner(@Param("projectId") Long projectId);
|
||||
|
||||
List<PullRequestVo> countPRUser(@Param("projectId") Long projectId);
|
||||
|
||||
IssuesVo selectIssuesById(@Param("id") Long id);
|
||||
|
||||
PullRequestVo selectPRById(@Param("id") Long id);
|
||||
|
||||
List<Long> selectIssuesAssigners(@Param("issueId") Long issueId);
|
||||
|
||||
String selectRepositoriesUrl(@Param("id") Long id);
|
||||
|
||||
Long selectIdByLogin(@Param("login") String login);
|
||||
|
||||
List<TaskVo> selectTaskByStatus(@Param("statusIds") List<Integer> statusIds);
|
||||
|
||||
Map<String, Object> selectUsersById(@Param("id") Long id);
|
||||
|
||||
TaskVo selectTaskById(@Param("id") Long id);
|
||||
|
||||
List<ExpertVo> selectExpertsBy(ExpertVo expertVo);
|
||||
|
||||
List<KeyValVo<Long,String>> allTaskWithExpertIds(@Param("type") String type);
|
||||
|
||||
TaskVo selectCompetitionById(Long competitionId);
|
||||
|
||||
List<TaskVo> selectCompetitionIdByStatus();
|
||||
|
||||
PrInfoVo selectPRInfoById(@Param("id") Integer id);
|
||||
|
||||
}
|
|
@ -0,0 +1,405 @@
|
|||
package com.microservices.dms.referral.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.Achievements;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementsMapper;
|
||||
import com.microservices.dms.constant.ReferralConstant;
|
||||
import com.microservices.dms.constant.TaskConstant;
|
||||
import com.microservices.dms.referral.mapper.TalentReferralMapper;
|
||||
import com.microservices.dms.referral.vo.*;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.utils.DmsGitLinkRequestUrl;
|
||||
import com.microservices.dms.utils.DmsRequestHelper;
|
||||
import com.microservices.dms.utils.SimilarityService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 人才推荐服务
|
||||
*/
|
||||
@Service
|
||||
public class TalentReferralService {
|
||||
|
||||
@Autowired
|
||||
private TalentReferralMapper talentReferralMapper;
|
||||
|
||||
@Autowired
|
||||
private DmsRequestHelper dmsRequestHelper;
|
||||
|
||||
@Autowired
|
||||
private AchievementsMapper achievementsMapper;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(TalentReferralService.class);
|
||||
|
||||
public Set<Long> getContributors(String projectFullName) {
|
||||
try {
|
||||
// 获取项目贡献者数量
|
||||
JSONArray contributorsArray = dmsRequestHelper.getAllDataByPage(DmsGitLinkRequestUrl.CONTRIBUTORS(projectFullName), "list", "total_count");
|
||||
|
||||
return contributorsArray.stream().map(o -> (JSONObject) o).map(s -> s.getString("contributions")).filter(StringUtils::isNotBlank).mapToLong(Long::parseLong).boxed().collect(Collectors.toSet());
|
||||
|
||||
} catch (ServiceException e) {
|
||||
logger.error("【{}】获取项目贡献者数量失败:{}", projectFullName, e.getMessage());
|
||||
}
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
public Set<Long> getCollaborators(String projectFullName) {
|
||||
try {
|
||||
// 获取项目成员者数量
|
||||
JSONArray contributorsArray = dmsRequestHelper.getAllDataByPage(DmsGitLinkRequestUrl.QUERY_USER_FROM_PROJECT(projectFullName), "members", "total_count");
|
||||
|
||||
return contributorsArray.stream().map(o -> (JSONObject) o).map(s -> s.getString("id")).filter(StringUtils::isNotBlank).mapToLong(Long::parseLong).boxed().collect(Collectors.toSet());
|
||||
|
||||
} catch (ServiceException e) {
|
||||
logger.error("【{}】获取项目成员者数量失败:{}", projectFullName, e.getMessage());
|
||||
}
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
public String getRepoName(Long projectId) {
|
||||
// 获取仓库的fullName,用来查询贡献者
|
||||
String s = talentReferralMapper.selectRepositoriesUrl(projectId);
|
||||
return StringUtils.isNotEmpty(s) ? s : "";
|
||||
}
|
||||
|
||||
public Set<Long> getContributorsByProjectId(Long projectId) {
|
||||
Set<Long> contributors = new HashSet<>();
|
||||
String repoName = getRepoName(projectId);
|
||||
if (StringUtils.isNotBlank(repoName)) {
|
||||
contributors.addAll(getContributors(repoName));
|
||||
}
|
||||
return contributors;
|
||||
}
|
||||
|
||||
public Set<Long> getCollaboratorsByProjectId(Long projectId) {
|
||||
Set<Long> collaborators = new HashSet<>();
|
||||
String repoName = getRepoName(projectId);
|
||||
if (StringUtils.isNotBlank(repoName)) {
|
||||
collaborators.addAll(getCollaborators(repoName));
|
||||
}
|
||||
return collaborators;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> doIssueTalentReferral(Long issueId , Long projectId) {
|
||||
List<Map.Entry<Long, Double>> entries = issueTalentReferral(projectId, issueId);
|
||||
return entries.stream().limit(3).map(s -> {
|
||||
Map<String, Object> mm = talentReferralMapper.selectUsersById(s.getKey());
|
||||
return mm;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<Map.Entry<Long, Double>> issueTalentReferral(Long projectId, Long issueId) {
|
||||
|
||||
IssuesVo curIssue = talentReferralMapper.selectIssuesById(issueId);
|
||||
if (curIssue == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
List<Long> curIssueAssigners = talentReferralMapper.selectIssuesAssigners(curIssue.getId());
|
||||
if (!curIssueAssigners.isEmpty()) {
|
||||
// return new ArrayList<>();
|
||||
}
|
||||
|
||||
IssuesVo vo = new IssuesVo();
|
||||
vo.setProjectId(projectId);
|
||||
vo.setStatusIds(Lists.newArrayList(ReferralConstant.ISSUE_CLOSED,ReferralConstant.ISSUE_RESOLVED));
|
||||
List<IssuesVo> issuesVos = talentReferralMapper.selectIssuesCondition(vo);
|
||||
Map<Long, Double> userFractionMap = new HashMap<>();
|
||||
// 计算与解决issue的相似度, 标题+描述
|
||||
for (IssuesVo v : issuesVos) {
|
||||
String subject = v.getSubject();
|
||||
String description = v.getDescription();
|
||||
double subjectFraction = SimilarityService.sentence(subject, curIssue.getSubject());
|
||||
double descFraction = SimilarityService.text(description, curIssue.getDescription());
|
||||
//这个数据可以缓存下来
|
||||
List<Long> assigners = talentReferralMapper.selectIssuesAssigners(v.getId());
|
||||
for (Long assigner : assigners) {
|
||||
userFractionMap.merge(assigner, (subjectFraction + descFraction) * 60.0D, Double::sum);
|
||||
}
|
||||
}
|
||||
|
||||
// 计算每个负责人关闭的issues数量
|
||||
List<IssuesVo> assIs = talentReferralMapper.countIssuesAssigner(projectId);
|
||||
for (IssuesVo a : assIs) {
|
||||
userFractionMap.merge(a.getId(), a.getNum() * 40.0D, Double::sum);
|
||||
}
|
||||
|
||||
List<Map.Entry<Long, Double>> entryList = new ArrayList<>(userFractionMap.entrySet());
|
||||
entryList.sort((entry1, entry2) -> Double.compare(entry2.getValue(), entry1.getValue()));
|
||||
|
||||
Set<Long> contributors = getContributorsByProjectId(projectId);
|
||||
if (!contributors.isEmpty() && !entryList.isEmpty()) {
|
||||
entryList.removeIf(s -> !contributors.contains(s.getKey()));
|
||||
}
|
||||
return entryList;
|
||||
}
|
||||
|
||||
public List<Map.Entry<Long, Double>> PRTalentReferral(Long projectId, Long prId, List<IssueDto> prs) {
|
||||
|
||||
Map<Long, Double> userFractionMap = new HashMap<>();
|
||||
Map<String, Double> userNameFractionMap = new HashMap<>();
|
||||
Map<String, Set<String>> PRFilesMap = new HashMap<>();
|
||||
List<IssueDto> closedPullRequests = getPullRequests(projectId, "11").stream()
|
||||
.filter(e->StringUtils.isNotBlank(e.getAssignUserLogin())).collect(Collectors.toList());
|
||||
|
||||
for (IssueDto pr : prs) {
|
||||
PrInfoVo curPrInfoVo = talentReferralMapper.selectPRInfoById(pr.getPullRequestId());
|
||||
//关闭PR的对比
|
||||
for (IssueDto dto : closedPullRequests) {
|
||||
String reviewer = dto.getAssignUserLogin();
|
||||
Set<String> prFiles = getPRFiles(projectId, dto.getPullRequestNumber());
|
||||
PRFilesMap.merge(reviewer, prFiles, (a, b) -> {
|
||||
HashSet<String> set = new HashSet<>();
|
||||
set.addAll(a);
|
||||
set.addAll(b);
|
||||
return set;
|
||||
});
|
||||
|
||||
//标题、content匹配
|
||||
PrInfoVo prInfoVo = talentReferralMapper.selectPRInfoById(dto.getPullRequestId());
|
||||
double subjectFraction = SimilarityService.sentence(curPrInfoVo.getTitle(), prInfoVo.getTitle());
|
||||
double descFraction = SimilarityService.text(curPrInfoVo.getContent(), prInfoVo.getContent());
|
||||
//这个数据可以缓存下来
|
||||
userNameFractionMap.merge(dto.getAssignUserLogin(), (subjectFraction + descFraction) * 40.0D, Double::sum);
|
||||
}
|
||||
|
||||
Set<String> curPrFiles = getPRFiles(projectId, pr.getPullRequestNumber());
|
||||
for (String curPrFile : curPrFiles) {
|
||||
PRFilesMap.forEach((k, v) -> {
|
||||
if (v.contains(curPrFile)) {
|
||||
userNameFractionMap.merge(k, 30.0D, Double::sum);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 计算每个负责人关闭的 PR数量
|
||||
closedPullRequests.stream().map(IssueDto::getAssignUserLogin).forEach(s -> userNameFractionMap.merge(s, 30.0D, Double::sum));
|
||||
}
|
||||
|
||||
userNameFractionMap.forEach((k, v) -> {
|
||||
Long id = talentReferralMapper.selectIdByLogin(k);
|
||||
userFractionMap.put(id, v);
|
||||
});
|
||||
|
||||
List<Map.Entry<Long, Double>> entryList = new ArrayList<>(userFractionMap.entrySet());
|
||||
entryList.sort((entry1, entry2) -> Double.compare(entry2.getValue(), entry1.getValue()));
|
||||
|
||||
//必须是项目成员
|
||||
Set<Long> collaborators = getCollaboratorsByProjectId(projectId);
|
||||
if (!collaborators.isEmpty() && !entryList.isEmpty()) {
|
||||
entryList.removeIf(s -> !collaborators.contains(s.getKey()));
|
||||
}
|
||||
|
||||
return entryList;
|
||||
}
|
||||
|
||||
public List<IssueDto> getPullRequests(Long projectId, String statusType) {
|
||||
|
||||
String projectFullName = getRepoName(projectId);
|
||||
if (StringUtils.isEmpty(projectFullName)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
try {
|
||||
return dmsRequestHelper.getAllDataByPage(DmsGitLinkRequestUrl.GET_PULL_REQUEST(projectFullName, statusType), "issues", IssueDto.class);
|
||||
} catch (ServiceException e) {
|
||||
logger.error("【{}】获取PR失败:{}", projectFullName, e.getMessage());
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public Set<String> getPRFiles(Long projectId, int PRNum) {
|
||||
String projectFullName = getRepoName(projectId);
|
||||
if (StringUtils.isEmpty(projectFullName)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
try {
|
||||
JSONArray allDataByPage = dmsRequestHelper.getAllDataByPage(DmsGitLinkRequestUrl.GET_PR_FILES(projectFullName, PRNum), "files", "file_nums");
|
||||
return allDataByPage.stream().map(o -> (JSONObject) o).map(o -> (String) o.get("filename")).collect(Collectors.toSet());
|
||||
} catch (ServiceException e) {
|
||||
logger.error("【{}】获取PR文件失败:{}", projectFullName, e.getMessage());
|
||||
}
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> doPRTalentReferral(Long prId, Long projectId) {
|
||||
List<Map.Entry<Long, Double>> entries = PRTalentReferral(projectId, prId);
|
||||
return entries.stream().limit(3).map(s -> {
|
||||
Map<String, Object> mm = talentReferralMapper.selectUsersById(s.getKey());
|
||||
return mm;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<Map.Entry<Long, Double>> PRTalentReferral(Long projectId, Long prId) {
|
||||
List<IssueDto> openPullRequests = getPullRequests(projectId, "1");
|
||||
openPullRequests = openPullRequests.stream().filter(e -> StringUtils.isEmpty(e.getAssignUserLogin())).collect(Collectors.toList());
|
||||
|
||||
if (prId != null) {
|
||||
openPullRequests = openPullRequests.stream().filter(e -> Objects.equals((long) (e.getPullRequestId()), prId)).collect(Collectors.toList());
|
||||
return PRTalentReferral(projectId, prId, openPullRequests);
|
||||
}
|
||||
|
||||
return PRTalentReferral(projectId, null, openPullRequests);
|
||||
}
|
||||
|
||||
//定时统计
|
||||
public void projectsStatistic() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 1、先查找任务状态为成果征集中、成果评选中的数据,新增存储到数据表中
|
||||
* 2、获取系统中的任务领域和数据仓库中的领域是一样 ;50%
|
||||
* 3、根据1中任务标题和任务正文 与数据仓库中名称和简介、详情比较 ;取前10获取对比计算分值大于0的结果
|
||||
* 4、将2和3的结果相加,取前5个成果进行推荐
|
||||
*/
|
||||
public List<Achievements> taskAchievementTalentReferral(Long taskId) {
|
||||
TaskVo task = talentReferralMapper.selectTaskById(taskId);
|
||||
Achievements tCond = new Achievements();
|
||||
tCond.setSourceId(taskId);
|
||||
tCond.setSource("2");
|
||||
tCond.setStatus("1");
|
||||
List<Achievements> taskAchievements = achievementsMapper.selectAchievementsList(tCond);
|
||||
List<Achievements> result;
|
||||
|
||||
List<Long> trTaskIds = doTaskTalentReferral(task, taskAchievements);
|
||||
result = trTaskIds.stream().map(s -> taskAchievements.stream().filter(e -> e.getId().equals(s)).findFirst().orElse(null)).filter(Objects::nonNull).limit(5).collect(Collectors.toList());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<Long> doTaskTalentReferral(TaskVo task, List<Achievements> taskVos) {
|
||||
Long taskDomain = task.getCategoryId();
|
||||
Map<Long, Double> step1Map = new TreeMap<>();
|
||||
Map<Long, Double> step2Map = new TreeMap<>();
|
||||
for (Achievements t1 : taskVos) {
|
||||
if (Objects.equals(String.valueOf(taskDomain), t1.getField1())) {
|
||||
step1Map.put(t1.getId(), 50.0D);
|
||||
}
|
||||
double subjectFraction = SimilarityService.sentence(task.getName(), t1.getAchievementName());
|
||||
double descFraction = SimilarityService.text(t1.getSummary(), task.getDescription());
|
||||
step2Map.put(t1.getId(), (subjectFraction + descFraction) * 50.0D);
|
||||
}
|
||||
|
||||
step1Map.forEach((k, v) -> step2Map.merge(k, v, Double::sum));
|
||||
step2Map.keySet().removeIf(step -> Double.compare(step2Map.get(step), 0.0D) > 0);
|
||||
|
||||
List<Map.Entry<Long, Double>> entryList = new ArrayList<>(step2Map.entrySet());
|
||||
entryList.sort((entry1, entry2) -> Double.compare(entry2.getValue(), entry1.getValue()));
|
||||
|
||||
return entryList.stream().map(Map.Entry::getKey).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创客任务评审专家推荐
|
||||
* 1、先查找创客任务状态未结束,并且已加入评审的数据,新增存储到数据表中
|
||||
* 2、技术匹配度:系统中专家领域 与 任务是一样的领域 20%
|
||||
* 3、根据1中任务标题和任务描述 与专家简介进行比较 ,匹配结果分数,取前10;30%
|
||||
* 4、根据1中任务标题和任务描述 与已完成的任务标题与任务描述比较,匹配结果分数,取前3 ,前3个竞赛中对应的专家 分数*50%
|
||||
*/
|
||||
public Object taskExpertTalentReferral(Long taskId) {
|
||||
TaskVo task = talentReferralMapper.selectTaskById(taskId);
|
||||
List<KeyValueVo> categories = achievementsMapper.getAreasByName(null);
|
||||
List<TaskVo> completedTasks = talentReferralMapper.selectTaskByStatus(Lists.newArrayList(TaskConstant.TASK_COMPLETE_STATUS));
|
||||
List<ExpertVo> allExperts = talentReferralMapper.selectExpertsBy(new ExpertVo());
|
||||
|
||||
List<Long> expertIds = doTaskExpertTalentReferral(task, categories, completedTasks, allExperts);
|
||||
return expertIds.stream().map(s -> allExperts.stream().filter(e -> e.getId().equals(s)).findFirst().orElse(null)).filter(Objects::nonNull).limit(3).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<Long> doTaskExpertTalentReferral(TaskVo task, List<KeyValueVo> categories, List<TaskVo> completedTasks, List<ExpertVo> allExperts) {
|
||||
|
||||
Map<Long, String> v2k = categories.stream().collect(Collectors.toMap(KeyValueVo::getValue, KeyValueVo::getKey, (o, n) -> n));
|
||||
|
||||
String taskDomain = v2k.get(task.getCategoryId());
|
||||
Map<Long, Double> step1Map = new TreeMap<>();
|
||||
Map<Long, Double> step2Map = new TreeMap<>();
|
||||
for (ExpertVo t1 : allExperts) {
|
||||
if (Objects.equals(taskDomain, t1.getReviewAreaOne()) || Objects.equals(taskDomain, t1.getReviewAreaTwo()) || Objects.equals(taskDomain, t1.getReviewAreaThree())) {
|
||||
step1Map.put(t1.getId(), 50.0D);
|
||||
}
|
||||
}
|
||||
|
||||
List<KeyValVo<Long, String>> allTaskWithExpertIds = talentReferralMapper.allTaskWithExpertIds("1");
|
||||
Map<Long, String> t2e = allTaskWithExpertIds.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV, (o, n) -> n));
|
||||
for (TaskVo t2 : completedTasks) {
|
||||
double subjectFraction = SimilarityService.sentence(task.getName(), t2.getName());
|
||||
double descFraction = SimilarityService.text(t2.getDescription(), task.getDescription());
|
||||
|
||||
String[] split = t2e.getOrDefault(t2.getId(), "").split(",");
|
||||
for (String s : split) {
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
step2Map.put(Long.parseLong(s), (subjectFraction + descFraction) * 50.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
step1Map.forEach((k, v) -> step2Map.merge(k, v, Double::sum));
|
||||
|
||||
List<Map.Entry<Long, Double>> entryList = new ArrayList<>(step2Map.entrySet());
|
||||
entryList.sort((entry1, entry2) -> Double.compare(entry2.getValue(), entry1.getValue()));
|
||||
|
||||
return entryList.stream().map(Map.Entry::getKey).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 开源竞赛评审专家推荐
|
||||
* 1、先查找开放竞赛状态未结束,并且已提交评审的数据,新增存储到数据表中
|
||||
* 2、技术匹配度:系统中专家领域 与 竞赛是一样的领域 ; 20%
|
||||
* 3、根据1中竞赛标题和竞赛描述 与专家简介进行比较 ,匹配结果分数,取前10;30%
|
||||
* 4、根据1中竞赛标题和竞赛描述 与已完成的竞赛标题与竞赛描述比较,匹配结果分数,取前3 ,前3个竞赛中对应的专家;*50%
|
||||
*/
|
||||
public Object competitionExpertTalentReferral(Long competitionId) {
|
||||
TaskVo task = talentReferralMapper.selectCompetitionById(competitionId);
|
||||
List<KeyValueVo> categories = new ArrayList<>();
|
||||
List<TaskVo> completedTasks = talentReferralMapper.selectCompetitionIdByStatus();
|
||||
List<ExpertVo> allExperts = talentReferralMapper.selectExpertsBy(new ExpertVo());
|
||||
|
||||
List<Long> expertIds = doCompetitionExpertTalentReferral(task, categories, completedTasks, allExperts);
|
||||
return expertIds.stream().map(s -> allExperts.stream().filter(e -> e.getId().equals(s)).findFirst().orElse(null)).filter(Objects::nonNull).limit(3).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
private List<Long> doCompetitionExpertTalentReferral(TaskVo task, List<KeyValueVo> categories, List<TaskVo> completedTasks, List<ExpertVo> allExperts) {
|
||||
|
||||
Map<Long, Double> step1Map = new TreeMap<>();
|
||||
Map<Long, Double> step2Map = new TreeMap<>();
|
||||
|
||||
|
||||
List<KeyValVo<Long, String>> allTaskWithExpertIds = talentReferralMapper.allTaskWithExpertIds("2");
|
||||
Map<Long, String> t2e = allTaskWithExpertIds.stream().collect(Collectors.toMap(KeyValVo::getK, KeyValVo::getV, (o, n) -> n));
|
||||
for (TaskVo t2 : completedTasks) {
|
||||
double subjectFraction = SimilarityService.sentence(task.getName(), t2.getName());
|
||||
double descFraction = SimilarityService.text(t2.getDescription(), task.getDescription());
|
||||
|
||||
String[] split = t2e.getOrDefault(t2.getId(), "").split(",");
|
||||
for (String s : split) {
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
step2Map.put(Long.parseLong(s), (subjectFraction + descFraction) * 100.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
step1Map.forEach((k, v) -> step2Map.merge(k, v, Double::sum));
|
||||
|
||||
List<Map.Entry<Long, Double>> entryList = new ArrayList<>(step2Map.entrySet());
|
||||
entryList.sort((entry1, entry2) -> Double.compare(entry2.getValue(), entry1.getValue()));
|
||||
|
||||
return entryList.stream().map(Map.Entry::getKey).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExpertVo {
|
||||
Long id;
|
||||
Long userId;
|
||||
String expertName;
|
||||
String nickname;
|
||||
String reviewAreaOne;
|
||||
String reviewAreaTwo;
|
||||
String reviewAreaThree;
|
||||
Integer status;
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author otto
|
||||
*/
|
||||
@Data
|
||||
public class IssueDto {
|
||||
|
||||
@JsonProperty("pull_request_id")
|
||||
private int pullRequestId;
|
||||
@JsonProperty("pull_request_number")
|
||||
private int pullRequestNumber;
|
||||
@JsonProperty("pull_request_status")
|
||||
private int pullRequestStatus;
|
||||
@JsonProperty("pull_request_head")
|
||||
private String pullRequestHead;
|
||||
@JsonProperty("pull_request_base")
|
||||
private String pullRequestBase;
|
||||
@JsonProperty("pull_request_staus")
|
||||
private String pullRequestStaus;
|
||||
@JsonProperty("is_original")
|
||||
private boolean isOriginal;
|
||||
@JsonProperty("fork_project_id")
|
||||
private String forkProjectId;
|
||||
@JsonProperty("fork_project_identifier")
|
||||
private String forkProjectIdentifier;
|
||||
@JsonProperty("fork_project_user")
|
||||
private String forkProjectUser;
|
||||
@JsonProperty("fork_project_user_name")
|
||||
private String forkProjectUserName;
|
||||
private List<String> reviewers;
|
||||
private int id;
|
||||
private String name;
|
||||
@JsonProperty("pr_time")
|
||||
private String prTime;
|
||||
@JsonProperty("assign_user_name")
|
||||
private String assignUserName;
|
||||
@JsonProperty("assign_user_login")
|
||||
private String assignUserLogin;
|
||||
@JsonProperty("author_name")
|
||||
private String authorName;
|
||||
@JsonProperty("author_login")
|
||||
private String authorLogin;
|
||||
@JsonProperty("avatar_url")
|
||||
private String avatarUrl;
|
||||
private String priority;
|
||||
private String version;
|
||||
@JsonProperty("journals_count")
|
||||
private int journalsCount;
|
||||
@JsonProperty("issue_tags")
|
||||
private String issueTags;
|
||||
@JsonProperty("attached_issues")
|
||||
private List<String> attachedIssues;
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class IssuesVo {
|
||||
private Long id;
|
||||
private Long projectId;
|
||||
private String subject;
|
||||
private String description;
|
||||
private Long statusId;
|
||||
private List<Long> statusIds;
|
||||
private Long num;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PrInfoVo {
|
||||
private Long id;
|
||||
private String title;
|
||||
private String content;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PullRequestVo {
|
||||
private Long id;
|
||||
private Long projectId;
|
||||
private Long userId;
|
||||
private Long giteaNumber;
|
||||
private String title;
|
||||
private String description;
|
||||
private Long statusId;
|
||||
private List<Long> statusIds;
|
||||
private Long num;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.microservices.dms.referral.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TaskVo {
|
||||
private Long id;
|
||||
private Long taskId;
|
||||
private String name;
|
||||
private String description;
|
||||
private Long categoryId;
|
||||
private String identifier;
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package com.microservices.dms.resourceLibrary.controller;
|
||||
|
||||
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.dms.resourceLibrary.domain.*;
|
||||
import com.microservices.dms.resourceLibrary.service.TaskResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Api(tags = "数据管理体系-用户行为信息接口")
|
||||
@RestController
|
||||
@RequestMapping("/collectUserActData")
|
||||
@RequiredArgsConstructor
|
||||
public class CollectUserActDataController {
|
||||
|
||||
private final TaskResourceLibraryService taskResourceLibraryService;
|
||||
|
||||
@PostMapping("/addClicker")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "clickType", value = "点击类型(任务:makerSpaceTask、竞赛:CompetitionInfo、项目:Project、成果:Achievements、专家:Experts,校企:schoolEnterprise,成果用户对接:userDocking)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "clickId", value = "点击对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
@ApiOperation(value = "记录点击次数")
|
||||
public AjaxResult addTaskClick(@RequestBody Clicker clicker) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addClick(clicker));
|
||||
}
|
||||
|
||||
@PostMapping("/addDownloader")
|
||||
@ApiOperation(value = "记录下载次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "downloadType", value = "下载类型(任务:makerSpaceTask、竞赛作品:CompetitionOpusDownload、成果:Achievements、专家:Experts)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "downloadId", value = "下载对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
public AjaxResult addDownloader(@RequestBody Downloader downloader) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addDownloader(downloader));
|
||||
}
|
||||
|
||||
@PostMapping("/addSearcher")
|
||||
@ApiOperation(value = "记录搜索次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "searchType", value = "搜索类型(任务:makerSpaceTask、项目:Project、竞赛:CompetitionInfo)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "searchId", value = "搜索对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
public AjaxResult addSearcher(@RequestBody Searcher searcher) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addSearcher(searcher));
|
||||
}
|
||||
|
||||
@PostMapping("/addSearcher2")
|
||||
@ApiOperation(value = "记录搜索次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "searchType", value = "搜索类型(任务:makerSpaceTask、项目:Project、竞赛:CompetitionInfo)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "searchIds", value = "搜索对象ID,多个,分隔", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
public AjaxResult addSearcher2(@RequestBody Searcher searcher) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addSearcher2(searcher));
|
||||
}
|
||||
|
||||
@PostMapping("/addFavorite")
|
||||
@ApiOperation(value = "记录收藏次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "favoriteType", value = "收藏类型(成果:Achievements、专家:Experts)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "favoriteId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
public AjaxResult addFavorite(@RequestBody Favorite favorite) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addFavorite(favorite));
|
||||
}
|
||||
|
||||
@PostMapping("/addWatcher")
|
||||
@ApiOperation(value = "记录关注次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "favoriteType", value = "关注类型(成果:Achievements、专家:Experts)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "favoriteId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "extInfo", value = "补充信息", paramType = "query", dataTypeClass = String.class)
|
||||
})
|
||||
public AjaxResult addFavorite(@RequestBody Watcher watcher) {
|
||||
return AjaxResult.success(taskResourceLibraryService.addWatcher(watcher));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delFavorite")
|
||||
@ApiOperation(value = "删除收藏次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "favoriteType", value = "收藏类型(成果:Achievements、专家:Experts)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "favoriteId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public AjaxResult delFavorite(Favorite favorite) {
|
||||
return AjaxResult.success(taskResourceLibraryService.delFavorite(favorite));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delWatcher")
|
||||
@ApiOperation(value = "删除关注次数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "favoriteType", value = "关注类型(成果:Achievements、专家:Experts)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "favoriteId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public AjaxResult delWatcher(Watcher watcher) {
|
||||
return AjaxResult.success(taskResourceLibraryService.delWatcher(watcher));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
package com.microservices.dms.resourceLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.PageUtils;
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.CompetitionListVo;
|
||||
import com.microservices.dms.resourceLibrary.service.CompetitionResourceLibraryService;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.service.TaskResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
import static com.microservices.common.core.utils.PageUtils.startPage;
|
||||
import static com.microservices.common.core.web.domain.AjaxResult.success;
|
||||
|
||||
@Api(tags = "数据管理体系-竞赛资源库接口")
|
||||
@RestController
|
||||
@RequestMapping("/competitionResourceLibrary")
|
||||
@RequiredArgsConstructor
|
||||
public class CompetitionResourceLibraryController extends BaseController {
|
||||
|
||||
private final TaskResourceLibraryService taskResourceLibraryService;
|
||||
private final CompetitionResourceLibraryService competitionResourceLibraryService;
|
||||
|
||||
@GetMapping("/selectRegisterCondition")
|
||||
@ApiOperation(value = "查询用户报名")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectRegisterCondition(UserActionDataVo taskJournals) {
|
||||
startPage();
|
||||
List<UserActionDataVo> userActionDataVos = competitionResourceLibraryService.selectRegisterCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("/selectOpusCondition")
|
||||
@ApiOperation(value = "查询用户作品")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "status", value = "状态3", paramType = "query", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectOpusCondition(UserActionDataVo taskJournals) {
|
||||
startPage();
|
||||
List<UserActionDataVo> userActionDataVos = competitionResourceLibraryService.selectOpusCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("/selectCompetitionListCondition")
|
||||
@ApiOperation(value = "查询竞赛作品列表")
|
||||
public GenericsTableDataInfo<CompetitionListVo> selectCompetitionListCondition(CompetitionListVo taskJournals) {
|
||||
startPage();
|
||||
List<CompetitionListVo> userActionDataVos = competitionResourceLibraryService.selectCompetitionListCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
startPage();
|
||||
List<CompetitionResourceLibrary> list = competitionResourceLibraryService.selectCompetitionResourceLibraryList(competitionResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
List<CompetitionResourceLibrary> list = competitionResourceLibraryService.selectCompetitionResourceLibraryList(competitionResourceLibrary);
|
||||
ExcelUtil<CompetitionResourceLibrary> util = new ExcelUtil<CompetitionResourceLibrary>(CompetitionResourceLibrary.class);
|
||||
util.exportExcel(response, list, "数据");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(competitionResourceLibraryService.selectCompetitionResourceLibraryById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
return success(competitionResourceLibraryService.insertCompetitionResourceLibrary(competitionResourceLibrary));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
return success(competitionResourceLibraryService.updateCompetitionResourceLibrary(competitionResourceLibrary));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return success(competitionResourceLibraryService.deleteCompetitionResourceLibraryByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回开放竞赛总数
|
||||
*
|
||||
* @return 开放竞赛总数
|
||||
*/
|
||||
@ApiOperation(value = "返回开放竞赛总数")
|
||||
@GetMapping(value = "/getTotalOpenCompetitions")
|
||||
public AjaxResult getTotalOpenCompetitions() {
|
||||
// 这里替换成你的实际逻辑,例如从数据库查询
|
||||
return AjaxResult.success(competitionResourceLibraryService.getTotalOpenCompetitions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回竞赛转换成果数
|
||||
*
|
||||
* @return 竞赛转换成果数
|
||||
*/
|
||||
@ApiOperation(value = "返回竞赛转换成果数")
|
||||
@GetMapping(value = "/getTotalCompetitionAchievements")
|
||||
public AjaxResult getTotalCompetitionAchievements() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return AjaxResult.success(competitionResourceLibraryService.getTotalCompetitionAchievements());
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回竞赛提交作品数
|
||||
*
|
||||
* @return 竞赛提交作品数
|
||||
*/
|
||||
@ApiOperation(value = "返回竞赛提交作品数")
|
||||
@GetMapping(value = "/getTotalCompetitionSubmissions")
|
||||
public AjaxResult getTotalCompetitionSubmissions() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return AjaxResult.success(competitionResourceLibraryService.getTotalCompetitionSubmissions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回已结束竞赛数
|
||||
*
|
||||
* @return 已结束竞赛数
|
||||
*/
|
||||
@ApiOperation(value = "返回已结束竞赛数")
|
||||
@GetMapping(value = "/getTotalFinishedCompetitions")
|
||||
public AjaxResult getTotalFinishedCompetitions() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return AjaxResult.success(competitionResourceLibraryService.getTotalFinishedCompetitions());
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回需评审竞赛数
|
||||
*
|
||||
* @return 需评审竞赛数
|
||||
*/
|
||||
@ApiOperation(value = "需评审竞赛数")
|
||||
@GetMapping(value = "/getReviewCompetitionCount")
|
||||
public AjaxResult getReviewCompetitionCount() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return AjaxResult.success(competitionResourceLibraryService.getReviewCompetitionCount());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
package com.microservices.dms.resourceLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.service.IExpertResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专家资源库Controller
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Api(tags = "数据管理体系-优质专家库")
|
||||
@RestController
|
||||
@RequestMapping("/expertResourceLibrary")
|
||||
public class ExpertResourceLibraryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExpertResourceLibraryService expertResourceLibraryService;
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
startPage();
|
||||
List<ExpertResourceLibrary> list = expertResourceLibraryService.selectExpertResourceLibraryList(expertResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*/
|
||||
@GetMapping("/listFront")
|
||||
public TableDataInfo listFront(ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
startPage();
|
||||
List<ExpertResourceLibrary> list = expertResourceLibraryService.selectExpertResourceLibraryList2(expertResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出专家资源库列表
|
||||
*/
|
||||
@Log(title = "专家资源库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
List<ExpertResourceLibrary> list = expertResourceLibraryService.selectExpertResourceLibraryList(expertResourceLibrary);
|
||||
ExcelUtil<ExpertResourceLibrary> util = new ExcelUtil<ExpertResourceLibrary>(ExpertResourceLibrary.class);
|
||||
util.exportExcel(response, list, "专家资源库数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专家资源库详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(expertResourceLibraryService.selectExpertResourceLibraryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增专家资源库
|
||||
*/
|
||||
@Log(title = "专家资源库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
return toAjax(expertResourceLibraryService.insertExpertResourceLibrary(expertResourceLibrary));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改专家资源库
|
||||
*/
|
||||
@Log(title = "专家资源库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExpertResourceLibrary expertResourceLibrary)
|
||||
{
|
||||
return toAjax(expertResourceLibraryService.updateExpertResourceLibrary(expertResourceLibrary));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专家资源库
|
||||
*/
|
||||
@Log(title = "专家资源库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(expertResourceLibraryService.deleteExpertResourceLibraryByIds(ids));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "评审专家数")
|
||||
@GetMapping("/auditExpertCount")
|
||||
public AjaxResult auditExpertCount()
|
||||
{
|
||||
return AjaxResult.success(expertResourceLibraryService.auditExpertCount());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "竞赛评审数")
|
||||
@GetMapping("/competitionAuditCount")
|
||||
public AjaxResult competitionAuditCount()
|
||||
{
|
||||
return AjaxResult.success(expertResourceLibraryService.competitionAuditCount());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务评审数")
|
||||
@GetMapping("/taskAuditCount")
|
||||
public AjaxResult taskAuditCount()
|
||||
{
|
||||
return AjaxResult.success(expertResourceLibraryService.taskAuditCount());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据当前用户以及专家ID,获取当前专家的 是否收藏与关注状态")
|
||||
@GetMapping("/getWatchFavoriteStatusById")
|
||||
public AjaxResult getWatchFavoriteStatusById(Long id, Long userId) {
|
||||
return success(expertResourceLibraryService.getWatchFavoriteStatusById(id, userId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据成果ID,获取专家的相关行为数据统计(点击量、搜索量、附件下载量、收藏、关注)")
|
||||
@GetMapping("/getActDataStatisticById")
|
||||
public AjaxResult getActDataStatisticById(Long id) {
|
||||
return success(expertResourceLibraryService.getActDataStatisticById(id));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
package com.microservices.dms.resourceLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.PageUtils;
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ProjectResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.ProjectListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.TaskListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.service.ProjectResourceLibraryService;
|
||||
import com.microservices.dms.resourceLibrary.service.TaskResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "数据管理体系-项目资源库接口")
|
||||
@RestController
|
||||
@RequestMapping("/projectResourceLibrary/")
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectResourceLibraryController extends BaseController {
|
||||
|
||||
private final ProjectResourceLibraryService projectResourceLibraryService;
|
||||
|
||||
@GetMapping("selectSearcherCondition")
|
||||
@ApiOperation(value = "查询用户搜索")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(Project)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectSearcherCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectSearchCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectCodeCommitCondition")
|
||||
@ApiOperation(value = "查询用户提交")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectCodeCommitCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectCodeCommitCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectForkCondition")
|
||||
@ApiOperation(value = "查询用户Fork")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectForkCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectForkCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectIssueCondition")
|
||||
@ApiOperation(value = "查询用户Issue")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectIssueCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectIssueCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectPRCondition")
|
||||
@ApiOperation(value = "查询用户PR")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectPRCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectPRCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectPraisesCondition")
|
||||
@ApiOperation(value = "查询用户点赞")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(Project)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = Integer.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectPraisesCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = projectResourceLibraryService.selectPraisesCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectProjectListCondition")
|
||||
@ApiOperation(value = "查询项目统计列表")
|
||||
public GenericsTableDataInfo<ProjectListVo> selectProjectListCondition(ProjectListVo projectListVo) {
|
||||
PageUtils.startPage();
|
||||
List<ProjectListVo> userActionDataVos = projectResourceLibraryService.selectProjectListCondition(projectListVo);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询项目资源库-列表")
|
||||
@GetMapping(value = "/list")
|
||||
public TableDataInfo list(ProjectResourceLibrary projectResourceLibrary) {
|
||||
startPage();
|
||||
List<ProjectResourceLibrary> list = projectResourceLibraryService.selectProjectResourceLibraryList(projectResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProjectResourceLibrary projectResourceLibrary) {
|
||||
List<ProjectResourceLibrary> list = projectResourceLibraryService.selectProjectResourceLibraryList(projectResourceLibrary);
|
||||
ExcelUtil<ProjectResourceLibrary> util = new ExcelUtil<ProjectResourceLibrary>(ProjectResourceLibrary.class);
|
||||
util.exportExcel(response, list, "数据");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(projectResourceLibraryService.selectProjectResourceLibraryById(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProjectResourceLibrary projectResourceLibrary) {
|
||||
return AjaxResult.success(projectResourceLibraryService.insertProjectResourceLibrary(projectResourceLibrary));
|
||||
}
|
||||
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProjectResourceLibrary projectResourceLibrary) {
|
||||
return AjaxResult.success(projectResourceLibraryService.updateProjectResourceLibrary(projectResourceLibrary));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return AjaxResult.success(projectResourceLibraryService.deleteProjectResourceLibraryByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "项目转换成果数")
|
||||
@GetMapping(value = "/getTotalConversionCount")
|
||||
public AjaxResult getTotalConversionCount() {
|
||||
return success(projectResourceLibraryService.getTotalConversionCount());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "项目公开数")
|
||||
@GetMapping(value = "/getPublicProjectCount")
|
||||
public AjaxResult getPublicProjectCount() {
|
||||
return success(projectResourceLibraryService.getPublicProjectCount());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "项目发布版本数")
|
||||
@GetMapping(value = "/getTotalReleaseCount")
|
||||
public AjaxResult getTotalReleaseCount() {
|
||||
return success(projectResourceLibraryService.getTotalReleaseCount());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "项目总数")
|
||||
@GetMapping(value = "/getTotalProjectCount")
|
||||
public AjaxResult getTotalProjectCount() {
|
||||
return success(projectResourceLibraryService.getTotalProjectCount());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
package com.microservices.dms.resourceLibrary.controller;
|
||||
|
||||
import com.microservices.common.core.utils.PageUtils;
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.dms.resourceLibrary.domain.TaskResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.TaskListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.service.TaskResourceLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "数据管理体系-任务资源库接口")
|
||||
@RestController
|
||||
@RequestMapping("/taskResourceLibrary")
|
||||
@RequiredArgsConstructor
|
||||
public class TaskResourceLibraryController extends BaseController {
|
||||
|
||||
private final TaskResourceLibraryService taskResourceLibraryService;
|
||||
|
||||
|
||||
@GetMapping("/selectTaskJournalsCondition")
|
||||
@ApiOperation(value = "查询用户评论")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:makerSpaceTask)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectTaskJournalsCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectTaskJournalsCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectClickerCondition")
|
||||
@ApiOperation(value = "查询用户点击")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:makerSpaceTask)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectClickerCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectClickerCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectDownloaderCondition")
|
||||
@ApiOperation(value = "查询用户下载")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:makerSpaceTask)", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectDownloaderCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectDownloaderCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectVisitCondition")
|
||||
@ApiOperation(value = "查询用户点击")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:makerSpaceTask)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectVisitCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectVisitCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectPapersCondition")
|
||||
@ApiOperation(value = "查询用户交稿")
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectPapersCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectPapersCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectWatcherCondition")
|
||||
@ApiOperation(value = "查询用户关注")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:MakerTask)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectWatcherCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectWatcherCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectSearcherCondition")
|
||||
@ApiOperation(value = "查询用户搜索")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemType", value = "类型(任务:makerSpaceTask)", paramType = "query", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "itemId", value = "对象ID", paramType = "query", dataTypeClass = String.class),
|
||||
})
|
||||
public GenericsTableDataInfo<UserActionDataVo> selectSearcherCondition(UserActionDataVo taskJournals) {
|
||||
PageUtils.startPage();
|
||||
List<UserActionDataVo> userActionDataVos = taskResourceLibraryService.selectSearcherCondition(taskJournals);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("selectTaskListCondition")
|
||||
@ApiOperation(value = "查询任务列表")
|
||||
public GenericsTableDataInfo<TaskListVo> selectTaskListCondition(TaskListVo taskListVo) {
|
||||
PageUtils.startPage();
|
||||
List<TaskListVo> userActionDataVos = taskResourceLibraryService.selectTaskListCondition(taskListVo);
|
||||
return PageUtils.toPage(userActionDataVos);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TaskResourceLibrary taskResourceLibrary) {
|
||||
startPage();
|
||||
List<TaskResourceLibrary> list = taskResourceLibraryService.selectTaskResourceLibraryList(taskResourceLibrary);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TaskResourceLibrary taskResourceLibrary) {
|
||||
List<TaskResourceLibrary> list = taskResourceLibraryService.selectTaskResourceLibraryList(taskResourceLibrary);
|
||||
ExcelUtil<TaskResourceLibrary> util = new ExcelUtil<TaskResourceLibrary>(TaskResourceLibrary.class);
|
||||
util.exportExcel(response, list, "数据");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(taskResourceLibraryService.selectTaskResourceLibraryById(id));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TaskResourceLibrary taskResourceLibrary) {
|
||||
return AjaxResult.success(taskResourceLibraryService.insertTaskResourceLibrary(taskResourceLibrary));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TaskResourceLibrary taskResourceLibrary) {
|
||||
return AjaxResult.success(taskResourceLibraryService.updateTaskResourceLibrary(taskResourceLibrary));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return AjaxResult.success(taskResourceLibraryService.deleteTaskResourceLibraryByIds(ids));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getTotalTasks")
|
||||
@ApiOperation(value = "获取任务总数")
|
||||
public AjaxResult getTotalTasks() {
|
||||
return success(taskResourceLibraryService.getTotalTasks());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getConvertedTaskAmount")
|
||||
@ApiOperation(value = "获取转换成果任务金额")
|
||||
public AjaxResult getConvertedTaskAmount() {
|
||||
return success(taskResourceLibraryService.getConvertedTaskAmount());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getConvertedTasksCount")
|
||||
@ApiOperation(value = "获取任务转换成果数")
|
||||
public AjaxResult getConvertedTasksCount() {
|
||||
return success(taskResourceLibraryService.getConvertedTasksCount());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getTaskAmount")
|
||||
@ApiOperation(value = "获取任务金额")
|
||||
public AjaxResult getTaskAmount() {
|
||||
return success(taskResourceLibraryService.getTaskAmount());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/getReviewTaskCount")
|
||||
@ApiOperation(value = "需评审任务数")
|
||||
public AjaxResult getReviewTaskCount() {
|
||||
return success(taskResourceLibraryService.getReviewTaskCount());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Clicker{
|
||||
private Long id;
|
||||
private String clickType;
|
||||
private Long clickId;
|
||||
private Long userId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private String extInfo;
|
||||
}
|
||||
|
|
@ -0,0 +1,297 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
||||
/**
|
||||
* @author microservices
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
public class CompetitionResourceLibrary extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
/**
|
||||
* 开放竞赛ID
|
||||
*/
|
||||
private Long openCompetitionId;
|
||||
/**
|
||||
* 开放竞赛名称
|
||||
*/
|
||||
private String openCompetitionName;
|
||||
/**
|
||||
* 开放竞赛创建者
|
||||
*/
|
||||
private Long competitionUserId;
|
||||
/**
|
||||
* 竞赛领域
|
||||
*/
|
||||
private String competitionField;
|
||||
/**
|
||||
* 竞赛状态 status: 0 未上架 1上架
|
||||
*/
|
||||
private String competitionStatus;
|
||||
/**
|
||||
* 竞赛提交名称
|
||||
*/
|
||||
private String competitionSubmissionName;
|
||||
/**
|
||||
* 作品提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date submissionTime;
|
||||
/**
|
||||
* 提交者
|
||||
*/
|
||||
private String submitter;
|
||||
/**
|
||||
* 提交类型
|
||||
*/
|
||||
private String submissionType;
|
||||
/**
|
||||
* 提交单位
|
||||
*/
|
||||
private String submittingUnit;
|
||||
/**
|
||||
* 竞赛提交摘要
|
||||
*/
|
||||
private String submissionSummary;
|
||||
/**
|
||||
* 竞赛提交详情
|
||||
*/
|
||||
private String submissionDetails;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactPerson;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 是否已转入成果库 0否 1是
|
||||
*/
|
||||
private Integer isTransferredToResultLibrary;
|
||||
/**
|
||||
* 转入成果库时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date transferredToResultLibraryTime;
|
||||
/**
|
||||
* 是否精选成果
|
||||
*/
|
||||
private Integer isFeaturedResult;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
/**
|
||||
* 专家审核
|
||||
*/
|
||||
private Integer isExpertAudit;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String attachment;
|
||||
private String leader;
|
||||
private String identifier;
|
||||
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(String identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
}
|
||||
|
||||
public void setLeader(String leader) {
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
private List<KeyValVo<String, String>> attachmentList = new ArrayList<>();
|
||||
|
||||
public Integer getIsExpertAudit() {
|
||||
return isExpertAudit;
|
||||
}
|
||||
|
||||
public void setIsExpertAudit(Integer isExpertAudit) {
|
||||
this.isExpertAudit = isExpertAudit;
|
||||
}
|
||||
|
||||
public List<KeyValVo<String, String>> getAttachmentList() {
|
||||
return attachmentList;
|
||||
}
|
||||
|
||||
public void setAttachmentList(List<KeyValVo<String, String>> attachmentList) {
|
||||
this.attachmentList = attachmentList;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setOpenCompetitionId(Long openCompetitionId) {
|
||||
this.openCompetitionId = openCompetitionId;
|
||||
}
|
||||
|
||||
public Long getOpenCompetitionId() {
|
||||
return openCompetitionId;
|
||||
}
|
||||
|
||||
public void setOpenCompetitionName(String openCompetitionName) {
|
||||
this.openCompetitionName = openCompetitionName;
|
||||
}
|
||||
|
||||
public String getOpenCompetitionName() {
|
||||
return openCompetitionName;
|
||||
}
|
||||
|
||||
public void setCompetitionUserId(Long competitionUserId) {
|
||||
this.competitionUserId = competitionUserId;
|
||||
}
|
||||
|
||||
public Long getCompetitionUserId() {
|
||||
return competitionUserId;
|
||||
}
|
||||
|
||||
public void setCompetitionField(String competitionField) {
|
||||
this.competitionField = competitionField;
|
||||
}
|
||||
|
||||
public String getCompetitionField() {
|
||||
return competitionField;
|
||||
}
|
||||
|
||||
public void setCompetitionStatus(String competitionStatus) {
|
||||
this.competitionStatus = competitionStatus;
|
||||
}
|
||||
|
||||
public String getCompetitionStatus() {
|
||||
return competitionStatus;
|
||||
}
|
||||
|
||||
public void setCompetitionSubmissionName(String competitionSubmissionName) {
|
||||
this.competitionSubmissionName = competitionSubmissionName;
|
||||
}
|
||||
|
||||
public String getCompetitionSubmissionName() {
|
||||
return competitionSubmissionName;
|
||||
}
|
||||
|
||||
public void setSubmissionTime(Date submissionTime) {
|
||||
this.submissionTime = submissionTime;
|
||||
}
|
||||
|
||||
public Date getSubmissionTime() {
|
||||
return submissionTime;
|
||||
}
|
||||
|
||||
public void setSubmitter(String submitter) {
|
||||
this.submitter = submitter;
|
||||
}
|
||||
|
||||
public String getSubmitter() {
|
||||
return submitter;
|
||||
}
|
||||
|
||||
public void setSubmissionType(String submissionType) {
|
||||
this.submissionType = submissionType;
|
||||
}
|
||||
|
||||
public String getSubmissionType() {
|
||||
return submissionType;
|
||||
}
|
||||
|
||||
public void setSubmittingUnit(String submittingUnit) {
|
||||
this.submittingUnit = submittingUnit;
|
||||
}
|
||||
|
||||
public String getSubmittingUnit() {
|
||||
return submittingUnit;
|
||||
}
|
||||
|
||||
public void setSubmissionSummary(String submissionSummary) {
|
||||
this.submissionSummary = submissionSummary;
|
||||
}
|
||||
|
||||
public String getSubmissionSummary() {
|
||||
return submissionSummary;
|
||||
}
|
||||
|
||||
public void setSubmissionDetails(String submissionDetails) {
|
||||
this.submissionDetails = submissionDetails;
|
||||
}
|
||||
|
||||
public String getSubmissionDetails() {
|
||||
return submissionDetails;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setIsTransferredToResultLibrary(Integer isTransferredToResultLibrary) {
|
||||
this.isTransferredToResultLibrary = isTransferredToResultLibrary;
|
||||
}
|
||||
|
||||
public Integer getIsTransferredToResultLibrary() {
|
||||
return isTransferredToResultLibrary;
|
||||
}
|
||||
|
||||
public void setTransferredToResultLibraryTime(Date transferredToResultLibraryTime) {
|
||||
this.transferredToResultLibraryTime = transferredToResultLibraryTime;
|
||||
}
|
||||
|
||||
public Date getTransferredToResultLibraryTime() {
|
||||
return transferredToResultLibraryTime;
|
||||
}
|
||||
|
||||
public void setIsFeaturedResult(Integer isFeaturedResult) {
|
||||
this.isFeaturedResult = isFeaturedResult;
|
||||
}
|
||||
|
||||
public Integer getIsFeaturedResult() {
|
||||
return isFeaturedResult;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setAttachment(String attachment) {
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
public String getAttachment() {
|
||||
return attachment;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Downloader {
|
||||
private Long id;
|
||||
private String downloadType;
|
||||
private Long downloadId;
|
||||
private Long userId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private String extInfo;
|
||||
}
|
|
@ -0,0 +1,372 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 专家资源库对象 expert_resource_library
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
public class ExpertResourceLibrary extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long expertId;
|
||||
private Long id;
|
||||
//专家ID
|
||||
private Long userId;
|
||||
//专家名称
|
||||
private String expertName;
|
||||
//最高学历
|
||||
private String highestDegree;
|
||||
//毕业院校
|
||||
private String graduatedFrom;
|
||||
//身份证
|
||||
private String idNumber;
|
||||
|
||||
private String major;
|
||||
//工作单位
|
||||
private String workplace;
|
||||
//电话
|
||||
private String phone;
|
||||
|
||||
private String workplaceType;
|
||||
//邮箱
|
||||
private String expertEmail;
|
||||
//专家简介
|
||||
private String expertSummary;
|
||||
//专家详情
|
||||
private String expertDetail;
|
||||
|
||||
private String professionalTitle;
|
||||
|
||||
private String expertType;
|
||||
//专家领域
|
||||
private String expertDomain;
|
||||
|
||||
private String titleRank;
|
||||
|
||||
private Long status;
|
||||
//评审领域1
|
||||
private String reviewAreaOne;
|
||||
//评审领域2
|
||||
private String reviewAreaTwo;
|
||||
//评审领域3
|
||||
private String reviewAreaThree;
|
||||
//领域查询条件
|
||||
private String areaQuery;
|
||||
|
||||
private Integer isDelete;
|
||||
|
||||
private Long expertAuth;
|
||||
|
||||
private Integer sortNo;
|
||||
|
||||
private Long taskAuditCount;
|
||||
|
||||
private Long competitionAuditCount;
|
||||
|
||||
private String images;
|
||||
private String attachments;
|
||||
private Long watcherSum;
|
||||
private Long favoriteSum;
|
||||
|
||||
private String userImg;
|
||||
private String userNickName;
|
||||
private String otherAttachments;
|
||||
|
||||
public String getOtherAttachments() {
|
||||
return otherAttachments;
|
||||
}
|
||||
|
||||
public void setOtherAttachments(String otherAttachments) {
|
||||
this.otherAttachments = otherAttachments;
|
||||
}
|
||||
|
||||
public String getUserImg() {
|
||||
return userImg;
|
||||
}
|
||||
|
||||
public void setUserImg(String userImg) {
|
||||
this.userImg = userImg;
|
||||
}
|
||||
|
||||
public String getUserNickName() {
|
||||
return userNickName;
|
||||
}
|
||||
|
||||
public void setUserNickName(String userNickName) {
|
||||
this.userNickName = userNickName;
|
||||
}
|
||||
|
||||
public String getAreaQuery() {
|
||||
return areaQuery;
|
||||
}
|
||||
|
||||
public void setAreaQuery(String areaQuery) {
|
||||
this.areaQuery = areaQuery;
|
||||
}
|
||||
|
||||
public Long getWatcherSum() {
|
||||
return watcherSum;
|
||||
}
|
||||
|
||||
public void setWatcherSum(Long watcherSum) {
|
||||
this.watcherSum = watcherSum;
|
||||
}
|
||||
|
||||
public Long getFavoriteSum() {
|
||||
return favoriteSum;
|
||||
}
|
||||
|
||||
public void setFavoriteSum(Long favoriteSum) {
|
||||
this.favoriteSum = favoriteSum;
|
||||
}
|
||||
|
||||
public String getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public Long getExpertAuth() {
|
||||
return expertAuth;
|
||||
}
|
||||
|
||||
public void setExpertAuth(Long expertAuth) {
|
||||
this.expertAuth = expertAuth;
|
||||
}
|
||||
|
||||
public Long getTaskAuditCount() {
|
||||
return taskAuditCount;
|
||||
}
|
||||
|
||||
public void setTaskAuditCount(Long taskAuditCount) {
|
||||
this.taskAuditCount = taskAuditCount;
|
||||
}
|
||||
|
||||
public Long getCompetitionAuditCount() {
|
||||
return competitionAuditCount;
|
||||
}
|
||||
|
||||
public void setCompetitionAuditCount(Long competitionAuditCount) {
|
||||
this.competitionAuditCount = competitionAuditCount;
|
||||
}
|
||||
|
||||
public String gender;
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Integer getSortNo() {
|
||||
return sortNo;
|
||||
}
|
||||
|
||||
public void setSortNo(Integer sortNo) {
|
||||
this.sortNo = sortNo;
|
||||
}
|
||||
|
||||
public Long getExpertId() {
|
||||
return expertId;
|
||||
}
|
||||
|
||||
public void setExpertId(Long expertId) {
|
||||
this.expertId = expertId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setExpertName(String expertName) {
|
||||
this.expertName = expertName;
|
||||
}
|
||||
|
||||
public String getExpertName() {
|
||||
return expertName;
|
||||
}
|
||||
|
||||
public void setHighestDegree(String highestDegree) {
|
||||
this.highestDegree = highestDegree;
|
||||
}
|
||||
|
||||
public String getHighestDegree() {
|
||||
return highestDegree;
|
||||
}
|
||||
|
||||
public void setGraduatedFrom(String graduatedFrom) {
|
||||
this.graduatedFrom = graduatedFrom;
|
||||
}
|
||||
|
||||
public String getGraduatedFrom() {
|
||||
return graduatedFrom;
|
||||
}
|
||||
|
||||
public void setIdNumber(String idNumber) {
|
||||
this.idNumber = idNumber;
|
||||
}
|
||||
|
||||
public String getIdNumber() {
|
||||
return idNumber;
|
||||
}
|
||||
|
||||
public void setMajor(String major) {
|
||||
this.major = major;
|
||||
}
|
||||
|
||||
public String getMajor() {
|
||||
return major;
|
||||
}
|
||||
|
||||
public void setWorkplace(String workplace) {
|
||||
this.workplace = workplace;
|
||||
}
|
||||
|
||||
public String getWorkplace() {
|
||||
return workplace;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setWorkplaceType(String workplaceType) {
|
||||
this.workplaceType = workplaceType;
|
||||
}
|
||||
|
||||
public String getWorkplaceType() {
|
||||
return workplaceType;
|
||||
}
|
||||
|
||||
public void setExpertEmail(String expertEmail) {
|
||||
this.expertEmail = expertEmail;
|
||||
}
|
||||
|
||||
public String getExpertEmail() {
|
||||
return expertEmail;
|
||||
}
|
||||
|
||||
public void setExpertSummary(String expertSummary) {
|
||||
this.expertSummary = expertSummary;
|
||||
}
|
||||
|
||||
public String getExpertSummary() {
|
||||
return expertSummary;
|
||||
}
|
||||
|
||||
public void setExpertDetail(String expertDetail) {
|
||||
this.expertDetail = expertDetail;
|
||||
}
|
||||
|
||||
public String getExpertDetail() {
|
||||
return expertDetail;
|
||||
}
|
||||
|
||||
public void setProfessionalTitle(String professionalTitle) {
|
||||
this.professionalTitle = professionalTitle;
|
||||
}
|
||||
|
||||
public String getProfessionalTitle() {
|
||||
return professionalTitle;
|
||||
}
|
||||
|
||||
public void setExpertType(String expertType) {
|
||||
this.expertType = expertType;
|
||||
}
|
||||
|
||||
public String getExpertType() {
|
||||
return expertType;
|
||||
}
|
||||
|
||||
public void setExpertDomain(String expertDomain) {
|
||||
this.expertDomain = expertDomain;
|
||||
}
|
||||
|
||||
public String getExpertDomain() {
|
||||
return expertDomain;
|
||||
}
|
||||
|
||||
public void setTitleRank(String titleRank) {
|
||||
this.titleRank = titleRank;
|
||||
}
|
||||
|
||||
public String getTitleRank() {
|
||||
return titleRank;
|
||||
}
|
||||
|
||||
public void setStatus(Long status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setReviewAreaOne(String reviewAreaOne) {
|
||||
this.reviewAreaOne = reviewAreaOne;
|
||||
}
|
||||
|
||||
public String getReviewAreaOne() {
|
||||
return reviewAreaOne;
|
||||
}
|
||||
|
||||
public void setReviewAreaTwo(String reviewAreaTwo) {
|
||||
this.reviewAreaTwo = reviewAreaTwo;
|
||||
}
|
||||
|
||||
public String getReviewAreaTwo() {
|
||||
return reviewAreaTwo;
|
||||
}
|
||||
|
||||
public void setReviewAreaThree(String reviewAreaThree) {
|
||||
this.reviewAreaThree = reviewAreaThree;
|
||||
}
|
||||
|
||||
public String getReviewAreaThree() {
|
||||
return reviewAreaThree;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Favorite {
|
||||
private Long id;
|
||||
private String favoriteType;
|
||||
private Long favoriteId;
|
||||
private Long userId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private String extInfo;
|
||||
}
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
||||
/**
|
||||
* 对象 project_resource_library
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-07
|
||||
*/
|
||||
public class ProjectResourceLibrary extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long id;
|
||||
//项目资源名称
|
||||
private String projectName;
|
||||
//项目领域
|
||||
private String projectDomain;
|
||||
//项目领域名称
|
||||
private String projectDomainName;
|
||||
//
|
||||
private String identifier;
|
||||
private String userIdentifier;
|
||||
//开源项目ID
|
||||
private Long projectId;
|
||||
//仓库ID
|
||||
private Long repositoryId;
|
||||
//版本Id
|
||||
private Long versionReleasesId;
|
||||
//项目是否已公开
|
||||
private Long isPublic;
|
||||
//发版名称
|
||||
private String releaseName;
|
||||
//发版时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date releaseDate;
|
||||
//发版人
|
||||
private String releasePerson;
|
||||
//发版类型
|
||||
private String releaseType;
|
||||
//发版单位
|
||||
private String releaseUnit;
|
||||
//发版摘要
|
||||
private String releaseSummary;
|
||||
//发版详情
|
||||
private String releaseDetails;
|
||||
//联系人
|
||||
private String contactPerson;
|
||||
//联系时间
|
||||
private String contactPhone;
|
||||
//是否已转入成果库
|
||||
private Long isTransferredToAchievement;
|
||||
//转入成果库时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date transferDate;
|
||||
//是否精选成果
|
||||
private Long isSelectedAchievement;
|
||||
//图片
|
||||
private String images;
|
||||
//附件
|
||||
private String attachments;
|
||||
private List<KeyValVo<String, String>> attachmentList = new ArrayList<>();
|
||||
|
||||
public String getUserIdentifier() {
|
||||
return userIdentifier;
|
||||
}
|
||||
|
||||
public void setUserIdentifier(String userIdentifier) {
|
||||
this.userIdentifier = userIdentifier;
|
||||
}
|
||||
|
||||
public String getProjectDomain() {
|
||||
return projectDomain;
|
||||
}
|
||||
|
||||
public void setProjectDomain(String projectDomain) {
|
||||
this.projectDomain = projectDomain;
|
||||
}
|
||||
|
||||
public List<KeyValVo<String, String>> getAttachmentList() {
|
||||
return attachmentList;
|
||||
}
|
||||
|
||||
public void setAttachmentList(List<KeyValVo<String, String>> attachmentList) {
|
||||
this.attachmentList = attachmentList;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(String identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setRepositoryId(Long repositoryId) {
|
||||
this.repositoryId = repositoryId;
|
||||
}
|
||||
|
||||
public Long getRepositoryId() {
|
||||
return repositoryId;
|
||||
}
|
||||
|
||||
public void setVersionReleasesId(Long versionReleasesId) {
|
||||
this.versionReleasesId = versionReleasesId;
|
||||
}
|
||||
|
||||
public Long getVersionReleasesId() {
|
||||
return versionReleasesId;
|
||||
}
|
||||
|
||||
public void setIsPublic(Long isPublic) {
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
public Long getIsPublic() {
|
||||
return isPublic;
|
||||
}
|
||||
|
||||
public void setReleaseName(String releaseName) {
|
||||
this.releaseName = releaseName;
|
||||
}
|
||||
|
||||
public String getReleaseName() {
|
||||
return releaseName;
|
||||
}
|
||||
|
||||
public void setReleaseDate(Date releaseDate) {
|
||||
this.releaseDate = releaseDate;
|
||||
}
|
||||
|
||||
public Date getReleaseDate() {
|
||||
return releaseDate;
|
||||
}
|
||||
|
||||
public void setReleasePerson(String releasePerson) {
|
||||
this.releasePerson = releasePerson;
|
||||
}
|
||||
|
||||
public String getReleasePerson() {
|
||||
return releasePerson;
|
||||
}
|
||||
|
||||
public void setReleaseType(String releaseType) {
|
||||
this.releaseType = releaseType;
|
||||
}
|
||||
|
||||
public String getReleaseType() {
|
||||
return releaseType;
|
||||
}
|
||||
|
||||
public void setReleaseUnit(String releaseUnit) {
|
||||
this.releaseUnit = releaseUnit;
|
||||
}
|
||||
|
||||
public String getReleaseUnit() {
|
||||
return releaseUnit;
|
||||
}
|
||||
|
||||
public void setReleaseSummary(String releaseSummary) {
|
||||
this.releaseSummary = releaseSummary;
|
||||
}
|
||||
|
||||
public String getReleaseSummary() {
|
||||
return releaseSummary;
|
||||
}
|
||||
|
||||
public void setReleaseDetails(String releaseDetails) {
|
||||
this.releaseDetails = releaseDetails;
|
||||
}
|
||||
|
||||
public String getReleaseDetails() {
|
||||
return releaseDetails;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setIsTransferredToAchievement(Long isTransferredToAchievement) {
|
||||
this.isTransferredToAchievement = isTransferredToAchievement;
|
||||
}
|
||||
|
||||
public Long getIsTransferredToAchievement() {
|
||||
return isTransferredToAchievement;
|
||||
}
|
||||
|
||||
public void setTransferDate(Date transferDate) {
|
||||
this.transferDate = transferDate;
|
||||
}
|
||||
|
||||
public Date getTransferDate() {
|
||||
return transferDate;
|
||||
}
|
||||
|
||||
public void setIsSelectedAchievement(Long isSelectedAchievement) {
|
||||
this.isSelectedAchievement = isSelectedAchievement;
|
||||
}
|
||||
|
||||
public Long getIsSelectedAchievement() {
|
||||
return isSelectedAchievement;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setAttachments(String attachments) {
|
||||
this.attachments = attachments;
|
||||
}
|
||||
|
||||
public String getAttachments() {
|
||||
return attachments;
|
||||
}
|
||||
|
||||
public String getProjectDomainName() {
|
||||
return projectDomainName;
|
||||
}
|
||||
|
||||
public void setProjectDomainName(String projectDomainName) {
|
||||
this.projectDomainName = projectDomainName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Searcher {
|
||||
private Long id;
|
||||
private String searchType;
|
||||
private Long searchId;
|
||||
private String searchIds;
|
||||
private Long userId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private String extInfo;
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @author microservices
|
||||
* @date 2025-04-08
|
||||
*/
|
||||
public class TaskResourceLibrary extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//
|
||||
private Long id;
|
||||
//创客任务ID
|
||||
private Long taskId;
|
||||
//
|
||||
private Long paperId;
|
||||
//创客任务名称
|
||||
private String taskName;
|
||||
//任务领域
|
||||
private String taskDomain;
|
||||
//创客任务金额
|
||||
private BigDecimal taskAmount;
|
||||
//胜出交稿名称
|
||||
private String submissionName;
|
||||
//交稿时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date submissionDate;
|
||||
//交稿人
|
||||
private String submitterName;
|
||||
//交稿类型
|
||||
private String submissionType;
|
||||
//交稿单位
|
||||
private String submissionOrganization;
|
||||
//交稿摘要
|
||||
private String submissionSummary;
|
||||
//交稿详情
|
||||
private String releaseDetails;
|
||||
//联系人
|
||||
private String contactName;
|
||||
//联系电话
|
||||
private String contactPhone;
|
||||
//是否已转入成果库
|
||||
private Long isTransferredToResultsLibrary;
|
||||
//转入成果库时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date transferToResultsDate;
|
||||
//是否精选成果 0否 1是
|
||||
private Long isSelectedResult;
|
||||
//图片
|
||||
private String imageUrl;
|
||||
//附件
|
||||
private String attachmentUrl;
|
||||
private List<KeyValVo<String, String>> attachmentList;
|
||||
//专家审核
|
||||
private Integer expertReview;
|
||||
|
||||
public Integer getExpertReview() {
|
||||
return expertReview;
|
||||
}
|
||||
|
||||
public void setExpertReview(Integer expertReview) {
|
||||
this.expertReview = expertReview;
|
||||
}
|
||||
|
||||
public List<KeyValVo<String, String>> getAttachmentList() {
|
||||
return attachmentList;
|
||||
}
|
||||
|
||||
public void setAttachmentList(List<KeyValVo<String, String>> attachmentList) {
|
||||
this.attachmentList = attachmentList;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setPaperId(Long paperId) {
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId() {
|
||||
return paperId;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskDomain(String taskDomain) {
|
||||
this.taskDomain = taskDomain;
|
||||
}
|
||||
|
||||
public String getTaskDomain() {
|
||||
return taskDomain;
|
||||
}
|
||||
|
||||
public void setTaskAmount(BigDecimal taskAmount) {
|
||||
this.taskAmount = taskAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTaskAmount() {
|
||||
return taskAmount;
|
||||
}
|
||||
|
||||
public void setSubmissionName(String submissionName) {
|
||||
this.submissionName = submissionName;
|
||||
}
|
||||
|
||||
public String getSubmissionName() {
|
||||
return submissionName;
|
||||
}
|
||||
|
||||
public void setSubmissionDate(Date submissionDate) {
|
||||
this.submissionDate = submissionDate;
|
||||
}
|
||||
|
||||
public Date getSubmissionDate() {
|
||||
return submissionDate;
|
||||
}
|
||||
|
||||
public void setSubmitterName(String submitterName) {
|
||||
this.submitterName = submitterName;
|
||||
}
|
||||
|
||||
public String getSubmitterName() {
|
||||
return submitterName;
|
||||
}
|
||||
|
||||
public void setSubmissionType(String submissionType) {
|
||||
this.submissionType = submissionType;
|
||||
}
|
||||
|
||||
public String getSubmissionType() {
|
||||
return submissionType;
|
||||
}
|
||||
|
||||
public void setSubmissionOrganization(String submissionOrganization) {
|
||||
this.submissionOrganization = submissionOrganization;
|
||||
}
|
||||
|
||||
public String getSubmissionOrganization() {
|
||||
return submissionOrganization;
|
||||
}
|
||||
|
||||
public void setSubmissionSummary(String submissionSummary) {
|
||||
this.submissionSummary = submissionSummary;
|
||||
}
|
||||
|
||||
public String getSubmissionSummary() {
|
||||
return submissionSummary;
|
||||
}
|
||||
|
||||
public void setReleaseDetails(String releaseDetails) {
|
||||
this.releaseDetails = releaseDetails;
|
||||
}
|
||||
|
||||
public String getReleaseDetails() {
|
||||
return releaseDetails;
|
||||
}
|
||||
|
||||
public void setContactName(String contactName) {
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactName() {
|
||||
return contactName;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setIsTransferredToResultsLibrary(Long isTransferredToResultsLibrary) {
|
||||
this.isTransferredToResultsLibrary = isTransferredToResultsLibrary;
|
||||
}
|
||||
|
||||
public Long getIsTransferredToResultsLibrary() {
|
||||
return isTransferredToResultsLibrary;
|
||||
}
|
||||
|
||||
public void setTransferToResultsDate(Date transferToResultsDate) {
|
||||
this.transferToResultsDate = transferToResultsDate;
|
||||
}
|
||||
|
||||
public Date getTransferToResultsDate() {
|
||||
return transferToResultsDate;
|
||||
}
|
||||
|
||||
public void setIsSelectedResult(Long isSelectedResult) {
|
||||
this.isSelectedResult = isSelectedResult;
|
||||
}
|
||||
|
||||
public Long getIsSelectedResult() {
|
||||
return isSelectedResult;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setAttachmentUrl(String attachmentUrl) {
|
||||
this.attachmentUrl = attachmentUrl;
|
||||
}
|
||||
|
||||
public String getAttachmentUrl() {
|
||||
return attachmentUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("taskId", getTaskId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("taskName", getTaskName())
|
||||
.append("taskDomain", getTaskDomain())
|
||||
.append("taskAmount", getTaskAmount())
|
||||
.append("submissionName", getSubmissionName())
|
||||
.append("submissionDate", getSubmissionDate())
|
||||
.append("submitterName", getSubmitterName())
|
||||
.append("submissionType", getSubmissionType())
|
||||
.append("submissionOrganization", getSubmissionOrganization())
|
||||
.append("submissionSummary", getSubmissionSummary())
|
||||
.append("releaseDetails", getReleaseDetails())
|
||||
.append("contactName", getContactName())
|
||||
.append("contactPhone", getContactPhone())
|
||||
.append("isTransferredToResultsLibrary", getIsTransferredToResultsLibrary())
|
||||
.append("transferToResultsDate", getTransferToResultsDate())
|
||||
.append("isSelectedResult", getIsSelectedResult())
|
||||
.append("imageUrl", getImageUrl())
|
||||
.append("attachmentUrl", getAttachmentUrl())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.microservices.dms.resourceLibrary.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class Watcher {
|
||||
private Long id;
|
||||
private String watchableType;
|
||||
private Long watchableId;
|
||||
private Long userId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private String extInfo;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class CompetitionListVo {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String categoryName;
|
||||
private Long status;
|
||||
private Long totalTaskDays;
|
||||
|
||||
private Long visits;
|
||||
private Long watchersCount;
|
||||
private Long registrationsCount;
|
||||
private Long opusCount;
|
||||
private Long opusDownloadCount;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
|
||||
public class ExpertAttachmentVo {
|
||||
private Long expertId;
|
||||
private Long academicAchievementsAttachments;
|
||||
private Long honorsAttachments;
|
||||
private Long resumeAttachments;
|
||||
private Long titleCertificateAttachments;
|
||||
|
||||
public Long getExpertId() {
|
||||
return expertId;
|
||||
}
|
||||
|
||||
public void setExpertId(Long expertId) {
|
||||
this.expertId = expertId;
|
||||
}
|
||||
|
||||
public Long getAcademicAchievementsAttachments() {
|
||||
return academicAchievementsAttachments;
|
||||
}
|
||||
|
||||
public void setAcademicAchievementsAttachments(Long academicAchievementsAttachments) {
|
||||
this.academicAchievementsAttachments = academicAchievementsAttachments;
|
||||
}
|
||||
|
||||
public Long getHonorsAttachments() {
|
||||
return honorsAttachments;
|
||||
}
|
||||
|
||||
public void setHonorsAttachments(Long honorsAttachments) {
|
||||
this.honorsAttachments = honorsAttachments;
|
||||
}
|
||||
|
||||
public Long getResumeAttachments() {
|
||||
return resumeAttachments;
|
||||
}
|
||||
|
||||
public void setResumeAttachments(Long resumeAttachments) {
|
||||
this.resumeAttachments = resumeAttachments;
|
||||
}
|
||||
|
||||
public Long getTitleCertificateAttachments() {
|
||||
return titleCertificateAttachments;
|
||||
}
|
||||
|
||||
public void setTitleCertificateAttachments(Long titleCertificateAttachments) {
|
||||
this.titleCertificateAttachments = titleCertificateAttachments;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
public class KeyValVo<K, V> {
|
||||
private K k;
|
||||
private V v;
|
||||
|
||||
// 默认构造函数
|
||||
public KeyValVo() {}
|
||||
|
||||
// 带参构造函数
|
||||
public KeyValVo(K k, V v) {
|
||||
this.k = k;
|
||||
this.v = v;
|
||||
}
|
||||
|
||||
// Getters and Setters
|
||||
public K getK() {
|
||||
return k;
|
||||
}
|
||||
|
||||
public void setK(K k) {
|
||||
this.k = k;
|
||||
}
|
||||
|
||||
public V getV() {
|
||||
return v;
|
||||
}
|
||||
|
||||
public void setV(V v) {
|
||||
this.v = v;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ProjectListVo {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createdOn;
|
||||
private Long versionReleasesCount;
|
||||
private String projectLanguages;
|
||||
private String projectCategories;
|
||||
private Long categoryId;
|
||||
private Long praisesCount;
|
||||
private Long watchersCount;
|
||||
private Long forkedCount;
|
||||
private Long issuesCount;
|
||||
private Long pullRequestsCount;
|
||||
private Long commitsCount;
|
||||
private Long licenseId;
|
||||
private Long membersCount;
|
||||
private Long membersMonthAddCount;
|
||||
private Long projectSearchCount;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class TaskListVo {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String categoryName;
|
||||
private Long categoryId;
|
||||
private BigDecimal bounty;
|
||||
private Long totalTaskDays;
|
||||
|
||||
private Long taskClickCount;
|
||||
private Long taskWatcherCount;
|
||||
private Long taskPapersCount;
|
||||
private Long taskJournalCount;
|
||||
private Long taskSearchCount;
|
||||
private Long taskDownloadCount;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.microservices.dms.resourceLibrary.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserActionDataVo {
|
||||
private Long id;
|
||||
private String itemType;
|
||||
private Long itemId;
|
||||
private String itemName;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "")
|
||||
private Date createdAt;
|
||||
private Integer status;
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.microservices.dms.resourceLibrary.mapper;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.CompetitionListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface CompetitionResourceLibraryMapper {
|
||||
|
||||
List<UserActionDataVo> selectRegisterCondition(UserActionDataVo clicker);
|
||||
|
||||
List<UserActionDataVo> selectOpusCondition(UserActionDataVo searcher);
|
||||
|
||||
Long countRegisterCondition(UserActionDataVo clicker);
|
||||
|
||||
Long countOpusCondition(UserActionDataVo searcher);
|
||||
|
||||
List<CompetitionListVo> selectCompetitionListCondition(CompetitionListVo downloader);
|
||||
|
||||
CompetitionResourceLibrary selectCompetitionResourceLibraryById(Long id);
|
||||
|
||||
List<CompetitionResourceLibrary> selectCompetitionResourceLibraryList(CompetitionResourceLibrary competitionResourceLibrary);
|
||||
|
||||
int insertCompetitionResourceLibrary(CompetitionResourceLibrary competitionResourceLibrary);
|
||||
|
||||
int updateCompetitionResourceLibrary(CompetitionResourceLibrary competitionResourceLibrary);
|
||||
|
||||
int deleteCompetitionResourceLibraryById(Long id);
|
||||
|
||||
int deleteCompetitionResourceLibraryByIds(Long[] ids);
|
||||
|
||||
List<KeyValVo<String, String>> getAttachments(@Param("id") Long id);
|
||||
|
||||
long getTotalOpenCompetitions();
|
||||
|
||||
long getTotalCompetitionAchievements();
|
||||
|
||||
long getTotalCompetitionSubmissions();
|
||||
|
||||
long getTotalFinishedCompetitions();
|
||||
|
||||
long getReviewCompetitionCount();
|
||||
|
||||
Long getCompetitionFinish();
|
||||
|
||||
Long getCompetitionEnroll();
|
||||
|
||||
Long getCompetitionUnderway();
|
||||
|
||||
Long getCompetitionSubmitCount();
|
||||
|
||||
Long getCompetitionTransferCount();
|
||||
|
||||
Long getCompetitionNeedAuditCount();
|
||||
|
||||
List<KeyValueVo> getCompetitionStatisticYearly();
|
||||
|
||||
List<Map<String,Object>> getCompetitionHot();
|
||||
|
||||
List<KeyValVo<String, Long>> getCompetitionYearlyPaperAdd(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
List<KeyValVo<String, Long>> getCompetitionYearlyFinish(@Param("s") Date s, @Param("e") Date e);
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package com.microservices.dms.resourceLibrary.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.ExpertTotallVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.MemoTotalVo;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 专家资源库Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface ExpertResourceLibraryMapper
|
||||
{
|
||||
/**
|
||||
* 查询专家资源库
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 专家资源库
|
||||
*/
|
||||
public ExpertResourceLibrary selectExpertResourceLibraryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 专家资源库集合
|
||||
*/
|
||||
public List<ExpertResourceLibrary> selectExpertResourceLibraryList(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 新增专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 修改专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 删除专家资源库
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpertResourceLibraryById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除专家资源库
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpertResourceLibraryByIds(Long[] ids);
|
||||
|
||||
List<ExpertResourceLibrary> selectExpertResourceLibraryList2(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
Long auditExpertCount();
|
||||
|
||||
Long competitionAuditCount();
|
||||
|
||||
Long taskAuditCount();
|
||||
|
||||
Long expertResourceCount();
|
||||
|
||||
Long auditTaskAuditExpertCount();
|
||||
|
||||
Long auditCompetitionAuditExpertCount();
|
||||
|
||||
|
||||
List<KeyValueVo> getTitleRankStatistic();
|
||||
|
||||
List<KeyValueVo> getExpertTypeStatistic();
|
||||
|
||||
List<KeyValueVo> getHighestDegreeStatistic();
|
||||
|
||||
List<KeyValueVo> getWorkplaceTypeStatistic();
|
||||
|
||||
KeyValueVo getAuthenticationStatistic();
|
||||
|
||||
Long getExpertTotal();
|
||||
|
||||
List<KeyValueVo> getExpertTotalByYear();
|
||||
|
||||
List<KeyValueVo> getReviewAreasStatistic();
|
||||
|
||||
List<ExpertTotallVo> getExpertAduit();
|
||||
|
||||
AchievementBehaviorSumVo getActDataStatisticById(@Param("id") Long id);
|
||||
|
||||
AchievementBehaviorSumVo getWatchFavoriteStatusById(@Param("id") Long id, @Param("userId")Long userId);
|
||||
|
||||
List<KeyValueVo> getMemoAduit();
|
||||
|
||||
List<KeyValueVo> getIsOriginalStatistic();
|
||||
|
||||
List<KeyValueVo> getMemoTotalByYear();
|
||||
|
||||
List<KeyValueVo> getForumSectionStatistic();
|
||||
|
||||
List<KeyValueVo> getAddMemoStatistic();
|
||||
|
||||
List<MemoTotalVo> getTop5Memos();
|
||||
|
||||
List<KeyValVo<String, Long>> get7DayPaise(@Param("s") Date s, @Param("e") Date e);
|
||||
|
||||
ExpertAttachmentVo getExpertInfoById(@Param("expertId") Long expertId);
|
||||
|
||||
Map<String, Object> getAttachmentInfo(@Param("id") Long id);
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.microservices.dms.resourceLibrary.mapper;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.TokenListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ProjectResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.ProjectListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Slave
|
||||
public interface ProjectResourceLibraryMapper {
|
||||
|
||||
List<ProjectListVo> selectProjectListCondition(ProjectListVo projectListVo);
|
||||
|
||||
List<UserActionDataVo> selectCodeCommitCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
List<UserActionDataVo> selectForkCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
List<UserActionDataVo> selectIssueCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
List<UserActionDataVo> selectPRCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
List<UserActionDataVo> selectPraisesCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
List<UserActionDataVo> selectSearchCondition(UserActionDataVo userActionDataVo);
|
||||
|
||||
public ProjectResourceLibrary selectProjectResourceLibraryById(Long id);
|
||||
|
||||
public List<ProjectResourceLibrary> selectProjectResourceLibraryList(ProjectResourceLibrary projectResourceLibrary);
|
||||
|
||||
public int insertProjectResourceLibrary(ProjectResourceLibrary projectResourceLibrary);
|
||||
|
||||
public int updateProjectResourceLibrary(ProjectResourceLibrary projectResourceLibrary);
|
||||
|
||||
public int deleteProjectResourceLibraryById(Long id);
|
||||
|
||||
public int deleteProjectResourceLibraryByIds(Long[] ids);
|
||||
|
||||
long getTotalProjectCount();
|
||||
|
||||
long getPublicProjectCount();
|
||||
|
||||
long getTotalReleaseCount();
|
||||
|
||||
long getTotalConversionCount();
|
||||
|
||||
List<KeyValVo<String,String>> getAttachments(@Param("containerId") Long containerId);
|
||||
|
||||
String getProjectDomainNameByKey(@Param("projectDomain") String projectDomain );
|
||||
|
||||
List<TokenListVo> selectProjectInfos();
|
||||
|
||||
Long sumProjectIssueToken(@Param("id") Long id);
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package com.microservices.dms.resourceLibrary.mapper;
|
||||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.resourceLibrary.domain.*;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.TaskListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Slave
|
||||
@Mapper
|
||||
public interface TaskResourceLibraryMapper {
|
||||
|
||||
int insertClicker(Clicker record);
|
||||
long countClicker(Clicker record);
|
||||
long countClickerSimple(Clicker record);
|
||||
int insertSearcher(Searcher record);
|
||||
|
||||
int insertDownloader(Downloader record);
|
||||
|
||||
List<UserActionDataVo> selectClickerCondition(UserActionDataVo clicker);
|
||||
|
||||
List<UserActionDataVo> selectVisitCondition(UserActionDataVo clicker);
|
||||
|
||||
List<UserActionDataVo> selectSearcherCondition(UserActionDataVo searcher);
|
||||
|
||||
List<UserActionDataVo> selectDownloaderCondition(UserActionDataVo downloader);
|
||||
|
||||
List<UserActionDataVo> selectWatcherCondition(UserActionDataVo watcher);
|
||||
|
||||
List<UserActionDataVo> selectPapersCondition(UserActionDataVo paper);
|
||||
|
||||
List<UserActionDataVo> selectTaskJournalsCondition(UserActionDataVo taskJournals);
|
||||
|
||||
List<TaskListVo> selectTaskListCondition(TaskListVo taskListVo);
|
||||
|
||||
long countClickerCondition(UserActionDataVo clicker);
|
||||
|
||||
long countVisitCondition(UserActionDataVo clicker);
|
||||
|
||||
long countSearcherCondition(UserActionDataVo searcher);
|
||||
|
||||
long countDownloaderCondition(UserActionDataVo downloader);
|
||||
|
||||
long countWatcherCondition(UserActionDataVo watcher);
|
||||
|
||||
long countPapersCondition(UserActionDataVo paper);
|
||||
|
||||
long countTaskJournalsCondition(UserActionDataVo taskJournals);
|
||||
|
||||
TaskResourceLibrary selectTaskResourceLibraryById(Long id);
|
||||
|
||||
List<TaskResourceLibrary> selectTaskResourceLibraryList(TaskResourceLibrary taskResourceLibrary);
|
||||
|
||||
int insertTaskResourceLibrary(TaskResourceLibrary taskResourceLibrary);
|
||||
|
||||
int updateTaskResourceLibrary(TaskResourceLibrary taskResourceLibrary);
|
||||
|
||||
int deleteTaskResourceLibraryById(Long id);
|
||||
|
||||
int deleteTaskResourceLibraryByIds(Long[] ids);
|
||||
|
||||
List<KeyValVo<String, String>> getAttachments(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取任务总数
|
||||
*
|
||||
* @return 任务总数
|
||||
*/
|
||||
long getTotalTasks();
|
||||
|
||||
/**
|
||||
* 获取转换成果任务金额
|
||||
*
|
||||
* @return 转换成果任务金额
|
||||
*/
|
||||
double getConvertedTaskAmount();
|
||||
|
||||
/**
|
||||
* 获取任务转换成果数
|
||||
*
|
||||
* @return 任务转换成果数
|
||||
*/
|
||||
long getConvertedTasksCount();
|
||||
|
||||
/**
|
||||
* 获取任务金额
|
||||
*
|
||||
* @return 任务金额
|
||||
*/
|
||||
Double getTaskAmount();
|
||||
|
||||
/**
|
||||
* 获取需评审任务数
|
||||
*
|
||||
* @return 需评审任务数
|
||||
*/
|
||||
long getReviewTaskCount();
|
||||
|
||||
int insertFavorite(Favorite favorite);
|
||||
|
||||
int insertWatcher(Watcher watcher);
|
||||
|
||||
int delFavorite(Favorite favorite);
|
||||
|
||||
int delWatcher(Watcher watcher);
|
||||
|
||||
double getConvertedTaskAmount2();
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.microservices.dms.resourceLibrary.service;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.resourceLibrary.domain.CompetitionResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.ProjectResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.CompetitionListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.CompetitionResourceLibraryMapper;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.TaskResourceLibraryMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.microservices.dms.constant.TaskConstant.COMPETITION_TYPE_DOWNLOAD;
|
||||
import static com.microservices.dms.constant.TaskConstant.PROJECT_DOWNLOAD_API;
|
||||
import static com.microservices.dms.utils.UrlUtil.getUrlPath;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CompetitionResourceLibraryService {
|
||||
|
||||
@Value("${http.gitLinkUrl}")
|
||||
public String gitLinkUrl;
|
||||
|
||||
private final CompetitionResourceLibraryMapper competitionResourceLibraryMapper;
|
||||
private final TaskResourceLibraryMapper taskResourceLibraryMapper;
|
||||
|
||||
public List<UserActionDataVo> selectRegisterCondition(UserActionDataVo vo) {
|
||||
return competitionResourceLibraryMapper.selectRegisterCondition(vo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectOpusCondition(UserActionDataVo vo) {
|
||||
return competitionResourceLibraryMapper.selectOpusCondition(vo);
|
||||
}
|
||||
|
||||
public List<CompetitionListVo> selectCompetitionListCondition(CompetitionListVo dataVo) {
|
||||
List<CompetitionListVo> competitionListVos = competitionResourceLibraryMapper.selectCompetitionListCondition(dataVo);
|
||||
for (CompetitionListVo vo : competitionListVos) {
|
||||
UserActionDataVo c = new UserActionDataVo();
|
||||
c.setItemId(vo.getId());
|
||||
c.setItemType(COMPETITION_TYPE_DOWNLOAD);
|
||||
long opusDownload = taskResourceLibraryMapper.countDownloaderCondition(c);
|
||||
vo.setOpusDownloadCount(opusDownload);
|
||||
Long register = competitionResourceLibraryMapper.countRegisterCondition(c);
|
||||
vo.setRegistrationsCount(register);
|
||||
c.setStatus(3);
|
||||
Long opus = competitionResourceLibraryMapper.countOpusCondition(c);
|
||||
vo.setOpusCount(opus);
|
||||
}
|
||||
|
||||
return competitionListVos;
|
||||
}
|
||||
|
||||
public CompetitionResourceLibrary selectCompetitionResourceLibraryById(Long id) {
|
||||
return competitionResourceLibraryMapper.selectCompetitionResourceLibraryById(id);
|
||||
}
|
||||
|
||||
public List<CompetitionResourceLibrary> selectCompetitionResourceLibraryList(CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
List<CompetitionResourceLibrary> list = competitionResourceLibraryMapper.selectCompetitionResourceLibraryList(competitionResourceLibrary);
|
||||
// /api/attachments/10e9c28d-f8cb-4fbd-83c3-e46d2ff1b325
|
||||
for (CompetitionResourceLibrary l : list) {
|
||||
List<KeyValVo<String, String>> attachments = competitionResourceLibraryMapper.getAttachments(l.getCompetitionUserId());
|
||||
for (KeyValVo<String, String> a : attachments) {
|
||||
String v = a.getV();
|
||||
if (StringUtils.isNotEmpty(v)) {
|
||||
a.setV(String.format(PROJECT_DOWNLOAD_API, gitLinkUrl, v));
|
||||
}
|
||||
l.setAttachmentList(attachments);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public Long insertCompetitionResourceLibrary(CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
competitionResourceLibrary.setCreateTime(DateUtils.getNowDate());
|
||||
competitionResourceLibrary.setCreateBy(SecurityUtils.getUsername());
|
||||
competitionResourceLibrary.setTransferredToResultLibraryTime(DateUtils.getNowDate());
|
||||
competitionResourceLibraryMapper.insertCompetitionResourceLibrary(competitionResourceLibrary);
|
||||
return competitionResourceLibrary.getId();
|
||||
}
|
||||
|
||||
public int updateCompetitionResourceLibrary(CompetitionResourceLibrary competitionResourceLibrary) {
|
||||
competitionResourceLibrary.setUpdateTime(DateUtils.getNowDate());
|
||||
return competitionResourceLibraryMapper.updateCompetitionResourceLibrary(competitionResourceLibrary);
|
||||
}
|
||||
|
||||
public int deleteCompetitionResourceLibraryByIds(Long[] ids) {
|
||||
return competitionResourceLibraryMapper.deleteCompetitionResourceLibraryByIds(ids);
|
||||
}
|
||||
|
||||
public int deleteCompetitionResourceLibraryById(Long id) {
|
||||
return competitionResourceLibraryMapper.deleteCompetitionResourceLibraryById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 返回开放竞赛总数
|
||||
*
|
||||
* @return 开放竞赛总数
|
||||
*/
|
||||
public long getTotalOpenCompetitions() {
|
||||
// 这里替换成你的实际逻辑,例如从数据库查询
|
||||
return competitionResourceLibraryMapper.getTotalOpenCompetitions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回竞赛转换成果数
|
||||
*
|
||||
* @return 竞赛转换成果数
|
||||
*/
|
||||
public long getTotalCompetitionAchievements() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return competitionResourceLibraryMapper.getTotalCompetitionAchievements();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回竞赛提交作品数
|
||||
*
|
||||
* @return 竞赛提交作品数
|
||||
*/
|
||||
public long getTotalCompetitionSubmissions() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return competitionResourceLibraryMapper.getTotalCompetitionSubmissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回已结束竞赛数
|
||||
*
|
||||
* @return 已结束竞赛数
|
||||
*/
|
||||
public long getTotalFinishedCompetitions() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return competitionResourceLibraryMapper.getTotalFinishedCompetitions();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回需评审竞赛数
|
||||
*
|
||||
* @return 需评审竞赛数
|
||||
*/
|
||||
public long getReviewCompetitionCount() {
|
||||
// 这里替换成你的实际逻辑
|
||||
return competitionResourceLibraryMapper.getReviewCompetitionCount();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.microservices.dms.resourceLibrary.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
||||
/**
|
||||
* 专家资源库Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
public interface IExpertResourceLibraryService
|
||||
{
|
||||
/**
|
||||
* 查询专家资源库
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 专家资源库
|
||||
*/
|
||||
public ExpertResourceLibrary selectExpertResourceLibraryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 专家资源库集合
|
||||
*/
|
||||
public List<ExpertResourceLibrary> selectExpertResourceLibraryList(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 新增专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 修改专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
/**
|
||||
* 批量删除专家资源库
|
||||
*
|
||||
* @param ids 需要删除的专家资源库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpertResourceLibraryByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除专家资源库信息
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExpertResourceLibraryById(Long id);
|
||||
|
||||
List<ExpertResourceLibrary> selectExpertResourceLibraryList2(ExpertResourceLibrary expertResourceLibrary);
|
||||
|
||||
Long auditExpertCount();
|
||||
|
||||
Long competitionAuditCount();
|
||||
|
||||
Long taskAuditCount();
|
||||
|
||||
AchievementBehaviorSumVo getActDataStatisticById(Long id);
|
||||
|
||||
AchievementBehaviorSumVo getWatchFavoriteStatusById(Long id, Long userId);
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
package com.microservices.dms.resourceLibrary.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.resourceLibrary.domain.ProjectResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.ProjectListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ProjectResourceLibraryMapper;
|
||||
import com.microservices.dms.utils.DateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.microservices.dms.constant.TaskConstant.PROJECT_DOWNLOAD_API;
|
||||
import static com.microservices.dms.utils.UrlUtil.getUrlPath;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectResourceLibraryService {
|
||||
|
||||
private final ProjectResourceLibraryMapper projectResourceLibraryMapper;
|
||||
|
||||
@Value("${http.gitLinkUrl}")
|
||||
public String gitLinkUrl;
|
||||
|
||||
public List<ProjectListVo> selectProjectListCondition(ProjectListVo projectListVo) {
|
||||
return projectResourceLibraryMapper.selectProjectListCondition(projectListVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectCodeCommitCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectCodeCommitCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectForkCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectForkCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectIssueCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectIssueCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectPRCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectPRCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectPraisesCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectPraisesCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectSearchCondition(UserActionDataVo userActionDataVo) {
|
||||
return projectResourceLibraryMapper.selectSearchCondition(userActionDataVo);
|
||||
}
|
||||
|
||||
|
||||
public ProjectResourceLibrary selectProjectResourceLibraryById(Long id) {
|
||||
return projectResourceLibraryMapper.selectProjectResourceLibraryById(id);
|
||||
}
|
||||
|
||||
|
||||
public List<ProjectResourceLibrary> selectProjectResourceLibraryList(ProjectResourceLibrary projectResourceLibrary) {
|
||||
List<ProjectResourceLibrary> list = projectResourceLibraryMapper.selectProjectResourceLibraryList(projectResourceLibrary);
|
||||
// /api/attachments/10e9c28d-f8cb-4fbd-83c3-e46d2ff1b325
|
||||
for (ProjectResourceLibrary l : list) {
|
||||
//根据领域key,获取领域名称
|
||||
String projectDomain = l.getProjectDomain();
|
||||
if(StringUtils.isNotBlank(projectDomain)){
|
||||
String projectDomainName = projectResourceLibraryMapper.getProjectDomainNameByKey(projectDomain);
|
||||
l.setProjectDomainName(projectDomainName);
|
||||
}
|
||||
Date releaseDate = l.getReleaseDate();
|
||||
l.setReleaseDate(DateUtil.plusHours(releaseDate, 8));
|
||||
List<KeyValVo<String, String>> attachments = projectResourceLibraryMapper.getAttachments(l.getVersionReleasesId());
|
||||
for (KeyValVo<String, String> a : attachments) {
|
||||
String v = a.getV();
|
||||
if (StringUtils.isNotEmpty(v)) {
|
||||
if (v.startsWith("http")) {
|
||||
String urlPath = getUrlPath(v);
|
||||
if (StringUtils.isNotEmpty(urlPath)) {
|
||||
if (urlPath.startsWith("/api")) {
|
||||
a.setV(gitLinkUrl + urlPath);
|
||||
}else {
|
||||
a.setV(gitLinkUrl +"/api"+ urlPath);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
a.setV(String.format(PROJECT_DOWNLOAD_API, gitLinkUrl, v));
|
||||
}
|
||||
}
|
||||
}
|
||||
l.setAttachmentList(attachments);
|
||||
l.setAttachments(JSON.toJSONString(attachments));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public Long insertProjectResourceLibrary(ProjectResourceLibrary projectResourceLibrary) {
|
||||
projectResourceLibrary.setCreateTime(DateUtils.getNowDate());
|
||||
projectResourceLibrary.setTransferDate(DateUtils.getNowDate());
|
||||
projectResourceLibrary.setCreateBy(SecurityUtils.getUsername());
|
||||
projectResourceLibraryMapper.insertProjectResourceLibrary(projectResourceLibrary);
|
||||
return projectResourceLibrary.getId();
|
||||
}
|
||||
|
||||
|
||||
public int updateProjectResourceLibrary(ProjectResourceLibrary projectResourceLibrary) {
|
||||
projectResourceLibrary.setUpdateTime(DateUtils.getNowDate());
|
||||
return projectResourceLibraryMapper.updateProjectResourceLibrary(projectResourceLibrary);
|
||||
}
|
||||
|
||||
|
||||
public int deleteProjectResourceLibraryByIds(Long[] ids) {
|
||||
return projectResourceLibraryMapper.deleteProjectResourceLibraryByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
public int deleteProjectResourceLibraryById(Long id) {
|
||||
return projectResourceLibraryMapper.deleteProjectResourceLibraryById(id);
|
||||
}
|
||||
|
||||
public long getTotalProjectCount() {
|
||||
return projectResourceLibraryMapper.getTotalProjectCount();
|
||||
}
|
||||
|
||||
public long getPublicProjectCount() {
|
||||
return projectResourceLibraryMapper.getPublicProjectCount();
|
||||
}
|
||||
|
||||
public long getTotalReleaseCount() {
|
||||
return projectResourceLibraryMapper.getTotalReleaseCount();
|
||||
}
|
||||
|
||||
public long getTotalConversionCount() {
|
||||
return projectResourceLibraryMapper.getTotalConversionCount();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,212 @@
|
|||
package com.microservices.dms.resourceLibrary.service;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.constant.TaskConstant;
|
||||
import com.microservices.dms.resourceLibrary.domain.*;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.TaskListVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.UserActionDataVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.TaskResourceLibraryMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.microservices.dms.constant.TaskConstant.MARKER_SPACE_DOWNLOAD_API_BY_ID;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TaskResourceLibraryService {
|
||||
private final TaskResourceLibraryMapper taskResourceLibraryMapper;
|
||||
|
||||
@Value("${markerSpaceUrl}")
|
||||
public String markerSpaceUrl;
|
||||
|
||||
public int addClick(Clicker click) {
|
||||
click.setCreatedAt(DateUtils.getNowDate());
|
||||
return taskResourceLibraryMapper.insertClicker(click);
|
||||
}
|
||||
|
||||
public int addSearcher(Searcher searcher) {
|
||||
searcher.setCreatedAt(DateUtils.getNowDate());
|
||||
return taskResourceLibraryMapper.insertSearcher(searcher);
|
||||
}
|
||||
|
||||
public int addDownloader(Downloader downloader) {
|
||||
downloader.setCreatedAt(DateUtils.getNowDate());
|
||||
return taskResourceLibraryMapper.insertDownloader(downloader);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectClickerCondition(UserActionDataVo actionDataVo) {
|
||||
return taskResourceLibraryMapper.selectClickerCondition(actionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectVisitCondition(UserActionDataVo actionDataVo) {
|
||||
return taskResourceLibraryMapper.selectVisitCondition(actionDataVo);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectSearcherCondition(UserActionDataVo searcher) {
|
||||
return taskResourceLibraryMapper.selectSearcherCondition(searcher);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectDownloaderCondition(UserActionDataVo downloader) {
|
||||
return taskResourceLibraryMapper.selectDownloaderCondition(downloader);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectWatcherCondition(UserActionDataVo watcher) {
|
||||
return taskResourceLibraryMapper.selectWatcherCondition(watcher);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectPapersCondition(UserActionDataVo paper) {
|
||||
return taskResourceLibraryMapper.selectPapersCondition(paper);
|
||||
}
|
||||
|
||||
public List<UserActionDataVo> selectTaskJournalsCondition(UserActionDataVo taskJournals) {
|
||||
return taskResourceLibraryMapper.selectTaskJournalsCondition(taskJournals);
|
||||
}
|
||||
|
||||
public List<TaskListVo> selectTaskListCondition(TaskListVo taskListVo) {
|
||||
List<TaskListVo> taskListVos = taskResourceLibraryMapper.selectTaskListCondition(taskListVo);
|
||||
for (TaskListVo vo : taskListVos) {
|
||||
UserActionDataVo c = new UserActionDataVo();
|
||||
c.setItemId(vo.getId());
|
||||
c.setItemType(TaskConstant.TASK_TYPE_PAPERS);
|
||||
long papers = taskResourceLibraryMapper.countPapersCondition(c);
|
||||
c.setItemType(TaskConstant.TASK_TYPE_WATCHERS);
|
||||
long watcher = taskResourceLibraryMapper.countWatcherCondition(c);
|
||||
c.setItemType(TaskConstant.TASK_TYPE_JOURNALS);
|
||||
long clicker = taskResourceLibraryMapper.countClickerCondition(c);
|
||||
long downloader = taskResourceLibraryMapper.countDownloaderCondition(c);
|
||||
long taskJournals = taskResourceLibraryMapper.countTaskJournalsCondition(c);
|
||||
long searcher = taskResourceLibraryMapper.countSearcherCondition(c);
|
||||
|
||||
vo.setTaskClickCount(clicker);
|
||||
vo.setTaskWatcherCount(watcher);
|
||||
vo.setTaskPapersCount(papers);
|
||||
vo.setTaskDownloadCount(downloader);
|
||||
vo.setTaskJournalCount(taskJournals);
|
||||
vo.setTaskSearchCount(searcher);
|
||||
}
|
||||
return taskListVos;
|
||||
}
|
||||
|
||||
public TaskResourceLibrary selectTaskResourceLibraryById(Long id) {
|
||||
return taskResourceLibraryMapper.selectTaskResourceLibraryById(id);
|
||||
}
|
||||
|
||||
|
||||
public List<TaskResourceLibrary> selectTaskResourceLibraryList(TaskResourceLibrary taskResourceLibrary) {
|
||||
List<TaskResourceLibrary> list = taskResourceLibraryMapper.selectTaskResourceLibraryList(taskResourceLibrary);
|
||||
for (TaskResourceLibrary l : list) {
|
||||
List<KeyValVo<String, String>> attachments = taskResourceLibraryMapper.getAttachments(l.getPaperId());
|
||||
for (KeyValVo<String, String> a : attachments) {
|
||||
Object v = a.getV();
|
||||
a.setV(String.format(MARKER_SPACE_DOWNLOAD_API_BY_ID, markerSpaceUrl, v));
|
||||
}
|
||||
l.setAttachmentList(attachments);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public Long insertTaskResourceLibrary(TaskResourceLibrary taskResourceLibrary) {
|
||||
taskResourceLibrary.setCreateTime(DateUtils.getNowDate());
|
||||
taskResourceLibrary.setTransferToResultsDate(DateUtils.getNowDate());
|
||||
taskResourceLibrary.setCreateBy(SecurityUtils.getUsername());
|
||||
taskResourceLibraryMapper.insertTaskResourceLibrary(taskResourceLibrary);
|
||||
return taskResourceLibrary.getId();
|
||||
}
|
||||
|
||||
|
||||
public int updateTaskResourceLibrary(TaskResourceLibrary taskResourceLibrary) {
|
||||
taskResourceLibrary.setUpdateTime(DateUtils.getNowDate());
|
||||
taskResourceLibrary.setUpdateBy(SecurityUtils.getUsername());
|
||||
return taskResourceLibraryMapper.updateTaskResourceLibrary(taskResourceLibrary);
|
||||
}
|
||||
|
||||
public int deleteTaskResourceLibraryByIds(Long[] ids) {
|
||||
return taskResourceLibraryMapper.deleteTaskResourceLibraryByIds(ids);
|
||||
}
|
||||
|
||||
public int deleteTaskResourceLibraryById(Long id) {
|
||||
return taskResourceLibraryMapper.deleteTaskResourceLibraryById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取任务总数
|
||||
*
|
||||
* @return 任务总数
|
||||
*/
|
||||
public Long getTotalTasks() {
|
||||
return taskResourceLibraryMapper.getTotalTasks();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转换成果任务金额
|
||||
*
|
||||
* @return 转换成果任务金额
|
||||
*/
|
||||
public Double getConvertedTaskAmount() {
|
||||
return taskResourceLibraryMapper.getConvertedTaskAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务转换成果数
|
||||
*
|
||||
* @return 任务转换成果数
|
||||
*/
|
||||
public Long getConvertedTasksCount() {
|
||||
return taskResourceLibraryMapper.getConvertedTasksCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务金额
|
||||
*
|
||||
* @return 任务金额
|
||||
*/
|
||||
public Double getTaskAmount() {
|
||||
return taskResourceLibraryMapper.getTaskAmount();
|
||||
}
|
||||
|
||||
|
||||
public Long getReviewTaskCount() {
|
||||
return taskResourceLibraryMapper.getReviewTaskCount();
|
||||
}
|
||||
|
||||
public int addFavorite(Favorite favorite) {
|
||||
favorite.setCreatedAt(DateUtils.getNowDate());
|
||||
return taskResourceLibraryMapper.insertFavorite(favorite);
|
||||
}
|
||||
|
||||
public int addWatcher(Watcher watcher) {
|
||||
watcher.setCreatedAt(DateUtils.getNowDate());
|
||||
return taskResourceLibraryMapper.insertWatcher(watcher);
|
||||
}
|
||||
|
||||
public int addSearcher2(Searcher searcher) {
|
||||
String[] split = searcher.getSearchIds().split(",");
|
||||
Arrays.stream(split).forEach(s -> {
|
||||
Searcher e = new Searcher();
|
||||
e.setCreatedAt(DateUtils.getNowDate());
|
||||
e.setSearchId(Long.parseLong(s));
|
||||
e.setUserId(searcher.getUserId());
|
||||
e.setExtInfo(searcher.getExtInfo());
|
||||
e.setSearchType(searcher.getSearchType());
|
||||
taskResourceLibraryMapper.insertSearcher(e);
|
||||
});
|
||||
|
||||
return split.length;
|
||||
}
|
||||
|
||||
public int delFavorite(Favorite favorite) {
|
||||
return taskResourceLibraryMapper.delFavorite(favorite);
|
||||
}
|
||||
|
||||
public int delWatcher(Watcher watcher) {
|
||||
return taskResourceLibraryMapper.delWatcher(watcher);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,185 @@
|
|||
package com.microservices.dms.resourceLibrary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo;
|
||||
import com.microservices.dms.resourceLibrary.mapper.ExpertResourceLibraryMapper;
|
||||
import com.microservices.dms.resourceLibrary.service.IExpertResourceLibraryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.microservices.dms.constant.TaskConstant.MARKER_SPACE_DOWNLOAD_API_BY_ID;
|
||||
|
||||
/**
|
||||
* 专家资源库Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2025-04-11
|
||||
*/
|
||||
@Service
|
||||
public class ExpertResourceLibraryServiceImpl implements IExpertResourceLibraryService {
|
||||
@Autowired
|
||||
private ExpertResourceLibraryMapper expertResourceLibraryMapper;
|
||||
|
||||
@Value("${markerSpaceUrl}")
|
||||
public String markerSpaceUrl;
|
||||
/**
|
||||
* 查询专家资源库
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 专家资源库
|
||||
*/
|
||||
@Override
|
||||
public ExpertResourceLibrary selectExpertResourceLibraryById(Long id) {
|
||||
ExpertResourceLibrary res = expertResourceLibraryMapper.selectExpertResourceLibraryById(id);
|
||||
// getSomeAttaches(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
private ExpertResourceLibrary getSomeAttaches(ExpertResourceLibrary res) {
|
||||
List<Map<String, Object>> mmp = new ArrayList<>();
|
||||
ExpertAttachmentVo attachmentVo = expertResourceLibraryMapper.getExpertInfoById(res.getExpertId());
|
||||
if (attachmentVo == null) {
|
||||
return res;
|
||||
}
|
||||
Map<String, Object> honorsAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getHonorsAttachments());
|
||||
buildFullUrl(honorsAttachments);
|
||||
Map<String, Object> resumeAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getResumeAttachments());
|
||||
buildFullUrl(resumeAttachments);
|
||||
Map<String, Object> titleCertificateAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getTitleCertificateAttachments());
|
||||
buildFullUrl(titleCertificateAttachments);
|
||||
Map<String, Object> academicAchievementsAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getAcademicAchievementsAttachments());
|
||||
buildFullUrl(academicAchievementsAttachments);
|
||||
res.getParams().put("academicAchievementsAttachments", academicAchievementsAttachments);
|
||||
res.getParams().put("honorsAttachments", honorsAttachments);
|
||||
res.getParams().put("resumeAttachments", resumeAttachments);
|
||||
res.getParams().put("titleCertificateAttachments", titleCertificateAttachments);
|
||||
|
||||
mmp.add(academicAchievementsAttachments);
|
||||
mmp.add(honorsAttachments);
|
||||
mmp.add(resumeAttachments);
|
||||
mmp.add(titleCertificateAttachments);
|
||||
res.setOtherAttachments(JSON.toJSONString(mmp));
|
||||
return res;
|
||||
}
|
||||
|
||||
private void buildFullUrl(Map<String, Object> map) {
|
||||
if (map != null && map.containsKey("id") && map.get("id") != null) {
|
||||
String id = map.get("id").toString();
|
||||
map.put("url", String.format(MARKER_SPACE_DOWNLOAD_API_BY_ID, markerSpaceUrl, id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 专家资源库
|
||||
*/
|
||||
@Override
|
||||
public List<ExpertResourceLibrary> selectExpertResourceLibraryList(ExpertResourceLibrary expertResourceLibrary) {
|
||||
List<ExpertResourceLibrary> expertResourceLibraryList = expertResourceLibraryMapper.selectExpertResourceLibraryList(expertResourceLibrary);
|
||||
for (ExpertResourceLibrary a : expertResourceLibraryList) {
|
||||
String gender = a.getGender();
|
||||
String img = "images/avatars/User/boy.jpg";
|
||||
if(StringUtils.isNotEmpty(gender) && gender.equals("1")){
|
||||
img = "images/avatars/User/girl.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
|
||||
getSomeAttaches(a);
|
||||
}
|
||||
return expertResourceLibraryList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询专家资源库列表
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 专家资源库
|
||||
*/
|
||||
@Override
|
||||
public List<ExpertResourceLibrary> selectExpertResourceLibraryList2(ExpertResourceLibrary expertResourceLibrary) {
|
||||
return expertResourceLibraryMapper.selectExpertResourceLibraryList2(expertResourceLibrary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long auditExpertCount() {
|
||||
return expertResourceLibraryMapper.auditExpertCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long competitionAuditCount() {
|
||||
return expertResourceLibraryMapper.competitionAuditCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long taskAuditCount() {
|
||||
return expertResourceLibraryMapper.taskAuditCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AchievementBehaviorSumVo getActDataStatisticById(Long id) {
|
||||
return expertResourceLibraryMapper.getActDataStatisticById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AchievementBehaviorSumVo getWatchFavoriteStatusById(Long id, Long userId) {
|
||||
return expertResourceLibraryMapper.getWatchFavoriteStatusById(id, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary) {
|
||||
expertResourceLibrary.setCreateTime(DateUtils.getNowDate());
|
||||
return expertResourceLibraryMapper.insertExpertResourceLibrary(expertResourceLibrary);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改专家资源库
|
||||
*
|
||||
* @param expertResourceLibrary 专家资源库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary) {
|
||||
expertResourceLibrary.setUpdateTime(DateUtils.getNowDate());
|
||||
return expertResourceLibraryMapper.updateExpertResourceLibrary(expertResourceLibrary);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除专家资源库
|
||||
*
|
||||
* @param ids 需要删除的专家资源库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpertResourceLibraryByIds(Long[] ids) {
|
||||
return expertResourceLibraryMapper.deleteExpertResourceLibraryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专家资源库信息
|
||||
*
|
||||
* @param id 专家资源库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExpertResourceLibraryById(Long id) {
|
||||
return expertResourceLibraryMapper.deleteExpertResourceLibraryById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package com.microservices.dms.utils;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.Year;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class DateUtil {
|
||||
|
||||
public static Date[] getDays(long start, long end) {
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDate startOfWeek = today.minusDays(end);
|
||||
LocalDate endOfWeek = today.minusDays(start);
|
||||
|
||||
LocalDateTime startDateTime = startOfWeek.atStartOfDay();
|
||||
LocalDateTime endDateTime = endOfWeek.atTime(23, 59, 59);
|
||||
|
||||
return new Date[]{
|
||||
Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant()),
|
||||
Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant()),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public static Date[] getCurrentYear() {
|
||||
Year year = Year.now();
|
||||
|
||||
LocalDate startDate = year.atDay(1);
|
||||
LocalDate endDate = year.atDay(year.length());
|
||||
|
||||
LocalDateTime startDateTime = startDate.atStartOfDay();
|
||||
LocalDateTime endDateTime = endDate.atTime(23, 59, 59);
|
||||
|
||||
return new Date[]{
|
||||
Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant()),
|
||||
Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant())
|
||||
};
|
||||
}
|
||||
|
||||
public static Date[] getLast12Months() {
|
||||
LocalDate endDate = LocalDate.now();
|
||||
|
||||
LocalDate startDate = endDate.minusMonths(11);
|
||||
|
||||
LocalDateTime startDateTime = LocalDateTime.of(startDate.getYear(),startDate.getMonth(),1,0,0,0);
|
||||
LocalDateTime endDateTime = endDate.atTime(23, 59, 59);
|
||||
|
||||
return new Date[]{
|
||||
Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant()),
|
||||
Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant())
|
||||
};
|
||||
}
|
||||
|
||||
public static Date[] getCurrentYearEndOf(LocalDate endDate) {
|
||||
Year year = Year.now();
|
||||
|
||||
LocalDate startOfWeek = year.atDay(1);
|
||||
|
||||
LocalDateTime startDateTime = startOfWeek.atStartOfDay();
|
||||
LocalDateTime endDateTime = endDate.atTime(23, 59, 59);
|
||||
|
||||
return new Date[]{
|
||||
Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant()),
|
||||
Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant())
|
||||
};
|
||||
}
|
||||
|
||||
public static List<String> getDateStrMMDD(Date start, Date end) {
|
||||
LocalDate s = start.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
LocalDate e = end.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
String pattern = "MM-dd";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
|
||||
return LongStream.range(0, s.until(e).getDays() + 1)
|
||||
.mapToObj(s::plusDays)
|
||||
.map(formatter::format)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
public static List<String> getDateStrYYYYMM(Date start, Date end) {
|
||||
LocalDate s = start.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
LocalDate e = end.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
String pattern = "yyyy-MM";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
|
||||
return LongStream.range(0, s.until(e).getMonths() + 1)
|
||||
.mapToObj(s::plusMonths)
|
||||
.map(formatter::format)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<String> getDateStrYYYYMMDD(Date start, Date end) {
|
||||
LocalDate s = start.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
LocalDate e = end.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().toLocalDate();
|
||||
String pattern = "yyyy-MM-dd";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
|
||||
return LongStream.range(0, s.until(e).getDays() + 1)
|
||||
.mapToObj(s::plusDays)
|
||||
.map(formatter::format)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static Date plusHours(Date date, long plusHours){
|
||||
if (date == null) {return null;}
|
||||
LocalDateTime s = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||
return Date.from(s.plusHours(plusHours).atZone(ZoneId.systemDefault()).toInstant());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.microservices.dms.utils;
|
||||
|
||||
import com.microservices.common.httpClient.domain.GitLinkRequestUrl;
|
||||
|
||||
public class DmsGitLinkRequestUrl extends GitLinkRequestUrl {
|
||||
|
||||
/**
|
||||
* 获取项目贡献者
|
||||
*/
|
||||
public static String CONTRIBUTORS(String fullName) {
|
||||
return String.format("/api/%s/contributors.json", fullName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目成员//
|
||||
*/
|
||||
public static String QUERY_USER_FROM_PROJECT(String fullName) {
|
||||
return String.format("/api/%s/collaborators.json", fullName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的PR
|
||||
*/
|
||||
public static String GET_PULL_REQUEST(String fullName, String statusType) {
|
||||
return String.format("/api/%s/pulls.json?status_type=%s", fullName, statusType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取PR的文件
|
||||
*/
|
||||
public static String GET_PR_FILES(String fullName, int PRNum) {
|
||||
return String.format("/api/v1/%s/pulls/%s/files.json", fullName, PRNum);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue