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-11-17 10:09:30 +08:00
commit 3c85e12cd8
9 changed files with 67 additions and 22 deletions

View File

@ -378,9 +378,6 @@ public class ResultRecordController extends AbstractController {
} }
} }
//获取考核维度等信息 //获取考核维度等信息
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto(); ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto); BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
@ -490,7 +487,7 @@ public class ResultRecordController extends AbstractController {
resultRecortModelDto.setMaxCount(null); resultRecortModelDto.setMaxCount(null);
} }
List<ResultDetailDto> detailDtos = List<ResultDetailDto> detailDtos =
resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType()); resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getId());
for (ResultDetailDto dto:detailDtos for (ResultDetailDto dto:detailDtos
) { ) {
//下面设置计算公式 //下面设置计算公式

View File

@ -58,6 +58,8 @@ public class ResultDetailDto {
@ApiModelProperty(value = "评分详细", name = "scoreDtos") @ApiModelProperty(value = "评分详细", name = "scoreDtos")
private List<ResultScoreDto> scoreDtos; private List<ResultScoreDto> scoreDtos;
@ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
private Long modelId;
/** /**
* *
* @return * @return

View File

@ -362,7 +362,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
BeanUtils.copyProperties(dto, resultModel); BeanUtils.copyProperties(dto, resultModel);
resultModel.setId(null); resultModel.setId(null);
resultModelService.insertResultModel(resultModel); resultModelService.insertResultModel(resultModel);
dto.setId(resultModel.getId());
List<ResultTagetLibDto> libDtos = resultTagetLibService.selectResultTagetLibDtoByModelId(dto.getId()); List<ResultTagetLibDto> libDtos = resultTagetLibService.selectResultTagetLibDtoByModelId(dto.getId());
dto.setTagetLibs(libDtos); dto.setTagetLibs(libDtos);
for (ResultTagetLibDto libDto: libDtos for (ResultTagetLibDto libDto: libDtos
@ -463,6 +463,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
resultDetail.setCheckWeight(libDto.getWeight()); resultDetail.setCheckWeight(libDto.getWeight());
resultDetail.setStaffId(staffInfo.getId()); resultDetail.setStaffId(staffInfo.getId());
resultDetail.setPriority(libDto.getOrderBy()); resultDetail.setPriority(libDto.getOrderBy());
resultDetail.setModelId(modelDto.getId());
resultDetails.add(resultDetail); resultDetails.add(resultDetail);
} }
} }
@ -723,6 +724,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
resultDetail.setCheckWeight(libDto.getWeight()); resultDetail.setCheckWeight(libDto.getWeight());
resultDetail.setStaffId(staffInfo.getId()); resultDetail.setStaffId(staffInfo.getId());
resultDetail.setPriority(libDto.getOrderBy()); resultDetail.setPriority(libDto.getOrderBy());
resultDetail.setModelId(modelDto.getId());
resultDetails.add(resultDetail); resultDetails.add(resultDetail);
} }
} }

View File

@ -45,5 +45,5 @@ public interface ResultDetailMapper extends BaseMapper<ResultDetail> {
Long insertResultDetails(@Param("list") List<ResultDetail> resultDetails); Long insertResultDetails(@Param("list") List<ResultDetail> resultDetails);
List<ResultDetailDto> selectDtosByRecordId(@Param("recordResultId") Long id, @Param("type") int type); List<ResultDetailDto> selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") Long modelId);
} }

View File

@ -1,57 +1,78 @@
package com.lz.modules.sys.entity.app; package com.lz.modules.sys.entity.app;
import com.baomidou.mybatisplus.annotation.IdType;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
* <p> * <p>
* 菜单权限表 * </p>*业绩详情表
* </p>*绩效详情表
* @author quyixiao * @author quyixiao
* @since 2020-08-28 * @since 2020-11-17
*/ */
@Data @Data
@TableName("lz_result_detail") @TableName("lz_result_detail")
@ApiModel(value = "业绩详情表")
public class ResultDetail implements java.io.Serializable { public class ResultDetail implements java.io.Serializable {
// //
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
//是否删除状态1删除0有效 //是否删除状态1删除0有效
@ApiModelProperty(value = "是否删除状态1删除0有效", name = "isDelete")
private Integer isDelete; private Integer isDelete;
//创建时间 //创建时间
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
private Date gmtCreate; private Date gmtCreate;
//最后修改时间 //最后修改时间
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
private Date gmtModified; private Date gmtModified;
//1绩效2文化价值观 //1业绩2文化价值观
@ApiModelProperty(value = "1业绩2文化价值观", name = "type")
private Integer type; private Integer type;
//目标 //目标
@ApiModelProperty(value = "目标", name = "target")
private String target; private String target;
//关键结果 //关键结果
@ApiModelProperty(value = "关键结果", name = "keyResult")
private String keyResult; private String keyResult;
//关键结果_3.5标准 //关键结果_3.5标准
@ApiModelProperty(value = "关键结果_3.5标准", name = "keyResult35")
private String keyResult35; private String keyResult35;
//关键结果3.7分标准 //关键结果3.7分标准
@ApiModelProperty(value = "关键结果3.7分标准", name = "keyResult37")
private String keyResult37; private String keyResult37;
//考核权重 //考核权重
@ApiModelProperty(value = "考核权重", name = "checkWeight")
private BigDecimal checkWeight; private BigDecimal checkWeight;
//考核结果 //考核结果
@ApiModelProperty(value = "考核结果", name = "checkResult")
private String checkResult; private String checkResult;
//直属上级评分 //直属上级评分
@ApiModelProperty(value = "直属上级评分", name = "superScore")
private String superScore; private String superScore;
//得分 //得分
@ApiModelProperty(value = "得分", name = "acquireScore")
private BigDecimal acquireScore; private BigDecimal acquireScore;
//评分说明 //评分说明
@ApiModelProperty(value = "评分说明", name = "scoreComment")
private String scoreComment; private String scoreComment;
//记录id //记录id
@ApiModelProperty(value = "记录id ", name = "recordId")
private Long recordId; private Long recordId;
//用户id //用户id
@ApiModelProperty(value = "用户id", name = "staffId")
private Long staffId; private Long staffId;
//优先级从大到小 //优先级从大到小
@ApiModelProperty(value = "优先级,从大到小", name = "priority")
private Integer priority; private Integer priority;
//维度id lz_result_model的id
@ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
private Long modelId;
/** /**
* *
* @return * @return
@ -113,14 +134,14 @@ public class ResultDetail implements java.io.Serializable {
} }
/** /**
* 12文化价值观 * 12文化价值观
* @return * @return
*/ */
public Integer getType() { public Integer getType() {
return type; return type;
} }
/** /**
* 12文化价值观 * 12文化价值观
* @param type * @param type
*/ */
public void setType(Integer type) { public void setType(Integer type) {
@ -307,6 +328,21 @@ public class ResultDetail implements java.io.Serializable {
this.priority = priority; this.priority = priority;
} }
/**
* 维度id lz_result_model的id
* @return
*/
public Long getModelId() {
return modelId;
}
/**
* 维度id lz_result_model的id
* @param modelId
*/
public void setModelId(Long modelId) {
this.modelId = modelId;
}
@Override @Override
public String toString() { public String toString() {
return "ResultDetail{" + return "ResultDetail{" +
@ -327,6 +363,7 @@ public class ResultDetail implements java.io.Serializable {
",recordId=" + recordId + ",recordId=" + recordId +
",staffId=" + staffId + ",staffId=" + staffId +
",priority=" + priority + ",priority=" + priority +
",modelId=" + modelId +
"}"; "}";
} }
} }

View File

@ -69,5 +69,5 @@ public interface ResultDetailService extends IService<ResultDetail> {
Long insertResultDetails(List<ResultDetail> resultDetails); Long insertResultDetails(List<ResultDetail> resultDetails);
List<ResultDetailDto> selectDtosByRecordId(Long id, int type); List<ResultDetailDto> selectDtosByRecordId(Long id, Long modelId);
} }

View File

@ -336,8 +336,8 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
} }
@Override @Override
public List<ResultDetailDto> selectDtosByRecordId(Long id, int type){ public List<ResultDetailDto> selectDtosByRecordId(Long id, Long modelId){
return resultDetailMapper.selectDtosByRecordId(id, type); return resultDetailMapper.selectDtosByRecordId(id, modelId);
} }
} }

