Browse Source

图标0601

master
zy_Java 5 years ago
parent
commit
ca1e15b689
  1. 26
      tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java
  2. 5
      tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java
  3. 11
      tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java
  4. 70
      tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java
  5. 199
      tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java
  6. 1340
      tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java
  7. 107
      tall/src/main/java/com/ccsens/tall/bean/vo/ChartVo.java
  8. 4
      tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java
  9. 10
      tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java
  10. 3
      tall/src/main/java/com/ccsens/tall/config/SpringConfig.java
  11. 4
      tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java
  12. 18
      tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java
  13. 59
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java
  14. 135
      tall/src/main/java/com/ccsens/tall/service/ChartService.java
  15. 19
      tall/src/main/java/com/ccsens/tall/service/IChartService.java
  16. 8
      tall/src/main/java/com/ccsens/tall/service/ILabelService.java
  17. 69
      tall/src/main/java/com/ccsens/tall/service/LabelService.java
  18. 9
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  19. 13
      tall/src/main/java/com/ccsens/tall/service/ProjectService.java
  20. 86
      tall/src/main/java/com/ccsens/tall/web/ChartController.java
  21. 22
      tall/src/main/java/com/ccsens/tall/web/LabelController.java
  22. 20
      tall/src/main/java/com/ccsens/tall/web/ProjectController.java
  23. 6
      tall/src/main/resources/mapper_dao/SysLabelDao.xml
  24. 221
      tall/src/main/resources/mapper_dao/SysProjectDao.xml
  25. 5
      tall/src/main/resources/mapper_dao/SysUserDao.xml
  26. 37
      tall/src/main/resources/mapper_dao/TaskDetailDao.xml
  27. 25
      tall/src/main/resources/mapper_raw/ProShowMapper.xml
  28. 499
      tall/src/main/resources/mapper_raw/SysPluginMapper.xml
  29. 2
      util/src/main/java/com/ccsens/util/StringUtil.java

26
tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java

@ -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;
}
}

5
tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java

@ -13,11 +13,12 @@ public class LabelDto {
@Data @Data
@ApiModel("添加标签") @ApiModel("添加标签")
public static class AddLabel{ public static class AddLabel{
@NotEmpty @NotEmpty(message = "请输入标签名")
@ApiModelProperty("标签名") @ApiModelProperty("标签名")
private String name; private String name;
@ApiModelProperty("标签code") @ApiModelProperty("标签code")
private String code; private String code;
@NotEmpty(message = "请选择颜色")
@ApiModelProperty("颜色") @ApiModelProperty("颜色")
private String color; private String color;
@ApiModelProperty("备注信息") @ApiModelProperty("备注信息")
@ -57,7 +58,7 @@ public class LabelDto {
@NotNull @NotNull
@ApiModelProperty("项目id") @ApiModelProperty("项目id")
private Long projectId; private Long projectId;
@ApiModelProperty("项目id") @ApiModelProperty("标签id")
private List<Long> labelList; private List<Long> labelList;
} }
} }

11
tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java

