diff --git a/src/main/java/com/lz/common/utils/R.java b/src/main/java/com/lz/common/utils/R.java
index 2e6741c1..e604cace 100644
--- a/src/main/java/com/lz/common/utils/R.java
+++ b/src/main/java/com/lz/common/utils/R.java
@@ -24,7 +24,7 @@ public class R extends HashMap {
private boolean isSuccess;
public R() {
- put("code", 0);
+ put("code", 200);
put("msg", "success");
this.isSuccess = true ;
}
diff --git a/src/main/java/com/lz/modules/flow/dao/EvaluationGroupMapper.java b/src/main/java/com/lz/modules/flow/dao/EvaluationGroupMapper.java
index 71e899ec..62bf47af 100644
--- a/src/main/java/com/lz/modules/flow/dao/EvaluationGroupMapper.java
+++ b/src/main/java/com/lz/modules/flow/dao/EvaluationGroupMapper.java
@@ -8,7 +8,9 @@ package com.lz.modules.flow.dao;
* @since 2020-10-13
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lz.modules.flow.entity.EvaluationGroup;
+import com.lz.modules.flow.req.EvaluationGroupReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -33,4 +35,5 @@ public interface EvaluationGroupMapper extends BaseMapper {
int deleteEvaluationGroupById(@Param("id")Long id);
+ List seleteEvaluationGroupByReq(@Param("page") IPage page, @Param("req") EvaluationGroupReq req);
}
\ No newline at end of file
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 6475b550..6fb00c52 100644
--- a/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java
+++ b/src/main/java/com/lz/modules/flow/dao/ResultModelMapper.java
@@ -9,6 +9,7 @@ package com.lz.modules.flow.dao;
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.ResultModel;
+import com.lz.modules.flow.model.ResultModelDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -34,4 +35,8 @@ public interface ResultModelMapper extends BaseMapper {
List selectResultModelByGroupId(@Param("id") Long id);
+
+ List selectResultDtoByGroupId(Long id);
+
+ int deleteResultModelByGroupId(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
index 66685fee..bc6e8906 100644
--- a/src/main/java/com/lz/modules/flow/dao/ResultTagetLibMapper.java
+++ b/src/main/java/com/lz/modules/flow/dao/ResultTagetLibMapper.java
@@ -8,9 +8,15 @@ package com.lz.modules.flow.dao;
* @since 2020-10-16
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lz.modules.flow.entity.ResultTagetLib;
+import com.lz.modules.flow.model.ResultTagetLibDto;
+import com.lz.modules.flow.req.ResultTagetLibSearchReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
@Mapper
public interface ResultTagetLibMapper extends BaseMapper {
@@ -30,4 +36,9 @@ public interface ResultTagetLibMapper extends BaseMapper {
int deleteResultTagetLibById(@Param("id")Long id);
+ List selectResultTagetLibByModelId(Long id);
+
+ List selectByCondition(@Param("page") IPage page, @Param("req") ResultTagetLibSearchReq req);
+
+ int deleteResultTagetLibByModelId(Long id);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/entity/EvaluationGroup.java b/src/main/java/com/lz/modules/flow/entity/EvaluationGroup.java
index 31b52fa0..6f35d100 100644
--- a/src/main/java/com/lz/modules/flow/entity/EvaluationGroup.java
+++ b/src/main/java/com/lz/modules/flow/entity/EvaluationGroup.java
@@ -34,7 +34,7 @@ public class EvaluationGroup implements java.io.Serializable {
private String name;
//绩效管理员ID,system_user,id,逗号隔开
@ApiModelProperty(value = "绩效管理员ID,system_user,id,逗号隔开", name = "managerIds")
- private Long managerIds;
+ private String managerIds;
//参与部门id,逗号隔开
@ApiModelProperty(value = "参与部门id,逗号隔开", name = "depIds")
private String depIds;
@@ -123,14 +123,14 @@ public class EvaluationGroup implements java.io.Serializable {
* 绩效管理员ID,system_user,id,逗号隔开
* @return
*/
- public Long getManagerIds() {
+ public String getManagerIds() {
return managerIds;
}
/**
* 绩效管理员ID,system_user,id,逗号隔开
* @param managerIds
*/
- public void setManagerIds(Long managerIds) {
+ public void setManagerIds(String managerIds) {
this.managerIds = managerIds;
}
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 84563817..2fb1d8b9 100644
--- a/src/main/java/com/lz/modules/flow/entity/ResultModel.java
+++ b/src/main/java/com/lz/modules/flow/entity/ResultModel.java
@@ -10,7 +10,7 @@ import java.math.BigDecimal;
import java.util.Date;
/**
*
-*
*考核模板表
+*
*考核维度表
* @author quyixiao
* @since 2020-10-16
*/
@@ -40,13 +40,13 @@ public class ResultModel implements java.io.Serializable {
//1:业绩 2:文化价值观
@ApiModelProperty(value = "1:业绩 2:文化价值观", name = "type")
private Integer type;
- //权重
- @ApiModelProperty(value = "权重", name = "weight")
+ //权重 0不限权重
+ @ApiModelProperty(value = "权重 0不限权重", name = "weight")
private BigDecimal weight;
//考核子项目个数最大限制
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
- //lz_result_calculate 的id
+ //lz_result_calculate 的id,计算法方法id
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭,1开启
@@ -55,6 +55,9 @@ public class ResultModel implements java.io.Serializable {
//使用的哪个等级。等级组id,lz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
+ //排序
+ @ApiModelProperty(value = "排序", name = "order")
+ private Integer order;
/**
*
* @return
@@ -161,14 +164,14 @@ public class ResultModel implements java.io.Serializable {
}
/**
- * 权重
+ * 权重 0不限权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
- * 权重
+ * 权重 0不限权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
@@ -191,14 +194,14 @@ public class ResultModel implements java.io.Serializable {
}
/**
- * lz_result_calculate 的id
+ * lz_result_calculate 的id,计算法方法id
* @return
*/
public Long getCalculateId() {
return calculateId;
}
/**
- * lz_result_calculate 的id
+ * lz_result_calculate 的id,计算法方法id
* @param calculateId
*/
public void setCalculateId(Long calculateId) {
@@ -235,6 +238,21 @@ public class ResultModel implements java.io.Serializable {
this.gradeGroupId = gradeGroupId;
}
+ /**
+ * 排序
+ * @return
+ */
+ public Integer getOrder() {
+ return order;
+ }
+ /**
+ * 排序
+ * @param order
+ */
+ public void setOrder(Integer order) {
+ this.order = order;
+ }
+
@Override
public String toString() {
return "ResultModel{" +
@@ -250,6 +268,7 @@ public class ResultModel implements java.io.Serializable {
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
+ ",order=" + order +
"}";
}
}
\ 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
index ca892795..290d6891 100644
--- a/src/main/java/com/lz/modules/flow/entity/ResultTagetLib.java
+++ b/src/main/java/com/lz/modules/flow/entity/ResultTagetLib.java
@@ -43,6 +43,9 @@ public class ResultTagetLib implements java.io.Serializable {
//考核标准,关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
+ //排序
+ @ApiModelProperty(value = "排序", name = "order")
+ private Integer order;
/**
*
* @return
@@ -163,6 +166,21 @@ public class ResultTagetLib implements java.io.Serializable {
this.keyResult = keyResult;
}
+ /**
+ * 排序
+ * @return
+ */
+ public Integer getOrder() {
+ return order;
+ }
+ /**
+ * 排序
+ * @param order
+ */
+ public void setOrder(Integer order) {
+ this.order = order;
+ }
+
@Override
public String toString() {
return "ResultTagetLib{" +
@@ -174,6 +192,7 @@ public class ResultTagetLib implements java.io.Serializable {
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
+ ",order=" + order +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/model/EvaluationGroupDto.java b/src/main/java/com/lz/modules/flow/model/EvaluationGroupDto.java
index abf45a43..feb35272 100644
--- a/src/main/java/com/lz/modules/flow/model/EvaluationGroupDto.java
+++ b/src/main/java/com/lz/modules/flow/model/EvaluationGroupDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "考评组表")
+@ApiModel(value = "考评组Dto")
public class EvaluationGroupDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java b/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java
index cff7451c..51b58f68 100644
--- a/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java
+++ b/src/main/java/com/lz/modules/flow/model/EvaluationStartStaffDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "发起考核考,核组人员对应关系表")
+@ApiModel(value = "发起考核考,核组人员对应关系Dto")
public class EvaluationStartStaffDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/FlowApprovalRoleDto.java b/src/main/java/com/lz/modules/flow/model/FlowApprovalRoleDto.java
index 14f5edac..89a6fd71 100644
--- a/src/main/java/com/lz/modules/flow/model/FlowApprovalRoleDto.java
+++ b/src/main/java/com/lz/modules/flow/model/FlowApprovalRoleDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "流程审批表")
+@ApiModel(value = "流程审批Dto")
public class FlowApprovalRoleDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/FlowChangeDto.java b/src/main/java/com/lz/modules/flow/model/FlowChangeDto.java
index 18193b50..af6d4b26 100644
--- a/src/main/java/com/lz/modules/flow/model/FlowChangeDto.java
+++ b/src/main/java/com/lz/modules/flow/model/FlowChangeDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "变动记录表")
+@ApiModel(value = "变动记录Dto")
public class FlowChangeDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/FlowChartDto.java b/src/main/java/com/lz/modules/flow/model/FlowChartDto.java
index 878d6835..0fd92594 100644
--- a/src/main/java/com/lz/modules/flow/model/FlowChartDto.java
+++ b/src/main/java/com/lz/modules/flow/model/FlowChartDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "流程图,lz_flow的父")
+@ApiModel(value = "流程图Dto")
public class FlowChartDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java b/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java
index eb43c52b..ee1278f5 100644
--- a/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java
+++ b/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java
@@ -10,7 +10,7 @@ import lombok.Data;
*/
@Data
-@ApiModel(value = "流程节点权限对应关系表")
+@ApiModel(value = "流程节点权限对应关系Dto")
public class FlowChartRoleDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/FlowStartDto.java b/src/main/java/com/lz/modules/flow/model/FlowStartDto.java
index acec56b9..c4c2f028 100644
--- a/src/main/java/com/lz/modules/flow/model/FlowStartDto.java
+++ b/src/main/java/com/lz/modules/flow/model/FlowStartDto.java
@@ -11,7 +11,7 @@ import java.util.Date;
*/
@Data
-@ApiModel(value = "发起考核表")
+@ApiModel(value = "发起考核Dto")
public class FlowStartDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/ResultDimensionDto.java b/src/main/java/com/lz/modules/flow/model/ResultDimensionDto.java
index 7b85e387..90e43587 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultDimensionDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultDimensionDto.java
@@ -18,7 +18,7 @@ import java.util.Date;
*/
@Data
-@ApiModel(value = "考核维度")
+@ApiModel(value = "考核维度Dto")
public class ResultDimensionDto implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
diff --git a/src/main/java/com/lz/modules/flow/model/ResultGradeDto.java b/src/main/java/com/lz/modules/flow/model/ResultGradeDto.java
index 148131ec..a6c8ae64 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultGradeDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultGradeDto.java
@@ -13,7 +13,7 @@ import java.math.BigDecimal;
*/
@Data
-@ApiModel(value = "等级表")
+@ApiModel(value = "等级Dto")
public class ResultGradeDto {
//
@ApiModelProperty(value = "", name = "id")
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 243a0994..a89c8ce2 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultModelDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultModelDto.java
@@ -4,16 +4,17 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
+import java.util.List;
/**
*
-*
*考核模板表
+* *考核维度表
* @author quyixiao
* @since 2020-10-16
*/
@Data
-@ApiModel(value = "考核维度表")
+@ApiModel(value = "考核维度表Dto")
public class ResultModelDto {
//
@ApiModelProperty(value = "", name = "id")
@@ -27,13 +28,13 @@ public class ResultModelDto {
//1:业绩 2:文化价值观
@ApiModelProperty(value = "1:业绩 2:文化价值观", name = "type")
private Integer type;
- //权重
- @ApiModelProperty(value = "权重", name = "weight")
+ //权重 0不限权重
+ @ApiModelProperty(value = "权重 0不限权重", name = "weight")
private BigDecimal weight;
//考核子项目个数最大限制
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
private Integer maxCount;
- //lz_result_calculate 的id
+ //lz_result_calculate 的id,计算法方法id
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
private Long calculateId;
//等级开关0关闭,1开启
@@ -42,6 +43,11 @@ public class ResultModelDto {
//使用的哪个等级。等级组id,lz_result_grade的group_id
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
private Long gradeGroupId;
+ //排序
+ @ApiModelProperty(value = "排序", name = "order")
+ private Integer order;
+ @ApiModelProperty(value = "已添加的指标", name = "tagetLibs")
+ private List tagetLibs;
/**
*
* @return
@@ -103,14 +109,14 @@ public class ResultModelDto {
}
/**
- * 权重
+ * 权重 0不限权重
* @return
*/
public BigDecimal getWeight() {
return weight;
}
/**
- * 权重
+ * 权重 0不限权重
* @param weight
*/
public void setWeight(BigDecimal weight) {
@@ -133,14 +139,14 @@ public class ResultModelDto {
}
/**
- * lz_result_calculate 的id
+ * lz_result_calculate 的id,计算法方法id
* @return
*/
public Long getCalculateId() {
return calculateId;
}
/**
- * lz_result_calculate 的id
+ * lz_result_calculate 的id,计算法方法id
* @param calculateId
*/
public void setCalculateId(Long calculateId) {
@@ -177,6 +183,21 @@ public class ResultModelDto {
this.gradeGroupId = gradeGroupId;
}
+ /**
+ * 排序
+ * @return
+ */
+ public Integer getOrder() {
+ return order;
+ }
+ /**
+ * 排序
+ * @param order
+ */
+ public void setOrder(Integer order) {
+ this.order = order;
+ }
+
@Override
public String toString() {
return "ResultModel{" +
@@ -189,6 +210,7 @@ public class ResultModelDto {
",calculateId=" + calculateId +
",gradeStatus=" + gradeStatus +
",gradeGroupId=" + gradeGroupId +
+ ",order=" + order +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java
index 0eeac84e..ecc922b1 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java
@@ -13,7 +13,7 @@ import java.math.BigDecimal;
*/
@Data
-@ApiModel(value = "业绩详情评分表")
+@ApiModel(value = "业绩详情评分Dto")
public class ResultScoreDto {
//
@ApiModelProperty(value = "", name = "id")
diff --git a/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java b/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java
index 6e9f6ec9..71ff0655 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultTagetLibDto.java
@@ -13,7 +13,7 @@ import java.math.BigDecimal;
*/
@Data
-@ApiModel(value = "考核指标库表")
+@ApiModel(value = "考核指标库表Dto")
public class ResultTagetLibDto {
//
@ApiModelProperty(value = "", name = "id")
@@ -30,6 +30,11 @@ public class ResultTagetLibDto {
//考核标准,关键结果
@ApiModelProperty(value = "考核标准,关键结果", name = "keyResult")
private String keyResult;
+ //排序
+ @ApiModelProperty(value = "排序", name = "order")
+ private Integer order;
+
+
/**
*
* @return
@@ -105,6 +110,21 @@ public class ResultTagetLibDto {
this.keyResult = keyResult;
}
+ /**
+ * 排序
+ * @return
+ */
+ public Integer getOrder() {
+ return order;
+ }
+ /**
+ * 排序
+ * @param order
+ */
+ public void setOrder(Integer order) {
+ this.order = order;
+ }
+
@Override
public String toString() {
return "ResultTagetLib{" +
@@ -113,6 +133,7 @@ public class ResultTagetLibDto {
",modelId=" + modelId +
",weight=" + weight +
",keyResult=" + keyResult +
+ ",order=" + order +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/req/EvaluationGroupReq.java b/src/main/java/com/lz/modules/flow/req/EvaluationGroupReq.java
index d329df44..b3de50f3 100644
--- a/src/main/java/com/lz/modules/flow/req/EvaluationGroupReq.java
+++ b/src/main/java/com/lz/modules/flow/req/EvaluationGroupReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "考评组表")
+@ApiModel(value = "考评组搜索Req")
public class EvaluationGroupReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@@ -30,29 +30,16 @@ public class EvaluationGroupReq implements java.io.Serializable {
//
private Long id;
//
- @ApiModelProperty(value = "", name = "isDelete")
- private Integer isDelete;
+ @ApiModelProperty(value = "起始时间", name = "startTime")
+ private String startTime;
//
- @ApiModelProperty(value = "", name = "gmtCreate")
- private Date gmtCreate;
- //
- @ApiModelProperty(value = "", name = "gmtModified")
- private Date gmtModified;
+ @ApiModelProperty(value = "结束时间", name = "endTime")
+ private String endTime;
//
@ApiModelProperty(value = "", name = "name")
private String name;
- //绩效管理员ID,system_user,id,逗号隔开
- @ApiModelProperty(value = "绩效管理员ID,system_user,id,逗号隔开", name = "managerIds")
- private Long managerIds;
- //参与部门id,逗号隔开
- @ApiModelProperty(value = "参与部门id,逗号隔开", name = "depIds")
- private Long depIds;
- //参与考核员工staff_id,逗号隔开
- @ApiModelProperty(value = "参与考核员工staff_id,逗号隔开", name = "staffIds")
- private Long staffIds;
- //排除人员ids,逗号隔开
- @ApiModelProperty(value = "排除人员ids,逗号隔开", name = "outIds")
- private Long outIds;
+
+
/**
*
* @return
@@ -68,50 +55,7 @@ public class EvaluationGroupReq implements java.io.Serializable {
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;
- }
/**
*
@@ -128,78 +72,15 @@ public class EvaluationGroupReq implements java.io.Serializable {
this.name = name;
}
- /**
- * 绩效管理员ID,system_user,id,逗号隔开
- * @return
- */
- public Long getManagerIds() {
- return managerIds;
- }
- /**
- * 绩效管理员ID,system_user,id,逗号隔开
- * @param managerIds
- */
- public void setManagerIds(Long managerIds) {
- this.managerIds = managerIds;
- }
- /**
- * 参与部门id,逗号隔开
- * @return
- */
- public Long getDepIds() {
- return depIds;
- }
- /**
- * 参与部门id,逗号隔开
- * @param depIds
- */
- public void setDepIds(Long depIds) {
- this.depIds = depIds;
- }
-
- /**
- * 参与考核员工staff_id,逗号隔开
- * @return
- */
- public Long getStaffIds() {
- return staffIds;
- }
- /**
- * 参与考核员工staff_id,逗号隔开
- * @param staffIds
- */
- public void setStaffIds(Long staffIds) {
- this.staffIds = staffIds;
- }
-
- /**
- * 排除人员ids,逗号隔开
- * @return
- */
- public Long getOutIds() {
- return outIds;
- }
- /**
- * 排除人员ids,逗号隔开
- * @param outIds
- */
- public void setOutIds(Long outIds) {
- this.outIds = outIds;
- }
@Override
public String toString() {
return "EvaluationGroup{" +
",id=" + id +
- ",isDelete=" + isDelete +
- ",gmtCreate=" + gmtCreate +
- ",gmtModified=" + gmtModified +
+ ",startTime=" + startTime +
+ ",endTime=" + endTime +
",name=" + name +
- ",managerIds=" + managerIds +
- ",depIds=" + depIds +
- ",staffIds=" + staffIds +
- ",outIds=" + outIds +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java b/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java
index a4093b23..9b69903e 100644
--- a/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java
+++ b/src/main/java/com/lz/modules/flow/req/EvaluationStartStaffReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "发起考核考,核组人员对应关系表")
+@ApiModel(value = "发起考核考,核组人员对应关系Req")
public class EvaluationStartStaffReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/FlowApprovalRoleReq.java b/src/main/java/com/lz/modules/flow/req/FlowApprovalRoleReq.java
index bb2cb47e..6062b86a 100644
--- a/src/main/java/com/lz/modules/flow/req/FlowApprovalRoleReq.java
+++ b/src/main/java/com/lz/modules/flow/req/FlowApprovalRoleReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "流程审批表")
+@ApiModel(value = "流程审批Req")
public class FlowApprovalRoleReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/FlowChangeReq.java b/src/main/java/com/lz/modules/flow/req/FlowChangeReq.java
index eb91d57d..4ebaf90e 100644
--- a/src/main/java/com/lz/modules/flow/req/FlowChangeReq.java
+++ b/src/main/java/com/lz/modules/flow/req/FlowChangeReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "变动记录表")
+@ApiModel(value = "变动记录Req")
public class FlowChangeReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartReq.java
index 4264f107..679aa94b 100644
--- a/src/main/java/com/lz/modules/flow/req/FlowChartReq.java
+++ b/src/main/java/com/lz/modules/flow/req/FlowChartReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "流程图,lz_flow的父")
+@ApiModel(value = "流程图Req")
public class FlowChartReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java
index fcfc40b1..6bb17f58 100644
--- a/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java
+++ b/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "流程节点权限对应关系表")
+@ApiModel(value = "流程节点权限对应关系Req")
public class FlowChartRoleReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/FlowStartReq.java b/src/main/java/com/lz/modules/flow/req/FlowStartReq.java
index 78515754..885b302c 100644
--- a/src/main/java/com/lz/modules/flow/req/FlowStartReq.java
+++ b/src/main/java/com/lz/modules/flow/req/FlowStartReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "发起考核表")
+@ApiModel(value = "发起考核Req")
public class FlowStartReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultCalculateReq.java b/src/main/java/com/lz/modules/flow/req/ResultCalculateReq.java
index 6cd41821..d3da41eb 100644
--- a/src/main/java/com/lz/modules/flow/req/ResultCalculateReq.java
+++ b/src/main/java/com/lz/modules/flow/req/ResultCalculateReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "模板计算公式")
+@ApiModel(value = "模板计算公式Req")
public class ResultCalculateReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultDimensionReq.java b/src/main/java/com/lz/modules/flow/req/ResultDimensionReq.java
index 50135d42..07d68281 100644
--- a/src/main/java/com/lz/modules/flow/req/ResultDimensionReq.java
+++ b/src/main/java/com/lz/modules/flow/req/ResultDimensionReq.java
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "考核维度表")
+@ApiModel(value = "考核维度Req")
public class ResultDimensionReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultGradeReq.java b/src/main/java/com/lz/modules/flow/req/ResultGradeReq.java
index 74a08981..9d3dfcc1 100644
--- a/src/main/java/com/lz/modules/flow/req/ResultGradeReq.java
+++ b/src/main/java/com/lz/modules/flow/req/ResultGradeReq.java
@@ -18,7 +18,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "等级表")
+@ApiModel(value = "等级Req")
public class ResultGradeReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
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 149eb7df..3f14b608 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 = "考核维度Req")
public class ResultModelReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@@ -50,7 +50,7 @@ public class ResultModelReq implements java.io.Serializable {
@ApiModelProperty(value = "1:业绩 2:文化价值观", name = "type")
private Integer type;
//权重
- @ApiModelProperty(value = "权重", name = "weight")
+ @ApiModelProperty(value = "权重 0不限权重", name = "weight")
private BigDecimal weight;
//考核子项目个数最大限制
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultScoreReq.java b/src/main/java/com/lz/modules/flow/req/ResultScoreReq.java
index 7710ced8..81203bab 100644
--- a/src/main/java/com/lz/modules/flow/req/ResultScoreReq.java
+++ b/src/main/java/com/lz/modules/flow/req/ResultScoreReq.java
@@ -18,7 +18,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "业绩详情评分表")
+@ApiModel(value = "业绩详情评分Req")
public class ResultScoreReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java b/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java
index 6626891d..37e586d7 100644
--- a/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java
+++ b/src/main/java/com/lz/modules/flow/req/ResultTagetLibReq.java
@@ -18,7 +18,7 @@ import java.util.Date;
@Data
-@ApiModel(value = "考核指标库表")
+@ApiModel(value = "考核指标库Req")
public class ResultTagetLibReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
diff --git a/src/main/java/com/lz/modules/flow/req/ResultTagetLibSearchReq.java b/src/main/java/com/lz/modules/flow/req/ResultTagetLibSearchReq.java
new file mode 100644
index 00000000..b680c706
--- /dev/null
+++ b/src/main/java/com/lz/modules/flow/req/ResultTagetLibSearchReq.java
@@ -0,0 +1,114 @@
+package com.lz.modules.flow.req;
+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 = "搜索指标Req")
+public class ResultTagetLibSearchReq implements java.io.Serializable {
+
+ @ApiModelProperty(value = "currPage", name = "当前页码")
+ private int currPage = 1;
+ @ApiModelProperty(value = "pageSize", name = "每页返回条数")
+ private int pageSize = 10;
+
+ //
+ 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;
+
+ /**
+ *
+ * @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;
+ }
+
+
+
+ @Override
+ public String toString() {
+ return "ResultTagetLib{" +
+ ",id=" + id +
+ ",name=" + name +
+ ",modelId=" + modelId +
+ ",weight=" + weight +
+ "}";
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/service/EvaluationGroupService.java b/src/main/java/com/lz/modules/flow/service/EvaluationGroupService.java
index 003b8f8b..3195f132 100644
--- a/src/main/java/com/lz/modules/flow/service/EvaluationGroupService.java
+++ b/src/main/java/com/lz/modules/flow/service/EvaluationGroupService.java
@@ -1,7 +1,10 @@
package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.lz.common.utils.PageUtils;
+import com.lz.common.utils.R;
import com.lz.modules.flow.entity.EvaluationGroup;
+import com.lz.modules.flow.req.EvaluationGroupReq;
import java.util.List;
@@ -29,7 +32,8 @@ public interface EvaluationGroupService extends IService {
int updateCoverEvaluationGroupById(EvaluationGroup evaluationGroup);
- int deleteEvaluationGroupById(Long id);
+ R deleteEvaluationGroupById(Long id);
+ PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req);
}
\ 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 966dca77..bac12ee6 100644
--- a/src/main/java/com/lz/modules/flow/service/ResultModelService.java
+++ b/src/main/java/com/lz/modules/flow/service/ResultModelService.java
@@ -1,7 +1,9 @@
package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.lz.common.utils.R;
import com.lz.modules.flow.entity.ResultModel;
+import com.lz.modules.flow.model.ResultModelDto;
import java.util.List;
@@ -29,8 +31,12 @@ public interface ResultModelService extends IService {
int updateCoverResultModelById(ResultModel resultModel);
- int deleteResultModelById(Long id);
+ R deleteResultModelById(Long id);
List selectResultModelByGroupId(Long id);
+
+ List selectResultDtoByGroupId(Long id);
+
+ R deleteResultModelByGroupId(Long id);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java
index 7205839a..dd7ea621 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java
@@ -1,8 +1,13 @@
package com.lz.modules.flow.service.impl;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lz.common.utils.ISelect;
+import com.lz.common.utils.PageUtils;
+import com.lz.common.utils.R;
import com.lz.modules.flow.dao.EvaluationGroupMapper;
import com.lz.modules.flow.entity.EvaluationGroup;
+import com.lz.modules.flow.req.EvaluationGroupReq;
import com.lz.modules.flow.service.EvaluationGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -56,11 +61,16 @@ public class EvaluationGroupServiceImpl extends ServiceImpl evaluationGroupMapper.seleteEvaluationGroupByReq(page, req));
+ return pageUtils;
+ }
}
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 3fc6c58b..d056db60 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
@@ -1,9 +1,13 @@
package com.lz.modules.flow.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lz.common.utils.R;
import com.lz.modules.flow.dao.ResultModelMapper;
import com.lz.modules.flow.entity.ResultModel;
+import com.lz.modules.flow.model.ResultModelDto;
import com.lz.modules.flow.service.ResultModelService;
+import com.lz.modules.performance.service.ResultTagetLibService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -19,12 +23,16 @@ import java.util.List;
*/
@Service
+@Slf4j
public class ResultModelServiceImpl extends ServiceImpl implements ResultModelService {
@Autowired
private ResultModelMapper resultModelMapper;
+ @Autowired
+ private ResultTagetLibService resultTargetLibService;
+
@Override
@@ -56,8 +64,12 @@ public class ResultModelServiceImpl extends ServiceImpl selectResultDtoByGroupId(Long id){
+ return resultModelMapper.selectResultDtoByGroupId(id);
+ }
+
+ @Override
+ public R deleteResultModelByGroupId(Long id){
+ List resultModels = selectResultModelByGroupId(id);
+ for (ResultModel model:resultModels
+ ) {
+ deleteResultModelById(model.getId());
+ }
+ return R.ok();
+ }
}
diff --git a/src/main/java/com/lz/modules/performance/controller/EvaluationGroupController.java b/src/main/java/com/lz/modules/performance/controller/EvaluationGroupController.java
index c9538ffd..465bda64 100644
--- a/src/main/java/com/lz/modules/performance/controller/EvaluationGroupController.java
+++ b/src/main/java/com/lz/modules/performance/controller/EvaluationGroupController.java
@@ -7,12 +7,12 @@ import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.entity.FlowManager;
+import com.lz.modules.flow.entity.ResultModel;
import com.lz.modules.flow.req.EvaluationGroupReq;
import com.lz.modules.flow.service.EvaluationGroupService;
import com.lz.modules.flow.service.FlowManagerService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import com.lz.modules.flow.service.ResultModelService;
+import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -31,15 +31,19 @@ public class EvaluationGroupController {
+ @Autowired
+ private ResultModelService resultModelService;
- @RequestMapping("/getById")
- public R getById(@RequestBody EvaluationGroupReq evaluationGroupReq) {
- EvaluationGroup evaluationGroup = evaluationGroupService.selectEvaluationGroupById(evaluationGroupReq.getId());
- return R.ok().put("evaluationGroup",evaluationGroup);
+ @PostMapping("/getById")
+ @ApiOperation("获取考核组列表")
+ @ApiResponses({@ApiResponse(code=200,message = "成功", response=EvaluationGroup.class)})
+ public R getById(@RequestBody @ApiParam EvaluationGroupReq req) {
+ PageUtils pageUtils = evaluationGroupService.selectEvaluationGroupByReq(req);
+ return R.ok().put("data",pageUtils);
}
@@ -58,9 +62,11 @@ public class EvaluationGroupController {
}
- @RequestMapping("/delete")
- public R list(@RequestBody Long id) {
- evaluationGroupService.deleteEvaluationGroupById(id);
- return R.ok();
+ @GetMapping("/delete")
+ @ApiOperation("删除考核组")
+ public R delete(@RequestParam @ApiParam("组id") Long id) {
+ resultModelService.deleteResultModelByGroupId(id);
+ return evaluationGroupService.deleteEvaluationGroupById(id);
+ //return R.ok();
}
}
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 702ae151..721eb74c 100644
--- a/src/main/java/com/lz/modules/performance/controller/ResultModelController.java
+++ b/src/main/java/com/lz/modules/performance/controller/ResultModelController.java
@@ -1,38 +1,44 @@
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.ResultModel;
-import com.lz.modules.flow.model.FlowChartRoleDto;
+import com.lz.modules.flow.model.ResultModelDto;
+import com.lz.modules.flow.model.ResultTagetLibDto;
import com.lz.modules.flow.service.ResultModelService;
+import com.lz.modules.performance.service.ResultTagetLibService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
@RestController
@RequestMapping("/resultModel")
-@Api(tags = "模板相关")
+@Api(tags = "考核模板相关")
public class ResultModelController {
@Autowired
private ResultModelService resultModelService;
+ @Autowired
+ private ResultTagetLibService resultTagetLibService;
+
@GetMapping("/getByGroupId")
@ApiOperation(value="根据考核组id获取模板列表")
- @ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModel.class)})
+ @ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModelDto.class)})
public R getByGroupId(@RequestParam Long id) {
- List resultModels = resultModelService.selectResultModelByGroupId(id);
- return R.ok().put("data",resultModels);
+ //List resultModels = resultModelService.selectResultModelByGroupId(id);
+ List resultModelDtos = resultModelService.selectResultDtoByGroupId(id);
+ for (ResultModelDto dto:resultModelDtos
+ ) {
+ List libDtos = resultTagetLibService.selectResultTagetLibByModelId(dto.getId());
+ dto.setTagetLibs(libDtos);
+ }
+ return R.ok().put("data",resultModelDtos);
}
@@ -58,9 +64,10 @@ public class ResultModelController {
}
- @RequestMapping("/delete")
- public R delete(@RequestBody Long id) {
- resultModelService.deleteResultModelById(id);
- return R.ok();
+ @GetMapping("/delete")
+ @ApiOperation("删除模板")
+ public R delete(@RequestParam @ApiParam("模板id") Long id) {
+ return resultModelService.deleteResultModelById(id);
+
}
}
diff --git a/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java b/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java
index a07ec3c1..5eabfe52 100644
--- a/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java
+++ b/src/main/java/com/lz/modules/performance/controller/ResultTagetLibController.java
@@ -1,22 +1,19 @@
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.flow.model.ResultTagetLibDto;
+import com.lz.modules.flow.req.ResultTagetLibSearchReq;
import com.lz.modules.performance.service.ResultTagetLibService;
+import io.swagger.annotations.*;
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;
+import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/resultTagetLib")
+@Api(tags = "考核指标相关")
public class ResultTagetLibController {
@@ -27,6 +24,15 @@ public class ResultTagetLibController {
+ @PostMapping("/GetTargetLibs")
+ @ApiOperation("搜索指标库")
+ @ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultTagetLibDto.class)})
+ public R GetTargetLibs(@RequestBody @ApiParam ResultTagetLibSearchReq req) {
+ PageUtils pageUtils = resultTagetLibService.selectResultTagetLibByReq(req);
+ return R.ok().put("data",pageUtils);
+ }
+
+
@RequestMapping("/getById")
public R getById(@RequestBody ResultTagetLib resultTagetLib) {
resultTagetLib = resultTagetLibService.selectResultTagetLibById(resultTagetLib.getId());
@@ -41,15 +47,18 @@ public class ResultTagetLibController {
}
- @RequestMapping("/save")
- public R save(@RequestBody ResultTagetLib resultTagetLib) {
- resultTagetLibService.insertResultTagetLib(resultTagetLib);
- return R.ok();
+ @PostMapping("/save")
+ @ApiOperation("新增考核指标")
+ public R save(@RequestBody @ApiParam ResultTagetLib resultTagetLib) {
+
+ return resultTagetLibService.insertResultTagetLib(resultTagetLib);
+
}
- @RequestMapping("/delete")
- public R delete(@RequestBody Long id) {
+ @GetMapping("/delete")
+ @ApiOperation("删除指标")
+ public R delete(@RequestParam @ApiParam("指标id") 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
index 8a5ac2c3..bd7958ed 100644
--- a/src/main/java/com/lz/modules/performance/service/ResultTagetLibService.java
+++ b/src/main/java/com/lz/modules/performance/service/ResultTagetLibService.java
@@ -1,7 +1,13 @@
package com.lz.modules.performance.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.lz.common.utils.PageUtils;
+import com.lz.common.utils.R;
import com.lz.modules.flow.entity.ResultTagetLib;
+import com.lz.modules.flow.model.ResultTagetLibDto;
+import com.lz.modules.flow.req.ResultTagetLibSearchReq;
+
+import java.util.List;
/**
*
@@ -18,7 +24,7 @@ public interface ResultTagetLibService extends IService {
ResultTagetLib selectResultTagetLibById(Long id);
- Long insertResultTagetLib(ResultTagetLib resultTagetLib);
+ R insertResultTagetLib(ResultTagetLib resultTagetLib);
int updateResultTagetLibById(ResultTagetLib resultTagetLib);
@@ -30,4 +36,9 @@ public interface ResultTagetLibService extends IService {
int deleteResultTagetLibById(Long id);
+ List selectResultTagetLibByModelId(Long id);
+
+ PageUtils selectResultTagetLibByReq(ResultTagetLibSearchReq req);
+
+ int deleteResultTagetLibByModelId(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
index 3616901f..24d407bf 100644
--- a/src/main/java/com/lz/modules/performance/service/impl/ResultTagetLibServiceImpl.java
+++ b/src/main/java/com/lz/modules/performance/service/impl/ResultTagetLibServiceImpl.java
@@ -1,12 +1,22 @@
package com.lz.modules.performance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lz.common.utils.PageUtils;
+import com.lz.common.utils.R;
import com.lz.modules.flow.dao.ResultTagetLibMapper;
+import com.lz.modules.flow.entity.ResultModel;
import com.lz.modules.flow.entity.ResultTagetLib;
+import com.lz.modules.flow.model.ResultTagetLibDto;
+import com.lz.modules.flow.req.ResultTagetLibSearchReq;
+import com.lz.modules.flow.service.ResultModelService;
import com.lz.modules.performance.service.ResultTagetLibService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.math.BigDecimal;
+import java.util.List;
+
/**
*
* 考核指标库表 服务类
@@ -17,12 +27,15 @@ import org.springframework.stereotype.Service;
*/
@Service
+@Slf4j
public class ResultTagetLibServiceImpl extends ServiceImpl implements ResultTagetLibService {
@Autowired
private ResultTagetLibMapper resultTagetLibMapper;
+ @Autowired
+ private ResultModelService resultModelService;
@Override
@@ -33,8 +46,27 @@ public class ResultTagetLibServiceImpl extends ServiceImpl resultTagetLibDtos = selectResultTagetLibByModelId(resultModel.getId());
+ BigDecimal weight = BigDecimal.ZERO;
+ for(int i = 0; i < resultTagetLibDtos.size(); i++){
+ ResultTagetLibDto dto = resultTagetLibDtos.get(i);
+ weight = weight.add(dto.getWeight());
+ }
+ weight = weight.add(resultTagetLib.getWeight());
+ if(weight.compareTo(resultModel.getWeight()) > 0){
+ return R.error("权重之和不能超过" + (resultModel.getWeight().multiply(new BigDecimal(100)) + "%" ));
+ }
+ }
+ resultTagetLibMapper.insertResultTagetLib(resultTagetLib);
+ return R.ok().put("data", resultTagetLib);
}
@@ -58,6 +90,25 @@ public class ResultTagetLibServiceImpl extends ServiceImpl selectResultTagetLibByModelId(Long id){
+ return resultTagetLibMapper.selectResultTagetLibByModelId(id);
+ }
+
+ @Override
+ public PageUtils selectResultTagetLibByReq(ResultTagetLibSearchReq req){
+ PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
+ page -> resultTagetLibMapper.selectByCondition(page, req)
+ );
+ return pageUtils;
+ }
+
+ @Override
+ public int deleteResultTagetLibByModelId(Long id){
+ log.info("删除模板下面的指标,模板id={}", id);
+ return resultTagetLibMapper.deleteResultTagetLibByModelId(id);
+ }
+
}
diff --git a/src/main/resources/mapper/flow/EvaluationGroupMapper.xml b/src/main/resources/mapper/flow/EvaluationGroupMapper.xml
index 75897245..f0159a88 100644
--- a/src/main/resources/mapper/flow/EvaluationGroupMapper.xml
+++ b/src/main/resources/mapper/flow/EvaluationGroupMapper.xml
@@ -89,6 +89,13 @@
update lz_evaluation_group set is_delete = 1 where id=#{id} limit 1
+
+
diff --git a/src/main/resources/mapper/flow/ResultModelMapper.xml b/src/main/resources/mapper/flow/ResultModelMapper.xml
index 2ffa75f6..eba723d8 100644
--- a/src/main/resources/mapper/flow/ResultModelMapper.xml
+++ b/src/main/resources/mapper/flow/ResultModelMapper.xml
@@ -108,5 +108,13 @@
select * from lz_result_model where evaluation_group_id=#{id} and is_delete = 0
+
+
+
+ update lz_result_model set is_delete = 1 where evaluation_group_id=#{id}
+
+
diff --git a/src/main/resources/mapper/flow/ResultTagetLibMapper.xml b/src/main/resources/mapper/flow/ResultTagetLibMapper.xml
index a368cca2..04a145ed 100644
--- a/src/main/resources/mapper/flow/ResultTagetLibMapper.xml
+++ b/src/main/resources/mapper/flow/ResultTagetLibMapper.xml
@@ -84,5 +84,20 @@
update lz_result_taget_lib set is_delete = 1 where id=#{id} limit 1
+
+
+
+
+
+ update lz_result_taget_lib set is_delete = 1 where model_id=#{id}
+
+
diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java
index ca82a412..04cee285 100644
--- a/src/test/java/com/lz/mysql/MysqlMain.java
+++ b/src/test/java/com/lz/mysql/MysqlMain.java
@@ -75,7 +75,7 @@ public class MysqlMain {
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_model"));
//list.add(new TablesBean("lz_result_score"));
list.add(new TablesBean("lz_result_taget_lib"));
@@ -97,7 +97,7 @@ public class MysqlMain {
}
- for (int i = 0; i < list2.size(); i++) {
+ /* for (int i = 0; i < list2.size(); i++) {
MysqlUtilTable2Contoller.printController(list2.get(i));
}
@@ -109,7 +109,7 @@ public class MysqlMain {
for (int i = 0; i < list2.size(); i++) {
MysqlUtilTable2Service.printService(list2.get(i));
MysqlUtilTable2Service.printServiceImpl(list2.get(i));
- }
+ }*/
for (int i = 0; i < list2.size(); i++) {
MysqlUtilTable2XML.printXMLForMap(list2.get(i));
diff --git a/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java b/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java
index 586b8a7d..112749d7 100644
--- a/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java
+++ b/src/test/java/com/lz/mysql/MysqlUtilTable2Bean.java
@@ -148,7 +148,7 @@ public class MysqlUtilTable2Bean {
content += "@Data\n";
- content += "@ApiModel(value = \"" + tableBean.getComment() + "\")\n";
+ content += "@ApiModel(value = \"" + tableBean.getComment() + "Req\")\n";
content += "public class " + realName + "Req implements java.io.Serializable {\n" + bf.toString();
content += sb.toString();
content += "}";
@@ -395,7 +395,7 @@ public class MysqlUtilTable2Bean {
content += "\n";
content += "@Data\n";
- content += "@ApiModel(value = \"" + tableBean.getComment() + "\")\n";
+ content += "@ApiModel(value = \"" + tableBean.getComment() + "Dto\")\n";
content += "public class " + realName + "Dto {\n" + bf.toString();
content += sb.toString();
content += "}";