View File

@ -21,12 +21,13 @@
<result column="record_id" property="recordId"/> <result column="record_id" property="recordId"/>
<result column="staff_id" property="staffId"/> <result column="staff_id" property="staffId"/>
<result column="priority" property="priority"/> <result column="priority" property="priority"/>
<result column="model_id" property="modelId"/>
</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, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId
</sql> </sql>
@ -52,6 +53,7 @@
<if test="recordId != null">record_id, </if> <if test="recordId != null">record_id, </if>
<if test="staffId != null">staff_id, </if> <if test="staffId != null">staff_id, </if>
<if test="priority != null">priority, </if> <if test="priority != null">priority, </if>
<if test="modelId != null">model_id, </if>
is_delete, is_delete,
gmt_create, gmt_create,
gmt_modified gmt_modified
@ -69,6 +71,7 @@
<if test="recordId != null">#{ recordId}, </if> <if test="recordId != null">#{ recordId}, </if>
<if test="staffId != null">#{ staffId}, </if> <if test="staffId != null">#{ staffId}, </if>
<if test="priority != null">#{ priority}, </if> <if test="priority != null">#{ priority}, </if>
<if test="modelId != null">#{ modelId}, </if>
0, 0,
now(), now(),
now() now()
@ -94,10 +97,11 @@
<if test="scoreComment != null">score_comment = #{scoreComment},</if> <if test="scoreComment != null">score_comment = #{scoreComment},</if>
<if test="recordId != null">record_id = #{recordId},</if> <if test="recordId != null">record_id = #{recordId},</if>
<if test="staffId != null">staff_id = #{staffId},</if> <if test="staffId != null">staff_id = #{staffId},</if>
<if test="priority != null">priority = #{priority}</if> <if test="priority != null">priority = #{priority},</if>
<if test="modelId != null">model_id = #{modelId}</if>
</trim> </trim>
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} limit 1 where id = #{id}
</update> </update>
@ -119,7 +123,8 @@
score_comment = #{scoreComment}, score_comment = #{scoreComment},
record_id = #{recordId}, record_id = #{recordId},
staff_id = #{staffId}, staff_id = #{staffId},
priority = #{priority} priority = #{priority},
model_id = #{modelId}
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} where id = #{id}
</update> </update>
@ -158,6 +163,7 @@
record_id, record_id,
staff_id, staff_id,
priority, priority,
model_id,
is_delete is_delete
)values )values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
@ -173,13 +179,14 @@
#{ item.recordId}, #{ item.recordId},
#{ item.staffId}, #{ item.staffId},
#{ item.priority}, #{ item.priority},
#{item.modelId},
0 0
) )
</foreach> </foreach>
</insert> </insert>
<select id="selectDtosByRecordId" resultType="com.lz.modules.flow.model.ResultDetailDto"> <select id="selectDtosByRecordId" resultType="com.lz.modules.flow.model.ResultDetailDto">
select * from lz_result_detail where record_id=#{recordResultId} and type = #{type} and is_delete = 0 order by priority asc select * from lz_result_detail where record_id=#{recordResultId} and model_id = #{modelId} and is_delete = 0 order by priority asc
</select> </select>
</mapper> </mapper>

View File

@ -126,7 +126,7 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>(); List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_result_score")); list.add(new TablesBean("lz_result_detail"));
List<TablesBean> list2 = new ArrayList<TablesBean>(); List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments(); Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();