@ -30,6 +30,8 @@ public class ProShow implements Serializable {
private Byte selectTaskType; private Byte selectTaskType;
private String detailPath;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -136,6 +138,14 @@ public class ProShow implements Serializable {
this.selectTaskType = selectTaskType; this.selectTaskType = selectTaskType;
} }
public String getDetailPath() {
return detailPath;
}
public void setDetailPath(String detailPath) {
this.detailPath = detailPath == null ? null : detailPath.trim();
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -155,6 +165,7 @@ public class ProShow implements Serializable {
sb.append(", duration=").append(duration); sb.append(", duration=").append(duration);
sb.append(", showShortcuts=").append(showShortcuts); sb.append(", showShortcuts=").append(showShortcuts);
sb.append(", selectTaskType=").append(selectTaskType); sb.append(", selectTaskType=").append(selectTaskType);
sb.append(", detailPath=").append(detailPath);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

70
tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java

@ -894,6 +894,76 @@ public class ProShowExample {
addCriterion("select_task_type not between", value1, value2, "selectTaskType"); addCriterion("select_task_type not between", value1, value2, "selectTaskType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDetailPathIsNull() {
addCriterion("detail_path is null");
return (Criteria) this;
}
public Criteria andDetailPathIsNotNull() {
addCriterion("detail_path is not null");
return (Criteria) this;
}
public Criteria andDetailPathEqualTo(String value) {
addCriterion("detail_path =", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathNotEqualTo(String value) {
addCriterion("detail_path <>", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathGreaterThan(String value) {
addCriterion("detail_path >", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathGreaterThanOrEqualTo(String value) {
addCriterion("detail_path >=", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathLessThan(String value) {
addCriterion("detail_path <", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathLessThanOrEqualTo(String value) {
addCriterion("detail_path <=", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathLike(String value) {
addCriterion("detail_path like", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathNotLike(String value) {
addCriterion("detail_path not like", value, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathIn(List<String> values) {
addCriterion("detail_path in", values, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathNotIn(List<String> values) {
addCriterion("detail_path not in", values, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathBetween(String value1, String value2) {
addCriterion("detail_path between", value1, value2, "detailPath");
return (Criteria) this;
}
public Criteria andDetailPathNotBetween(String value1, String value2) {
addCriterion("detail_path not between", value1, value2, "detailPath");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

199
tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java

@ -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();
}
} }

1340
tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java

File diff suppressed because it is too large

107
tall/src/main/java/com/ccsens/tall/bean/vo/ChartVo.java

@ -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;
}
}

4
tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java

@ -96,9 +96,11 @@ public class ProjectVo {
@ApiModelProperty("是否展示MVP 0:不展示 1:展示") @ApiModelProperty("是否展示MVP 0:不展示 1:展示")
private int showMvp = 1; private int showMvp = 1;
@JsonIgnore//0日程,1天,2周,3月 @JsonIgnore//0日程,1天,2周,3月
private int selectTaskType = 0; private int selectTaskType = 1;
@ApiModelProperty("查询任务类型") @ApiModelProperty("查询任务类型")
private String selectType; private String selectType;
@ApiModelProperty("第三列展示页面的路径")
private String detailPath = "/project";
public String getSelectType(){ public String getSelectType(){
if(ObjectUtil.isNull(selectTaskType)) { if(ObjectUtil.isNull(selectTaskType)) {

10
tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java

@ -96,12 +96,6 @@ public class TaskVo {
private Long endTime; private Long endTime;
@ApiModelProperty("时长") @ApiModelProperty("时长")
private Long duration; private Long duration;
// @ApiModelProperty("显示的日期格式")
// private String showTimeFormat;
// @ApiModelProperty("是否展示快捷方式(交付物硬件按钮)0不展示 1展示")
// private int showShortcuts;
// @ApiModelProperty("是否展示添加任务的按钮 0不展示 1展示")
// private int createTask;
@ApiModelProperty("循环周期") @ApiModelProperty("循环周期")
private String cycle; private String cycle;
@ApiModelProperty("跳转模式 0自动,1延迟,2手动") @ApiModelProperty("跳转模式 0自动,1延迟,2手动")
@ -120,6 +114,8 @@ public class TaskVo {
private BigDecimal money; private BigDecimal money;
@ApiModelProperty("状态:0-未开始,1-进行中,2-已完成") @ApiModelProperty("状态:0-未开始,1-进行中,2-已完成")
private int process; private int process;
@ApiModelProperty("子项目id")
private Long subProjectId;
@ApiModelProperty("服务器时间") @ApiModelProperty("服务器时间")
private Long serverTime; private Long serverTime;
@ApiModelProperty("任务类型 0普通任务 1虚拟任务") @ApiModelProperty("任务类型 0普通任务 1虚拟任务")
@ -213,6 +209,8 @@ public class TaskVo {
private String name; private String name;
@ApiModelProperty("插件描述") @ApiModelProperty("插件描述")
private String description; private String description;
@ApiModelProperty("显示分类")
private String showType;
@JsonIgnore @JsonIgnore
private Long roleId; private Long roleId;
} }

3
tall/src/main/java/com/ccsens/tall/config/SpringConfig.java

@ -154,7 +154,8 @@ public class SpringConfig implements WebMvcConfigurer {
.addPathPatterns("/members/**") .addPathPatterns("/members/**")
.addPathPatterns("/templates/**") .addPathPatterns("/templates/**")
.addPathPatterns("/hardware/**") .addPathPatterns("/hardware/**")
.addPathPatterns("/labels/**"); .addPathPatterns("/labels/**")
.addPathPatterns("/charts/**");
//super.addInterceptors(registry); //super.addInterceptors(registry);
} }

4
tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java

@ -9,7 +9,7 @@ import java.util.List;
@Repository @Repository
public interface SysLabelDao extends SysLabelMapper { public interface SysLabelDao extends SysLabelMapper {
List<LabelVo.SelectLabel> selectLabelByUserId(@Param("userId")Long userId); List<LabelVo.SelectLabel> selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key);
List<LabelVo.SelectLabel> selectLabelByProjectId(@Param("projectId")Long projectId); List<LabelVo.SelectLabel> selectLabelByProjectId(@Param("userId")Long userId,@Param("projectId")Long projectId);
} }

18
tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java

@ -1,6 +1,7 @@
package com.ccsens.tall.persist.dao; package com.ccsens.tall.persist.dao;
import com.ccsens.tall.bean.po.SysProject; import com.ccsens.tall.bean.po.SysProject;
import com.ccsens.tall.bean.vo.ChartVo;
import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.persist.mapper.SysProjectMapper; import com.ccsens.tall.persist.mapper.SysProjectMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -22,5 +23,20 @@ public interface SysProjectDao extends SysProjectMapper{
List<ProjectVo.ProjectInfo> selectByLabelName(@Param("userId")Long currentUserId, @Param("labelName")String labelName); List<ProjectVo.ProjectInfo> selectByLabelName(@Param("userId")Long currentUserId, @Param("labelName")String labelName);
List<ProjectVo.RelevanceProject> selectRelevanceProject(@Param("labelName")Long projectId); List<ProjectVo.RelevanceProject> selectRelevanceProject(@Param("projectId")Long projectId);
List<ChartVo.__ExecutorChart> getExecutorChart(@Param("projectId")Long projectId,@Param("type")Integer type);
List<ChartVo.CompleteTaskNum> getCompleteTaskByTime(@Param("projectId")Long projectId);
List<ChartVo.ProjectTrendVo> getProjectTrend(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId);
ChartVo.ProjectOverview getOverview(@Param("projectId")Long projectId);
List<ChartVo.BurnoutFigure> getBurnoutFigure(@Param("projectId")Long projectId,
@Param("start")Long start, @Param("end")Long end,
@Param("roleId")Long roleIdm,@Param("type") Integer type);
Integer getTaskTotalByProjectId(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId);
} }

59
tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java

@ -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);
} }

135
tall/src/main/java/com/ccsens/tall/service/ChartService.java

@ -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;
}
}

19
tall/src/main/java/com/ccsens/tall/service/IChartService.java

@ -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);
}

8
tall/src/main/java/com/ccsens/tall/service/ILabelService.java

@ -6,15 +6,15 @@ import com.ccsens.tall.bean.vo.LabelVo;
import java.util.List; import java.util.List;
public interface ILabelService { public interface ILabelService {
List<LabelVo.SelectLabel> addLabel(Long userId,List<LabelDto.AddLabel> labelList); List<LabelVo.SelectLabel> addLabel(Long userId,LabelDto.AddLabel labelList);
List<LabelVo.SelectLabel> selectLabel(Long currentUserId); List<LabelVo.SelectLabel> selectLabel(Long currentUserId,String key);
void delLabel(Long currentUserId, LabelDto.DelLabel delLabel); void delLabel(Long currentUserId, LabelDto.DelLabel delLabel);
void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel); void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel);
void projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); List<LabelVo.SelectLabel> projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel);
void projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); List<LabelVo.SelectLabel> projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel);
} }

69
tall/src/main/java/com/ccsens/tall/service/LabelService.java

@ -17,6 +17,7 @@ import com.ccsens.util.exception.BaseException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service @Service
@ -34,26 +35,24 @@ public class LabelService implements ILabelService{
/** /**
* 添加标签 * 添加标签
* @param labelList 添加的标签信息 * @param label 添加的标签信息
*/ */
@Override @Override
public List<LabelVo.SelectLabel> addLabel(Long userId,List<LabelDto.AddLabel> labelList) { public List<LabelVo.SelectLabel> addLabel(Long userId,LabelDto.AddLabel label) {
if(CollectionUtil.isNotEmpty(labelList)){ if(ObjectUtil.isNotNull(label)){
labelList.forEach(label->{ SysLabelExample sysLabelExample = new SysLabelExample();
SysLabelExample sysLabelExample = new SysLabelExample(); sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId);
sysLabelExample.createCriteria().andNameEqualTo(label.getName()); List<SysLabel> sysLabels = sysLabelDao.selectByExample(sysLabelExample);
List<SysLabel> sysLabels = sysLabelDao.selectByExample(sysLabelExample); if(CollectionUtil.isNotEmpty(sysLabels)){
if(CollectionUtil.isNotEmpty(sysLabels)){ throw new BaseException(CodeEnum.REPEAT_LABEL);
throw new BaseException(CodeEnum.REPEAT_LABEL); }
} SysLabel sysLabel = new SysLabel();
SysLabel sysLabel = new SysLabel(); sysLabel.setId(snowflake.nextId());
sysLabel.setId(snowflake.nextId()); sysLabel.setUserId(userId);
sysLabel.setUserId(userId); BeanUtil.copyProperties(label,sysLabel);
BeanUtil.copyProperties(label,sysLabel); sysLabelDao.insertSelective(sysLabel);
sysLabelDao.insertSelective(sysLabel);
});
} }
return sysLabelDao.selectLabelByUserId(userId); return sysLabelDao.selectLabelByUserId(userId,null);
} }
/** /**
@ -62,8 +61,8 @@ public class LabelService implements ILabelService{
* @return 返回该用户添加的所有标签 * @return 返回该用户添加的所有标签
*/ */
@Override @Override
public List<LabelVo.SelectLabel> selectLabel(Long currentUserId) { public List<LabelVo.SelectLabel> selectLabel(Long currentUserId,String key) {
return sysLabelDao.selectLabelByUserId(currentUserId); return sysLabelDao.selectLabelByUserId(currentUserId,key);
} }
/** /**
@ -123,12 +122,13 @@ public class LabelService implements ILabelService{
* @param projectLabel 项目id和标签id * @param projectLabel 项目id和标签id
*/ */
@Override @Override
public void projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { public List<LabelVo.SelectLabel> projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) {
List<LabelVo.SelectLabel> selectLabelList = new ArrayList<>();
SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId());
if (ObjectUtil.isNotNull(project)) { if (ObjectUtil.isNotNull(project)) {
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); // int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId());
if (power > 1) { // if (power > 1) {
if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){
projectLabel.getLabelList().forEach(labelId->{ projectLabel.getLabelList().forEach(labelId->{
SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId);
@ -146,12 +146,15 @@ public class LabelService implements ILabelService{
sysProjectLabelDao.insertSelective(sysProjectLabel); sysProjectLabelDao.insertSelective(sysProjectLabel);
}); });
} }
} else { //查询项目内的标签信息
throw new BaseException(CodeEnum.NOT_POWER); selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId());
} // } else {
// throw new BaseException(CodeEnum.NOT_POWER);
// }
} else { } else {
throw new BaseException(CodeEnum.NOT_PROJECT); throw new BaseException(CodeEnum.NOT_PROJECT);
} }
return selectLabelList;
} }
/** /**
@ -160,12 +163,13 @@ public class LabelService implements ILabelService{
* @param projectLabel 项目id和被删除的标签的id * @param projectLabel 项目id和被删除的标签的id
*/ */
@Override @Override
public void projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { public List<LabelVo.SelectLabel> projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) {
List<LabelVo.SelectLabel> selectLabelList = new ArrayList<>();
SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId());
if (ObjectUtil.isNotNull(project)) { if (ObjectUtil.isNotNull(project)) {
//用户在项目中的最高权限 //用户在项目中的最高权限
int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); // int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId());
if (power > 1) { // if (power > 1) {
if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){
projectLabel.getLabelList().forEach(labelId -> { projectLabel.getLabelList().forEach(labelId -> {
SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId);
@ -187,11 +191,14 @@ public class LabelService implements ILabelService{
} }
}); });
} }
//查询项目内的标签信息
selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId());
} else { } else {
throw new BaseException(CodeEnum.NOT_POWER); throw new BaseException(CodeEnum.NOT_POWER);
} }
} else { // } else {
throw new BaseException(CodeEnum.NOT_PROJECT); // throw new BaseException(CodeEnum.NOT_PROJECT);
} // }
return selectLabelList;
} }
} }

