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; |
package com.ccsens.tall.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
||||
|
|
||||
public class SysPlugin implements Serializable { |
public class SysPlugin implements Serializable { |
||||
private Long id; |
private Long id; |
||||
|
|
||||
private String name; |
private String name; |
||||
|
|
||||
private String description; |
private String description; |
||||
|
|
||||
private Byte scene; |
private Byte scene; |
||||
|
|
||||
private Date createdAt; |
private Date createdAt; |
||||
|
|
||||
private Date updatedAt; |
private Date updatedAt; |
||||
|
|
||||
private Byte recStatus; |
private Byte recStatus; |
||||
|
|
||||
private static final long serialVersionUID = 1L; |
private Byte showType; |
||||
|
|
||||
public Long getId() { |
private static final long serialVersionUID = 1L; |
||||
return id; |
|
||||
} |
public Long getId() { |
||||
|
return id; |
||||
public void setId(Long id) { |
} |
||||
this.id = id; |
|
||||
} |
public void setId(Long id) { |
||||
|
this.id = id; |
||||
public String getName() { |
} |
||||
return name; |
|
||||
} |
public String getName() { |
||||
|
return name; |
||||
public void setName(String name) { |
} |
||||
this.name = name == null ? null : name.trim(); |
|
||||
} |
public void setName(String name) { |
||||
|
this.name = name == null ? null : name.trim(); |
||||
public String getDescription() { |
} |
||||
return description; |
|
||||
} |
public String getDescription() { |
||||
|
return description; |
||||
public void setDescription(String description) { |
} |
||||
this.description = description == null ? null : description.trim(); |
|
||||
} |
public void setDescription(String description) { |
||||
|
this.description = description == null ? null : description.trim(); |
||||
public Byte getScene() { |
} |
||||
return scene; |
|
||||
} |
public Byte getScene() { |
||||
|
return scene; |
||||
public void setScene(Byte scene) { |
} |
||||
this.scene = scene; |
|
||||
} |
public void setScene(Byte scene) { |
||||
|
this.scene = scene; |
||||
public Date getCreatedAt() { |
} |
||||
return createdAt; |
|
||||
} |
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
public void setCreatedAt(Date createdAt) { |
} |
||||
this.createdAt = createdAt; |
|
||||
} |
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
public Date getUpdatedAt() { |
} |
||||
return updatedAt; |
|
||||
} |
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
public void setUpdatedAt(Date updatedAt) { |
} |
||||
this.updatedAt = updatedAt; |
|
||||
} |
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
public Byte getRecStatus() { |
} |
||||
return recStatus; |
|
||||
} |
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
public void setRecStatus(Byte recStatus) { |
} |
||||
this.recStatus = recStatus; |
|
||||
} |
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
@Override |
} |
||||
public String toString() { |
|
||||
StringBuilder sb = new StringBuilder(); |
public Byte getShowType() { |
||||
sb.append(getClass().getSimpleName()); |
return showType; |
||||
sb.append(" ["); |
} |
||||
sb.append("Hash = ").append(hashCode()); |
|
||||
sb.append(", id=").append(id); |
public void setShowType(Byte showType) { |
||||
sb.append(", name=").append(name); |
this.showType = showType; |
||||
sb.append(", description=").append(description); |
} |
||||
sb.append(", scene=").append(scene); |
|
||||
sb.append(", createdAt=").append(createdAt); |
@Override |
||||
sb.append(", updatedAt=").append(updatedAt); |
public String toString() { |
||||
sb.append(", recStatus=").append(recStatus); |
StringBuilder sb = new StringBuilder(); |
||||
sb.append("]"); |
sb.append(getClass().getSimpleName()); |
||||
return sb.toString(); |
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; |
package com.ccsens.tall.persist.mapper; |
||||
|
|
||||
import com.ccsens.tall.bean.po.SysPlugin; |
import com.ccsens.tall.bean.po.SysPlugin; |
||||
import com.ccsens.tall.bean.po.SysPluginExample; |
import com.ccsens.tall.bean.po.SysPluginExample; |
||||
import org.apache.ibatis.annotations.Param; |
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
|
||||
|
public interface SysPluginMapper { |
||||
public interface SysPluginMapper { |
long countByExample(SysPluginExample example); |
||||
long countByExample(SysPluginExample example); |
|
||||
|
int deleteByExample(SysPluginExample example); |
||||
int deleteByExample(SysPluginExample example); |
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
int deleteByPrimaryKey(Long id); |
|
||||
|
int insert(SysPlugin record); |
||||
int insert(SysPlugin record); |
|
||||
|
int insertSelective(SysPlugin record); |
||||
int insertSelective(SysPlugin record); |
|
||||
|
List<SysPlugin> selectByExample(SysPluginExample example); |
||||
List<SysPlugin> selectByExample(SysPluginExample example); |
|
||||
|
SysPlugin selectByPrimaryKey(Long id); |
||||
SysPlugin selectByPrimaryKey(Long id); |
|
||||
|
int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
||||
int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|
||||
|
int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
||||
int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); |
|
||||
|
int updateByPrimaryKeySelective(SysPlugin record); |
||||
int updateByPrimaryKeySelective(SysPlugin record); |
|
||||
|
int updateByPrimaryKey(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"?> |
<?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"> |
<!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"> |
<mapper namespace="com.ccsens.tall.persist.mapper.SysPluginMapper"> |
||||
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysPlugin"> |
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysPlugin"> |
||||
<id column="id" jdbcType="BIGINT" property="id" /> |
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
<result column="name" jdbcType="VARCHAR" property="name" /> |
<result column="name" jdbcType="VARCHAR" property="name" /> |
||||
<result column="description" jdbcType="VARCHAR" property="description" /> |
<result column="description" jdbcType="VARCHAR" property="description" /> |
||||
<result column="scene" jdbcType="TINYINT" property="scene" /> |
<result column="scene" jdbcType="TINYINT" property="scene" /> |
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
</resultMap> |
<result column="show_type" jdbcType="TINYINT" property="showType" /> |
||||
<sql id="Example_Where_Clause"> |
</resultMap> |
||||
<where> |
<sql id="Example_Where_Clause"> |
||||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
<where> |
||||
<if test="criteria.valid"> |
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
<if test="criteria.valid"> |
||||
<foreach collection="criteria.criteria" item="criterion"> |
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
<choose> |
<foreach collection="criteria.criteria" item="criterion"> |
||||
<when test="criterion.noValue"> |
<choose> |
||||
and ${criterion.condition} |
<when test="criterion.noValue"> |
||||
</when> |
and ${criterion.condition} |
||||
<when test="criterion.singleValue"> |
</when> |
||||
and ${criterion.condition} #{criterion.value} |
<when test="criterion.singleValue"> |
||||
</when> |
and ${criterion.condition} #{criterion.value} |
||||
<when test="criterion.betweenValue"> |
</when> |
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
<when test="criterion.betweenValue"> |
||||
</when> |
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
<when test="criterion.listValue"> |
</when> |
||||
and ${criterion.condition} |
<when test="criterion.listValue"> |
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
and ${criterion.condition} |
||||
#{listItem} |
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
</foreach> |
#{listItem} |
||||
</when> |
</foreach> |
||||
</choose> |
</when> |
||||
</foreach> |
</choose> |
||||
</trim> |
</foreach> |
||||
</if> |
</trim> |
||||
</foreach> |
</if> |
||||
</where> |
</foreach> |
||||
</sql> |
</where> |
||||
<sql id="Update_By_Example_Where_Clause"> |
</sql> |
||||
<where> |
<sql id="Update_By_Example_Where_Clause"> |
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
<where> |
||||
<if test="criteria.valid"> |
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
<if test="criteria.valid"> |
||||
<foreach collection="criteria.criteria" item="criterion"> |
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
<choose> |
<foreach collection="criteria.criteria" item="criterion"> |
||||
<when test="criterion.noValue"> |
<choose> |
||||
and ${criterion.condition} |
<when test="criterion.noValue"> |
||||
</when> |
and ${criterion.condition} |
||||
<when test="criterion.singleValue"> |
</when> |
||||
and ${criterion.condition} #{criterion.value} |
<when test="criterion.singleValue"> |
||||
</when> |
and ${criterion.condition} #{criterion.value} |
||||
<when test="criterion.betweenValue"> |
</when> |
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
<when test="criterion.betweenValue"> |
||||
</when> |
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
<when test="criterion.listValue"> |
</when> |
||||
and ${criterion.condition} |
<when test="criterion.listValue"> |
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
and ${criterion.condition} |
||||
#{listItem} |
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
</foreach> |
#{listItem} |
||||
</when> |
</foreach> |
||||
</choose> |
</when> |
||||
</foreach> |
</choose> |
||||
</trim> |
</foreach> |
||||
</if> |
</trim> |
||||
</foreach> |
</if> |
||||
</where> |
</foreach> |
||||
</sql> |
</where> |
||||
<sql id="Base_Column_List"> |
</sql> |
||||
id, name, description, scene, created_at, updated_at, rec_status |
<sql id="Base_Column_List"> |
||||
</sql> |
id, name, description, scene, created_at, updated_at, rec_status, show_type |
||||
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultMap="BaseResultMap"> |
</sql> |
||||
select |
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultMap="BaseResultMap"> |
||||
<if test="distinct"> |
select |
||||
distinct |
<if test="distinct"> |
||||
</if> |
distinct |
||||
<include refid="Base_Column_List" /> |
</if> |
||||
from t_sys_plugin |
<include refid="Base_Column_List" /> |
||||
<if test="_parameter != null"> |
from t_sys_plugin |
||||
<include refid="Example_Where_Clause" /> |
<if test="_parameter != null"> |
||||
</if> |
<include refid="Example_Where_Clause" /> |
||||
<if test="orderByClause != null"> |
</if> |
||||
order by ${orderByClause} |
<if test="orderByClause != null"> |
||||
</if> |
order by ${orderByClause} |
||||
</select> |
</if> |
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
</select> |
||||
select |
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
<include refid="Base_Column_List" /> |
select |
||||
from t_sys_plugin |
<include refid="Base_Column_List" /> |
||||
where id = #{id,jdbcType=BIGINT} |
from t_sys_plugin |
||||
</select> |
where id = #{id,jdbcType=BIGINT} |
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
</select> |
||||
delete from t_sys_plugin |
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
where id = #{id,jdbcType=BIGINT} |
delete from t_sys_plugin |
||||
</delete> |
where id = #{id,jdbcType=BIGINT} |
||||
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample"> |
</delete> |
||||
delete from t_sys_plugin |
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample"> |
||||
<if test="_parameter != null"> |
delete from t_sys_plugin |
||||
<include refid="Example_Where_Clause" /> |
<if test="_parameter != null"> |
||||
</if> |
<include refid="Example_Where_Clause" /> |
||||
</delete> |
</if> |
||||
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
</delete> |
||||
insert into t_sys_plugin (id, name, description, |
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
||||
scene, created_at, updated_at, |
insert into t_sys_plugin (id, name, description, |
||||
rec_status) |
scene, created_at, updated_at, |
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, |
rec_status, show_type) |
||||
#{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, |
||||
#{recStatus,jdbcType=TINYINT}) |
#{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
||||
</insert> |
#{recStatus,jdbcType=TINYINT}, #{showType,jdbcType=TINYINT}) |
||||
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
</insert> |
||||
insert into t_sys_plugin |
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
insert into t_sys_plugin |
||||
<if test="id != null"> |
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
id, |
<if test="id != null"> |
||||
</if> |
id, |
||||
<if test="name != null"> |
</if> |
||||
name, |
<if test="name != null"> |
||||
</if> |
name, |
||||
<if test="description != null"> |
</if> |
||||
description, |
<if test="description != null"> |
||||
</if> |
description, |
||||
<if test="scene != null"> |
</if> |
||||
scene, |
<if test="scene != null"> |
||||
</if> |
scene, |
||||
<if test="createdAt != null"> |
</if> |
||||
created_at, |
<if test="createdAt != null"> |
||||
</if> |
created_at, |
||||
<if test="updatedAt != null"> |
</if> |
||||
updated_at, |
<if test="updatedAt != null"> |
||||
</if> |
updated_at, |
||||
<if test="recStatus != null"> |
</if> |
||||
rec_status, |
<if test="recStatus != null"> |
||||
</if> |
rec_status, |
||||
</trim> |
</if> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
<if test="showType != null"> |
||||
<if test="id != null"> |
show_type, |
||||
#{id,jdbcType=BIGINT}, |
</if> |
||||
</if> |
</trim> |
||||
<if test="name != null"> |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
#{name,jdbcType=VARCHAR}, |
<if test="id != null"> |
||||
</if> |
#{id,jdbcType=BIGINT}, |
||||
<if test="description != null"> |
</if> |
||||
#{description,jdbcType=VARCHAR}, |
<if test="name != null"> |
||||
</if> |
#{name,jdbcType=VARCHAR}, |
||||
<if test="scene != null"> |
</if> |
||||
#{scene,jdbcType=TINYINT}, |
<if test="description != null"> |
||||
</if> |
#{description,jdbcType=VARCHAR}, |
||||
<if test="createdAt != null"> |
</if> |
||||
#{createdAt,jdbcType=TIMESTAMP}, |
<if test="scene != null"> |
||||
</if> |
#{scene,jdbcType=TINYINT}, |
||||
<if test="updatedAt != null"> |
</if> |
||||
#{updatedAt,jdbcType=TIMESTAMP}, |
<if test="createdAt != null"> |
||||
</if> |
#{createdAt,jdbcType=TIMESTAMP}, |
||||
<if test="recStatus != null"> |
</if> |
||||
#{recStatus,jdbcType=TINYINT}, |
<if test="updatedAt != null"> |
||||
</if> |
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
</trim> |
</if> |
||||
</insert> |
<if test="recStatus != null"> |
||||
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultType="java.lang.Long"> |
#{recStatus,jdbcType=TINYINT}, |
||||
select count(*) from t_sys_plugin |
</if> |
||||
<if test="_parameter != null"> |
<if test="showType != null"> |
||||
<include refid="Example_Where_Clause" /> |
#{showType,jdbcType=TINYINT}, |
||||
</if> |
</if> |
||||
</select> |
</trim> |
||||
<update id="updateByExampleSelective" parameterType="map"> |
</insert> |
||||
update t_sys_plugin |
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysPluginExample" resultType="java.lang.Long"> |
||||
<set> |
select count(*) from t_sys_plugin |
||||
<if test="record.id != null"> |
<if test="_parameter != null"> |
||||
id = #{record.id,jdbcType=BIGINT}, |
<include refid="Example_Where_Clause" /> |
||||
</if> |
</if> |
||||
<if test="record.name != null"> |
</select> |
||||
name = #{record.name,jdbcType=VARCHAR}, |
<update id="updateByExampleSelective" parameterType="map"> |
||||
</if> |
update t_sys_plugin |
||||
<if test="record.description != null"> |
<set> |
||||
description = #{record.description,jdbcType=VARCHAR}, |
<if test="record.id != null"> |
||||
</if> |
id = #{record.id,jdbcType=BIGINT}, |
||||
<if test="record.scene != null"> |
</if> |
||||
scene = #{record.scene,jdbcType=TINYINT}, |
<if test="record.name != null"> |
||||
</if> |
name = #{record.name,jdbcType=VARCHAR}, |
||||
<if test="record.createdAt != null"> |
</if> |
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
<if test="record.description != null"> |
||||
</if> |
description = #{record.description,jdbcType=VARCHAR}, |
||||
<if test="record.updatedAt != null"> |
</if> |
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
<if test="record.scene != null"> |
||||
</if> |
scene = #{record.scene,jdbcType=TINYINT}, |
||||
<if test="record.recStatus != null"> |
</if> |
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
<if test="record.createdAt != null"> |
||||
</if> |
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
</set> |
</if> |
||||
<if test="_parameter != null"> |
<if test="record.updatedAt != null"> |
||||
<include refid="Update_By_Example_Where_Clause" /> |
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
</if> |
</if> |
||||
</update> |
<if test="record.recStatus != null"> |
||||
<update id="updateByExample" parameterType="map"> |
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
update t_sys_plugin |
</if> |
||||
set id = #{record.id,jdbcType=BIGINT}, |
<if test="record.showType != null"> |
||||
name = #{record.name,jdbcType=VARCHAR}, |
show_type = #{record.showType,jdbcType=TINYINT}, |
||||
description = #{record.description,jdbcType=VARCHAR}, |
</if> |
||||
scene = #{record.scene,jdbcType=TINYINT}, |
</set> |
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
<if test="_parameter != null"> |
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
<include refid="Update_By_Example_Where_Clause" /> |
||||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
</if> |
||||
<if test="_parameter != null"> |
</update> |
||||
<include refid="Update_By_Example_Where_Clause" /> |
<update id="updateByExample" parameterType="map"> |
||||
</if> |
update t_sys_plugin |
||||
</update> |
set id = #{record.id,jdbcType=BIGINT}, |
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
name = #{record.name,jdbcType=VARCHAR}, |
||||
update t_sys_plugin |
description = #{record.description,jdbcType=VARCHAR}, |
||||
<set> |
scene = #{record.scene,jdbcType=TINYINT}, |
||||
<if test="name != null"> |
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
name = #{name,jdbcType=VARCHAR}, |
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
</if> |
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
<if test="description != null"> |
show_type = #{record.showType,jdbcType=TINYINT} |
||||
description = #{description,jdbcType=VARCHAR}, |
<if test="_parameter != null"> |
||||
</if> |
<include refid="Update_By_Example_Where_Clause" /> |
||||
<if test="scene != null"> |
</if> |
||||
scene = #{scene,jdbcType=TINYINT}, |
</update> |
||||
</if> |
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
||||
<if test="createdAt != null"> |
update t_sys_plugin |
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
<set> |
||||
</if> |
<if test="name != null"> |
||||
<if test="updatedAt != null"> |
name = #{name,jdbcType=VARCHAR}, |
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
</if> |
||||
</if> |
<if test="description != null"> |
||||
<if test="recStatus != null"> |
description = #{description,jdbcType=VARCHAR}, |
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
</if> |
||||
</if> |
<if test="scene != null"> |
||||
</set> |
scene = #{scene,jdbcType=TINYINT}, |
||||
where id = #{id,jdbcType=BIGINT} |
</if> |
||||
</update> |
<if test="createdAt != null"> |
||||
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysPlugin"> |
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
update t_sys_plugin |
</if> |
||||
set name = #{name,jdbcType=VARCHAR}, |
<if test="updatedAt != null"> |
||||
description = #{description,jdbcType=VARCHAR}, |
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
scene = #{scene,jdbcType=TINYINT}, |
</if> |
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
<if test="recStatus != null"> |
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
rec_status = #{recStatus,jdbcType=TINYINT} |
</if> |
||||
where id = #{id,jdbcType=BIGINT} |
<if test="showType != null"> |
||||
</update> |
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> |
</mapper> |
Loading…
Reference in new issue