From d7cbc5a41045c081bf5cdcc82ad08d067b526134 Mon Sep 17 00:00:00 2001
From: wulin
Date: Tue, 17 Nov 2020 09:43:08 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=A0=E6=B3=95?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=9A=E4=B8=AA=E7=9B=B8=E5=90=8C=E7=BB=B4?=
=?UTF-8?q?=E5=BA=A6=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/ResultRecordController.java | 5 +-
.../modules/flow/model/ResultDetailDto.java | 2 +
.../sys/dao/app/ResultDetailMapper.java | 2 +-
.../modules/sys/entity/app/ResultDetail.java | 51 ++++++++++++++++---
.../sys/service/app/ResultDetailService.java | 2 +-
.../app/impl/ResultDetailServiceImpl.java | 4 +-
.../mapper/app/ResultDetailMapper.xml | 17 +++++--
src/test/java/com/lz/mysql/MysqlMain.java | 2 +-
8 files changed, 64 insertions(+), 21 deletions(-)
diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java
index 4982eba4..0b23aaa7 100644
--- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java
+++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java
@@ -378,9 +378,6 @@ public class ResultRecordController extends AbstractController {
}
}
-
-
-
//获取考核维度等信息
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
@@ -490,7 +487,7 @@ public class ResultRecordController extends AbstractController {
resultRecortModelDto.setMaxCount(null);
}
List detailDtos =
- resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType());
+ resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getId());
for (ResultDetailDto dto:detailDtos
) {
//下面设置计算公式
diff --git a/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java b/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java
index a3dbbbc8..601b7219 100644
--- a/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java
+++ b/src/main/java/com/lz/modules/flow/model/ResultDetailDto.java
@@ -58,6 +58,8 @@ public class ResultDetailDto {
@ApiModelProperty(value = "评分详细", name = "scoreDtos")
private List scoreDtos;
+ @ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
+ private Long modelId;
/**
*
* @return
diff --git a/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java b/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
index cfa8b60e..38a3e398 100644
--- a/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
+++ b/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
@@ -45,5 +45,5 @@ public interface ResultDetailMapper extends BaseMapper {
Long insertResultDetails(@Param("list") List resultDetails);
- List selectDtosByRecordId(@Param("recordResultId") Long id, @Param("type") int type);
+ List selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") int modelId);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java b/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java
index 73c421c1..c042cc82 100644
--- a/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java
+++ b/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java
@@ -1,57 +1,78 @@
package com.lz.modules.sys.entity.app;
-import com.baomidou.mybatisplus.annotation.IdType;
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-08-28
+* @since 2020-11-17
*/
@Data
@TableName("lz_result_detail")
+@ApiModel(value = "业绩详情表")
public class ResultDetail implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//是否删除状态,1:删除,0:有效
+ @ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete")
private Integer isDelete;
//创建时间
+ @ApiModelProperty(value = "创建时间", name = "gmtCreate")
private Date gmtCreate;
//最后修改时间
+ @ApiModelProperty(value = "最后修改时间", name = "gmtModified")
private Date gmtModified;
- //1,绩效,2文化价值观
+ //1,业绩,2文化价值观
+ @ApiModelProperty(value = "1,业绩,2文化价值观", name = "type")
private Integer type;
//目标
+ @ApiModelProperty(value = "目标", name = "target")
private String target;
//关键结果
+ @ApiModelProperty(value = "关键结果", name = "keyResult")
private String keyResult;
//关键结果_3.5标准
+ @ApiModelProperty(value = "关键结果_3.5标准", name = "keyResult35")
private String keyResult35;
//关键结果3.7分标准
+ @ApiModelProperty(value = "关键结果3.7分标准", name = "keyResult37")
private String keyResult37;
//考核权重
+ @ApiModelProperty(value = "考核权重", name = "checkWeight")
private BigDecimal checkWeight;
//考核结果
+ @ApiModelProperty(value = "考核结果", name = "checkResult")
private String checkResult;
//直属上级评分
+ @ApiModelProperty(value = "直属上级评分", name = "superScore")
private String superScore;
//得分
+ @ApiModelProperty(value = "得分", name = "acquireScore")
private BigDecimal acquireScore;
//评分说明
+ @ApiModelProperty(value = "评分说明", name = "scoreComment")
private String scoreComment;
//记录id
+ @ApiModelProperty(value = "记录id ", name = "recordId")
private Long recordId;
//用户id
+ @ApiModelProperty(value = "用户id", name = "staffId")
private Long staffId;
//优先级,从大到小
+ @ApiModelProperty(value = "优先级,从大到小", name = "priority")
private Integer priority;
+ //维度id lz_result_model的id
+ @ApiModelProperty(value = "维度id lz_result_model的id", name = "modelId")
+ private Long modelId;
/**
*
* @return
@@ -113,14 +134,14 @@ public class ResultDetail implements java.io.Serializable {
}
/**
- * 1,绩效,2文化价值观
+ * 1,业绩,2文化价值观
* @return
*/
public Integer getType() {
return type;
}
/**
- * 1,绩效,2文化价值观
+ * 1,业绩,2文化价值观
* @param type
*/
public void setType(Integer type) {
@@ -307,6 +328,21 @@ public class ResultDetail implements java.io.Serializable {
this.priority = priority;
}
+ /**
+ * 维度id lz_result_model的id
+ * @return
+ */
+ public Long getModelId() {
+ return modelId;
+ }
+ /**
+ * 维度id lz_result_model的id
+ * @param modelId
+ */
+ public void setModelId(Long modelId) {
+ this.modelId = modelId;
+ }
+
@Override
public String toString() {
return "ResultDetail{" +
@@ -327,6 +363,7 @@ public class ResultDetail implements java.io.Serializable {
",recordId=" + recordId +
",staffId=" + staffId +
",priority=" + priority +
+ ",modelId=" + modelId +
"}";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/sys/service/app/ResultDetailService.java b/src/main/java/com/lz/modules/sys/service/app/ResultDetailService.java
index f9d5213e..f7360a95 100644
--- a/src/main/java/com/lz/modules/sys/service/app/ResultDetailService.java
+++ b/src/main/java/com/lz/modules/sys/service/app/ResultDetailService.java
@@ -69,5 +69,5 @@ public interface ResultDetailService extends IService {
Long insertResultDetails(List resultDetails);
- List selectDtosByRecordId(Long id, int type);
+ List selectDtosByRecordId(Long id, Long modelId);
}
\ No newline at end of file
diff --git a/src/main/java/com/lz/modules/sys/service/app/impl/ResultDetailServiceImpl.java b/src/main/java/com/lz/modules/sys/service/app/impl/ResultDetailServiceImpl.java
index cd015176..f337f388 100644
--- a/src/main/java/com/lz/modules/sys/service/app/impl/ResultDetailServiceImpl.java
+++ b/src/main/java/com/lz/modules/sys/service/app/impl/ResultDetailServiceImpl.java
@@ -336,8 +336,8 @@ public class ResultDetailServiceImpl extends ServiceImpl selectDtosByRecordId(Long id, int type){
- return resultDetailMapper.selectDtosByRecordId(id, type);
+ public List selectDtosByRecordId(Long id, Long modelId){
+ return resultDetailMapper.selectDtosByRecordId(id, modelId);
}
}
diff --git a/src/main/resources/mapper/app/ResultDetailMapper.xml b/src/main/resources/mapper/app/ResultDetailMapper.xml
index 9b6c2620..796d3504 100644
--- a/src/main/resources/mapper/app/ResultDetailMapper.xml
+++ b/src/main/resources/mapper/app/ResultDetailMapper.xml
@@ -21,12 +21,13 @@
+
- id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority
+ id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId
@@ -52,6 +53,7 @@
record_id,
staff_id,
priority,
+ model_id,
is_delete,
gmt_create,
gmt_modified
@@ -69,6 +71,7 @@
#{ recordId},
#{ staffId},
#{ priority},
+ #{ modelId},
0,
now(),
now()
@@ -94,10 +97,11 @@
score_comment = #{scoreComment},
record_id = #{recordId},
staff_id = #{staffId},
- priority = #{priority}
+ priority = #{priority},
+ model_id = #{modelId}
,gmt_modified = now()
- where id = #{id} limit 1
+ where id = #{id}
@@ -119,7 +123,8 @@
score_comment = #{scoreComment},
record_id = #{recordId},
staff_id = #{staffId},
- priority = #{priority}
+ priority = #{priority},
+ model_id = #{modelId}
,gmt_modified = now()
where id = #{id}
@@ -158,6 +163,7 @@
record_id,
staff_id,
priority,
+ model_id,
is_delete
)values
@@ -173,13 +179,14 @@
#{ item.recordId},
#{ item.staffId},
#{ item.priority},
+ #{item.modelId},
0
)
diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java
index c89a36a3..cf1028c3 100644
--- a/src/test/java/com/lz/mysql/MysqlMain.java
+++ b/src/test/java/com/lz/mysql/MysqlMain.java
@@ -126,7 +126,7 @@ public class MysqlMain {
List list = new ArrayList();
- list.add(new TablesBean("lz_result_score"));
+ list.add(new TablesBean("lz_result_detail"));
List list2 = new ArrayList();
Map map = MysqlUtil2ShowCreateTable.getComments();
From fe201ca16e7810d2ddc31879f9eb873554600e0a Mon Sep 17 00:00:00 2001
From: wulin
Date: Tue, 17 Nov 2020 09:45:06 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E6=97=B6=E4=BF=9D?=
=?UTF-8?q?=E5=AD=98modelId?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/lz/modules/flow/service/impl/FlowStartServiceImpl.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
index daa259f7..894b725a 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
@@ -463,6 +463,7 @@ public class FlowStartServiceImpl extends ServiceImpl
Date: Tue, 17 Nov 2020 09:48:14 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/lz/modules/sys/dao/app/ResultDetailMapper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java b/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
index 38a3e398..87424123 100644
--- a/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
+++ b/src/main/java/com/lz/modules/sys/dao/app/ResultDetailMapper.java
@@ -45,5 +45,5 @@ public interface ResultDetailMapper extends BaseMapper {
Long insertResultDetails(@Param("list") List resultDetails);
- List selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") int modelId);
+ List selectDtosByRecordId(@Param("recordResultId") Long id, @Param("modelId") Long modelId);
}
\ No newline at end of file
From 3fbf7e727b0fcc3dda1352cdd4b4245205272ef5 Mon Sep 17 00:00:00 2001
From: wulin
Date: Tue, 17 Nov 2020 09:57:48 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E8=B5=B7?=
=?UTF-8?q?=E4=BF=9D=E5=AD=98modelId=E9=94=99=E8=AF=AF=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/lz/modules/flow/service/impl/FlowStartServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
index 894b725a..70a38a8c 100644
--- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
+++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java
@@ -362,7 +362,7 @@ public class FlowStartServiceImpl extends ServiceImpl libDtos = resultTagetLibService.selectResultTagetLibDtoByModelId(dto.getId());
dto.setTagetLibs(libDtos);
for (ResultTagetLibDto libDto: libDtos