9
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -23,6 +23,7 @@ import com.ccsens.util.cron.CronConstant;
import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.cron.NatureToDate;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.aspectj.apache.bcel.classfile.Code;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
@ -453,6 +454,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
String[] pluginIds = pluginVo.getId().split(","); String[] pluginIds = pluginVo.getId().split(",");
String[] pluginNames = pluginVo.getName().split(","); String[] pluginNames = pluginVo.getName().split(",");
String[] pluginDescription = pluginVo.getDescription().split(","); String[] pluginDescription = pluginVo.getDescription().split(",");
String[] pluginShowType = pluginVo.getShowType().split(",");
TaskVo.PluginVo plugin = null; TaskVo.PluginVo plugin = null;
for(int i = 0;i<pluginIds.length;i++){ for(int i = 0;i<pluginIds.length;i++){
@ -460,6 +462,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
plugin.setId(pluginIds[i]); plugin.setId(pluginIds[i]);
plugin.setName(pluginNames[i]); plugin.setName(pluginNames[i]);
plugin.setDescription(pluginDescription[i]); plugin.setDescription(pluginDescription[i]);
plugin.setShowType(pluginShowType[i]);
pluginVoList.add(plugin); pluginVoList.add(plugin);
} }
} }
@ -929,7 +932,13 @@ public class ProTaskDetailService implements IProTaskDetailService {
public ProSubTimeMember getProcessByUserIdAndTask(Long userId, Long subTimeId) throws Exception { public ProSubTimeMember getProcessByUserIdAndTask(Long userId, Long subTimeId) throws Exception {
ProSubTimeMember subTimeMember = null; ProSubTimeMember subTimeMember = null;
ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(subTimeId); ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(subTimeId);
if(ObjectUtil.isNull(subTime)){
throw new BaseException(CodeEnum.NOT_TASK);
}
ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId());
if(ObjectUtil.isNull(taskDetail)){
throw new BaseException(CodeEnum.NOT_TASK);
}
if (taskDetail.getFinishNeedAll() == 0) { if (taskDetail.getFinishNeedAll() == 0) {
ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample();
subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId).andComplatedStatusEqualTo((byte) 2); subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId).andComplatedStatusEqualTo((byte) 2);

13
tall/src/main/java/com/ccsens/tall/service/ProjectService.java

@ -186,12 +186,10 @@ public class ProjectService implements IProjectService {
projectConfig.setFilter(proShowList.get(0).getFilter()); projectConfig.setFilter(proShowList.get(0).getFilter());
projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp());
projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType());
projectConfig.setDetailPath(proShowList.get(0).getDetailPath());
projectInfo.setProjectConfig(projectConfig); projectInfo.setProjectConfig(projectConfig);
} else { } else {
ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig();
projectConfig.setFilter(0);
projectConfig.setSlide(0);
projectConfig.setCreateTask(1);
projectInfo.setProjectConfig(projectConfig); projectInfo.setProjectConfig(projectConfig);
} }
}); });
@ -245,7 +243,7 @@ public class ProjectService implements IProjectService {
projectInfo.setProjectConfig(projectConfig); projectInfo.setProjectConfig(projectConfig);
} }
//获取项目下的标签信息 //获取项目下的标签信息
List<LabelVo.SelectLabel> labelList = sysLabelDao.selectLabelByProjectId(project.getId()); List<LabelVo.SelectLabel> labelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId());
if(CollectionUtil.isNotEmpty(labelList)){ if(CollectionUtil.isNotEmpty(labelList)){
projectInfo.setLabelList(labelList); projectInfo.setLabelList(labelList);
} }
@ -301,16 +299,14 @@ public class ProjectService implements IProjectService {
projectConfig.setCreateTask(proShowList.get(0).getCreateTask()); projectConfig.setCreateTask(proShowList.get(0).getCreateTask());
projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp());
projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType());
projectConfig.setDetailPath(proShowList.get(0).getDetailPath());
projectInfo.setProjectConfig(projectConfig); projectInfo.setProjectConfig(projectConfig);
} else { } else {
ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig();
projectConfig.setSlide(0);
projectConfig.setFilter(0);
projectConfig.setCreateTask(1);
projectInfo.setProjectConfig(projectConfig); projectInfo.setProjectConfig(projectConfig);
} }
//获取项目下的标签信息 //获取项目下的标签信息
List<LabelVo.SelectLabel> labelList = sysLabelDao.selectLabelByProjectId(projectId); List<LabelVo.SelectLabel> labelList = sysLabelDao.selectLabelByProjectId(userId,projectId);
if(CollectionUtil.isNotEmpty(labelList)){ if(CollectionUtil.isNotEmpty(labelList)){
projectInfo.setLabelList(labelList); projectInfo.setLabelList(labelList);
} }
@ -329,7 +325,6 @@ public class ProjectService implements IProjectService {
PageHelper.startPage(1, 4); PageHelper.startPage(1, 4);
List<ProjectVo.TemplateStatus> templateProject = sysProjectDao.selectByTemplateStatus(1); List<ProjectVo.TemplateStatus> templateProject = sysProjectDao.selectByTemplateStatus(1);
PageHelper.startPage(1, 2); PageHelper.startPage(1, 2);
List<ProjectVo.TemplateStatus> commonProject = sysProjectDao.selectByTemplateStatus(0); List<ProjectVo.TemplateStatus> commonProject = sysProjectDao.selectByTemplateStatus(0);
// PageInfo pageInfo =new PageInfo<>(project); // PageInfo pageInfo =new PageInfo<>(project);

86
tall/src/main/java/com/ccsens/tall/web/ChartController.java

@ -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);
}
}

