diff --git a/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java b/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java index f89596ca..6475b550 100644 --- a/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java @@ -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 { @@ -30,4 +33,5 @@ public interface ResultModelMapper extends BaseMapper { int deleteResultModelById(@Param("id")Long id); + List selectResultModelByGroupId(@Param("id") Long id); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/dao/ResultTagetLibMapper.java b/src/main/java/com/lz/modules/flow/dao/ResultTagetLibMapper.java new file mode 100644 index 00000000..66685fee --- /dev/null +++ b/src/main/java/com/lz/modules/flow/dao/ResultTagetLibMapper.java @@ -0,0 +1,33 @@ +package com.lz.modules.flow.dao; +/** +*

+* 考核指标库表 服务类 +*

+* +* @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 selectResultTagetLibById(@Param("id")Long id); + + + Long insertResultTagetLib(ResultTagetLib resultTagetLib); + + + int updateResultTagetLibById(ResultTagetLib resultTagetLib); + + + int updateCoverResultTagetLibById(ResultTagetLib resultTagetLib); + + + int deleteResultTagetLibById(@Param("id")Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/entity/ResultModel.java b/src/main/java/com/lz/modules/flow/entity/ResultModel.java index 395ae93c..84563817 100644 --- a/src/main/java/com/lz/modules/flow/entity/ResultModel.java +++ b/src/main/java/com/lz/modules/flow/entity/ResultModel.java @@ -10,15 +10,14 @@ import java.math.BigDecimal; import java.util.Date; /** *

-* 菜单权限表 *

*考核模板表 * @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; + //使用的哪个等级。等级组id,lz_result_grade的group_id + @ApiModelProperty(value = "使用的哪个等级。等级组id,lz_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; + } + + /** + * 使用的哪个等级。等级组id,lz_result_grade的group_id + * @return + */ + public Long getGradeGroupId() { + return gradeGroupId; + } + /** + * 使用的哪个等级。等级组id,lz_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 + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/entity/ResultTagetLib.java b/src/main/java/com/lz/modules/flow/entity/ResultTagetLib.java new file mode 100644 index 00000000..ca892795 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/entity/ResultTagetLib.java @@ -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; +/** +*

+*

*考核指标库表 +* @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; + //考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + @ApiModelProperty(value = "考核维度ID,result_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; + } + + /** + * 考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + * @return + */ + public Long getModelId() { + return modelId; + } + /** + * 考核维度ID,result_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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/ResultModelDto.java b/src/main/java/com/lz/modules/flow/model/ResultModelDto.java index f9392b6c..243a0994 100644 --- a/src/main/java/com/lz/modules/flow/model/ResultModelDto.java +++ b/src/main/java/com/lz/modules/flow/model/ResultModelDto.java @@ -9,15 +9,18 @@ import java.math.BigDecimal; *

*

*考核模板表 * @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; + //使用的哪个等级。等级组id,lz_result_grade的group_id + @ApiModelProperty(value = "使用的哪个等级。等级组id,lz_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; + } + + /** + * 使用的哪个等级。等级组id,lz_result_grade的group_id + * @return + */ + public Long getGradeGroupId() { + return gradeGroupId; + } + /** + * 使用的哪个等级。等级组id,lz_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 + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java b/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java new file mode 100644 index 00000000..6e9f6ec9 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java @@ -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; + +/** +*

+*

*考核指标库表 +* @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; + //考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + @ApiModelProperty(value = "考核维度ID,result_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; + } + + /** + * 考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + * @return + */ + public Long getModelId() { + return modelId; + } + /** + * 考核维度ID,result_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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/ResultModelReq.java b/src/main/java/com/lz/modules/flow/req/ResultModelReq.java index e92ba180..149eb7df 100644 --- a/src/main/java/com/lz/modules/flow/req/ResultModelReq.java +++ b/src/main/java/com/lz/modules/flow/req/ResultModelReq.java @@ -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; + //使用的哪个等级。等级组id,lz_result_grade的group_id + @ApiModelProperty(value = "使用的哪个等级。等级组id,lz_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; + } + + /** + * 使用的哪个等级。等级组id,lz_result_grade的group_id + * @return + */ + public Long getGradeGroupId() { + return gradeGroupId; + } + /** + * 使用的哪个等级。等级组id,lz_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 + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java b/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java new file mode 100644 index 00000000..6626891d --- /dev/null +++ b/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java @@ -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; +/** +*

+* 菜单权限表 +*

*考核指标库表 +* @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; + //考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + @ApiModelProperty(value = "考核维度ID,result_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; + } + + /** + * 考核维度ID,result_model。如果id为0表示为指标库数据,其他地方可选 + * @return + */ + public Long getModelId() { + return modelId; + } + /** + * 考核维度ID,result_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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/ResultModelService.java b/src/main/java/com/lz/modules/flow/service/ResultModelService.java index 083e343c..966dca77 100644 --- a/src/main/java/com/lz/modules/flow/service/ResultModelService.java +++ b/src/main/java/com/lz/modules/flow/service/ResultModelService.java @@ -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; + /** *

* 考核模板表 服务类 @@ -30,4 +32,5 @@ public interface ResultModelService extends IService { int deleteResultModelById(Long id); + List selectResultModelByGroupId(Long id); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/ResultModelServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/ResultModelServiceImpl.java index a4651baf..3fc6c58b 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/ResultModelServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/ResultModelServiceImpl.java @@ -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; + /** *

* 考核模板表 服务类 @@ -58,6 +60,11 @@ public class ResultModelServiceImpl extends ServiceImpl selectResultModelByGroupId(Long id){ + return resultModelMapper.selectResultModelByGroupId(id); + } + } diff --git a/src/main/java/com/lz/modules/performance/controller/FlowChartController.java b/src/main/java/com/lz/modules/performance/controller/FlowChartController.java index 451dd690..f755683c 100644 --- a/src/main/java/com/lz/modules/performance/controller/FlowChartController.java +++ b/src/main/java/com/lz/modules/performance/controller/FlowChartController.java @@ -40,7 +40,7 @@ public class FlowChartController { FlowManager flowManager = flowManagerService.selectFlowManagerById(id); if(flowManager != null){ List 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 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") diff --git a/src/main/java/com/lz/modules/performance/controller/FlowChartRoleController.java b/src/main/java/com/lz/modules/performance/controller/FlowChartRoleController.java index 3bee766e..b0ec4465 100644 --- a/src/main/java/com/lz/modules/performance/controller/FlowChartRoleController.java +++ b/src/main/java/com/lz/modules/performance/controller/FlowChartRoleController.java @@ -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); } diff --git a/src/main/java/com/lz/modules/performance/controller/ResultGradeController.java b/src/main/java/com/lz/modules/performance/controller/ResultGradeController.java index babe9093..87022a34 100644 --- a/src/main/java/com/lz/modules/performance/controller/ResultGradeController.java +++ b/src/main/java/com/lz/modules/performance/controller/ResultGradeController.java @@ -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); } diff --git a/src/main/java/com/lz/modules/performance/controller/ResultModelController.java b/src/main/java/com/lz/modules/performance/controller/ResultModelController.java index f1de9b78..702ae151 100644 --- a/src/main/java/com/lz/modules/performance/controller/ResultModelController.java +++ b/src/main/java/com/lz/modules/performance/controller/ResultModelController.java @@ -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 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); } diff --git a/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java b/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java new file mode 100644 index 00000000..a07ec3c1 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java @@ -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(); + } +} diff --git a/src/main/java/com/lz/modules/performance/service/ResultTagetLibService.java b/src/main/java/com/lz/modules/performance/service/ResultTagetLibService.java new file mode 100644 index 00000000..8a5ac2c3 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/ResultTagetLibService.java @@ -0,0 +1,33 @@ +package com.lz.modules.performance.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.flow.entity.ResultTagetLib; + +/** +*

+* 考核指标库表 服务类 +*

+* +* @author quyixiao +* @since 2020-10-16 +*/ +public interface ResultTagetLibService extends IService { + + + + ResultTagetLib selectResultTagetLibById(Long id); + + + Long insertResultTagetLib(ResultTagetLib resultTagetLib); + + + int updateResultTagetLibById(ResultTagetLib resultTagetLib); + + + int updateCoverResultTagetLibById(ResultTagetLib resultTagetLib); + + + int deleteResultTagetLibById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/service/impl/ResultTagetLibServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/ResultTagetLibServiceImpl.java new file mode 100644 index 00000000..3616901f --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/impl/ResultTagetLibServiceImpl.java @@ -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; + +/** +*

+* 考核指标库表 服务类 +*

+* +* @author quyixiao +* @since 2020-10-16 +*/ + +@Service +public class ResultTagetLibServiceImpl extends ServiceImpl 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); + } + + + +} diff --git a/src/main/resources/mapper/flow/ResultModelMapper.xml b/src/main/resources/mapper/flow/ResultModelMapper.xml index 7f90402d..2ffa75f6 100644 --- a/src/main/resources/mapper/flow/ResultModelMapper.xml +++ b/src/main/resources/mapper/flow/ResultModelMapper.xml @@ -8,17 +8,20 @@ + + + - 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 @@ -31,20 +34,26 @@ insert into lz_result_model( + name, evaluation_group_id, type, weight, max_count, calculate_id, + grade_status, + grade_group_id, is_delete, gmt_create, gmt_modified )values( + #{ name}, #{ evaluationGroupId}, #{ type}, #{ weight}, #{ maxCount}, #{ calculateId}, + #{ gradeStatus}, + #{ gradeGroupId}, 0, now(), now() @@ -58,11 +67,14 @@ 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} @@ -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} @@ -89,5 +104,9 @@ update lz_result_model set is_delete = 1 where id=#{id} limit 1 + + diff --git a/src/main/resources/mapper/flow/ResultTagetLibMapper.xml b/src/main/resources/mapper/flow/ResultTagetLibMapper.xml new file mode 100644 index 00000000..a368cca2 --- /dev/null +++ b/src/main/resources/mapper/flow/ResultTagetLibMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + insert into lz_result_taget_lib( + name, + model_id, + weight, + key_result, + is_delete, + gmt_create, + gmt_modified + )values( + #{ name}, + #{ modelId}, + #{ weight}, + #{ keyResult}, + 0, + now(), + now() + ) + + + + + update + lz_result_taget_lib + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + model_id = #{modelId}, + weight = #{weight}, + key_result = #{keyResult} + + ,gmt_modified = now() + where id = #{id} + + + + + 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 lz_result_taget_lib set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index 979a1d98..ca82a412 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -65,7 +65,7 @@ public class MysqlMain { } List list = new ArrayList(); - 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 list2 = new ArrayList(); Map map = MysqlUtil2ShowCreateTable.getComments();