29 changed files with 1921 additions and 1111 deletions
@ -0,0 +1,26 @@ |
|||
package com.ccsens.tall.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Data |
|||
public class ChartDto { |
|||
|
|||
@Data |
|||
public static class ProjectTrendDto{ |
|||
@NotNull |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@NotEmpty |
|||
@ApiModelProperty("开始日期") |
|||
private String start; |
|||
@NotEmpty |
|||
@ApiModelProperty("结束日期") |
|||
private String end; |
|||
@ApiModelProperty("角色id") |
|||
private Long roleId; |
|||
} |
|||
} |
@ -1,95 +1,106 @@ |
|||
package com.ccsens.tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysPlugin implements Serializable { |
|||
private Long id; |
|||
|
|||
private String name; |
|||
|
|||
private String description; |
|||
|
|||
private Byte scene; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description == null ? null : description.trim(); |
|||
} |
|||
|
|||
public Byte getScene() { |
|||
return scene; |
|||
} |
|||
|
|||
public void setScene(Byte scene) { |
|||
this.scene = scene; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", description=").append(description); |
|||
sb.append(", scene=").append(scene); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
package com.ccsens.tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysPlugin implements Serializable { |
|||
private Long id; |
|||
|
|||
private String name; |
|||
|
|||
private String description; |
|||
|
|||
private Byte scene; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private Byte showType; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description == null ? null : description.trim(); |
|||
} |
|||
|
|||
public Byte getScene() { |
|||
return scene; |
|||
} |
|||
|
|||
public void setScene(Byte scene) { |
|||
this.scene = scene; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
public Byte getShowType() { |
|||
return showType; |
|||
} |
|||
|
|||
public void setShowType(Byte showType) { |
|||
this.showType = showType; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", description=").append(description); |
|||
sb.append(", scene=").append(scene); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", showType=").append(showType); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,107 @@ |
|||
package com.ccsens.tall.bean.vo; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class ChartVo { |
|||
|
|||
@Data |
|||
public static class ExecutorChart{ |
|||
@ApiModelProperty("查询类型") |
|||
private int type; |
|||
@ApiModelProperty("查询类型") |
|||
private List<__ExecutorChart> executorChart; |
|||
} |
|||
@Data |
|||
public static class __ExecutorChart{ |
|||
@ApiModelProperty("角色id") |
|||
private Long roleId; |
|||
@ApiModelProperty("角色名") |
|||
private String roleName; |
|||
@ApiModelProperty("value") |
|||
private Integer value; |
|||
} |
|||
|
|||
|
|||
@Data |
|||
public static class CompleteTaskNum{ |
|||
@ApiModelProperty("角色id") |
|||
private Long roleId; |
|||
@ApiModelProperty("角色名") |
|||
private String roleName; |
|||
@ApiModelProperty("完成数量") |
|||
private Integer value; |
|||
@ApiModelProperty("任务总数") |
|||
private Integer total; |
|||
} |
|||
|
|||
|
|||
@Data |
|||
public static class ProjectTrendVo { |
|||
@ApiModelProperty("日期") |
|||
private String date; |
|||
@ApiModelProperty("当天任务总数") |
|||
private Integer total; |
|||
@ApiModelProperty("当天已完成的任务数") |
|||
private Integer completed; |
|||
} |
|||
|
|||
@Data |
|||
public static class ProjectOverview { |
|||
@ApiModelProperty("任务总数") |
|||
private Integer total; |
|||
@ApiModelProperty("已完成的任务数") |
|||
private Integer completed; |
|||
@ApiModelProperty("未完成的任务数") |
|||
private Integer undone; |
|||
@ApiModelProperty("按时完成") |
|||
private Integer completedOnTime; |
|||
@ApiModelProperty("逾期完成") |
|||
private Integer completedOverTime; |
|||
@ApiModelProperty("今天任务总数") |
|||
private Integer today; |
|||
@ApiModelProperty("今日已完成") |
|||
private Integer todayCompleted; |
|||
@ApiModelProperty("今日未完成") |
|||
private Integer todayUndone; |
|||
|
|||
public Integer getUndone(){ |
|||
if(ObjectUtil.isNotNull(total) && ObjectUtil.isNotNull(completed)){ |
|||
return total - completed; |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public Integer getCompletedOverTime(){ |
|||
if(ObjectUtil.isNotNull(completed) && ObjectUtil.isNotNull(completedOnTime)){ |
|||
return completed - completedOnTime; |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
public static class BurnoutFigure { |
|||
@ApiModelProperty("日期 MM-DD") |
|||
private String date; |
|||
@ApiModelProperty("理想的剩余任务数,回出现小数 保留1位小数") |
|||
private BigDecimal ideal; |
|||
@ApiModelProperty("计划的剩余任务数") |
|||
private Integer planned; |
|||
@ApiModelProperty("实际的剩余任务数") |
|||
private Integer realistic; |
|||
@JsonIgnore//任务总数
|
|||
private Integer total; |
|||
@JsonIgnore//每天的任务数
|
|||
private Integer totalDay; |
|||
@JsonIgnore//每天完成的任务数量
|
|||
private Integer completed; |
|||
} |
|||
} |
@ -1,31 +1,30 @@ |
|||
package com.ccsens.tall.persist.mapper; |
|||
|
|||
import com.ccsens.tall.bean.po.SysPlugin; |
|||
import com.ccsens.tall.bean.po.SysPluginExample; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SysPluginMapper { |
|||
long countByExample(SysPluginExample example); |
|||
|
|||
int deleteByExample(SysPluginExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysPlugin record); |
|||
|
|||
int insertSelective(SysPlugin record); |
|||
|
|||
List<SysPlugin> selectByExample(SysPluginExample example); |
|||
|
|||
SysPlugin selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|||
|
|||
int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysPlugin record); |
|||
|
|||
int updateByPrimaryKey(SysPlugin record); |
|||
package com.ccsens.tall.persist.mapper; |
|||
|
|||
import com.ccsens.tall.bean.po.SysPlugin; |
|||
import com.ccsens.tall.bean.po.SysPluginExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysPluginMapper { |
|||
long countByExample(SysPluginExample example); |
|||
|
|||
int deleteByExample(SysPluginExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysPlugin record); |
|||
|
|||
int insertSelective(SysPlugin record); |
|||
|
|||
List<SysPlugin> selectByExample(SysPluginExample example); |
|||
|
|||
SysPlugin selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|||
|
|||
int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysPlugin record); |
|||
|
|||
int updateByPrimaryKey(SysPlugin record); |
|||
} |
@ -0,0 +1,135 @@ |
|||
package com.ccsens.tall.service; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.ccsens.tall.bean.dto.ChartDto; |
|||
import com.ccsens.tall.bean.po.SysProject; |
|||
import com.ccsens.tall.bean.vo.ChartVo; |
|||
import com.ccsens.tall.persist.dao.SysProjectDao; |
|||
import com.ccsens.util.CodeEnum; |
|||
import com.ccsens.util.exception.BaseException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
import java.util.concurrent.atomic.AtomicReference; |
|||
|
|||
@Service |
|||
public class ChartService implements IChartService{ |
|||
@Autowired |
|||
private SysProjectDao sysProjectDao; |
|||
|
|||
/** |
|||
* 任务执行者分布图 |
|||
* @param currentUserId |
|||
* @param type |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public ChartVo.ExecutorChart getExecutorChart(Long currentUserId,Long projectId,Integer type) { |
|||
SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); |
|||
if(ObjectUtil.isNull(sysProject)){ |
|||
throw new BaseException(CodeEnum.NOT_PROJECT); |
|||
} |
|||
List<ChartVo.__ExecutorChart> executorChartList = sysProjectDao.getExecutorChart(projectId,type); |
|||
ChartVo.ExecutorChart executorChart = new ChartVo.ExecutorChart(); |
|||
executorChart.setType(type); |
|||
executorChart.setExecutorChart(executorChartList); |
|||
return executorChart; |
|||
} |
|||
|
|||
/** |
|||
* 计划时间内完成任务 |
|||
* @param currentUserId |
|||
* @param projectId |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<ChartVo.CompleteTaskNum> getCompleteTaskByTime(Long currentUserId, Long projectId) { |
|||
//查找所有角色及任务数量
|
|||
List<ChartVo.CompleteTaskNum> completeTaskNumList = sysProjectDao.getCompleteTaskByTime(projectId); |
|||
return completeTaskNumList; |
|||
} |
|||
|
|||
/** |
|||
* 项目进展趋势图 |
|||
* @param currentUserId |
|||
* @param projectTrendDto |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<ChartVo.ProjectTrendVo> getProjectTrend(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto) { |
|||
Long start = DateUtil.parse(projectTrendDto.getStart()).getTime(); |
|||
Long end = DateUtil.parse(projectTrendDto.getEnd()).getTime(); |
|||
List<ChartVo.ProjectTrendVo> projectTrendVoList = sysProjectDao.getProjectTrend(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId()); |
|||
return projectTrendVoList; |
|||
} |
|||
|
|||
/** |
|||
* 概览报表 |
|||
* @param currentUserId |
|||
* @param projectId |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public ChartVo.ProjectOverview getOverview(Long currentUserId, Long projectId) { |
|||
ChartVo.ProjectOverview projectOverview = sysProjectDao.getOverview(projectId); |
|||
return projectOverview; |
|||
} |
|||
|
|||
/** |
|||
* 燃尽图 |
|||
* @param currentUserId |
|||
* @param projectTrendDto |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<ChartVo.BurnoutFigure> getBurnoutFigure(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto) { |
|||
Long start = DateUtil.parse(projectTrendDto.getStart()).getTime(); |
|||
Long end = DateUtil.parse(projectTrendDto.getEnd()).getTime(); |
|||
//获取任务总数(如果type传1 查询规定条件内的任务总数,若传null,则按天分组查找)
|
|||
List<ChartVo.BurnoutFigure> totalList = sysProjectDao.getBurnoutFigure(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId(),1); |
|||
//理想
|
|||
AtomicReference<BigDecimal> idealTotal = new AtomicReference<>(); |
|||
BigDecimal idealTotalInt = new BigDecimal(0); |
|||
//计划
|
|||
AtomicInteger plannedTotal = new AtomicInteger(); |
|||
//实际
|
|||
AtomicInteger realTotal = new AtomicInteger(); |
|||
if(CollectionUtil.isNotEmpty(totalList)) { |
|||
idealTotal.set(BigDecimal.valueOf(totalList.get(0).getTotalDay())); |
|||
idealTotalInt = BigDecimal.valueOf(totalList.get(0).getTotalDay()); |
|||
plannedTotal.set(totalList.get(0).getTotalDay()); |
|||
realTotal.set(totalList.get(0).getTotalDay()); |
|||
} |
|||
//按天获取信息
|
|||
List<ChartVo.BurnoutFigure> burnoutFigureList = sysProjectDao.getBurnoutFigure(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId(),null); |
|||
if(CollectionUtil.isNotEmpty(burnoutFigureList)){ |
|||
//每天理想完成数,总数/天数=每天理想完成数
|
|||
BigDecimal idealFinish = idealTotalInt.divide(BigDecimal.valueOf(burnoutFigureList.size()),1,BigDecimal.ROUND_HALF_UP); |
|||
burnoutFigureList.forEach(burnoutFigure -> { |
|||
//理想剩余数量
|
|||
idealTotal.set(idealTotal.get().subtract(idealFinish)); |
|||
if(idealTotal.get().compareTo(BigDecimal.valueOf(0)) < 1){ |
|||
burnoutFigure.setIdeal(BigDecimal.valueOf(0)); |
|||
}else { |
|||
burnoutFigure.setIdeal(idealTotal.get()); |
|||
} |
|||
//计划剩余数量
|
|||
plannedTotal.set(plannedTotal.get() - burnoutFigure.getTotalDay()); |
|||
burnoutFigure.setPlanned(plannedTotal.get()); |
|||
//实际剩余数量
|
|||
if(ObjectUtil.isNotNull(burnoutFigure.getCompleted())){ |
|||
realTotal.set(realTotal.get() - burnoutFigure.getCompleted()); |
|||
burnoutFigure.setRealistic(realTotal.get()); |
|||
}else{ |
|||
burnoutFigure.setRealistic(realTotal.get()); |
|||
} |
|||
}); |
|||
} |
|||
return burnoutFigureList; |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.ccsens.tall.service; |
|||
|
|||
import com.ccsens.tall.bean.dto.ChartDto; |
|||
import com.ccsens.tall.bean.vo.ChartVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface IChartService { |
|||
ChartVo.ExecutorChart getExecutorChart(Long currentUserId,Long projectId, Integer type); |
|||
|
|||
List<ChartVo.CompleteTaskNum> getCompleteTaskByTime(Long currentUserId, Long projectId); |
|||
|
|||
List<ChartVo.ProjectTrendVo> getProjectTrend(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto); |
|||
|
|||
ChartVo.ProjectOverview getOverview(Long currentUserId, Long projectId); |
|||
|
|||
List<ChartVo.BurnoutFigure> getBurnoutFigure(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto); |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.ccsens.tall.web; |
|||
|
|||
import com.ccsens.tall.bean.dto.ChartDto; |
|||
import com.ccsens.tall.bean.dto.TaskDto; |
|||
import com.ccsens.tall.bean.vo.ChartVo; |
|||
import com.ccsens.tall.bean.vo.TaskVo; |
|||
import com.ccsens.tall.service.IChartService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.WebConstant; |
|||
import io.jsonwebtoken.Claims; |
|||
import io.swagger.annotations.*; |
|||
import jdk.internal.dynalink.linker.LinkerServices; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
@Api(tags = "图表相关API", description = "") |
|||
@RestController |
|||
@RequestMapping("/charts") |
|||
public class ChartController { |
|||
@Autowired |
|||
private IChartService chartService; |
|||
|
|||
|
|||
@ApiOperation(value = "任务执行者分布图",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/executor", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ChartVo.ExecutorChart> getTasksByTaskId(HttpServletRequest request, |
|||
@RequestParam(required = true)Long projectId, |
|||
@RequestParam(required = false)Integer type) throws Exception{ |
|||
type = type == null ? 0 : type; |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
ChartVo.ExecutorChart executorChart = chartService.getExecutorChart(currentUserId,projectId,type); |
|||
return JsonResponse.newInstance().ok(executorChart); |
|||
} |
|||
|
|||
@ApiOperation(value = "计划时间内完成任务",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/complete", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<ChartVo.CompleteTaskNum>> getCompleteTaskByTime(HttpServletRequest request, |
|||
@RequestParam(required = true)Long projectId) throws Exception{ |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
List<ChartVo.CompleteTaskNum> completeTaskNumList = chartService.getCompleteTaskByTime(currentUserId,projectId); |
|||
return JsonResponse.newInstance().ok(completeTaskNumList); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "项目进展趋势图",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/trend", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<ChartVo.ProjectTrendVo>> getProjectTrend(HttpServletRequest request, |
|||
@Validated @RequestBody ChartDto.ProjectTrendDto projectTrendDto) throws Exception{ |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
List<ChartVo.ProjectTrendVo> projectTrendVoList = chartService.getProjectTrend(currentUserId,projectTrendDto); |
|||
return JsonResponse.newInstance().ok(projectTrendVoList); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "概览报表",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/overview", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ChartVo.ProjectOverview> getOverview(HttpServletRequest request, |
|||
@RequestParam(required = true)Long projectId) throws Exception{ |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,projectId); |
|||
return JsonResponse.newInstance().ok(projectOverview); |
|||
} |
|||
|
|||
@ApiOperation(value = "燃尽图",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/burnout", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<ChartVo.BurnoutFigure>> getBurnoutFigure(HttpServletRequest request, |
|||
@Validated @RequestBody ChartDto.ProjectTrendDto projectTrendDto) throws Exception{ |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
List<ChartVo.BurnoutFigure> burnoutFigure = chartService.getBurnoutFigure(currentUserId,projectTrendDto); |
|||
return JsonResponse.newInstance().ok(burnoutFigure); |
|||
} |
|||
} |
@ -1,243 +1,258 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.tall.persist.mapper.SysPluginMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysPlugin"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="description" jdbcType="VARCHAR" property="description" /> |
|||
<result column="scene" jdbcType="TINYINT" property="scene" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, description, scene, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_plugin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_plugin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample"> |
|||
delete from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
insert into t_sys_plugin (id, name, description, |
|||
scene, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, |
|||
#{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
insert into t_sys_plugin |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="description != null"> |
|||
description, |
|||
</if> |
|||
<if test="scene != null"> |
|||
scene, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
#{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="scene != null"> |
|||
#{scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_plugin |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.description != null"> |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.scene != null"> |
|||
scene = #{record.scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sys_plugin |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
scene = #{record.scene,jdbcType=TINYINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
update t_sys_plugin |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="scene != null"> |
|||
scene = #{scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
update t_sys_plugin |
|||
set name = #{name,jdbcType=VARCHAR}, |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
scene = #{scene,jdbcType=TINYINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.tall.persist.mapper.SysPluginMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysPlugin"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="description" jdbcType="VARCHAR" property="description" /> |
|||
<result column="scene" jdbcType="TINYINT" property="scene" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
<result column="show_type" jdbcType="TINYINT" property="showType" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, description, scene, created_at, updated_at, rec_status, show_type |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_plugin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_plugin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample"> |
|||
delete from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
insert into t_sys_plugin (id, name, description, |
|||
scene, created_at, updated_at, |
|||
rec_status, show_type) |
|||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, |
|||
#{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}, #{showType,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
insert into t_sys_plugin |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="description != null"> |
|||
description, |
|||
</if> |
|||
<if test="scene != null"> |
|||
scene, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
<if test="showType != null"> |
|||
show_type, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
#{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="scene != null"> |
|||
#{scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="showType != null"> |
|||
#{showType,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_plugin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_plugin |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.description != null"> |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.scene != null"> |
|||
scene = #{record.scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.showType != null"> |
|||
show_type = #{record.showType,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sys_plugin |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
description = #{record.description,jdbcType=VARCHAR}, |
|||
scene = #{record.scene,jdbcType=TINYINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
show_type = #{record.showType,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
update t_sys_plugin |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="description != null"> |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="scene != null"> |
|||
scene = #{scene,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="showType != null"> |
|||
show_type = #{showType,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
|||
update t_sys_plugin |
|||
set name = #{name,jdbcType=VARCHAR}, |
|||
description = #{description,jdbcType=VARCHAR}, |
|||
scene = #{scene,jdbcType=TINYINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
show_type = #{showType,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue