提交修改
This commit is contained in:
commit
b37f63d2b5
35
src/main/java/com/lz/common/emun/ChartFlowType.java
Normal file
35
src/main/java/com/lz/common/emun/ChartFlowType.java
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package com.lz.common.emun;
|
||||||
|
|
||||||
|
public enum ChartFlowType {
|
||||||
|
|
||||||
|
START(0, "目标制定"),
|
||||||
|
CHECK_RESULT(1, "目标确认"),
|
||||||
|
PROCESS(2, "执行中"),
|
||||||
|
INPUT_RESULT(3, "结果录入"),
|
||||||
|
SCORE(4, "评分"),
|
||||||
|
END(5, "审批节点"),
|
||||||
|
;
|
||||||
|
|
||||||
|
ChartFlowType(int code, String namee){
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
private int code;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -52,9 +52,6 @@ public class ShiroConfig {
|
|||||||
Map<String, String> filterMap = new LinkedHashMap<>();
|
Map<String, String> filterMap = new LinkedHashMap<>();
|
||||||
filterMap.put("/webjars/**", "anon");
|
filterMap.put("/webjars/**", "anon");
|
||||||
filterMap.put("/file/**", "anon");
|
filterMap.put("/file/**", "anon");
|
||||||
filterMap.put("/user/lzstaffrole/role/**", "anon");
|
|
||||||
filterMap.put("/user/lzresultrecord/**", "anon");
|
|
||||||
filterMap.put("/user/lzstaffrole/listByGroupId/**", "anon");
|
|
||||||
filterMap.put("/test/**", "anon");
|
filterMap.put("/test/**", "anon");
|
||||||
filterMap.put("/druid/**", "anon");
|
filterMap.put("/druid/**", "anon");
|
||||||
filterMap.put("/app/**", "anon");
|
filterMap.put("/app/**", "anon");
|
||||||
@ -72,6 +69,7 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/dtlg/jump", "anon");
|
filterMap.put("/dtlg/jump", "anon");
|
||||||
filterMap.put("/luck/getLuckById", "anon");
|
filterMap.put("/luck/getLuckById", "anon");
|
||||||
filterMap.put("/luck/updateLuck", "anon");
|
filterMap.put("/luck/updateLuck", "anon");
|
||||||
|
filterMap.put("/doc.html**", "anon");
|
||||||
filterMap.put("/**", "oauth2");
|
filterMap.put("/**", "oauth2");
|
||||||
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.controller;
|
package com.lz.modules.app.controller;
|
||||||
|
|
||||||
|
import com.lz.common.emun.ChartFlowType;
|
||||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||||
import com.lz.common.utils.*;
|
import com.lz.common.utils.*;
|
||||||
import com.lz.modules.app.dto.ApprovalDto;
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
@ -354,15 +355,20 @@ public class ResultRecordController extends AbstractController {
|
|||||||
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
||||||
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(resultRecord.getEvaluationId());
|
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(resultRecord.getEvaluationId());
|
||||||
//获取计算公式
|
//获取计算公式
|
||||||
|
List<CalculateModel> calculateModels1 = getCalculate(3l);
|
||||||
|
//获取计算公式
|
||||||
List<CalculateModel> calculateModels = getCalculate(resultModels.get(0).getCalculateId());
|
List<CalculateModel> calculateModels = getCalculate(resultModels.get(0).getCalculateId());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<ResultScoreDto> scoreDtos = new ArrayList<>();
|
List<ResultScoreDto> scoreDtos = new ArrayList<>();
|
||||||
//查询所有参与评分人以及所占比重
|
//查询所有参与评分人以及所占比重
|
||||||
List<FlowChartDetailRecord> flowChartDetailRecords =
|
List<FlowChartDetailRecord> flowChartDetailRecords =
|
||||||
flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), 4);//获取参与评分的人
|
flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), ChartFlowType.SCORE.getCode());//获取参与评分的人
|
||||||
List<StaffEntity> staffs = new ArrayList<>();
|
List<StaffEntity> staffs = new ArrayList<>();
|
||||||
|
Boolean isAllScore = true;//false表示返回所有的评分,true表示值返回评分了的人
|
||||||
for (FlowChartDetailRecord record:flowChartDetailRecords
|
for (FlowChartDetailRecord record:flowChartDetailRecords
|
||||||
) {
|
) {
|
||||||
if(record.getOptType().intValue() == -1){
|
if(record.getOptType().intValue() == -1){
|
||||||
//自己
|
//自己
|
||||||
StaffEntity staffEntity = new StaffEntity();
|
StaffEntity staffEntity = new StaffEntity();
|
||||||
@ -389,8 +395,20 @@ public class ResultRecordController extends AbstractController {
|
|||||||
}
|
}
|
||||||
if(staffs.size() == 0){
|
if(staffs.size() == 0){
|
||||||
log.info("无法找到评分人员,开始找绩效管理人员");
|
log.info("无法找到评分人员,开始找绩效管理人员");
|
||||||
staffs = staffService.findManger(resultRecord.getId(), 4);
|
staffs = staffService.findManger(resultRecord.getId(), ChartFlowType.SCORE.getCode());
|
||||||
}
|
}
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(resultRecord.getId(), 2);//获取当前的流程节点
|
||||||
|
if(flowRecords.get(0).getFlowProcess().intValue() > ChartFlowType.SCORE.getCode()){
|
||||||
|
//流程已经到了审批节点,那么判断评分是否为或签,如果是那么只需要返回实际评分的那个人即可,否则全部返回
|
||||||
|
flowRecords = flowRecordService.selectFlowRecordByRecordIdFlowProcess(resultRecord.getId(), ChartFlowType.SCORE.getCode());//获取当前的流程节点
|
||||||
|
if(flowRecords.get(0).getType().intValue() == 1){
|
||||||
|
//或签
|
||||||
|
isAllScore = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (StaffEntity staff:staffs
|
for (StaffEntity staff:staffs
|
||||||
) {
|
) {
|
||||||
@ -411,7 +429,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
List<ResultRecortModelDto> resultRecortModelDtos = new ArrayList<>();
|
List<ResultRecortModelDto> resultRecortModelDtos = new ArrayList<>();
|
||||||
BigDecimal weight = BigDecimal.ZERO;
|
BigDecimal weight = BigDecimal.ZERO;
|
||||||
for (ResultModel model:resultModels
|
for (ResultModel model:resultModels
|
||||||
) {
|
) {
|
||||||
ResultRecortModelDto resultRecortModelDto = new ResultRecortModelDto();
|
ResultRecortModelDto resultRecortModelDto = new ResultRecortModelDto();
|
||||||
BeanUtils.copyProperties(model, resultRecortModelDto);
|
BeanUtils.copyProperties(model, resultRecortModelDto);
|
||||||
if(resultRecortModelDto.getWeight().compareTo(BigDecimal.ZERO) == 0){//不限权重的
|
if(resultRecortModelDto.getWeight().compareTo(BigDecimal.ZERO) == 0){//不限权重的
|
||||||
@ -423,52 +441,70 @@ public class ResultRecordController extends AbstractController {
|
|||||||
List<ResultDetailDto> detailDtos =
|
List<ResultDetailDto> detailDtos =
|
||||||
resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType());
|
resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType());
|
||||||
for (ResultDetailDto dto:detailDtos
|
for (ResultDetailDto dto:detailDtos
|
||||||
) {
|
) {
|
||||||
//下面设置计算公式
|
//下面设置计算公式
|
||||||
dto.setCalculate(setCalculateValue(calculateModels, dto)) ;
|
dto.setCalculate(setCalculateValue(calculateModels1, dto)) ;
|
||||||
weight = weight.add(dto.getCheckWeight());
|
weight = weight.add(dto.getCheckWeight());
|
||||||
if(scoreDtos.size() > 0){
|
if(scoreDtos.size() > 0){
|
||||||
//获取评分详细
|
//获取评分详细
|
||||||
List<ResultScore> scores =
|
List<ResultScore> scores =
|
||||||
resultScoreService.selectResultScoresByDetailIdAndOrderByStaffIds(dto.getId(), scoreDtos);
|
resultScoreService.selectResultScoresByDetailIdAndOrderByStaffIds(dto.getId(), scoreDtos);
|
||||||
if(scores.size() > 0){
|
|
||||||
//
|
if(scores.size() > 0){//已经有平分了
|
||||||
|
|
||||||
List<ResultScoreDto> scoreDtos1 = new ArrayList<>();
|
List<ResultScoreDto> scoreDtos1 = new ArrayList<>();
|
||||||
for (ResultScoreDto scoreDto: scoreDtos
|
for (ResultScoreDto scoreDto: scoreDtos
|
||||||
) {//
|
) {//
|
||||||
//
|
|
||||||
|
|
||||||
boolean isAdd = false;
|
boolean isAdd = false;
|
||||||
for (ResultScore score:
|
for (ResultScore score:
|
||||||
scores) {
|
scores) {//设置每个已经评分的领导
|
||||||
if(scoreDto.getApprovalId().longValue() == score.getApprovalId().longValue()){
|
if(scoreDto.getApprovalId().longValue() == score.getApprovalId().longValue()){
|
||||||
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
||||||
BeanUtils.copyProperties(score, scoreDto1);
|
BeanUtils.copyProperties(score, scoreDto1);
|
||||||
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
||||||
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
||||||
scoreDto1.setWeight(scoreDto.getWeight());
|
scoreDto1.setWeight(scoreDto.getWeight());
|
||||||
|
//下面设置计算公式
|
||||||
|
scoreDto1.setCalculate(setCalculateValue(calculateModels, model)) ;
|
||||||
|
scoreDto1.setCalculate(scoreDto1.getCalculate() + setCalculateValue(calculateModels, dto)) ;
|
||||||
|
scoreDto1.setCalculate(scoreDto1.getCalculate() + setCalculateValue(calculateModels, scoreDto1)) ;
|
||||||
scoreDtos1.add(scoreDto1);
|
scoreDtos1.add(scoreDto1);
|
||||||
scores.remove(score);
|
scores.remove(score);
|
||||||
isAdd = true;
|
isAdd = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!isAdd){
|
if(!isAdd && isAllScore){//如果isAllScore为true返回所有的评分包括为评分和已评分的,false只返回已评分的,评分或签时用到
|
||||||
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
||||||
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
||||||
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
||||||
scoreDto1.setWeight(scoreDto.getWeight());
|
scoreDto1.setWeight(scoreDto.getWeight());
|
||||||
|
//下面设置计算公式
|
||||||
|
scoreDto1.setCalculate(setCalculateValue(calculateModels, model)) ;
|
||||||
|
scoreDto1.setCalculate(scoreDto1.getCalculate() + setCalculateValue(calculateModels, dto)) ;
|
||||||
|
scoreDto1.setCalculate(scoreDto1.getCalculate() + setCalculateValue(calculateModels, scoreDto1)) ;
|
||||||
scoreDtos1.add(scoreDto1);
|
scoreDtos1.add(scoreDto1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dto.setScoreDtos(scoreDtos1);
|
dto.setScoreDtos(scoreDtos1);
|
||||||
}else{
|
}else{//一个评分都没有
|
||||||
dto.setScoreDtos(scoreDtos);
|
List<ResultScoreDto> scoreDtos1 = new ArrayList<>();
|
||||||
|
for (ResultScoreDto scoreDto: scoreDtos
|
||||||
|
) {//
|
||||||
|
//下面设置计算公式
|
||||||
|
ResultScoreDto sdto = new ResultScoreDto();
|
||||||
|
BeanUtils.copyProperties(scoreDto, sdto);
|
||||||
|
sdto.setCalculate(setCalculateValue(calculateModels, model));
|
||||||
|
sdto.setCalculate(sdto.getCalculate() + setCalculateValue(calculateModels, dto));
|
||||||
|
sdto.setCalculate(sdto.getCalculate() + setCalculateValue(calculateModels, sdto));
|
||||||
|
scoreDtos1.add(sdto);
|
||||||
|
}
|
||||||
|
dto.setScoreDtos(scoreDtos1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resultRecortModelDto.setDetailDtos(detailDtos);
|
resultRecortModelDto.setDetailDtos(detailDtos);
|
||||||
resultRecortModelDtos.add(resultRecortModelDto);
|
resultRecortModelDtos.add(resultRecortModelDto);
|
||||||
}
|
}
|
||||||
@ -478,6 +514,7 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return R.ok().put("data", resultRecordDetailDto);
|
return R.ok().put("data", resultRecordDetailDto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//目前支持已生成对象的。不支持当前非对象表中的数据,如果要使用请用常量值
|
//目前支持已生成对象的。不支持当前非对象表中的数据,如果要使用请用常量值
|
||||||
|
|||||||
@ -43,7 +43,7 @@ public interface EvaluationGroupMapper extends BaseMapper<EvaluationGroup> {
|
|||||||
|
|
||||||
EvaluationGroup selectEvaluationGroupByName(@Param("name") String name);
|
EvaluationGroup selectEvaluationGroupByName(@Param("name") String name);
|
||||||
|
|
||||||
void deleteByCopyIds(@Param("ids") List<Long> ids);
|
void deleteByCopyIds(@Param("ids") List<Long> ids,@Param("startId")Long startId);
|
||||||
|
|
||||||
List<Long> selectIdsByCopyIds(@Param("copyIds")String copyIds,@Param("startId")Long startId);
|
List<Long> selectIdsByCopyIds(@Param("copyIds")String copyIds,@Param("startId")Long startId);
|
||||||
|
|
||||||
|
|||||||
@ -77,4 +77,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
FlowRecord selectFlowRecordByRecordIdMinIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
|
FlowRecord selectFlowRecordByRecordIdMinIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
|
||||||
|
|
||||||
int batchUpdateExecution(@Param("recordIds")List<Long> recordIds,@Param("processId") int processId);
|
int batchUpdateExecution(@Param("recordIds")List<Long> recordIds,@Param("processId") int processId);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdFlowProcess(@Param("id") Long id, @Param("flowProcess") int flowProcess);
|
||||||
}
|
}
|
||||||
@ -12,7 +12,7 @@ import java.util.Date;
|
|||||||
* <p>
|
* <p>
|
||||||
* </p>*业绩详情评分表
|
* </p>*业绩详情评分表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-11-09
|
* @since 2020-11-12
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -43,6 +43,9 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
//评分说明
|
//评分说明
|
||||||
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
||||||
private String scoreComment;
|
private String scoreComment;
|
||||||
|
//评分权重
|
||||||
|
@ApiModelProperty(value = "评分权重", name = "weight")
|
||||||
|
private BigDecimal weight;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -163,6 +166,21 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
this.scoreComment = scoreComment;
|
this.scoreComment = scoreComment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分权重
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 评分权重
|
||||||
|
* @param weight
|
||||||
|
*/
|
||||||
|
public void setWeight(BigDecimal weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResultScore{" +
|
return "ResultScore{" +
|
||||||
@ -174,6 +192,7 @@ public class ResultScore implements java.io.Serializable {
|
|||||||
",detailId=" + detailId +
|
",detailId=" + detailId +
|
||||||
",approvalId=" + approvalId +
|
",approvalId=" + approvalId +
|
||||||
",scoreComment=" + scoreComment +
|
",scoreComment=" + scoreComment +
|
||||||
|
",weight=" + weight +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,6 +31,10 @@ public class ResultDetailDto {
|
|||||||
@ApiModelProperty(value = "关键结果", name = "keyResult")
|
@ApiModelProperty(value = "关键结果", name = "keyResult")
|
||||||
private String keyResult;
|
private String keyResult;
|
||||||
|
|
||||||
|
//评分说明
|
||||||
|
@ApiModelProperty(value = "计算公式", name = "calculate")
|
||||||
|
private String calculate;
|
||||||
|
|
||||||
//考核权重
|
//考核权重
|
||||||
@ApiModelProperty(value = "考核权重", name = "checkWeight")
|
@ApiModelProperty(value = "考核权重", name = "checkWeight")
|
||||||
private BigDecimal checkWeight;
|
private BigDecimal checkWeight;
|
||||||
@ -47,9 +51,7 @@ public class ResultDetailDto {
|
|||||||
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
||||||
private String scoreComment;
|
private String scoreComment;
|
||||||
|
|
||||||
//评分说明
|
|
||||||
@ApiModelProperty(value = "计算公式", name = "calculate")
|
|
||||||
private String calculate;
|
|
||||||
//优先级,从大到小
|
//优先级,从大到小
|
||||||
@ApiModelProperty(value = "优先级,从小到大", name = "priority")
|
@ApiModelProperty(value = "优先级,从小到大", name = "priority")
|
||||||
private Integer priority;
|
private Integer priority;
|
||||||
|
|||||||
@ -36,6 +36,10 @@ public class ResultScoreDto {
|
|||||||
@ApiModelProperty(value = "所占权重", name = "weight")
|
@ApiModelProperty(value = "所占权重", name = "weight")
|
||||||
private BigDecimal weight;
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
//评分说明
|
||||||
|
@ApiModelProperty(value = "计算公式", name = "calculate")
|
||||||
|
private String calculate;
|
||||||
|
|
||||||
//评分说明
|
//评分说明
|
||||||
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
||||||
private String scoreComment;
|
private String scoreComment;
|
||||||
|
|||||||
@ -13,12 +13,12 @@ import java.util.Date;
|
|||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*业绩详情评分表
|
* </p>*业绩详情评分表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-10-16
|
* @since 2020-11-12
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "业绩详情评分Req")
|
@ApiModel(value = "业绩详情评分表Req")
|
||||||
public class ResultScoreReq implements java.io.Serializable {
|
public class ResultScoreReq implements java.io.Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "currPage", name = "当前页码")
|
@ApiModelProperty(value = "currPage", name = "当前页码")
|
||||||
@ -52,6 +52,9 @@ public class ResultScoreReq implements java.io.Serializable {
|
|||||||
//评分说明
|
//评分说明
|
||||||
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
@ApiModelProperty(value = "评分说明", name = "scoreComment")
|
||||||
private String scoreComment;
|
private String scoreComment;
|
||||||
|
//评分权重
|
||||||
|
@ApiModelProperty(value = "评分权重", name = "weight")
|
||||||
|
private BigDecimal weight;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -157,9 +160,39 @@ public class ResultScoreReq implements java.io.Serializable {
|
|||||||
this.approvalId = approvalId;
|
this.approvalId = approvalId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分说明
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getScoreComment() {
|
||||||
|
return scoreComment;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 评分说明
|
||||||
|
* @param scoreComment
|
||||||
|
*/
|
||||||
|
public void setScoreComment(String scoreComment) {
|
||||||
|
this.scoreComment = scoreComment;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分权重
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 评分权重
|
||||||
|
* @param weight
|
||||||
|
*/
|
||||||
|
public void setWeight(BigDecimal weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResultScore{" +
|
return "ResultScoreReq{" +
|
||||||
",id=" + id +
|
",id=" + id +
|
||||||
",isDelete=" + isDelete +
|
",isDelete=" + isDelete +
|
||||||
",gmtCreate=" + gmtCreate +
|
",gmtCreate=" + gmtCreate +
|
||||||
@ -167,6 +200,8 @@ public class ResultScoreReq implements java.io.Serializable {
|
|||||||
",acquireScore=" + acquireScore +
|
",acquireScore=" + acquireScore +
|
||||||
",detailId=" + detailId +
|
",detailId=" + detailId +
|
||||||
",approvalId=" + approvalId +
|
",approvalId=" + approvalId +
|
||||||
|
",scoreComment=" + scoreComment +
|
||||||
|
",weight=" + weight +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
|||||||
//获取考核组里面所有参与的人员信息,去除重复,去除离职
|
//获取考核组里面所有参与的人员信息,去除重复,去除离职
|
||||||
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
List<StaffSimpleInfo> selectAllStaffSimpleInfoByGroupId(EvaluationGroup evaluationGroup);
|
||||||
|
|
||||||
void deleteByCopyIds(List<Long> ids);
|
void deleteByCopyIds(List<Long> ids,Long startId);
|
||||||
|
|
||||||
R checkStaff(CheckStaffReq checkStaffReq);
|
R checkStaff(CheckStaffReq checkStaffReq);
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,6 @@ public interface FlowChartService extends IService<FlowChart> {
|
|||||||
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
||||||
|
|
||||||
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
||||||
|
//获取前端可设置的权限
|
||||||
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
||||||
}
|
}
|
||||||
@ -74,4 +74,6 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
List<FlowRecord> selectFlowRecordByResultRecordId(Long resultRecordId);
|
List<FlowRecord> selectFlowRecordByResultRecordId(Long resultRecordId);
|
||||||
|
|
||||||
FlowRecord selectFlowRecordByRecordIdMinIdStatus(Long resultRecordId, Long id, int i);
|
FlowRecord selectFlowRecordByRecordIdMinIdStatus(Long resultRecordId, Long id, int i);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdFlowProcess(Long id, int flowProcess);
|
||||||
}
|
}
|
||||||
@ -311,8 +311,8 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteByCopyIds(List<Long> ids) {
|
public void deleteByCopyIds(List<Long> ids,Long startId) {
|
||||||
evaluationGroupMapper.deleteByCopyIds(ids);
|
evaluationGroupMapper.deleteByCopyIds(ids,startId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -200,5 +200,10 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
return flowRecordMapper.selectFlowRecordByRecordIdMinIdStatus(resultRecordId,id,status);
|
return flowRecordMapper.selectFlowRecordByRecordIdMinIdStatus(resultRecordId,id,status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdFlowProcess(Long id, int flowProcess){
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdFlowProcess(id,flowProcess);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,8 +149,10 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
log.info("无有效考核人员");
|
log.info("无有效考核人员");
|
||||||
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
||||||
}
|
}
|
||||||
|
//流程流转中中途加人走的流程
|
||||||
switch (start(groupStaffs.getEvaluationGroup(), flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole, true)){
|
EvaluationGroup evaluationGroup =
|
||||||
|
evaluationGroupService.selectEvaluationGroupByCopyId(groupStaffs.getEvaluationGroup().getId(),flowStart.getId());
|
||||||
|
switch (start(evaluationGroup, flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole, true)){
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return R.error(groupStaffs.getEvaluationGroup().getName() + "——没有设置考核模板");
|
return R.error(groupStaffs.getEvaluationGroup().getName() + "——没有设置考核模板");
|
||||||
@ -354,8 +356,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
for (ResultModelDto dto:resultModelDtos
|
for (ResultModelDto dto:resultModelDtos
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
dto.setEvaluationGroupId(evaluationGroup.getId());//设置拷贝组的id
|
dto.setEvaluationGroupId(evaluationGroup.getId());//设置拷贝组的id
|
||||||
//下面拷贝一份考评组信息的维度信息
|
//下面拷贝一份考评组信息的维度信息
|
||||||
ResultModel resultModel = new ResultModel();
|
ResultModel resultModel = new ResultModel();
|
||||||
@ -379,9 +379,16 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//插入备份的考评组指标信息
|
//插入备份的考评组指标信息
|
||||||
resultTagetLibService.insertResultTagetLibs(resultTagetLibs);
|
resultTagetLibService.insertResultTagetLibs(resultTagetLibs);
|
||||||
}
|
}
|
||||||
}else{//流程流转中中途加人走的流程
|
//拷贝一份流程
|
||||||
evaluationGroup =
|
for(FlowChartDetailRecord flowChartDetailRecord: flowChartDetailRecords){
|
||||||
evaluationGroupService.selectEvaluationGroupByCopyId(evaluationGroup.getId(),flowStart.getId());
|
flowChartDetailRecord.setId(null);
|
||||||
|
flowChartDetailRecord.setGmtCreate(null);
|
||||||
|
flowChartDetailRecord.setGmtModified(null);
|
||||||
|
flowChartDetailRecord.setEvaluationGroupId(evaluationGroup.getId());
|
||||||
|
}
|
||||||
|
flowChartDetailRecordService.saveBatch(flowChartDetailRecords);
|
||||||
|
}else{
|
||||||
|
|
||||||
if(evaluationGroup == null){
|
if(evaluationGroup == null){
|
||||||
log.info("无法找到拷贝组信息");
|
log.info("无法找到拷贝组信息");
|
||||||
return 5;
|
return 5;
|
||||||
@ -474,12 +481,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
||||||
List<FlowApprovalRole> flowApprovalRoles = new ArrayList<>();
|
List<FlowApprovalRole> flowApprovalRoles = new ArrayList<>();
|
||||||
int stepIndex = 0;
|
int stepIndex = 0;
|
||||||
@ -545,10 +546,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//依次
|
//依次
|
||||||
stepIndex++;
|
stepIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//stepIndex++;
|
|
||||||
if(flowApprovalRole != null){
|
if(flowApprovalRole != null){
|
||||||
stepIndex = flowApprovalRole.getStepIndex() + 1;
|
stepIndex = flowApprovalRole.getStepIndex() + 1;
|
||||||
}
|
}
|
||||||
@ -589,9 +587,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
stepIndex++;
|
stepIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//插入记录/flowChart/saveDetailProcs
|
//插入记录/flowChart/saveDetailProcs
|
||||||
if(flowApprovalRoles.size() > 0){
|
if(flowApprovalRoles.size() > 0){
|
||||||
@ -600,12 +595,8 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//初始化lz_result_details数据
|
//初始化lz_result_details数据
|
||||||
List<ResultDetail> resultDetails = new ArrayList<>();
|
List<ResultDetail> resultDetails = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//下面初始化参与人员
|
//下面初始化参与人员
|
||||||
for (StaffSimpleInfo staffInfo:staffIds
|
for (StaffSimpleInfo staffInfo:staffIds
|
||||||
) {
|
) {
|
||||||
@ -719,8 +710,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//下面生成ResultDetail对象
|
//下面生成ResultDetail对象
|
||||||
for (ResultModelDto modelDto:resultModelDtos
|
for (ResultModelDto modelDto:resultModelDtos
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
if(modelDto.getTagetLibs() != null && modelDto.getTagetLibs().size() > 0){//模板里面有添加指标
|
if(modelDto.getTagetLibs() != null && modelDto.getTagetLibs().size() > 0){//模板里面有添加指标
|
||||||
for (ResultTagetLibDto libDto:
|
for (ResultTagetLibDto libDto:
|
||||||
modelDto.getTagetLibs()) {
|
modelDto.getTagetLibs()) {
|
||||||
@ -745,9 +734,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
resultDetailService.insertResultDetails(resultDetails);
|
resultDetailService.insertResultDetails(resultDetails);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||||
//下面通知所有参与考核人员
|
//下面通知所有参与考核人员
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,9 @@ public class TaskListDto {
|
|||||||
|
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
|
|
||||||
private Long staffId;
|
private Long recordStaffId;
|
||||||
|
|
||||||
private Long currentApprovalStaffId;
|
private Long approvalStaffId;
|
||||||
|
|
||||||
private Long startId;
|
private Long startId;
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
List<String> ids = Arrays.asList(split);
|
List<String> ids = Arrays.asList(split);
|
||||||
List<Long> collect = ids.stream().map(s -> Long.valueOf(s)).collect(toList());
|
List<Long> collect = ids.stream().map(s -> Long.valueOf(s)).collect(toList());
|
||||||
//删除副本组
|
//删除副本组
|
||||||
evaluationGroupService.deleteByCopyIds(collect);
|
evaluationGroupService.deleteByCopyIds(collect,flowStart.getId());
|
||||||
}
|
}
|
||||||
resultRecordMapper.batchDeleteByStartId(flowStart.getId());
|
resultRecordMapper.batchDeleteByStartId(flowStart.getId());
|
||||||
return ;
|
return ;
|
||||||
@ -260,6 +260,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
StartGroups startGroups = new StartGroups();
|
StartGroups startGroups = new StartGroups();
|
||||||
startGroups.setStartId(req.getStartId());
|
startGroups.setStartId(req.getStartId());
|
||||||
startGroups.setGroups(groupS);
|
startGroups.setGroups(groupS);
|
||||||
|
log.info("添加人员初始化请求:" + JSON.toJSONString(startGroups));
|
||||||
R r = flowStartService.startStaffs(startGroups);
|
R r = flowStartService.startStaffs(startGroups);
|
||||||
log.info("添加人员初始化返回:" + JSON.toJSONString(r));
|
log.info("添加人员初始化返回:" + JSON.toJSONString(r));
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@ -68,10 +68,10 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
List<TaskListDto> dtos = pageUtils.getList();
|
List<TaskListDto> dtos = pageUtils.getList();
|
||||||
dtos.stream().forEach(taskListDto -> {
|
dtos.stream().forEach(taskListDto -> {
|
||||||
TaskListRes res = new TaskListRes();
|
TaskListRes res = new TaskListRes();
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(taskListDto.getStaffId());
|
StaffEntity staffEntity = staffService.selectStaffById(taskListDto.getRecordStaffId());
|
||||||
res.setAvatar(Optional.ofNullable(staffEntity.getAvatar()).orElse(StringUtil.EMPTY));
|
res.setAvatar(Optional.ofNullable(staffEntity.getAvatar()).orElse(StringUtil.EMPTY));
|
||||||
String name = staffEntity.getName();
|
String name = staffEntity.getName();
|
||||||
if(taskListDto.getStaffId().equals(taskListDto.getCurrentApprovalStaffId())){
|
if(taskListDto.getRecordStaffId().equals(taskListDto.getApprovalStaffId())){
|
||||||
name = "您";
|
name = "您";
|
||||||
}
|
}
|
||||||
FlowStart start = flowStartService.selectFlowStartById(taskListDto.getStartId());
|
FlowStart start = flowStartService.selectFlowStartById(taskListDto.getStartId());
|
||||||
|
|||||||
@ -141,6 +141,7 @@
|
|||||||
|
|
||||||
<update id="deleteByCopyIds">
|
<update id="deleteByCopyIds">
|
||||||
update lz_evaluation_group set is_delete = 1 where is_delete=0
|
update lz_evaluation_group set is_delete = 1 where is_delete=0
|
||||||
|
and start_id = #{startId}
|
||||||
and copy_id in (
|
and copy_id in (
|
||||||
<foreach collection="ids" item="id" separator=",">
|
<foreach collection="ids" item="id" separator=",">
|
||||||
#{id}
|
#{id}
|
||||||
|
|||||||
@ -171,7 +171,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectFlowChartDetailRecordsByFlowProcess" resultType="FlowChartDetailRecord" >
|
<select id="selectFlowChartDetailRecordsByFlowProcess" resultType="FlowChartDetailRecord" >
|
||||||
select * from lz_flow_chart_detail_record where evaluation_group_id=(select copy_id from lz_evaluation_group where id = #{groupId})
|
select * from lz_flow_chart_detail_record where evaluation_group_id=#{groupId}
|
||||||
and chart_id = (select id from lz_flow_chart where flow_process = #{flowProcess}) and is_delete = 0 order by step_index asc
|
and chart_id = (select id from lz_flow_chart where flow_process = #{flowProcess}) and is_delete = 0 order by step_index asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -186,7 +186,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTodoTasksByApprovalStaffId" resultType="com.lz.modules.performance.dto.TaskListDto">
|
<select id="selectTodoTasksByApprovalStaffId" resultType="com.lz.modules.performance.dto.TaskListDto">
|
||||||
SELECT DISTINCT(record_id),f.flow_process,f.flow_name,current_approval_staff_id,staff_id,start_id,r.gmt_modified,f.type from lz_flow_record f
|
SELECT DISTINCT(record_id),f.flow_process,f.flow_name,f.approval_staff_id,f.record_staff_id,start_id,r.gmt_modified,f.type from lz_flow_record f
|
||||||
LEFT JOIN lz_result_record r
|
LEFT JOIN lz_result_record r
|
||||||
ON f.record_id = r.id
|
ON f.record_id = r.id
|
||||||
where f.is_delete=0 and r.is_delete=0
|
where f.is_delete=0 and r.is_delete=0
|
||||||
@ -280,5 +280,9 @@
|
|||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdFlowProcess" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{id} and flow_process = #{flowProcess}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -12,12 +12,13 @@
|
|||||||
<result column="detail_id" property="detailId"/>
|
<result column="detail_id" property="detailId"/>
|
||||||
<result column="approval_id" property="approvalId"/>
|
<result column="approval_id" property="approvalId"/>
|
||||||
<result column="score_comment" property="scoreComment"/>
|
<result column="score_comment" property="scoreComment"/>
|
||||||
|
<result column="weight" property="weight"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -34,6 +35,7 @@
|
|||||||
<if test="detailId != null">detail_id, </if>
|
<if test="detailId != null">detail_id, </if>
|
||||||
<if test="approvalId != null">approval_id, </if>
|
<if test="approvalId != null">approval_id, </if>
|
||||||
<if test="scoreComment != null">score_comment, </if>
|
<if test="scoreComment != null">score_comment, </if>
|
||||||
|
<if test="weight != null">weight, </if>
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
@ -42,6 +44,7 @@
|
|||||||
<if test="detailId != null">#{ detailId}, </if>
|
<if test="detailId != null">#{ detailId}, </if>
|
||||||
<if test="approvalId != null">#{ approvalId}, </if>
|
<if test="approvalId != null">#{ approvalId}, </if>
|
||||||
<if test="scoreComment != null">#{ scoreComment}, </if>
|
<if test="scoreComment != null">#{ scoreComment}, </if>
|
||||||
|
<if test="weight != null">#{ weight}, </if>
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
@ -58,7 +61,8 @@
|
|||||||
<if test="acquireScore != null">acquire_score = #{acquireScore},</if>
|
<if test="acquireScore != null">acquire_score = #{acquireScore},</if>
|
||||||
<if test="detailId != null">detail_id = #{detailId},</if>
|
<if test="detailId != null">detail_id = #{detailId},</if>
|
||||||
<if test="approvalId != null">approval_id = #{approvalId},</if>
|
<if test="approvalId != null">approval_id = #{approvalId},</if>
|
||||||
<if test="scoreComment != null">score_comment = #{scoreComment}</if>
|
<if test="scoreComment != null">score_comment = #{scoreComment},</if>
|
||||||
|
<if test="weight != null">weight = #{weight}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -74,7 +78,8 @@
|
|||||||
acquire_score = #{acquireScore},
|
acquire_score = #{acquireScore},
|
||||||
detail_id = #{detailId},
|
detail_id = #{detailId},
|
||||||
approval_id = #{approvalId},
|
approval_id = #{approvalId},
|
||||||
score_comment = #{scoreComment}
|
score_comment = #{scoreComment},
|
||||||
|
weight = #{weight}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user