Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
杜建超 2020-12-09 14:31:25 +08:00
commit 80e1041b6b
6 changed files with 160 additions and 52 deletions

View File

@ -962,7 +962,7 @@ public class ResultRecordController extends AbstractController {
resultComment.setOptDesc("修改了目标"); resultComment.setOptDesc("修改了目标");
resultComment.setComment(commandValue); resultComment.setComment(commandValue);
}else{ }else{
resultComment.setOptDesc(resultComment.getOptDesc() + "修改了目标"); resultComment.setOptDesc(resultComment.getOptDesc() + "-修改了目标");
resultComment.setComment((resultComment.getComment() == null ? "" : resultComment.getComment()) + commandValue); resultComment.setComment((resultComment.getComment() == null ? "" : resultComment.getComment()) + commandValue);
} }

View File

@ -1,4 +1,5 @@
package com.lz.modules.flow.model; package com.lz.modules.flow.model;
import com.lz.modules.performance.dto.ResultTaskDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -60,6 +61,8 @@ public class ResultDetailDto {
private List<ResultScoreDto> scoreDtos; private List<ResultScoreDto> scoreDtos;
@ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId") @ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
private Long modelId; private Long modelId;
@ApiModelProperty(value = "指标任务列表", name = "taskDtos")
List<ResultTaskDto> taskDtos;
/** /**
* *
* @return * @return

View File

@ -1,21 +1,101 @@
package com.lz.modules.performance.dto; package com.lz.modules.performance.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
* @Author: djc * <p>
* @Desc: * </p>*任务表
* @Date: 2020/12/9 10:23 * @author quyixiao
* @since 2020-12-09
*/ */
@Data @Data
@ApiModel(value = "任务表Dto")
public class ResultTaskDto { public class ResultTaskDto {
//
@ApiModelProperty(value = "", name = "id")
private Long id;
//任务名称 //任务名称
@ApiModelProperty(value = "任务名称", name = "name") @ApiModelProperty(value = "任务名称", name = "name")
private String name; private String name;
//任务的当前进度 //任务的当前进度
@ApiModelProperty(value = "任务的当前进度", name = "processRate") @ApiModelProperty(value = "任务的当前进度", name = "processRate")
private BigDecimal 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; package com.lz.modules.performance.entity;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
@ -12,7 +13,7 @@ import java.util.Date;
* <p> * <p>
* </p>*任务表 * </p>*任务表
* @author quyixiao * @author quyixiao
* @since 2020-12-08 * @since 2020-12-09
*/ */
@Data @Data
@ -40,6 +41,9 @@ public class ResultTask implements java.io.Serializable {
//任务的当前进度 //任务的当前进度
@ApiModelProperty(value = "任务的当前进度", name = "processRate") @ApiModelProperty(value = "任务的当前进度", name = "processRate")
private BigDecimal processRate; private BigDecimal processRate;
//排序由小到大
@ApiModelProperty(value = "排序由小到大", name = "orderBy")
private Integer orderBy;
/** /**
* *
* @return * @return
@ -145,6 +149,21 @@ public class ResultTask implements java.io.Serializable {
this.processRate = processRate; this.processRate = processRate;
} }
/**
* 排序由小到大
* @return
*/
public Integer getOrderBy() {
return orderBy;
}
/**
* 排序由小到大
* @param orderBy
*/
public void setOrderBy(Integer orderBy) {
this.orderBy = orderBy;
}
@Override @Override
public String toString() { public String toString() {
return "ResultTask{" + return "ResultTask{" +
@ -155,6 +174,7 @@ public class ResultTask implements java.io.Serializable {
",name=" + name + ",name=" + name +
",detailId=" + detailId + ",detailId=" + detailId +
",processRate=" + processRate + ",processRate=" + processRate +
",orderBy=" + orderBy +
"}"; "}";
} }
} }

View File

@ -11,12 +11,13 @@
<result column="name" property="name"/> <result column="name" property="name"/>
<result column="detail_id" property="detailId"/> <result column="detail_id" property="detailId"/>
<result column="process_rate" property="processRate"/> <result column="process_rate" property="processRate"/>
<result column="order_by" property="orderBy"/>
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <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> </sql>
@ -32,6 +33,7 @@
<if test="name != null">name, </if> <if test="name != null">name, </if>
<if test="detailId != null">detail_id, </if> <if test="detailId != null">detail_id, </if>
<if test="processRate != null">process_rate, </if> <if test="processRate != null">process_rate, </if>
<if test="orderBy != null">order_by, </if>
is_delete, is_delete,
gmt_create, gmt_create,
gmt_modified gmt_modified
@ -39,6 +41,7 @@
<if test="name != null">#{ name}, </if> <if test="name != null">#{ name}, </if>
<if test="detailId != null">#{ detailId}, </if> <if test="detailId != null">#{ detailId}, </if>
<if test="processRate != null">#{ processRate}, </if> <if test="processRate != null">#{ processRate}, </if>
<if test="orderBy != null">#{ orderBy}, </if>
0, 0,
now(), now(),
now() now()
@ -54,7 +57,8 @@
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if> <if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="name != null">name = #{name},</if> <if test="name != null">name = #{name},</if>
<if test="detailId != null">detail_id = #{detailId},</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> </trim>
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} where id = #{id}
@ -69,7 +73,8 @@
gmt_create = #{gmtCreate}, gmt_create = #{gmtCreate},
name = #{name}, name = #{name},
detail_id = #{detailId}, detail_id = #{detailId},
process_rate = #{processRate} process_rate = #{processRate},
order_by = #{orderBy}
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} where id = #{id}
</update> </update>
@ -79,9 +84,5 @@
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> </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> </mapper>

View File

@ -84,8 +84,12 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>(); List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_result_task"));
list.add(new TablesBean("lz_task_process_record")); list.add(new TablesBean("lz_task_process_record"));
List<TablesBean> list2 = new ArrayList<TablesBean>(); List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments(); Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {