增加排序字段

This commit is contained in:
wulin 2020-12-09 14:25:58 +08:00
parent bd6f92ee76
commit 367db0a8f8
6 changed files with 157 additions and 53 deletions

View File

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

View File

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

View File

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

View File

@ -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,6 +41,9 @@ public class ResultTask implements java.io.Serializable {
//任务的当前进度
@ApiModelProperty(value = "任务的当前进度", name = "processRate")
private BigDecimal processRate;
//排序由小到大
@ApiModelProperty(value = "排序由小到大", name = "orderBy")
private Integer orderBy;
/**
*
* @return
@ -145,6 +149,21 @@ public class ResultTask implements java.io.Serializable {
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 +
"}";
}
}

View File

@ -11,12 +11,13 @@
<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>
@ -32,6 +33,7 @@
<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
@ -39,6 +41,7 @@
<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()
@ -54,7 +57,8 @@
<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}
@ -69,7 +73,8 @@
gmt_create = #{gmtCreate},
name = #{name},
detail_id = #{detailId},
process_rate = #{processRate}
process_rate = #{processRate},
order_by = #{orderBy}
,gmt_modified = now()
where id = #{id}
</update>
@ -79,9 +84,5 @@
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>

View File

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