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

This commit is contained in:
wulin 2020-10-22 16:04:41 +08:00
commit 59a8dae138
4 changed files with 82 additions and 33 deletions

View File

@ -8,10 +8,9 @@ import lombok.Data;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*发起考核考核组人员对应关系表
* @author quyixiao
* @since 2020-10-13
* @since 2020-10-22
*/
@Data
@ -42,6 +41,9 @@ public class EvaluationStartStaff implements java.io.Serializable {
//0考核人员1管理人员
@ApiModelProperty(value = "0考核人员1管理人员", name = "type")
private Integer type;
//0: 未通知评分 1 已通知评分
@ApiModelProperty(value = "0: 未通知评分 1 已通知评分", name = "score")
private Integer score;
/**
*
* @return
@ -162,6 +164,21 @@ public class EvaluationStartStaff implements java.io.Serializable {
this.type = type;
}
/**
* 0: 未通知评分 1 已通知评分
* @return
*/
public Integer getScore() {
return score;
}
/**
* 0: 未通知评分 1 已通知评分
* @param score
*/
public void setScore(Integer score) {
this.score = score;
}
@Override
public String toString() {
return "EvaluationStartStaff{" +
@ -173,6 +190,7 @@ public class EvaluationStartStaff implements java.io.Serializable {
",startId=" + startId +
",staffId=" + staffId +
",type=" + type +
",score=" + score +
"}";
}
}

View File

@ -3,21 +3,29 @@ package com.lz.modules.performance.controller;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.modules.flow.dao.FlowStartMapper;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.entity.FlowStart;
import com.lz.modules.flow.service.EvaluationGroupService;
import com.lz.modules.performance.req.AssessListReq;
import com.lz.modules.performance.req.AssessDetailReq;
import com.lz.modules.performance.res.AssessManagerDetailRes;
import com.lz.modules.performance.res.AssessManagerListRes;
import com.lz.modules.performance.res.ChartStatisticalRes;
import io.swagger.annotations.ApiImplicitParam;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.ToLongFunction;
import java.util.stream.Collectors;
/**
* @Author: djc
@ -30,10 +38,12 @@ public class AssessManagerController {
@Autowired
private FlowStartMapper flowStartMapper;
@Autowired
private EvaluationGroupService evaluationGroupService;
@RequestMapping("assess/manager/list")
public R groupList(@RequestBody AssessListReq req){
public R assessList(@RequestBody AssessListReq req){
List<AssessManagerListRes> data = new ArrayList<>();
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
page -> flowStartMapper.selectListByTime(page,req.getCycleType(),req.getName())
@ -64,11 +74,28 @@ public class AssessManagerController {
}
@RequestMapping("assess/manager/detail")
public R groupDetail(@RequestBody AssessDetailReq req){
public R assessDetail(@RequestBody AssessDetailReq req){
AssessManagerDetailRes res = new AssessManagerDetailRes();
return R.ok();
}
@RequestMapping("assess/manager/delete")
@ApiImplicitParam(name = "assessId",value = "发起考核id", required = true, dataType = "Long",paramType = "query")
public R assessDelete(@RequestParam Long assessId){
FlowStart flowStart = flowStartMapper.selectFlowStartById(assessId);
if(flowStart == null){
return R.error("没有此条记录");
}
String[] split = flowStart.getGroupIds().split(",");
List<Long> collect = Arrays.asList(split).stream().map(s -> Long.valueOf(s)).collect(Collectors.toList());
List<EvaluationGroup> evaluationGroups = evaluationGroupService.selectEvaluationGroupByIds(collect);
return R.ok();
}
}

View File

@ -12,12 +12,13 @@
<result column="start_id" property="startId"/>
<result column="staff_id" property="staffId"/>
<result column="type" property="type"/>
<result column="score" property="score"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, evaluation_id AS evaluationId, start_id AS startId, staff_id AS staffId, type AS type
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, evaluation_id AS evaluationId, start_id AS startId, staff_id AS staffId, type AS type, score AS score
</sql>
@ -30,35 +31,38 @@
<insert id="insertEvaluationStartStaff" parameterType="EvaluationStartStaff" useGeneratedKeys="true" keyProperty="id" >
insert into lz_evaluation_start_staff(
<if test="evaluationId != null">evaluation_id, </if>
<if test="startId != null">start_id, </if>
<if test="staffId != null">staff_id, </if>
<if test="type != null">type, </if>
is_delete,
gmt_create,
gmt_modified
<if test="evaluationId != null">evaluation_id, </if>
<if test="startId != null">start_id, </if>
<if test="staffId != null">staff_id, </if>
<if test="type != null">type, </if>
<if test="score != null">score, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="evaluationId != null">#{ evaluationId}, </if>
<if test="startId != null">#{ startId}, </if>
<if test="staffId != null">#{ staffId}, </if>
<if test="type != null">#{ type}, </if>
0,
now(),
now()
<if test="evaluationId != null">#{ evaluationId}, </if>
<if test="startId != null">#{ startId}, </if>
<if test="staffId != null">#{ staffId}, </if>
<if test="type != null">#{ type}, </if>
<if test="score != null">#{ score}, </if>
0,
now(),
now()
)
</insert>
<update id="updateEvaluationStartStaffById" parameterType="EvaluationStartStaff" >
update
lz_evaluation_start_staff
lz_evaluation_start_staff
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="evaluationId != null">evaluation_id = #{evaluationId},</if>
<if test="startId != null">start_id = #{startId},</if>
<if test="staffId != null">staff_id = #{staffId},</if>
<if test="type != null">type = #{type}</if>
<if test="type != null">type = #{type},</if>
<if test="score != null">score = #{score}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -67,19 +71,19 @@
<update id="updateCoverEvaluationStartStaffById" parameterType="EvaluationStartStaff" >
update
lz_evaluation_start_staff
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
evaluation_id = #{evaluationId},
start_id = #{startId},
staff_id = #{staffId},
type = #{type}
lz_evaluation_start_staff
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
evaluation_id = #{evaluationId},
start_id = #{startId},
staff_id = #{staffId},
type = #{type},
score = #{score}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteEvaluationStartStaffById" parameterType="java.lang.Long">
update lz_evaluation_start_staff set is_delete = 1 where id=#{id} limit 1
</update>

View File

@ -80,9 +80,9 @@ public class MysqlMain {
//list.add(new TablesBean("lz_result_taget_lib"));
//list.add(new TablesBean("lz_flow_chart_detail_record"));
list.add(new TablesBean("lz_flow_approval_role"));
//list.add(new TablesBean("lz_flow_approval_role"));
list.add(new TablesBean("lz_flow_start"));
list.add(new TablesBean("lz_evaluation_start_staff"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();