Browse Source

任务增加上级字段,上级类型,开始时间字段

recovery
ma 4 years ago
parent
commit
9d6dc93329
  1. 12
      tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java
  2. 33
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java
  3. 180
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java
  4. 10
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  5. 3
      tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java
  6. 58
      tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml

12
tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java

@ -49,6 +49,12 @@ public class TaskDto {
private String milestone;
@ApiModelProperty("任务提醒消息")
private TaskRemindByAdd taskRemind;
@ApiModelProperty("上级任务详情id")
private Long lastTaskDetailId;
@ApiModelProperty("上级提醒类型(0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间)")
private Byte lastType;
@ApiModelProperty("两个任务时间差")
private Long timeDifference;
}
@ApiModel("批量添加任务")
@ -229,6 +235,12 @@ public class TaskDto {
private Long parentId;
@ApiModelProperty("所属项目id")
private Long projectId;
@ApiModelProperty("上级任务详情id")
private Long lastTaskDetailId;
@ApiModelProperty("上级提醒类型(0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间)")
private Byte lastType;
@ApiModelProperty("两个任务时间差")
private Long timeDifference;
}
@Data
@ApiModel("修改任务时修改交付物名称")

33
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java

@ -62,6 +62,12 @@ public class ProTaskDetail implements Serializable {
private Long buildUser;
private Long lastTaskDetailId;
private Byte lastType;
private Long timeDifference;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -296,6 +302,30 @@ public class ProTaskDetail implements Serializable {
this.buildUser = buildUser;
}
public Long getLastTaskDetailId() {
return lastTaskDetailId;
}
public void setLastTaskDetailId(Long lastTaskDetailId) {
this.lastTaskDetailId = lastTaskDetailId;
}
public Byte getLastType() {
return lastType;
}
public void setLastType(Byte lastType) {
this.lastType = lastType;
}
public Long getTimeDifference() {
return timeDifference;
}
public void setTimeDifference(Long timeDifference) {
this.timeDifference = timeDifference;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -331,6 +361,9 @@ public class ProTaskDetail implements Serializable {
sb.append(", priority=").append(priority);
sb.append(", milestone=").append(milestone);
sb.append(", buildUser=").append(buildUser);
sb.append(", lastTaskDetailId=").append(lastTaskDetailId);
sb.append(", lastType=").append(lastType);
sb.append(", timeDifference=").append(timeDifference);
sb.append("]");
return sb.toString();
}

180
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java

@ -1904,6 +1904,186 @@ public class ProTaskDetailExample {
addCriterion("build_user not between", value1, value2, "buildUser");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdIsNull() {
addCriterion("last_task_detail_id is null");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdIsNotNull() {
addCriterion("last_task_detail_id is not null");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdEqualTo(Long value) {
addCriterion("last_task_detail_id =", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdNotEqualTo(Long value) {
addCriterion("last_task_detail_id <>", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdGreaterThan(Long value) {
addCriterion("last_task_detail_id >", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdGreaterThanOrEqualTo(Long value) {
addCriterion("last_task_detail_id >=", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdLessThan(Long value) {
addCriterion("last_task_detail_id <", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdLessThanOrEqualTo(Long value) {
addCriterion("last_task_detail_id <=", value, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdIn(List<Long> values) {
addCriterion("last_task_detail_id in", values, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdNotIn(List<Long> values) {
addCriterion("last_task_detail_id not in", values, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdBetween(Long value1, Long value2) {
addCriterion("last_task_detail_id between", value1, value2, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTaskDetailIdNotBetween(Long value1, Long value2) {
addCriterion("last_task_detail_id not between", value1, value2, "lastTaskDetailId");
return (Criteria) this;
}
public Criteria andLastTypeIsNull() {
addCriterion("last_type is null");
return (Criteria) this;
}
public Criteria andLastTypeIsNotNull() {
addCriterion("last_type is not null");
return (Criteria) this;
}
public Criteria andLastTypeEqualTo(Byte value) {
addCriterion("last_type =", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeNotEqualTo(Byte value) {
addCriterion("last_type <>", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeGreaterThan(Byte value) {
addCriterion("last_type >", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("last_type >=", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeLessThan(Byte value) {
addCriterion("last_type <", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeLessThanOrEqualTo(Byte value) {
addCriterion("last_type <=", value, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeIn(List<Byte> values) {
addCriterion("last_type in", values, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeNotIn(List<Byte> values) {
addCriterion("last_type not in", values, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeBetween(Byte value1, Byte value2) {
addCriterion("last_type between", value1, value2, "lastType");
return (Criteria) this;
}
public Criteria andLastTypeNotBetween(Byte value1, Byte value2) {
addCriterion("last_type not between", value1, value2, "lastType");
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNull() {
addCriterion("time_difference is null");
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNotNull() {
addCriterion("time_difference is not null");
return (Criteria) this;
}
public Criteria andTimeDifferenceEqualTo(Long value) {
addCriterion("time_difference =", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotEqualTo(Long value) {
addCriterion("time_difference <>", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThan(Long value) {
addCriterion("time_difference >", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThanOrEqualTo(Long value) {
addCriterion("time_difference >=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThan(Long value) {
addCriterion("time_difference <", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThanOrEqualTo(Long value) {
addCriterion("time_difference <=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceIn(List<Long> values) {
addCriterion("time_difference in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotIn(List<Long> values) {
addCriterion("time_difference not in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceBetween(Long value1, Long value2) {
addCriterion("time_difference between", value1, value2, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotBetween(Long value1, Long value2) {
addCriterion("time_difference not between", value1, value2, "timeDifference");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

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

@ -1530,7 +1530,15 @@ public class ProTaskDetailService implements IProTaskDetailService {
if (ObjectUtil.isNotNull(updateTaskInfo.getMilestone())) {
taskDetail.setMilestone(updateTaskInfo.getMilestone());
}
if (ObjectUtil.isNotNull(updateTaskInfo.getLastTaskDetailId())){
taskDetail.setLastTaskDetailId(updateTaskInfo.getLastTaskDetailId());
}
if(ObjectUtil.isNotNull(updateTaskInfo.getLastType())){
taskDetail.setLastType(updateTaskInfo.getLastType());
}
if (ObjectUtil.isNotNull(updateTaskInfo.getTimeDifference())){
taskDetail.setTimeDifference(updateTaskInfo.getTimeDifference());
}
// //父任务id
// if(null != updateTaskInfo.getParentId()){

3
tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java

@ -364,6 +364,9 @@ public class TaskSubTimeService implements ITaskSubTimeService {
detail.setExecutorRole(addTask.getExecutorId());
detail.setMilestone(addTask.getMilestone());
detail.setBuildUser(currentUserId);
detail.setLastTaskDetailId(addTask.getLastTaskDetailId());
detail.setLastType(addTask.getLastType());
detail.setTimeDifference(addTask.getTimeDifference());
//添加任务优先级
if(ObjectUtil.isNotNull(addTask.getPriority())){
detail.setPriority(addTask.getPriority());

58
tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml

@ -31,6 +31,9 @@
<result column="priority" jdbcType="TINYINT" property="priority" />
<result column="milestone" jdbcType="VARCHAR" property="milestone" />
<result column="build_user" jdbcType="BIGINT" property="buildUser" />
<result column="last_task_detail_id" jdbcType="BIGINT" property="lastTaskDetailId" />
<result column="last_type" jdbcType="TINYINT" property="lastType" />
<result column="time_difference" jdbcType="BIGINT" property="timeDifference" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -94,7 +97,8 @@
id, project_id, name, description, begin_time, end_time, cycle, parent_id, sub_task,
sub_project_id, sub_project, executor_role, checker_role, money, delay, delay_time,
loop_to, loop_times, virtual, level, has_group, finish_need_all, all_member, created_at,
updated_at, rec_status, priority, milestone, build_user
updated_at, rec_status, priority, milestone, build_user, last_task_detail_id, last_type,
time_difference
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProTaskDetailExample" resultMap="BaseResultMap">
select
@ -136,7 +140,8 @@
virtual, level, has_group,
finish_need_all, all_member, created_at,
updated_at, rec_status, priority,
milestone, build_user)
milestone, build_user, last_task_detail_id,
last_type, time_difference)
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{beginTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{cycle,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}, #{subTask,jdbcType=VARCHAR},
@ -146,7 +151,8 @@
#{virtual,jdbcType=TINYINT}, #{level,jdbcType=TINYINT}, #{hasGroup,jdbcType=TINYINT},
#{finishNeedAll,jdbcType=TINYINT}, #{allMember,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{priority,jdbcType=TINYINT},
#{milestone,jdbcType=VARCHAR}, #{buildUser,jdbcType=BIGINT})
#{milestone,jdbcType=VARCHAR}, #{buildUser,jdbcType=BIGINT}, #{lastTaskDetailId,jdbcType=BIGINT},
#{lastType,jdbcType=TINYINT}, #{timeDifference,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProTaskDetail">
insert into t_pro_task_detail
@ -238,6 +244,15 @@
<if test="buildUser != null">
build_user,
</if>
<if test="lastTaskDetailId != null">
last_task_detail_id,
</if>
<if test="lastType != null">
last_type,
</if>
<if test="timeDifference != null">
time_difference,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -327,6 +342,15 @@
<if test="buildUser != null">
#{buildUser,jdbcType=BIGINT},
</if>
<if test="lastTaskDetailId != null">
#{lastTaskDetailId,jdbcType=BIGINT},
</if>
<if test="lastType != null">
#{lastType,jdbcType=TINYINT},
</if>
<if test="timeDifference != null">
#{timeDifference,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProTaskDetailExample" resultType="java.lang.Long">
@ -425,6 +449,15 @@
<if test="record.buildUser != null">
build_user = #{record.buildUser,jdbcType=BIGINT},
</if>
<if test="record.lastTaskDetailId != null">
last_task_detail_id = #{record.lastTaskDetailId,jdbcType=BIGINT},
</if>
<if test="record.lastType != null">
last_type = #{record.lastType,jdbcType=TINYINT},
</if>
<if test="record.timeDifference != null">
time_difference = #{record.timeDifference,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -460,7 +493,10 @@
rec_status = #{record.recStatus,jdbcType=TINYINT},
priority = #{record.priority,jdbcType=TINYINT},
milestone = #{record.milestone,jdbcType=VARCHAR},
build_user = #{record.buildUser,jdbcType=BIGINT}
build_user = #{record.buildUser,jdbcType=BIGINT},
last_task_detail_id = #{record.lastTaskDetailId,jdbcType=BIGINT},
last_type = #{record.lastType,jdbcType=TINYINT},
time_difference = #{record.timeDifference,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -552,6 +588,15 @@
<if test="buildUser != null">
build_user = #{buildUser,jdbcType=BIGINT},
</if>
<if test="lastTaskDetailId != null">
last_task_detail_id = #{lastTaskDetailId,jdbcType=BIGINT},
</if>
<if test="lastType != null">
last_type = #{lastType,jdbcType=TINYINT},
</if>
<if test="timeDifference != null">
time_difference = #{timeDifference,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -584,7 +629,10 @@
rec_status = #{recStatus,jdbcType=TINYINT},
priority = #{priority,jdbcType=TINYINT},
milestone = #{milestone,jdbcType=VARCHAR},
build_user = #{buildUser,jdbcType=BIGINT}
build_user = #{buildUser,jdbcType=BIGINT},
last_task_detail_id = #{lastTaskDetailId,jdbcType=BIGINT},
last_type = #{lastType,jdbcType=TINYINT},
time_difference = #{timeDifference,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save