22
tall/src/main/java/com/ccsens/tall/web/LabelController.java

@ -4,6 +4,7 @@ import com.ccsens.tall.bean.dto.LabelDto;
import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.vo.DomainVo; import com.ccsens.tall.bean.vo.DomainVo;
import com.ccsens.tall.bean.vo.LabelVo; import com.ccsens.tall.bean.vo.LabelVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.service.ILabelService; import com.ccsens.tall.service.ILabelService;
import com.ccsens.util.JsonResponse; import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant; import com.ccsens.util.WebConstant;
@ -30,9 +31,10 @@ public class LabelController {
@ApiImplicitParams({ @ApiImplicitParams({
}) })
@RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LabelVo.SelectLabel>> selectLabel(HttpServletRequest request) throws Exception { public JsonResponse<List<LabelVo.SelectLabel>> selectLabel(HttpServletRequest request,
@RequestParam(required = false)String key) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<LabelVo.SelectLabel> selectLabelList = labelService.selectLabel(currentUserId); List<LabelVo.SelectLabel> selectLabelList = labelService.selectLabel(currentUserId,key);
return JsonResponse.newInstance().ok(selectLabelList); return JsonResponse.newInstance().ok(selectLabelList);
} }
@ -41,7 +43,7 @@ public class LabelController {
}) })
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LabelVo.SelectLabel>> addLabel(HttpServletRequest request, public JsonResponse<List<LabelVo.SelectLabel>> addLabel(HttpServletRequest request,
@Validated @RequestBody List<LabelDto.AddLabel> labelList ) throws Exception { @Validated @RequestBody LabelDto.AddLabel labelList ) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<LabelVo.SelectLabel> selectLabelList = labelService.addLabel(currentUserId,labelList); List<LabelVo.SelectLabel> selectLabelList = labelService.addLabel(currentUserId,labelList);
return JsonResponse.newInstance().ok(selectLabelList); return JsonResponse.newInstance().ok(selectLabelList);
@ -73,22 +75,22 @@ public class LabelController {
@ApiImplicitParams({ @ApiImplicitParams({
}) })
@RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse projectAddLabel(HttpServletRequest request, public JsonResponse<List<LabelVo.SelectLabel>> projectAddLabel(HttpServletRequest request,
@Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
labelService.projectAddLabel(currentUserId,projectLabel); List<LabelVo.SelectLabel> selectLabelList = labelService.projectAddLabel(currentUserId,projectLabel);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok(selectLabelList);
} }
@ApiOperation(value = "删除项目关联的标签",notes = "") @ApiOperation(value = "删除项目关联的标签",notes = "")
@ApiImplicitParams({ @ApiImplicitParams({
}) })
@RequestMapping(value = "/project/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/project/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse projectRemoveLabel(HttpServletRequest request, public JsonResponse<List<LabelVo.SelectLabel>> projectRemoveLabel(HttpServletRequest request,
@Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
labelService.projectRemoveLabel(currentUserId,projectLabel); List<LabelVo.SelectLabel> selectLabelList = labelService.projectRemoveLabel(currentUserId,projectLabel);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok(selectLabelList);
} }
} }

