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-10-16 14:59:57 +08:00
commit 434118adca
20 changed files with 995 additions and 32 deletions

View File

@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.ResultModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ResultModelMapper extends BaseMapper<ResultModel> {
@ -30,4 +33,5 @@ public interface ResultModelMapper extends BaseMapper<ResultModel> {
int deleteResultModelById(@Param("id")Long id);
List<ResultModel> selectResultModelByGroupId(@Param("id") Long id);
}

View File

@ -0,0 +1,33 @@
package com.lz.modules.flow.dao;
/**
* <p>
* 考核指标库表 服务类
* </p>
*
* @author quyixiao
* @since 2020-10-16
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.ResultTagetLib;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ResultTagetLibMapper extends BaseMapper<ResultTagetLib> {
ResultTagetLib selectResultTagetLibById(@Param("id")Long id);
Long insertResultTagetLib(ResultTagetLib resultTagetLib);
int updateResultTagetLibById(ResultTagetLib resultTagetLib);
int updateCoverResultTagetLibById(ResultTagetLib resultTagetLib);
int deleteResultTagetLibById(@Param("id")Long id);
}

View File

@ -10,15 +10,14 @@ import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*考核模板表
* @author quyixiao
* @since 2020-10-14
* @since 2020-10-16
*/
@Data
@TableName("lz_result_model")
@ApiModel(value = "考核模板")
@ApiModel(value = "考核维度")
public class ResultModel implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
@ -32,6 +31,9 @@ public class ResultModel implements java.io.Serializable {
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//维度名称
@ApiModelProperty(value = "维度名称", name = "name")
private String name;
//考核组ID
@ApiModelProperty(value = "考核组ID", name = "evaluationGroupId")
private Long evaluationGroupId;
@ -45,8 +47,14 @@ public class ResultModel implements java.io.Serializable {
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
//lz_result_calculate 的id
@ApiModelProperty(value = "lz_result_calculate 的id", name = "calculateId")
@ApiModelProperty(value = "lz_result_calculate 的id计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭1开启
@ApiModelProperty(value = "等级开关0关闭1开启", name = "gradeStatus")
private Integer gradeStatus;
//使用的哪个等级等级组idlz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
/**
*
* @return
@ -107,6 +115,21 @@ public class ResultModel implements java.io.Serializable {
this.gmtModified = gmtModified;
}
/**
* 维度名称
* @return
*/
public String getName() {
return name;
}
/**
* 维度名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 考核组ID
* @return
@ -182,6 +205,36 @@ public class ResultModel implements java.io.Serializable {
this.calculateId = calculateId;
}
/**
* 等级开关0关闭1开启
* @return
*/
public Integer getGradeStatus() {
return gradeStatus;
}
/**
* 等级开关0关闭1开启
* @param gradeStatus
*/
public void setGradeStatus(Integer gradeStatus) {
this.gradeStatus = gradeStatus;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @return
*/
public Long getGradeGroupId() {
return gradeGroupId;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @param gradeGroupId
*/
public void setGradeGroupId(Long gradeGroupId) {
this.gradeGroupId = gradeGroupId;
}
@Override
public String toString() {
return "ResultModel{" +
@ -189,11 +242,14 @@ public class ResultModel implements java.io.Serializable {
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",evaluationGroupId=" + evaluationGroupId +
",type=" + type +
",weight=" + weight +
",maxCount=" + maxCount +
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
"}";
}
}

View File

@ -0,0 +1,179 @@
package com.lz.modules.flow.entity;
import com.baomidou.mybatisplus.annotation.TableId;
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 java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
*/
@Data
@TableName("lz_result_taget_lib")
@ApiModel(value = "考核指标库表")
public class ResultTagetLib implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//指标名称
@ApiModelProperty(value = "指标名称", name = "name")
private String name;
//考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
@ApiModelProperty(value = "考核维度IDresult_model。如果id为0表示为指标库数据其他地方可选", name = "modelId")
private Long modelId;
//权重
@ApiModelProperty(value = "权重", name = "weight")
private BigDecimal weight;
//考核标准关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
*
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
*
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
*
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
*
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 指标名称
* @return
*/
public String getName() {
return name;
}
/**
* 指标名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @return
*/
public Long getModelId() {
return modelId;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @param modelId
*/
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**
* 权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
* 权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 考核标准关键结果
* @return
*/
public String getKeyResult() {
return keyResult;
}
/**
* 考核标准关键结果
* @param keyResult
*/
public void setKeyResult(String keyResult) {
this.keyResult = keyResult;
}
@Override
public String toString() {
return "ResultTagetLib{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
"}";
}
}

View File

@ -9,15 +9,18 @@ import java.math.BigDecimal;
* <p>
* </p>*考核模板表
* @author quyixiao
* @since 2020-10-15
* @since 2020-10-16
*/
@Data
@ApiModel(value = "考核模板")
@ApiModel(value = "考核维度")
public class ResultModelDto {
//
@ApiModelProperty(value = "", name = "id")
private Long id;
//维度名称
@ApiModelProperty(value = "维度名称", name = "name")
private String name;
//考核组ID
@ApiModelProperty(value = "考核组ID", name = "evaluationGroupId")
private Long evaluationGroupId;
@ -31,8 +34,14 @@ public class ResultModelDto {
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
//lz_result_calculate 的id
@ApiModelProperty(value = "lz_result_calculate 的id", name = "calculateId")
@ApiModelProperty(value = "lz_result_calculate 的id计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭1开启
@ApiModelProperty(value = "等级开关0关闭1开启", name = "gradeStatus")
private Integer gradeStatus;
//使用的哪个等级等级组idlz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
/**
*
* @return
@ -48,7 +57,20 @@ public class ResultModelDto {
this.id = id;
}
/**
* 维度名称
* @return
*/
public String getName() {
return name;
}
/**
* 维度名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 考核组ID
@ -125,15 +147,48 @@ public class ResultModelDto {
this.calculateId = calculateId;
}
/**
* 等级开关0关闭1开启
* @return
*/
public Integer getGradeStatus() {
return gradeStatus;
}
/**
* 等级开关0关闭1开启
* @param gradeStatus
*/
public void setGradeStatus(Integer gradeStatus) {
this.gradeStatus = gradeStatus;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @return
*/
public Long getGradeGroupId() {
return gradeGroupId;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @param gradeGroupId
*/
public void setGradeGroupId(Long gradeGroupId) {
this.gradeGroupId = gradeGroupId;
}
@Override
public String toString() {
return "ResultModel{" +
",id=" + id +
",name=" + name +
",evaluationGroupId=" + evaluationGroupId +
",type=" + type +
",weight=" + weight +
",maxCount=" + maxCount +
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
"}";
}
}

View File

@ -0,0 +1,118 @@
package com.lz.modules.flow.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
*/
@Data
@ApiModel(value = "考核指标库表")
public class ResultTagetLibDto {
//
@ApiModelProperty(value = "", name = "id")
private Long id;
//指标名称
@ApiModelProperty(value = "指标名称", name = "name")
private String name;
//考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
@ApiModelProperty(value = "考核维度IDresult_model。如果id为0表示为指标库数据其他地方可选", name = "modelId")
private Long modelId;
//权重
@ApiModelProperty(value = "权重", name = "weight")
private BigDecimal weight;
//考核标准关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
/**
*
* @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;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @return
*/
public Long getModelId() {
return modelId;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @param modelId
*/
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**
* 权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
* 权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 考核标准关键结果
* @return
*/
public String getKeyResult() {
return keyResult;
}
/**
* 考核标准关键结果
* @param keyResult
*/
public void setKeyResult(String keyResult) {
this.keyResult = keyResult;
}
@Override
public String toString() {
return "ResultTagetLib{" +
",id=" + id +
",name=" + name +
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
"}";
}
}

View File

@ -18,7 +18,7 @@ import java.util.Date;
@Data
@ApiModel(value = "考核模板")
@ApiModel(value = "考核维度")
public class ResultModelReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@ -40,6 +40,9 @@ public class ResultModelReq implements java.io.Serializable {
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//维度名称
@ApiModelProperty(value = "维度名称", name = "name")
private String name;
//考核组ID
@ApiModelProperty(value = "考核组ID", name = "evaluationGroupId")
private Long evaluationGroupId;
@ -53,8 +56,14 @@ public class ResultModelReq implements java.io.Serializable {
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
//lz_result_calculate 的id
@ApiModelProperty(value = "lz_result_calculate 的id", name = "calculateId")
@ApiModelProperty(value = "lz_result_calculate 的id计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭1开启
@ApiModelProperty(value = "等级开关0关闭1开启", name = "gradeStatus")
private Integer gradeStatus;
//使用的哪个等级等级组idlz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组idlz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
/**
*
* @return
@ -115,6 +124,21 @@ public class ResultModelReq implements java.io.Serializable {
this.gmtModified = gmtModified;
}
/**
* 维度名称
* @return
*/
public String getName() {
return name;
}
/**
* 维度名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 考核组ID
* @return
@ -190,6 +214,36 @@ public class ResultModelReq implements java.io.Serializable {
this.calculateId = calculateId;
}
/**
* 等级开关0关闭1开启
* @return
*/
public Integer getGradeStatus() {
return gradeStatus;
}
/**
* 等级开关0关闭1开启
* @param gradeStatus
*/
public void setGradeStatus(Integer gradeStatus) {
this.gradeStatus = gradeStatus;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @return
*/
public Long getGradeGroupId() {
return gradeGroupId;
}
/**
* 使用的哪个等级等级组idlz_result_grade的group_id
* @param gradeGroupId
*/
public void setGradeGroupId(Long gradeGroupId) {
this.gradeGroupId = gradeGroupId;
}
@Override
public String toString() {
return "ResultModel{" +
@ -197,11 +251,14 @@ public class ResultModelReq implements java.io.Serializable {
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",evaluationGroupId=" + evaluationGroupId +
",type=" + type +
",weight=" + weight +
",maxCount=" + maxCount +
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
"}";
}
}

View File

@ -0,0 +1,188 @@
package com.lz.modules.flow.req;
import com.baomidou.mybatisplus.annotation.TableId;
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 java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*考核指标库表
* @author quyixiao
* @since 2020-10-16
*/
@Data
@ApiModel(value = "考核指标库表")
public class ResultTagetLibReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
private int currPage = 1;
@ApiModelProperty(value = "pageSize", name = "每页返回条数")
private int pageSize = 10;
@ApiModelProperty(value = "sort", name = "类型")
private String sort;
@ApiModelProperty(value = "order", name = "排序")
private String order;
//
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//指标名称
@ApiModelProperty(value = "指标名称", name = "name")
private String name;
//考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
@ApiModelProperty(value = "考核维度IDresult_model。如果id为0表示为指标库数据其他地方可选", name = "modelId")
private Long modelId;
//权重
@ApiModelProperty(value = "权重", name = "weight")
private BigDecimal weight;
//考核标准关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
*
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
*
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
*
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
*
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 指标名称
* @return
*/
public String getName() {
return name;
}
/**
* 指标名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @return
*/
public Long getModelId() {
return modelId;
}
/**
* 考核维度IDresult_model如果id为0表示为指标库数据其他地方可选
* @param modelId
*/
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**
* 权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
* 权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 考核标准关键结果
* @return
*/
public String getKeyResult() {
return keyResult;
}
/**
* 考核标准关键结果
* @param keyResult
*/
public void setKeyResult(String keyResult) {
this.keyResult = keyResult;
}
@Override
public String toString() {
return "ResultTagetLib{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
"}";
}
}

View File

@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.ResultModel;
import java.util.List;
/**
* <p>
* 考核模板表 服务类
@ -30,4 +32,5 @@ public interface ResultModelService extends IService<ResultModel> {
int deleteResultModelById(Long id);
List<ResultModel> selectResultModelByGroupId(Long id);
}

View File

@ -7,6 +7,8 @@ import com.lz.modules.flow.service.ResultModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 考核模板表 服务类
@ -58,6 +60,11 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
return resultModelMapper.deleteResultModelById(id);
}
@Override
public List<ResultModel> selectResultModelByGroupId(Long id){
return resultModelMapper.selectResultModelByGroupId(id);
}
}

View File

@ -40,7 +40,7 @@ public class FlowChartController {
FlowManager flowManager = flowManagerService.selectFlowManagerById(id);
if(flowManager != null){
List<FlowChart> flowCharts = flowChartService.selectFlowChartByFlowManagerId(flowManager.getId());
return R.ok().put("list",flowCharts);
return R.ok().put("data",flowCharts);
}
return R.error("无相关流程");
}
@ -52,7 +52,7 @@ public class FlowChartController {
public R getRoleByChatId(@RequestParam Long id) {
List<FlowChartRoleDto> flowCharts = flowChartService.selectChartRoleByChartId(id);
return R.ok().put("list",flowCharts);
return R.ok().put("data",flowCharts);
}
@ -60,7 +60,7 @@ public class FlowChartController {
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChart.class)})
public R getById(@RequestBody @ApiParam FlowChart flowChart) {
flowChart = flowChartService.selectFlowChartById(flowChart.getId());
return R.ok().put("flowChart",flowChart);
return R.ok().put("data",flowChart);
}
@RequestMapping("/update")

View File

@ -30,7 +30,7 @@ public class FlowChartRoleController {
@RequestMapping("/getById")
public R getById(@RequestBody FlowChartRole flowChartRole) {
flowChartRole = flowChartRoleService.selectFlowChartRoleById(flowChartRole.getId());
return R.ok().put("flowChartRole",flowChartRole);
return R.ok().put("data",flowChartRole);
}

View File

@ -30,7 +30,7 @@ public class ResultGradeController {
@RequestMapping("/getById")
public R getById(@RequestBody ResultGrade resultGrade) {
resultGrade = resultGradeService.selectResultGradeById(resultGrade.getId());
return R.ok().put("resultGrade",resultGrade);
return R.ok().put("data",resultGrade);
}

View File

@ -6,18 +6,14 @@ import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.ResultModel;
import com.lz.modules.flow.model.FlowChartRoleDto;
import com.lz.modules.flow.service.ResultModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@ -30,13 +26,20 @@ public class ResultModelController {
private ResultModelService resultModelService;
@GetMapping("/getByGroupId")
@ApiOperation(value="根据考核组id获取模板列表")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModel.class)})
public R getByGroupId(@RequestParam Long id) {
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(id);
return R.ok().put("data",resultModels);
}
@RequestMapping("/getById")
public R getById(@RequestBody ResultModel resultModel) {
resultModel = resultModelService.selectResultModelById(resultModel.getId());
return R.ok().put("resultModel",resultModel);
return R.ok().put("data",resultModel);
}
@ -51,7 +54,7 @@ public class ResultModelController {
@ApiOperation("新增模板")
public R save(@RequestBody @ApiParam ResultModel resultModel) {
resultModelService.insertResultModel(resultModel);
return R.ok();
return R.ok().put("data",resultModel);
}

View File

@ -0,0 +1,56 @@
package com.lz.modules.performance.controller;
import com.alibaba.fastjson.JSONObject;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.ResultTagetLib;
import com.lz.modules.performance.service.ResultTagetLibService;
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.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/resultTagetLib")
public class ResultTagetLibController {
@Autowired
private ResultTagetLibService resultTagetLibService;
@RequestMapping("/getById")
public R getById(@RequestBody ResultTagetLib resultTagetLib) {
resultTagetLib = resultTagetLibService.selectResultTagetLibById(resultTagetLib.getId());
return R.ok().put("resultTagetLib",resultTagetLib);
}
@RequestMapping("/update")
public R update(@RequestBody ResultTagetLib resultTagetLib) {
resultTagetLibService.updateResultTagetLibById(resultTagetLib);
return R.ok();
}
@RequestMapping("/save")
public R save(@RequestBody ResultTagetLib resultTagetLib) {
resultTagetLibService.insertResultTagetLib(resultTagetLib);
return R.ok();
}
@RequestMapping("/delete")
public R delete(@RequestBody Long id) {
resultTagetLibService.deleteResultTagetLibById(id);
return R.ok();
}
}

View File

@ -0,0 +1,33 @@
package com.lz.modules.performance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.ResultTagetLib;
/**
* <p>
* 考核指标库表 服务类
* </p>
*
* @author quyixiao
* @since 2020-10-16
*/
public interface ResultTagetLibService extends IService<ResultTagetLib> {
ResultTagetLib selectResultTagetLibById(Long id);
Long insertResultTagetLib(ResultTagetLib resultTagetLib);
int updateResultTagetLibById(ResultTagetLib resultTagetLib);
int updateCoverResultTagetLibById(ResultTagetLib resultTagetLib);
int deleteResultTagetLibById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.lz.modules.performance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.ResultTagetLibMapper;
import com.lz.modules.flow.entity.ResultTagetLib;
import com.lz.modules.performance.service.ResultTagetLibService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 考核指标库表 服务类
* </p>
*
* @author quyixiao
* @since 2020-10-16
*/
@Service
public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper, ResultTagetLib> implements ResultTagetLibService {
@Autowired
private ResultTagetLibMapper resultTagetLibMapper;
@Override
public ResultTagetLib selectResultTagetLibById(Long id){
return resultTagetLibMapper.selectResultTagetLibById(id);
}
@Override
public Long insertResultTagetLib(ResultTagetLib resultTagetLib){
return resultTagetLibMapper.insertResultTagetLib(resultTagetLib);
}
@Override
public int updateResultTagetLibById(ResultTagetLib resultTagetLib){
return resultTagetLibMapper.updateResultTagetLibById(resultTagetLib);
}
@Override
public int updateCoverResultTagetLibById(ResultTagetLib resultTagetLib){
return resultTagetLibMapper.updateCoverResultTagetLibById(resultTagetLib);
}
@Override
public int deleteResultTagetLibById(Long id){
return resultTagetLibMapper.deleteResultTagetLibById(id);
}
}

View File

@ -8,17 +8,20 @@
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="evaluation_group_id" property="evaluationGroupId"/>
<result column="type" property="type"/>
<result column="weight" property="weight"/>
<result column="max_count" property="maxCount"/>
<result column="calculate_id" property="calculateId"/>
<result column="grade_status" property="gradeStatus"/>
<result column="grade_group_id" property="gradeGroupId"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, evaluation_group_id AS evaluationGroupId, type AS type, weight AS weight, max_count AS maxCount, calculate_id AS calculateId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, evaluation_group_id AS evaluationGroupId, type AS type, weight AS weight, max_count AS maxCount, calculate_id AS calculateId, grade_status AS gradeStatus, grade_group_id AS gradeGroupId
</sql>
@ -31,20 +34,26 @@
<insert id="insertResultModel" parameterType="ResultModel" useGeneratedKeys="true" keyProperty="id" >
insert into lz_result_model(
<if test="name != null">name, </if>
<if test="evaluationGroupId != null">evaluation_group_id, </if>
<if test="type != null">type, </if>
<if test="weight != null">weight, </if>
<if test="maxCount != null">max_count, </if>
<if test="calculateId != null">calculate_id, </if>
<if test="gradeStatus != null">grade_status, </if>
<if test="gradeGroupId != null">grade_group_id, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="evaluationGroupId != null">#{ evaluationGroupId}, </if>
<if test="type != null">#{ type}, </if>
<if test="weight != null">#{ weight}, </if>
<if test="maxCount != null">#{ maxCount}, </if>
<if test="calculateId != null">#{ calculateId}, </if>
<if test="gradeStatus != null">#{ gradeStatus}, </if>
<if test="gradeGroupId != null">#{ gradeGroupId}, </if>
0,
now(),
now()
@ -58,11 +67,14 @@
<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="evaluationGroupId != null">evaluation_group_id = #{evaluationGroupId},</if>
<if test="type != null">type = #{type},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="maxCount != null">max_count = #{maxCount},</if>
<if test="calculateId != null">calculate_id = #{calculateId}</if>
<if test="calculateId != null">calculate_id = #{calculateId},</if>
<if test="gradeStatus != null">grade_status = #{gradeStatus},</if>
<if test="gradeGroupId != null">grade_group_id = #{gradeGroupId}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -75,11 +87,14 @@
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
evaluation_group_id = #{evaluationGroupId},
type = #{type},
weight = #{weight},
max_count = #{maxCount},
calculate_id = #{calculateId}
calculate_id = #{calculateId},
grade_status = #{gradeStatus},
grade_group_id = #{gradeGroupId}
,gmt_modified = now()
where id = #{id}
</update>
@ -89,5 +104,9 @@
update lz_result_model set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectResultModelByGroupId" resultType="ResultModel" >
select * from lz_result_model where evaluation_group_id=#{id} and is_delete = 0
</select>
</mapper>

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lz.modules.flow.dao.ResultTagetLibMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.flow.entity.ResultTagetLib">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="model_id" property="modelId"/>
<result column="weight" property="weight"/>
<result column="key_result" property="keyResult"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, model_id AS modelId, weight AS weight, key_result AS keyResult
</sql>
<select id="selectResultTagetLibById" resultType="ResultTagetLib" >
select * from lz_result_taget_lib where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertResultTagetLib" parameterType="ResultTagetLib" useGeneratedKeys="true" keyProperty="id" >
insert into lz_result_taget_lib(
<if test="name != null">name, </if>
<if test="modelId != null">model_id, </if>
<if test="weight != null">weight, </if>
<if test="keyResult != null">key_result, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="modelId != null">#{ modelId}, </if>
<if test="weight != null">#{ weight}, </if>
<if test="keyResult != null">#{ keyResult}, </if>
0,
now(),
now()
)
</insert>
<update id="updateResultTagetLibById" parameterType="ResultTagetLib" >
update
lz_result_taget_lib
<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="modelId != null">model_id = #{modelId},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="keyResult != null">key_result = #{keyResult}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverResultTagetLibById" parameterType="ResultTagetLib" >
update
lz_result_taget_lib
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
model_id = #{modelId},
weight = #{weight},
key_result = #{keyResult}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteResultTagetLibById" parameterType="java.lang.Long">
update lz_result_taget_lib set is_delete = 1 where id=#{id} limit 1
</update>
</mapper>

View File

@ -65,7 +65,7 @@ public class MysqlMain {
}
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_evaluation_group"));
/*list.add(new TablesBean("lz_evaluation_group"));
list.add(new TablesBean("lz_evaluation_start_staff"));
list.add(new TablesBean("lz_flow_approval_role"));
list.add(new TablesBean("lz_flow_change"));
@ -74,9 +74,10 @@ public class MysqlMain {
list.add(new TablesBean("lz_flow_start"));
list.add(new TablesBean("lz_result_calculate"));
list.add(new TablesBean("lz_result_dimension"));
list.add(new TablesBean("lz_result_grade"));
list.add(new TablesBean("lz_result_model"));
list.add(new TablesBean("lz_result_score"));
list.add(new TablesBean("lz_result_grade"));*/
//list.add(new TablesBean("lz_result_model"));
//list.add(new TablesBean("lz_result_score"));
list.add(new TablesBean("lz_result_taget_lib"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();