增加排序字段
This commit is contained in:
parent
bd6f92ee76
commit
367db0a8f8
@ -962,7 +962,7 @@ public class ResultRecordController extends AbstractController {
|
||||
resultComment.setOptDesc("修改了目标");
|
||||
resultComment.setComment(commandValue);
|
||||
}else{
|
||||
resultComment.setOptDesc(resultComment.getOptDesc() + "修改了目标");
|
||||
resultComment.setOptDesc(resultComment.getOptDesc() + "-修改了目标");
|
||||
|
||||
resultComment.setComment((resultComment.getComment() == null ? "" : resultComment.getComment()) + commandValue);
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
package com.lz.modules.flow.model;
|
||||
import com.lz.modules.performance.dto.ResultTaskDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -60,6 +61,8 @@ public class ResultDetailDto {
|
||||
private List<ResultScoreDto> scoreDtos;
|
||||
@ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
|
||||
private Long modelId;
|
||||
@ApiModelProperty(value = "指标任务列表", name = "taskDtos")
|
||||
List<ResultTaskDto> taskDtos;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
||||
@ -1,21 +1,101 @@
|
||||
package com.lz.modules.performance.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/12/9 10:23
|
||||
*/
|
||||
* <p>
|
||||
* </p>*任务表
|
||||
* @author quyixiao
|
||||
* @since 2020-12-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "任务表Dto")
|
||||
public class ResultTaskDto {
|
||||
//
|
||||
@ApiModelProperty(value = "", name = "id")
|
||||
private Long id;
|
||||
//任务名称
|
||||
@ApiModelProperty(value = "任务名称", name = "name")
|
||||
private String name;
|
||||
//任务的当前进度
|
||||
@ApiModelProperty(value = "任务的当前进度", name = "processRate")
|
||||
private BigDecimal processRate;
|
||||
}
|
||||
//排序由小到大
|
||||
@ApiModelProperty(value = "排序由小到大", name = "orderBy")
|
||||
private Integer orderBy;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 任务名称
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 任务的当前进度
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getProcessRate() {
|
||||
return processRate;
|
||||
}
|
||||
/**
|
||||
* 任务的当前进度
|
||||
* @param processRate
|
||||
*/
|
||||
public void setProcessRate(BigDecimal processRate) {
|
||||
this.processRate = processRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序由小到大
|
||||
* @return
|
||||
*/
|
||||
public Integer getOrderBy() {
|
||||
return orderBy;
|
||||
}
|
||||
/**
|
||||
* 排序由小到大
|
||||
* @param orderBy
|
||||
*/
|
||||
public void setOrderBy(Integer orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultTaskDto{" +
|
||||
",id=" + id +
|
||||
",name=" + name +
|
||||
",processRate=" + processRate +
|
||||
",orderBy=" + orderBy +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
package com.lz.modules.performance.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@ -9,11 +10,11 @@ import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* </p>*任务表
|
||||
* @author quyixiao
|
||||
* @since 2020-12-08
|
||||
*/
|
||||
* <p>
|
||||
* </p>*任务表
|
||||
* @author quyixiao
|
||||
* @since 2020-12-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("lz_result_task")
|
||||
@ -40,15 +41,18 @@ public class ResultTask implements java.io.Serializable {
|
||||
//任务的当前进度
|
||||
@ApiModelProperty(value = "任务的当前进度", name = "processRate")
|
||||
private BigDecimal processRate;
|
||||
//排序由小到大
|
||||
@ApiModelProperty(value = "排序由小到大", name = "orderBy")
|
||||
private Integer orderBy;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
@ -56,14 +60,14 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
/**
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* @param isDelete
|
||||
*/
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
@ -71,14 +75,14 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* 创建时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
/**
|
||||
* 创建时间
|
||||
* 创建时间
|
||||
* @param gmtCreate
|
||||
*/
|
||||
public void setGmtCreate(Date gmtCreate) {
|
||||
@ -86,14 +90,14 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
* 最后修改时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
/**
|
||||
* 最后修改时间
|
||||
* 最后修改时间
|
||||
* @param gmtModified
|
||||
*/
|
||||
public void setGmtModified(Date gmtModified) {
|
||||
@ -101,14 +105,14 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
* 任务名称
|
||||
* @return
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 任务名称
|
||||
* 任务名称
|
||||
* @param name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
@ -116,14 +120,14 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* lz_result_detail 的id
|
||||
* lz_result_detail 的id
|
||||
* @return
|
||||
*/
|
||||
public Long getDetailId() {
|
||||
return detailId;
|
||||
}
|
||||
/**
|
||||
* lz_result_detail 的id
|
||||
* lz_result_detail 的id
|
||||
* @param detailId
|
||||
*/
|
||||
public void setDetailId(Long detailId) {
|
||||
@ -131,20 +135,35 @@ public class ResultTask implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务的当前进度
|
||||
* 任务的当前进度
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getProcessRate() {
|
||||
return processRate;
|
||||
}
|
||||
/**
|
||||
* 任务的当前进度
|
||||
* 任务的当前进度
|
||||
* @param processRate
|
||||
*/
|
||||
public void setProcessRate(BigDecimal processRate) {
|
||||
this.processRate = processRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序由小到大
|
||||
* @return
|
||||
*/
|
||||
public Integer getOrderBy() {
|
||||
return orderBy;
|
||||
}
|
||||
/**
|
||||
* 排序由小到大
|
||||
* @param orderBy
|
||||
*/
|
||||
public void setOrderBy(Integer orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultTask{" +
|
||||
@ -155,6 +174,7 @@ public class ResultTask implements java.io.Serializable {
|
||||
",name=" + name +
|
||||
",detailId=" + detailId +
|
||||
",processRate=" + processRate +
|
||||
",orderBy=" + orderBy +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,50 +11,54 @@
|
||||
<result column="name" property="name"/>
|
||||
<result column="detail_id" property="detailId"/>
|
||||
<result column="process_rate" property="processRate"/>
|
||||
<result column="order_by" property="orderBy"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, detail_id AS detailId, process_rate AS processRate
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, detail_id AS detailId, process_rate AS processRate, order_by AS orderBy
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectResultTaskById" resultType="ResultTask" >
|
||||
select * from lz_result_task where id=#{id} and is_delete = 0 limit 1
|
||||
select * from lz_result_task where id=#{id} and is_delete = 0 limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertResultTask" parameterType="ResultTask" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_result_task(
|
||||
<if test="name != null">name, </if>
|
||||
<if test="detailId != null">detail_id, </if>
|
||||
<if test="processRate != null">process_rate, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
<if test="name != null">name, </if>
|
||||
<if test="detailId != null">detail_id, </if>
|
||||
<if test="processRate != null">process_rate, </if>
|
||||
<if test="orderBy != null">order_by, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
)values(
|
||||
<if test="name != null">#{ name}, </if>
|
||||
<if test="detailId != null">#{ detailId}, </if>
|
||||
<if test="processRate != null">#{ processRate}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
<if test="name != null">#{ name}, </if>
|
||||
<if test="detailId != null">#{ detailId}, </if>
|
||||
<if test="processRate != null">#{ processRate}, </if>
|
||||
<if test="orderBy != null">#{ orderBy}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateResultTaskById" parameterType="ResultTask" >
|
||||
update
|
||||
lz_result_task
|
||||
lz_result_task
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="detailId != null">detail_id = #{detailId},</if>
|
||||
<if test="processRate != null">process_rate = #{processRate}</if>
|
||||
<if test="processRate != null">process_rate = #{processRate},</if>
|
||||
<if test="orderBy != null">order_by = #{orderBy}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -63,25 +67,22 @@
|
||||
|
||||
<update id="updateCoverResultTaskById" parameterType="ResultTask" >
|
||||
update
|
||||
lz_result_task
|
||||
set
|
||||
lz_result_task
|
||||
set
|
||||
is_delete = #{isDelete},
|
||||
gmt_create = #{gmtCreate},
|
||||
name = #{name},
|
||||
detail_id = #{detailId},
|
||||
process_rate = #{processRate}
|
||||
,gmt_modified = now()
|
||||
process_rate = #{processRate},
|
||||
order_by = #{orderBy}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteResultTaskById" parameterType="java.lang.Long">
|
||||
update lz_result_task set is_delete = 1 where id=#{id} limit 1
|
||||
update lz_result_task set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
<select id="selectResultTasksByDetailId" resultType="com.lz.modules.performance.dto.ResultTaskDto">
|
||||
select name,process_rate from lz_result_task where detail_id=#{detailId} and is_delete = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ public class MysqlMain {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
list.add(new TablesBean("lz_result_detail"));
|
||||
list.add(new TablesBean("lz_result_task"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user