20
tall/src/main/java/com/ccsens/tall/web/ProjectController.java

@ -237,15 +237,15 @@ public class ProjectController {
return JsonResponse.newInstance().ok(projectInfoList); return JsonResponse.newInstance().ok(projectInfoList);
} }
// @ApiOperation(value = "查找关联的项目",notes = "") @ApiOperation(value = "查找关联的项目",notes = "")
// @ApiImplicitParams({ @ApiImplicitParams({
// }) })
// @RequestMapping(value = "/relevance", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/relevance", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<List<ProjectVo.RelevanceProject>> selectRelevanceProject(HttpServletRequest request, public JsonResponse<List<ProjectVo.RelevanceProject>> selectRelevanceProject(HttpServletRequest request,
// @RequestParam(required = false) Long projectId) throws Exception { @RequestParam(required = true) Long projectId) throws Exception {
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
// List<ProjectVo.RelevanceProject> projectInfoList = projectService.selectRelevanceProject(currentUserId,projectId); List<ProjectVo.RelevanceProject> projectInfoList = projectService.selectRelevanceProject(currentUserId,projectId);
// return JsonResponse.newInstance().ok(projectInfoList); return JsonResponse.newInstance().ok(projectInfoList);
// } }
} }

6
tall/src/main/resources/mapper_dao/SysLabelDao.xml

@ -8,6 +8,10 @@
rec_status = 0 rec_status = 0
and and
user_id = #{userId} user_id = #{userId}
<if test="key != null and key != ''">
and
`name` like concat('%',#{key},'%')
</if>
</select> </select>
<select id="selectLabelByProjectId" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel"> <select id="selectLabelByProjectId" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel">
@ -26,6 +30,8 @@
l.rec_status = 0 l.rec_status = 0
and and
p.project_id = #{projectId} p.project_id = #{projectId}
and
l.user_id = #{userId}
</select> </select>
</mapper> </mapper>

221
tall/src/main/resources/mapper_dao/SysProjectDao.xml

@ -55,6 +55,15 @@
<result column="pName" property="name" /> <result column="pName" property="name" />
</resultMap> </resultMap>
<!-- <resultMap id="ChartVo_CompleteTaskNum" type="com.ccsens.tall.bean.vo.ChartVo$CompleteTaskNum">-->
<!-- <id column="roleId" property="roleId" />-->
<!-- <result column="roleName" property="roleName" />-->
<!-- <result column="total" property="total" />-->
<!-- <collection property="taskDetailId" ofType="java.lang.Long">-->
<!-- <id column="dId" property="taskDetailId"/>-->
<!-- </collection>-->
<!-- </resultMap>-->
<select id="findProjectIdByUserId" parameterType="java.util.Map" <select id="findProjectIdByUserId" parameterType="java.util.Map"
resultMap="resultMap_ProjectInfo"> resultMap="resultMap_ProjectInfo">
SELECT SELECT
@ -208,17 +217,27 @@
<select id="selectRelevanceProject" parameterType="java.util.Map" resultMap="resultMap_Relevance_Project"> <select id="selectRelevanceProject" parameterType="java.util.Map" resultMap="resultMap_Relevance_Project">
SELECT SELECT
* p.id AS pId,
p.NAME AS pName,
p.address AS pAddress,
p.begin_time AS pBeginTime,
p.end_time AS pEndTime,
l.id as lId,
l.name as lName,
l.code as lCode,
l.color as lColor,
l.level as lLevle,
l.description as lDescription
FROM FROM
t_sys_project p LEFT JOIN (
(SELECT SELECT
r.relevance_project_id as rProjectId r.relevance_project_id as rProjectId
FROM FROM
t_sys_relevance_project r left JOIN t_sys_project sp ON r.project_id = sp.id t_sys_relevance_project r left JOIN t_sys_project sp ON r.project_id = sp.id
WHERE WHERE
r.project_id = #{projectId} r.project_id = #{projectId}
) t ) t
on p.id = t.rProjectId left join t_sys_project_label pl on pl.project_id = p.id LEFT JOIN t_sys_project p on p.id = t.rProjectId left join t_sys_project_label pl on pl.project_id = p.id
left join t_sys_label l on pl.label_id = l.id left join t_sys_label l on pl.label_id = l.id
WHERE WHERE
p.rec_status = 0 p.rec_status = 0
@ -228,6 +247,188 @@
(pl.rec_status = 0 or pl.rec_status is null) (pl.rec_status = 0 or pl.rec_status is null)
AND AND
p.template = 0 p.template = 0
</select>
<select id="getExecutorChart" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$__ExecutorChart">
SELECT
r.id as roleId,
r.`name` as roleName,
if(#{type}=0,count(d.id),SUM(d.end_time - d.begin_time)/6000) as `value`
FROM
`t_pro_role` r LEFT JOIN `t_pro_task_detail` d on r.id = d.executor_role
WHERE
r.project_id = #{projectId}
and
(SELECT name FROM t_pro_role pr WHERE r.parent_id = pr.id) in ('PM','Member')
AND
r.name not IN ('观众','MVP')
GROUP BY r.`name`
</select>
<select id="getCompleteTaskByTime" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$CompleteTaskNum">
SELECT
r.id as roleId,
r.`name` as roleName,
d.`name` as dId,
count(d.id) as total,
sum(a.finish=1) as value
FROM
`t_pro_role` r LEFT JOIN `t_pro_task_detail` d on r.id = d.executor_role
LEFT JOIN(
SELECT
td.id as dId,
if(sum(t.isFinish) = 0,true,false) as finish
FROM
t_pro_task_detail td LEFT JOIN
(
SELECT
s.id as sId,
s.task_detail_id as sTaskId,
m.real_finish_time,
m.complated_status,
if(count(m.id)=0,true,FALSE) as isFinish
FROM
t_pro_task_sub_time s LEFT JOIN t_pro_sub_time_member m on s.id = m.task_sub_time_id
WHERE
(
(
m.real_finish_time > s.begin_time
and
m.real_finish_time &lt;= s.end_time
and
m.complated_status = 2
)
or
(m.real_finish_time is null))
GROUP BY s.id
) t on td.id = t.sTaskId
WHERE
td.`level` in (2,3)
GROUP BY td.Id
) a on a.dId = d.id
WHERE
r.project_id = #{projectId}
and
d.`level` in (2,3)
and
(SELECT name FROM t_pro_role pr WHERE r.parent_id = pr.id) in ('PM','Member')
AND
r.name not IN ('观众','MVP')
GROUP BY r.`id`
</select>
<select id="getProjectTrend" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$ProjectTrendVo">
SELECT
FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d') as date,
count(s.id) as total,
sum(t.isFinish) as completed
FROM
t_pro_task_detail d LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id
LEFT JOIN
(
SELECT
st.id as sId,
st.task_detail_id,
m.real_finish_time,
m.complated_status,
m.id as mId,
if(count(m.id)=0,FALSE,true) as isFinish
FROM
t_pro_task_sub_time st LEFT JOIN t_pro_sub_time_member m on st.id = m.task_sub_time_id
WHERE
m.complated_status = 2
or
m.complated_status is null
GROUP BY st.id
) t on s.id = t.sId
WHERE
s.begin_time &lt; #{end}
AND
s.end_time &gt; #{start}
<if test="roleId != null">
and
d.executor_role = #{roleId}
</if>
and
d.project_id = #{projectId}
group by FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d')
</select>
<select id="getOverview" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$ProjectOverview">
SELECT
count(td.id) as total,
sum(t.isFinish) as completed,
sum(t.completedOnTime) as completedOnTime
FROM
t_pro_task_detail td LEFT JOIN
(
SELECT
st.id as sId,
st.task_detail_id as sTaskId,
if(count(m.id)=0,FALSE,true) as isFinish,
if(count(m.id)>0
and m.real_finish_time &gt; st.begin_time
and m.real_finish_time &lt;= st.end_time,true,false) as completedOnTime
FROM
t_pro_task_sub_time st LEFT JOIN t_pro_sub_time_member m on st.id = m.task_sub_time_id
WHERE
(m.complated_status = 2
or
m.complated_status is null)
GROUP BY st.id
) t on t.sTaskId = td.id
WHERE
td.project_id = #{projectId}
and
td.`level` in (2,3)
</select> </select>
<select id="getBurnoutFigure" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$BurnoutFigure">
SELECT
<if test="type == null">
FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d') as `date`,
</if>
count(s.id) as totalDay,
t.completed as completed
FROM
t_pro_task_detail d LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id
LEFT JOIN
(
SELECT
count(s.id) as completed,
FROM_UNIXTIME(m.real_finish_time/1000,'%Y-%m-%d') as `finishTime`
FROM
t_pro_task_detail d LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id
LEFT JOIN t_pro_sub_time_member m on s.id = m.task_sub_time_id
WHERE
m.complated_status = 2
AND
s.begin_time &lt; #{end}
AND
s.end_time &gt; #{start}
<if test="roleId != null">
and
d.executor_role = #{roleId}
</if>
and
d.project_id = #{projectId}
group by FROM_UNIXTIME(m.real_finish_time/1000,'%Y-%m-%d')
) t on t.finishTime = FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d')
WHERE
s.begin_time &lt; #{end}
AND
s.end_time &gt; #{start}
<if test="roleId != null">
and
d.executor_role = #{roleId}
</if>
and
d.project_id = #{projectId}
<if test="type == null">
group by FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d')
</if>
</select>
</mapper> </mapper>

5
tall/src/main/resources/mapper_dao/SysUserDao.xml

@ -76,9 +76,10 @@
AND a.identify_type = 3 AND a.identify_type = 3
WHERE WHERE
u.rec_status = 0 u.rec_status = 0
and and
a.rec_status = 0 a.rec_status = 0
and and
u.id = #{userId} u.id = #{userId}
limit 1
</select> </select>
</mapper> </mapper>

37
tall/src/main/resources/mapper_dao/TaskDetailDao.xml

@ -27,6 +27,7 @@
<result column="tRealBeginTime" property="realBeginTime" /> <result column="tRealBeginTime" property="realBeginTime" />
<result column="tRealEndTime" property="realEndTime" /> <result column="tRealEndTime" property="realEndTime" />
<result column="tProcess" property="process" /> <result column="tProcess" property="process" />
<result column="tSubProjectId" property="subProjectId" />
<result column="tMoney" property="money" /> <result column="tMoney" property="money" />
<result column="tVirtual" property="virtual" /> <result column="tVirtual" property="virtual" />
<result column="tDelay" property="delay" /> <result column="tDelay" property="delay" />
@ -38,6 +39,7 @@
<id column="pId" property="id"/> <id column="pId" property="id"/>
<result column="pName" property="name"/> <result column="pName" property="name"/>
<result column="pDescription" property="description"/> <result column="pDescription" property="description"/>
<result column="pShowType" property="showType"/>
</collection> </collection>
</resultMap> </resultMap>
@ -57,7 +59,8 @@
*, *,
GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId,
GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName,
GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription,
GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType
FROM FROM
(SELECT (SELECT
d.id as tDetailId, d.id as tDetailId,
@ -72,6 +75,7 @@
s.real_begin_time as tRealBeginTime, s.real_begin_time as tRealBeginTime,
s.real_end_time as tRealEndTime, s.real_end_time as tRealEndTime,
s.complated_status as tProcess, s.complated_status as tProcess,
d.sub_project_id as tSubProjectId,
d.money as tMoney, d.money as tMoney,
d.virtual as tVirtual, d.virtual as tVirtual,
d.delay as tDelay, d.delay as tDelay,
@ -82,7 +86,8 @@
sp.name as spName, sp.name as spName,
p.id as p_id, p.id as p_id,
sp.description as spDescription, sp.description as spDescription,
sp.id as spid sp.id as spid,
sp.show_type as spShowType
FROM FROM
t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id
LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id
@ -130,7 +135,8 @@
*, *,
GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId,
GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName,
GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription,
GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType
FROM FROM
(SELECT (SELECT
d.id as tDetailId, d.id as tDetailId,
@ -145,6 +151,7 @@
s.real_begin_time as tRealBeginTime, s.real_begin_time as tRealBeginTime,
s.real_end_time as tRealEndTime, s.real_end_time as tRealEndTime,
s.complated_status as tProcess, s.complated_status as tProcess,
d.sub_project_id as tSubProjectId,
d.money as tMoney, d.money as tMoney,
d.virtual as tVirtual, d.virtual as tVirtual,
d.delay as tDelay, d.delay as tDelay,
@ -155,7 +162,8 @@
sp.name as spName, sp.name as spName,
p.id as p_id, p.id as p_id,
sp.description as spDescription, sp.description as spDescription,
sp.id as spid sp.id as spid,
sp.show_type as spShowType
FROM FROM
t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id
LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id
@ -200,7 +208,8 @@
*, *,
GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId,
GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName,
GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription,
GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType
FROM FROM
(SELECT (SELECT
d.id as tDetailId, d.id as tDetailId,
@ -215,6 +224,7 @@
s.real_begin_time as tRealBeginTime, s.real_begin_time as tRealBeginTime,
s.real_end_time as tRealEndTime, s.real_end_time as tRealEndTime,
s.complated_status as tProcess, s.complated_status as tProcess,
d.sub_project_id as tSubProjectId,
d.money as tMoney, d.money as tMoney,
d.virtual as tVirtual, d.virtual as tVirtual,
d.delay as tDelay, d.delay as tDelay,
@ -222,7 +232,8 @@
sp.name as spName, sp.name as spName,
p.id as p_id, p.id as p_id,
sp.description as spDescription, sp.description as spDescription,
sp.id as spid sp.id as spid,
sp.show_type as spShowType
FROM FROM
t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id
LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id
@ -251,7 +262,8 @@
*, *,
GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId,
GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName,
GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription,
GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType
FROM FROM
(SELECT (SELECT
d.id as tDetailId, d.id as tDetailId,
@ -266,6 +278,7 @@
s.real_begin_time as tRealBeginTime, s.real_begin_time as tRealBeginTime,
s.real_end_time as tRealEndTime, s.real_end_time as tRealEndTime,
s.complated_status as tProcess, s.complated_status as tProcess,
d.sub_project_id as tSubProjectId,
d.money as tMoney, d.money as tMoney,
d.virtual as tVirtual, d.virtual as tVirtual,
d.delay as tDelay, d.delay as tDelay,
@ -273,7 +286,8 @@
sp.name as spName, sp.name as spName,
p.id as p_id, p.id as p_id,
sp.description as spDescription, sp.description as spDescription,
sp.id as spid sp.id as spid,
sp.show_type as spShowType
FROM FROM
t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id
LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id
@ -329,7 +343,8 @@
*, *,
GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId,
GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName,
GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription,
GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType
FROM FROM
(SELECT (SELECT
d.id as tDetailId, d.id as tDetailId,
@ -344,6 +359,7 @@
s.real_begin_time as tRealBeginTime, s.real_begin_time as tRealBeginTime,
s.real_end_time as tRealEndTime, s.real_end_time as tRealEndTime,
s.complated_status as tProcess, s.complated_status as tProcess,
d.sub_project_id as tSubProjectId,
d.money as tMoney, d.money as tMoney,
d.virtual as tVirtual, d.virtual as tVirtual,
d.delay as tDelay, d.delay as tDelay,
@ -351,7 +367,8 @@
sp.name as spName, sp.name as spName,
p.id as p_id, p.id as p_id,
sp.description as spDescription, sp.description as spDescription,
sp.id as spid sp.id as spid,
sp.show_type as spShowType
FROM FROM
t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id
LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id

25
tall/src/main/resources/mapper_raw/ProShowMapper.xml

@ -15,6 +15,7 @@
<result column="duration" jdbcType="TINYINT" property="duration" /> <result column="duration" jdbcType="TINYINT" property="duration" />
<result column="show_shortcuts" jdbcType="TINYINT" property="showShortcuts" /> <result column="show_shortcuts" jdbcType="TINYINT" property="showShortcuts" />
<result column="select_task_type" jdbcType="TINYINT" property="selectTaskType" /> <result column="select_task_type" jdbcType="TINYINT" property="selectTaskType" />
<result column="detail_path" jdbcType="VARCHAR" property="detailPath" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -76,7 +77,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, project_id, slide, filter, is_show_mvp, create_task, created_at, updated_at, id, project_id, slide, filter, is_show_mvp, create_task, created_at, updated_at,
rec_status, time_show, duration, show_shortcuts, select_task_type rec_status, time_show, duration, show_shortcuts, select_task_type, detail_path
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultMap="BaseResultMap">
select select
@ -113,12 +114,12 @@
filter, is_show_mvp, create_task, filter, is_show_mvp, create_task,
created_at, updated_at, rec_status, created_at, updated_at, rec_status,
time_show, duration, show_shortcuts, time_show, duration, show_shortcuts,
select_task_type) select_task_type, detail_path)
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{slide,jdbcType=TINYINT}, values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{slide,jdbcType=TINYINT},
#{filter,jdbcType=TINYINT}, #{isShowMvp,jdbcType=TINYINT}, #{createTask,jdbcType=TINYINT}, #{filter,jdbcType=TINYINT}, #{isShowMvp,jdbcType=TINYINT}, #{createTask,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
#{timeShow,jdbcType=VARCHAR}, #{duration,jdbcType=TINYINT}, #{showShortcuts,jdbcType=TINYINT}, #{timeShow,jdbcType=VARCHAR}, #{duration,jdbcType=TINYINT}, #{showShortcuts,jdbcType=TINYINT},
#{selectTaskType,jdbcType=TINYINT}) #{selectTaskType,jdbcType=TINYINT}, #{detailPath,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProShow"> <insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProShow">
insert into t_pro_show insert into t_pro_show
@ -162,6 +163,9 @@
<if test="selectTaskType != null"> <if test="selectTaskType != null">
select_task_type, select_task_type,
</if> </if>
<if test="detailPath != null">
detail_path,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -203,6 +207,9 @@
<if test="selectTaskType != null"> <if test="selectTaskType != null">
#{selectTaskType,jdbcType=TINYINT}, #{selectTaskType,jdbcType=TINYINT},
</if> </if>
<if test="detailPath != null">
#{detailPath,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultType="java.lang.Long">
@ -253,6 +260,9 @@
<if test="record.selectTaskType != null"> <if test="record.selectTaskType != null">
select_task_type = #{record.selectTaskType,jdbcType=TINYINT}, select_task_type = #{record.selectTaskType,jdbcType=TINYINT},
</if> </if>
<if test="record.detailPath != null">
detail_path = #{record.detailPath,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -272,7 +282,8 @@
time_show = #{record.timeShow,jdbcType=VARCHAR}, time_show = #{record.timeShow,jdbcType=VARCHAR},
duration = #{record.duration,jdbcType=TINYINT}, duration = #{record.duration,jdbcType=TINYINT},
show_shortcuts = #{record.showShortcuts,jdbcType=TINYINT}, show_shortcuts = #{record.showShortcuts,jdbcType=TINYINT},
select_task_type = #{record.selectTaskType,jdbcType=TINYINT} select_task_type = #{record.selectTaskType,jdbcType=TINYINT},
detail_path = #{record.detailPath,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -316,6 +327,9 @@
<if test="selectTaskType != null"> <if test="selectTaskType != null">
select_task_type = #{selectTaskType,jdbcType=TINYINT}, select_task_type = #{selectTaskType,jdbcType=TINYINT},
</if> </if>
<if test="detailPath != null">
detail_path = #{detailPath,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -332,7 +346,8 @@
time_show = #{timeShow,jdbcType=VARCHAR}, time_show = #{timeShow,jdbcType=VARCHAR},
duration = #{duration,jdbcType=TINYINT}, duration = #{duration,jdbcType=TINYINT},
show_shortcuts = #{showShortcuts,jdbcType=TINYINT}, show_shortcuts = #{showShortcuts,jdbcType=TINYINT},
select_task_type = #{selectTaskType,jdbcType=TINYINT} select_task_type = #{selectTaskType,jdbcType=TINYINT},
detail_path = #{detailPath,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

499
tall/src/main/resources/mapper_raw/SysPluginMapper.xml

@ -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>

2
util/src/main/java/com/ccsens/util/StringUtil.java

@ -13,7 +13,7 @@ import java.util.regex.Pattern;
public class StringUtil { public class StringUtil {
public final static String WEEK_DAY = "(每?隔\\d周)|(每?隔\\d星期)|(每?周[0-7]+)|(每?星期[0-7]+)|(每?周一)|(每?周二)|(每?周三)|(每?周四)|(每?周五)|(每?周六)|(每?周日)|(每?周天)"; public final static String WEEK_DAY = "(每?隔\\d周)|(每?隔\\d星期)|(每?周[0-7]+)|(每?星期[0-7]+)|(每?周一)|(每?周二)|(每?周三)|(每?周四)|(每?周五)|(每?周六)|(每?周日)|(每?周天)";
public final static String DAY = "(每?隔\\d+天)|(每?隔\\d+日)|(\\d+号)|(\\d+日)|(\\d+\\-\\d+号)|(\\d+\\-\\d+日)|(\\d+到\\d+号)|(\\d+到\\d+日)"; public final static String DAY = "(每\\d+天)|(每\\d+日)|(每?隔\\d+天)|(每?隔\\d+日)|(\\d+号)|(\\d+日)|(\\d+\\-\\d+号)|(\\d+\\-\\d+日)|(\\d+到\\d+号)|(\\d+到\\d+日)";
public final static String CONTINUE_RANGE = ".*(到|\\-|至).*"; public final static String CONTINUE_RANGE = ".*(到|\\-|至).*";

Loading…
Cancel
Save