Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
fcf9ec460b
@ -4,7 +4,7 @@ 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;
|
||||||
import com.lz.modules.app.dto.DepartmentsDto;
|
import com.lz.modules.app.dto.DepartmentsDto;
|
||||||
import com.lz.modules.app.dto.RecordListDto;
|
import com.lz.modules.app.dto.RecordDetailDto;
|
||||||
import com.lz.modules.app.dto.StaffDepartmentDto;
|
import com.lz.modules.app.dto.StaffDepartmentDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
@ -14,17 +14,11 @@ import com.lz.modules.app.resp.Step;
|
|||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.entity.FlowRecord;
|
import com.lz.modules.flow.entity.*;
|
||||||
import com.lz.modules.flow.entity.RecordAuth;
|
|
||||||
import com.lz.modules.flow.entity.RecordFile;
|
|
||||||
import com.lz.modules.flow.entity.StaffRole;
|
|
||||||
import com.lz.modules.flow.model.Auth;
|
import com.lz.modules.flow.model.Auth;
|
||||||
import com.lz.modules.flow.model.ResultRecordDto;
|
import com.lz.modules.flow.model.ResultRecordDetailDto;
|
||||||
import com.lz.modules.flow.req.ResultDetailReq;
|
import com.lz.modules.flow.req.ResultDetailReq;
|
||||||
import com.lz.modules.flow.service.FlowRecordService;
|
import com.lz.modules.flow.service.*;
|
||||||
import com.lz.modules.flow.service.RecordAuthService;
|
|
||||||
import com.lz.modules.flow.service.RecordFileService;
|
|
||||||
import com.lz.modules.flow.service.StaffRoleService;
|
|
||||||
import com.lz.modules.sys.controller.AbstractController;
|
import com.lz.modules.sys.controller.AbstractController;
|
||||||
import com.lz.modules.sys.entity.SysUserEntity;
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import com.lz.modules.sys.entity.app.ResultComment;
|
import com.lz.modules.sys.entity.app.ResultComment;
|
||||||
@ -33,15 +27,13 @@ import com.lz.modules.sys.entity.app.ResultRecord;
|
|||||||
import com.lz.modules.sys.service.app.ResultCommentService;
|
import com.lz.modules.sys.service.app.ResultCommentService;
|
||||||
import com.lz.modules.sys.service.app.ResultDetailService;
|
import com.lz.modules.sys.service.app.ResultDetailService;
|
||||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -59,6 +51,7 @@ import java.util.stream.Collectors;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("user/lzresultrecord")
|
@RequestMapping("user/lzresultrecord")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Api("绩效相关-吴林")
|
||||||
public class ResultRecordController extends AbstractController {
|
public class ResultRecordController extends AbstractController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResultRecordService lzResultRecordService;
|
private ResultRecordService lzResultRecordService;
|
||||||
@ -83,6 +76,8 @@ public class ResultRecordController extends AbstractController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RecordFileService recordFileService;
|
private RecordFileService recordFileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EvaluationStartStaffService evaluationStartStaffService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +87,9 @@ public class ResultRecordController extends AbstractController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisCacheUtil redisCacheUtil;
|
private RedisCacheUtil redisCacheUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ResultModelService resultModelService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@ -317,6 +315,29 @@ public class ResultRecordController extends AbstractController {
|
|||||||
return R.ok().put("lzResultRecord", lzResultRecord);
|
return R.ok().put("lzResultRecord", lzResultRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/getDetail")
|
||||||
|
@ApiOperation("获取绩效详情")
|
||||||
|
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = ResultRecordDetailDto.class)})
|
||||||
|
public R getDetail(@RequestParam @ApiParam("绩效id") Long id) {
|
||||||
|
|
||||||
|
ResultRecord resultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||||
|
SysUserEntity user = getUser();
|
||||||
|
if(resultRecord.getStaffId().longValue() != user.getUserId().longValue()){
|
||||||
|
//下面判断权限,是否可读
|
||||||
|
EvaluationStartStaff evaluationStartStaff =
|
||||||
|
evaluationStartStaffService.selectManagerEvaluationStartStaff(resultRecord.getEvaluationId(), user.getUserId());
|
||||||
|
if(evaluationStartStaff == null){//非考核组设置的绩效管理人员,下面应在查询其他权限
|
||||||
|
return R.error("未被授权访问");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//获取考核维度等信息
|
||||||
|
List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(resultRecord.getEvaluationId());
|
||||||
|
return R.ok().put("data", resultRecord);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息
|
* 信息
|
||||||
*/
|
*/
|
||||||
@ -651,28 +672,32 @@ public class ResultRecordController extends AbstractController {
|
|||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
// http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1&loginUserId=825
|
// 审批:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1&loginUserId=825&comment=xxx&menuName=bbb
|
||||||
|
// 跳过:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=4&menuName=bbb&flowRecordId=360
|
||||||
|
// 转交:http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=8&menuName=bbb&flowRecordId=360&transferStaffId=294
|
||||||
@RequestMapping("/new/approval")
|
@RequestMapping("/new/approval")
|
||||||
public R approval(ApprovalDto approvalDto) {
|
public R approval(ApprovalDto approvalDto) {
|
||||||
try {
|
try {
|
||||||
approvalDto.setLoginUserId(approvalDto.getLoginUserId());
|
if (getUser() != null) {
|
||||||
|
approvalDto.setLoginUserId(getUserId());
|
||||||
|
}
|
||||||
return resultRecordService.newApproval(approvalDto);
|
return resultRecordService.newApproval(approvalDto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return R.error(e.getMessage());
|
return R.error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordList
|
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordDetail?resultRecordId=215
|
||||||
@RequestMapping("/new/resultRecordList")
|
@RequestMapping("/new/resultRecordDetail")
|
||||||
public R newResultRecordList(RecordListDto recordListDto) {
|
public R newResultRecordList(RecordDetailDto recordDetailDto) {
|
||||||
|
if(recordDetailDto.getLoginUserId() ==null && getUser() !=null ){
|
||||||
|
recordDetailDto.setLoginUserId(getUserId());
|
||||||
|
}
|
||||||
|
return resultRecordService.newResultRecordList(recordDetailDto);
|
||||||
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -10,5 +10,5 @@ public class ApprovalDto {
|
|||||||
private String menuName; //按钮名称
|
private String menuName; //按钮名称
|
||||||
private String comment;
|
private String comment;
|
||||||
private Long transferStaffId; // 转交员工 id
|
private Long transferStaffId; // 转交员工 id
|
||||||
private Long currentStaffId; //当前用户 id
|
private Long flowRecordId;// 流程 id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.lz.modules.app.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class RecordListDto {
|
public class RecordDetailDto {
|
||||||
private Long loginUserId;
|
private Long loginUserId;
|
||||||
|
private Long resultRecordId;
|
||||||
}
|
}
|
||||||
10
src/main/java/com/lz/modules/app/resp/FlowDetailResp.java
Normal file
10
src/main/java/com/lz/modules/app/resp/FlowDetailResp.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.lz.modules.app.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FlowDetailResp {
|
||||||
|
private Long currentStaffId;
|
||||||
|
private String staffName;
|
||||||
|
private Long flowRecordId;
|
||||||
|
}
|
||||||
18
src/main/java/com/lz/modules/app/resp/FlowRecordResp.java
Normal file
18
src/main/java/com/lz/modules/app/resp/FlowRecordResp.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package com.lz.modules.app.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FlowRecordResp {
|
||||||
|
|
||||||
|
private String flowName;
|
||||||
|
|
||||||
|
private String staffName;
|
||||||
|
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
private List<FlowDetailResp> flowDetailRespList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -36,4 +36,6 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
|
|||||||
Long insertEvaluationStartStaffs(@Param("list") List<EvaluationStartStaff> evaluationStartStaffs);
|
Long insertEvaluationStartStaffs(@Param("list") List<EvaluationStartStaff> evaluationStartStaffs);
|
||||||
|
|
||||||
EvaluationStartStaff selectOneByStartIdAndStaffId(@Param("startId")Long startId,@Param("staffId")Long staffId);
|
EvaluationStartStaff selectOneByStartIdAndStaffId(@Param("startId")Long startId,@Param("staffId")Long staffId);
|
||||||
|
|
||||||
|
EvaluationStartStaff selectManagerEvaluationStartStaff(@Param("evaluationId") Long evaluationId, @Param("staffId") Long userId);
|
||||||
}
|
}
|
||||||
@ -71,4 +71,8 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
|
FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
|
||||||
|
|
||||||
List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(@Param("resultRecordId") Long resultRecordId, @Param("flowIndex") Integer flowIndex);
|
List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(@Param("resultRecordId") Long resultRecordId, @Param("flowIndex") Integer flowIndex);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByResultRecordId(@Param("resultRecordId") Long resultRecordId);
|
||||||
|
|
||||||
|
FlowRecord selectFlowRecordByRecordIdMinIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
|
||||||
}
|
}
|
||||||
218
src/main/java/com/lz/modules/flow/model/ResultDetailDto.java
Normal file
218
src/main/java/com/lz/modules/flow/model/ResultDetailDto.java
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
package com.lz.modules.flow.model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* </p>*业绩详情表
|
||||||
|
* @author quyixiao
|
||||||
|
* @since 2020-10-27
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "业绩详情表Dto")
|
||||||
|
public class ResultDetailDto {
|
||||||
|
//
|
||||||
|
@ApiModelProperty(value = "", name = "id")
|
||||||
|
private Long id;
|
||||||
|
//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;
|
||||||
|
|
||||||
|
//考核权重
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
//优先级,从大到小
|
||||||
|
@ApiModelProperty(value = "优先级,从大到小", name = "priority")
|
||||||
|
private Integer priority;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1,业绩,2文化价值观
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 1,业绩,2文化价值观
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目标
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 目标
|
||||||
|
* @param target
|
||||||
|
*/
|
||||||
|
public void setTarget(String target) {
|
||||||
|
this.target = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键结果
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getKeyResult() {
|
||||||
|
return keyResult;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 关键结果
|
||||||
|
* @param keyResult
|
||||||
|
*/
|
||||||
|
public void setKeyResult(String keyResult) {
|
||||||
|
this.keyResult = keyResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考核权重
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getCheckWeight() {
|
||||||
|
return checkWeight;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 考核权重
|
||||||
|
* @param checkWeight
|
||||||
|
*/
|
||||||
|
public void setCheckWeight(BigDecimal checkWeight) {
|
||||||
|
this.checkWeight = checkWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考核结果
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getCheckResult() {
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 考核结果
|
||||||
|
* @param checkResult
|
||||||
|
*/
|
||||||
|
public void setCheckResult(String checkResult) {
|
||||||
|
this.checkResult = checkResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直属上级评分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getSuperScore() {
|
||||||
|
return superScore;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 直属上级评分
|
||||||
|
* @param superScore
|
||||||
|
*/
|
||||||
|
public void setSuperScore(String superScore) {
|
||||||
|
this.superScore = superScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getAcquireScore() {
|
||||||
|
return acquireScore;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 得分
|
||||||
|
* @param acquireScore
|
||||||
|
*/
|
||||||
|
public void setAcquireScore(BigDecimal acquireScore) {
|
||||||
|
this.acquireScore = acquireScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分说明
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getScoreComment() {
|
||||||
|
return scoreComment;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 评分说明
|
||||||
|
* @param scoreComment
|
||||||
|
*/
|
||||||
|
public void setScoreComment(String scoreComment) {
|
||||||
|
this.scoreComment = scoreComment;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级,从大到小
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getPriority() {
|
||||||
|
return priority;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 优先级,从大到小
|
||||||
|
* @param priority
|
||||||
|
*/
|
||||||
|
public void setPriority(Integer priority) {
|
||||||
|
this.priority = priority;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ResultDetailDto{" +
|
||||||
|
",id=" + id +
|
||||||
|
",type=" + type +
|
||||||
|
",target=" + target +
|
||||||
|
",keyResult=" + keyResult +
|
||||||
|
",checkWeight=" + checkWeight +
|
||||||
|
",checkResult=" + checkResult +
|
||||||
|
",superScore=" + superScore +
|
||||||
|
",acquireScore=" + acquireScore +
|
||||||
|
",scoreComment=" + scoreComment +
|
||||||
|
",priority=" + priority +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,301 @@
|
|||||||
|
package com.lz.modules.flow.model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* </p>*业绩记录表
|
||||||
|
* @author quyixiao
|
||||||
|
* @since 2020-10-27
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "业绩详情Dto")
|
||||||
|
public class ResultRecordDetailDto {
|
||||||
|
//
|
||||||
|
@ApiModelProperty(value = "", name = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
//0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回,6申述,7 流程终止
|
||||||
|
@ApiModelProperty(value = "0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回,6申述,7 流程终止", name = "status")
|
||||||
|
private Integer status;
|
||||||
|
//最后得分
|
||||||
|
@ApiModelProperty(value = "最后得分", name = "lastScore")
|
||||||
|
private BigDecimal lastScore;
|
||||||
|
//总分
|
||||||
|
@ApiModelProperty(value = "总分", name = "allScore")
|
||||||
|
private BigDecimal allScore;
|
||||||
|
//备注
|
||||||
|
@ApiModelProperty(value = "备注", name = "remark")
|
||||||
|
private String remark;
|
||||||
|
//员工id
|
||||||
|
@ApiModelProperty(value = "员工id", name = "staffId")
|
||||||
|
private Long staffId;
|
||||||
|
|
||||||
|
//当前审批流转所在员工 id
|
||||||
|
@ApiModelProperty(value = "当前审批流转所在员工 id", name = "flowStaffIdRole")
|
||||||
|
private Long flowStaffIdRole;
|
||||||
|
//员工所在部门 id
|
||||||
|
@ApiModelProperty(value = "员工所在部门 id", name = "departmentId")
|
||||||
|
private Long departmentId;
|
||||||
|
//员工所在部门名称
|
||||||
|
@ApiModelProperty(value = "员工所在部门名称", name = "departmentName")
|
||||||
|
private String departmentName;
|
||||||
|
//员工姓名
|
||||||
|
@ApiModelProperty(value = "员工姓名", name = "staffName")
|
||||||
|
private String staffName;
|
||||||
|
//当前审批的员工 id
|
||||||
|
@ApiModelProperty(value = "当前审批的员工 id", name = "currentApprovalStaffId")
|
||||||
|
private Long currentApprovalStaffId;
|
||||||
|
//当前审批的员工名,以逗号隔开
|
||||||
|
@ApiModelProperty(value = "当前审批的员工名,以逗号隔开", name = "currentApprovalStaffName")
|
||||||
|
private String currentApprovalStaffName;
|
||||||
|
//等级
|
||||||
|
@ApiModelProperty(value = "等级", name = "scoreLevel")
|
||||||
|
private String scoreLevel;
|
||||||
|
|
||||||
|
//当前是目标确认还是评分,0,目标制定,1,目标确认,2执行中,3,结果值录入,4,评分,5考核结束
|
||||||
|
@ApiModelProperty(value = "当前是目标确认还是评分,0,目标制定,1,目标确认,2执行中,3,结果值录入,4,评分,5考核结束", name = "flowProcess")
|
||||||
|
private Integer flowProcess;
|
||||||
|
List<ResultRecortModelDto> recortModelDtos;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回,6申述,7 流程终止
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回,6申述,7 流程终止
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后得分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getLastScore() {
|
||||||
|
return lastScore;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 最后得分
|
||||||
|
* @param lastScore
|
||||||
|
*/
|
||||||
|
public void setLastScore(BigDecimal lastScore) {
|
||||||
|
this.lastScore = lastScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总分
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getAllScore() {
|
||||||
|
return allScore;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 总分
|
||||||
|
* @param allScore
|
||||||
|
*/
|
||||||
|
public void setAllScore(BigDecimal allScore) {
|
||||||
|
this.allScore = allScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
* @param remark
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
* @param staffId
|
||||||
|
*/
|
||||||
|
public void setStaffId(Long staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批流转所在员工 id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getFlowStaffIdRole() {
|
||||||
|
return flowStaffIdRole;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 当前审批流转所在员工 id
|
||||||
|
* @param flowStaffIdRole
|
||||||
|
*/
|
||||||
|
public void setFlowStaffIdRole(Long flowStaffIdRole) {
|
||||||
|
this.flowStaffIdRole = flowStaffIdRole;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工所在部门 id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getDepartmentId() {
|
||||||
|
return departmentId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 员工所在部门 id
|
||||||
|
* @param departmentId
|
||||||
|
*/
|
||||||
|
public void setDepartmentId(Long departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工所在部门名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getDepartmentName() {
|
||||||
|
return departmentName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 员工所在部门名称
|
||||||
|
* @param departmentName
|
||||||
|
*/
|
||||||
|
public void setDepartmentName(String departmentName) {
|
||||||
|
this.departmentName = departmentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工姓名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getStaffName() {
|
||||||
|
return staffName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 员工姓名
|
||||||
|
* @param staffName
|
||||||
|
*/
|
||||||
|
public void setStaffName(String staffName) {
|
||||||
|
this.staffName = staffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批的员工 id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getCurrentApprovalStaffId() {
|
||||||
|
return currentApprovalStaffId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 当前审批的员工 id
|
||||||
|
* @param currentApprovalStaffId
|
||||||
|
*/
|
||||||
|
public void setCurrentApprovalStaffId(Long currentApprovalStaffId) {
|
||||||
|
this.currentApprovalStaffId = currentApprovalStaffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前审批的员工名,以逗号隔开
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getCurrentApprovalStaffName() {
|
||||||
|
return currentApprovalStaffName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 当前审批的员工名,以逗号隔开
|
||||||
|
* @param currentApprovalStaffName
|
||||||
|
*/
|
||||||
|
public void setCurrentApprovalStaffName(String currentApprovalStaffName) {
|
||||||
|
this.currentApprovalStaffName = currentApprovalStaffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getScoreLevel() {
|
||||||
|
return scoreLevel;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 等级
|
||||||
|
* @param scoreLevel
|
||||||
|
*/
|
||||||
|
public void setScoreLevel(String scoreLevel) {
|
||||||
|
this.scoreLevel = scoreLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前是目标确认还是评分,0,目标制定,1,目标确认,2执行中,3,结果值录入,4,评分,5考核结束
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getFlowProcess() {
|
||||||
|
return flowProcess;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 当前是目标确认还是评分,0,目标制定,1,目标确认,2执行中,3,结果值录入,4,评分,5考核结束
|
||||||
|
* @param flowProcess
|
||||||
|
*/
|
||||||
|
public void setFlowProcess(Integer flowProcess) {
|
||||||
|
this.flowProcess = flowProcess;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ResultRecordDto{" +
|
||||||
|
",id=" + id +
|
||||||
|
",status=" + status +
|
||||||
|
",lastScore=" + lastScore +
|
||||||
|
",allScore=" + allScore +
|
||||||
|
",remark=" + remark +
|
||||||
|
",staffId=" + staffId +
|
||||||
|
",flowStaffIdRole=" + flowStaffIdRole +
|
||||||
|
",departmentId=" + departmentId +
|
||||||
|
",departmentName=" + departmentName +
|
||||||
|
",staffName=" + staffName +
|
||||||
|
",currentApprovalStaffId=" + currentApprovalStaffId +
|
||||||
|
",currentApprovalStaffName=" + currentApprovalStaffName +
|
||||||
|
",scoreLevel=" + scoreLevel +
|
||||||
|
",flowProcess=" + flowProcess +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,183 @@
|
|||||||
|
package com.lz.modules.flow.model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* </p>*考核维度表
|
||||||
|
* @author quyixiao
|
||||||
|
* @since 2020-10-19
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "绩效维度表Dto")
|
||||||
|
public class ResultRecortModelDto {
|
||||||
|
//
|
||||||
|
@ApiModelProperty(value = "", name = "id")
|
||||||
|
private Long id;
|
||||||
|
//维度名称
|
||||||
|
@ApiModelProperty(value = "维度名称", name = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//1:业绩 2:文化价值观
|
||||||
|
@ApiModelProperty(value = "1:业绩 2:文化价值观", name = "type")
|
||||||
|
private Integer type;
|
||||||
|
//权重 0不限权重
|
||||||
|
@ApiModelProperty(value = "权重 0不限权重", name = "weight")
|
||||||
|
private BigDecimal weight;
|
||||||
|
//考核子项目个数最大限制
|
||||||
|
@ApiModelProperty(value = "考核子项目个数最大限制", name = "maxCount")
|
||||||
|
private Integer maxCount;
|
||||||
|
//lz_result_calculate 的id,计算法方法id
|
||||||
|
@ApiModelProperty(value = "lz_result_calculate 的id,计算法方法id", name = "calculateId")
|
||||||
|
private Long calculateId;
|
||||||
|
|
||||||
|
//使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||||
|
@ApiModelProperty(value = "使用的哪个等级。等级组id,lz_result_grade的group_id", name = "gradeGroupId")
|
||||||
|
private Long gradeGroupId;
|
||||||
|
//排序
|
||||||
|
@ApiModelProperty(value = "排序", name = "orderBy")
|
||||||
|
private Integer orderBy;
|
||||||
|
@ApiModelProperty(value = "绩效指标", name = "detailDtos")
|
||||||
|
private List<ResultDetailDto> detailDtos;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:业绩 2:文化价值观
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 1:业绩 2:文化价值观
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权重 0不限权重
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BigDecimal getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 权重 0不限权重
|
||||||
|
* @param weight
|
||||||
|
*/
|
||||||
|
public void setWeight(BigDecimal weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考核子项目个数最大限制
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getMaxCount() {
|
||||||
|
return maxCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 考核子项目个数最大限制
|
||||||
|
* @param maxCount
|
||||||
|
*/
|
||||||
|
public void setMaxCount(Integer maxCount) {
|
||||||
|
this.maxCount = maxCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lz_result_calculate 的id,计算法方法id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getCalculateId() {
|
||||||
|
return calculateId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* lz_result_calculate 的id,计算法方法id
|
||||||
|
* @param calculateId
|
||||||
|
*/
|
||||||
|
public void setCalculateId(Long calculateId) {
|
||||||
|
this.calculateId = calculateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getGradeGroupId() {
|
||||||
|
return gradeGroupId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 使用的哪个等级。等级组id,lz_result_grade的group_id
|
||||||
|
* @param gradeGroupId
|
||||||
|
*/
|
||||||
|
public void setGradeGroupId(Long gradeGroupId) {
|
||||||
|
this.gradeGroupId = gradeGroupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer getOrderBy() {
|
||||||
|
return orderBy;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
* @param orderBy
|
||||||
|
*/
|
||||||
|
public void setOrderBy(Integer orderBy) {
|
||||||
|
this.orderBy = orderBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ResultModel{" +
|
||||||
|
",id=" + id +
|
||||||
|
",name=" + name +
|
||||||
|
",type=" + type +
|
||||||
|
",weight=" + weight +
|
||||||
|
",maxCount=" + maxCount +
|
||||||
|
",calculateId=" + calculateId +
|
||||||
|
",gradeGroupId=" + gradeGroupId +
|
||||||
|
",orderBy=" + orderBy +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -35,4 +35,6 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
|
|||||||
Long insertEvaluationStartStaffs(List<EvaluationStartStaff> evaluationStartStaffs);
|
Long insertEvaluationStartStaffs(List<EvaluationStartStaff> evaluationStartStaffs);
|
||||||
|
|
||||||
EvaluationStartStaff selectOneByStartIdAndStaffId(Long startId,Long staffId);
|
EvaluationStartStaff selectOneByStartIdAndStaffId(Long startId,Long staffId);
|
||||||
|
|
||||||
|
EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId);
|
||||||
}
|
}
|
||||||
@ -1,7 +1,9 @@
|
|||||||
package com.lz.modules.flow.service;
|
package com.lz.modules.flow.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
import com.lz.modules.flow.entity.FlowChange;
|
import com.lz.modules.flow.entity.FlowChange;
|
||||||
|
import com.lz.modules.flow.entity.FlowRecord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -30,4 +32,5 @@ public interface FlowChangeService extends IService<FlowChange> {
|
|||||||
int deleteFlowChangeById(Long id);
|
int deleteFlowChangeById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
void saveChange(ApprovalDto approvalDto, FlowRecord flowRecord, int i);
|
||||||
}
|
}
|
||||||
@ -70,4 +70,8 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(Long resultRecordId, Long id, int status);
|
FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(Long resultRecordId, Long id, int status);
|
||||||
|
|
||||||
List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(Long resultRecordId, Integer flowIndex);
|
List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(Long resultRecordId, Integer flowIndex);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByResultRecordId(Long resultRecordId);
|
||||||
|
|
||||||
|
FlowRecord selectFlowRecordByRecordIdMinIdStatus(Long resultRecordId, Long id, int i);
|
||||||
}
|
}
|
||||||
@ -93,4 +93,9 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
|
|||||||
public EvaluationStartStaff selectOneByStartIdAndStaffId(Long startId,Long staffId) {
|
public EvaluationStartStaff selectOneByStartIdAndStaffId(Long startId,Long staffId) {
|
||||||
return evaluationStartStaffMapper.selectOneByStartIdAndStaffId(startId,staffId);
|
return evaluationStartStaffMapper.selectOneByStartIdAndStaffId(startId,staffId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EvaluationStartStaff selectManagerEvaluationStartStaff(Long evaluationId, Long userId){
|
||||||
|
return evaluationStartStaffMapper.selectManagerEvaluationStartStaff(evaluationId,userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
package com.lz.modules.flow.service.impl;
|
package com.lz.modules.flow.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
import com.lz.modules.flow.dao.FlowChangeMapper;
|
import com.lz.modules.flow.dao.FlowChangeMapper;
|
||||||
import com.lz.modules.flow.entity.FlowChange;
|
import com.lz.modules.flow.entity.FlowChange;
|
||||||
|
import com.lz.modules.flow.entity.FlowRecord;
|
||||||
import com.lz.modules.flow.service.FlowChangeService;
|
import com.lz.modules.flow.service.FlowChangeService;
|
||||||
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -24,6 +28,9 @@ public class FlowChangeServiceImpl extends ServiceImpl<FlowChangeMapper, FlowCha
|
|||||||
private FlowChangeMapper flowChangeMapper;
|
private FlowChangeMapper flowChangeMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ResultRecordService resultRecordService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FlowChange selectFlowChangeById(Long id){
|
public FlowChange selectFlowChangeById(Long id){
|
||||||
@ -58,6 +65,19 @@ public class FlowChangeServiceImpl extends ServiceImpl<FlowChangeMapper, FlowCha
|
|||||||
return flowChangeMapper.deleteFlowChangeById(id);
|
return flowChangeMapper.deleteFlowChangeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveChange(ApprovalDto approvalDto, FlowRecord flowRecord, int type) {
|
||||||
|
FlowChange flowChange = new FlowChange();
|
||||||
|
flowChange.setApprovalId(flowRecord.getApprovalStaffId());
|
||||||
|
flowChange.setToApprovalId(approvalDto.getTransferStaffId());
|
||||||
|
flowChange.setOptId(approvalDto.getLoginUserId());
|
||||||
|
flowChange.setFlowRecordId(approvalDto.getFlowRecordId());
|
||||||
|
flowChange.setFlowRecordId(flowRecord.getRecordId());
|
||||||
|
ResultRecord resultRecord = resultRecordService.selectResultRecordById(flowRecord.getRecordId());
|
||||||
|
flowChange.setStaffId(resultRecord.getStaffId());
|
||||||
|
flowChange.setType(type);
|
||||||
|
flowChangeMapper.insertFlowChange(flowChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,5 +189,16 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
return flowRecordMapper.selectFlowRecordByRecordIdFlowIndex(resultRecordId,flowIndex);
|
return flowRecordMapper.selectFlowRecordByRecordIdFlowIndex(resultRecordId,flowIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByResultRecordId(Long resultRecordId) {
|
||||||
|
|
||||||
|
return flowRecordMapper.selectFlowRecordByResultRecordId(resultRecordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowRecord selectFlowRecordByRecordIdMinIdStatus(Long resultRecordId, Long id, int status) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdMinIdStatus(resultRecordId,id,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -480,7 +480,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return R.ok("发起成功");
|
return R.ok("发起成功").put("data", flowStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -22,9 +22,7 @@ import com.lz.modules.sys.entity.app.ResultDetail;
|
|||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
import com.lz.modules.sys.service.app.ResultDetailService;
|
import com.lz.modules.sys.service.app.ResultDetailService;
|
||||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.*;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -69,6 +67,7 @@ public class FlowStartController {
|
|||||||
|
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
@ApiOperation("发起新的考核任务")
|
@ApiOperation("发起新的考核任务")
|
||||||
|
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowStart.class)})
|
||||||
public R save(@RequestBody @ApiParam FlowStart flowStart) {
|
public R save(@RequestBody @ApiParam FlowStart flowStart) {
|
||||||
return flowStartService.saveStart(flowStart);
|
return flowStartService.saveStart(flowStart);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.lz.common.emun.WorkMsgTypeEnum;
|
|||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
import com.lz.modules.app.dto.ApprovalDto;
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
||||||
|
import com.lz.modules.app.dto.RecordDetailDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
@ -111,4 +112,6 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
|||||||
R initFlowRecord(Long resultRecordId);
|
R initFlowRecord(Long resultRecordId);
|
||||||
|
|
||||||
R newApproval(ApprovalDto approvalDto) throws Exception;
|
R newApproval(ApprovalDto approvalDto) throws Exception;
|
||||||
|
|
||||||
|
R newResultRecordList(RecordDetailDto recordDetailDto);
|
||||||
}
|
}
|
||||||
@ -11,12 +11,15 @@ import com.lz.modules.app.dao.DepartmentsStaffRelateDao;
|
|||||||
import com.lz.modules.app.dto.ApprovalDto;
|
import com.lz.modules.app.dto.ApprovalDto;
|
||||||
import com.lz.modules.app.dto.EmployeesDto;
|
import com.lz.modules.app.dto.EmployeesDto;
|
||||||
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
import com.lz.modules.app.dto.GraphicsStatisticalDto;
|
||||||
|
import com.lz.modules.app.dto.RecordDetailDto;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.enums.FlowApprovalRoleTypeEnums;
|
import com.lz.modules.app.enums.FlowApprovalRoleTypeEnums;
|
||||||
import com.lz.modules.app.enums.FlowRecordStatusEnums;
|
import com.lz.modules.app.enums.FlowRecordStatusEnums;
|
||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
|
import com.lz.modules.app.resp.FlowDetailResp;
|
||||||
|
import com.lz.modules.app.resp.FlowRecordResp;
|
||||||
import com.lz.modules.app.resp.OwnResultResp;
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.app.resp.ResultRecordResp;
|
import com.lz.modules.app.resp.ResultRecordResp;
|
||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
@ -127,6 +130,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
@Autowired
|
@Autowired
|
||||||
private FlowChartService flowChartService;
|
private FlowChartService flowChartService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowChangeService flowChangeService;
|
||||||
|
|
||||||
@Value("${dingtalk.appid}")
|
@Value("${dingtalk.appid}")
|
||||||
private String appid;
|
private String appid;
|
||||||
|
|
||||||
@ -824,13 +830,27 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
if(StringUtil.isBlank(approvalDto.getMenuName())){
|
if(StringUtil.isBlank(approvalDto.getMenuName())){
|
||||||
throw new RRException("menuName 不能为空");
|
throw new RRException("menuName 不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),2);
|
||||||
|
if(CollectionUtils.isNotEmpty(flowRecords)){
|
||||||
|
FlowRecord preFlowRecord = flowRecords.get(0);
|
||||||
|
// 评论内容
|
||||||
|
FlowChart flowChart = flowService.selectFlowChartByChartId(preFlowRecord.getFlowId());
|
||||||
|
comment(approvalDto, flowChart);
|
||||||
|
}
|
||||||
|
|
||||||
switch (approvalDto.getStatus()) {
|
switch (approvalDto.getStatus()) {
|
||||||
case 1: //1 提交审批,审批通过
|
case 1: //1 提交审批,审批通过
|
||||||
return newSubmit(approvalDto);
|
return newSubmit(approvalDto,null);
|
||||||
case 2: //2 撤回
|
case 2: //2 撤回
|
||||||
return reSubmit(approvalDto);
|
return reSubmit(approvalDto);
|
||||||
case 3: //3 催办
|
case 3: //3 催办
|
||||||
return urge(approvalDto);
|
return urge(approvalDto);
|
||||||
|
case 4: //4 跳过
|
||||||
|
if(approvalDto.getFlowRecordId() == null){
|
||||||
|
throw new RRException("currentStaffId 不能为空");
|
||||||
|
}
|
||||||
|
return skip(approvalDto);
|
||||||
case 5: //5 驳回
|
case 5: //5 驳回
|
||||||
return newReject(approvalDto);
|
return newReject(approvalDto);
|
||||||
case 6: //6 申述
|
case 6: //6 申述
|
||||||
@ -839,7 +859,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
if (approvalDto.getTransferStaffId() == null) {
|
if (approvalDto.getTransferStaffId() == null) {
|
||||||
throw new RRException("transferStaffId 不能为空");
|
throw new RRException("transferStaffId 不能为空");
|
||||||
}
|
}
|
||||||
if(approvalDto.getCurrentStaffId() == null){
|
if(approvalDto.getFlowRecordId() == null){
|
||||||
throw new RRException("currentStaffId 不能为空");
|
throw new RRException("currentStaffId 不能为空");
|
||||||
}
|
}
|
||||||
return transfer(approvalDto);
|
return transfer(approvalDto);
|
||||||
@ -849,10 +869,35 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private R transfer(ApprovalDto approvalDto) {
|
private R skip(ApprovalDto approvalDto) {
|
||||||
return null;
|
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||||
|
if(flowRecord.getStatus().equals(FlowRecordStatusEnums.FINISHED_STATUS.getStatus())
|
||||||
|
|| flowRecord.getStatus().equals(FlowRecordStatusEnums.OTHER_APPROVAL.getStatus())){
|
||||||
|
return R.ok("流程己经走了,无法跳过 " );
|
||||||
|
}
|
||||||
|
|
||||||
|
if(flowRecord.getStatus().equals(FlowRecordStatusEnums.UN_TO_STATUS.getStatus())){ // 如果当前没有审批
|
||||||
|
flowRecord.setStatus(FlowRecordStatusEnums.SKIP_STATUS.getStatus());
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
|
}else if (flowRecord.getStatus().equals(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus())){ //如果当前正在审批中
|
||||||
|
approvalDto.setLoginUserId(flowRecord.getApprovalStaffId());
|
||||||
|
newSubmit(approvalDto,FlowRecordStatusEnums.SKIP_STATUS.getStatus());
|
||||||
|
}
|
||||||
|
flowChangeService.saveChange(approvalDto, flowRecord, 0);
|
||||||
|
return R.ok("恭喜您,跳过成功。");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private R transfer(ApprovalDto approvalDto) {
|
||||||
|
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||||
|
flowChangeService.saveChange(approvalDto, flowRecord, 1);
|
||||||
|
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getTransferStaffId());
|
||||||
|
flowRecord.setApprovalStaffId(staffEntity.getId());
|
||||||
|
flowRecord.setApprovalStaffName(staffEntity.getName());
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
|
return R.ok("转交成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private R reSubmit(ApprovalDto approvalDto) {
|
private R reSubmit(ApprovalDto approvalDto) {
|
||||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(), 1);
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(), 1);
|
||||||
if(flowRecords!=null && flowRecords.size()>0){
|
if(flowRecords!=null && flowRecords.size()>0){
|
||||||
@ -861,20 +906,20 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return newReject(approvalDto);
|
return newReject(approvalDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void comment(ApprovalDto approvalDto, FlowChart flowChart) {
|
||||||
public void comment (ApprovalDto approvalDto,FlowChart flowChart){
|
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
|
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
|
||||||
if(staffEntity !=null ){
|
if (staffEntity != null) {
|
||||||
ResultComment resultComment = new ResultComment();
|
ResultComment resultComment = new ResultComment();
|
||||||
resultComment.setComment(approvalDto.getComment());
|
resultComment.setComment(approvalDto.getComment());
|
||||||
resultComment.setStaffName(staffEntity.getName());
|
resultComment.setStaffName(staffEntity.getName());
|
||||||
|
resultComment.setStaffId(staffEntity.getId());
|
||||||
resultComment.setRecordId(approvalDto.getResultRecordId());
|
resultComment.setRecordId(approvalDto.getResultRecordId());
|
||||||
resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName());
|
resultComment.setOptDesc(approvalDto.getMenuName() + flowChart.getName());
|
||||||
resultCommentService.insertResultComment(resultComment);
|
resultCommentService.insertResultComment(resultComment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private R newSubmit(ApprovalDto approvalDto) {
|
private R newSubmit(ApprovalDto approvalDto,Integer finishedStatus) {
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
||||||
if(approvalDto.getLoginUserId() == null){
|
if(approvalDto.getLoginUserId() == null){
|
||||||
approvalDto.setLoginUserId(resultRecord.getCurrentApprovalStaffId());
|
approvalDto.setLoginUserId(resultRecord.getCurrentApprovalStaffId());
|
||||||
@ -884,13 +929,16 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
log.info("流程己经结束");
|
log.info("流程己经结束");
|
||||||
return R.ok("流程己经结束");
|
return R.ok("流程己经结束");
|
||||||
}
|
}
|
||||||
|
if(finishedStatus == null){
|
||||||
|
finishedStatus = FlowRecordStatusEnums.FINISHED_STATUS.getStatus();
|
||||||
|
}
|
||||||
FlowRecord preFlowRecord = flowRecords.get(0);
|
FlowRecord preFlowRecord = flowRecords.get(0);
|
||||||
int stepType = preFlowRecord.getType();
|
int stepType = preFlowRecord.getType();
|
||||||
if (flowRecords != null && flowRecords.size() > 0) {
|
if (flowRecords.size() > 1) {
|
||||||
if (stepType == 0 || stepType == 1) { //表示只要一个人通过就可以了
|
if (stepType == 0 || stepType == 1) { //表示只要一个人通过就可以了
|
||||||
for (FlowRecord flowRecord : flowRecords) {
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
if (flowRecord.getApprovalStaffId().equals(approvalDto.getLoginUserId())) {
|
if (flowRecord.getApprovalStaffId().equals(approvalDto.getLoginUserId())) {
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//当前审批己经完成
|
flowRecord.setStatus(finishedStatus);//当前审批己经完成
|
||||||
} else {
|
} else {
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.OTHER_APPROVAL.getStatus()); //其他审批
|
flowRecord.setStatus(FlowRecordStatusEnums.OTHER_APPROVAL.getStatus()); //其他审批
|
||||||
}
|
}
|
||||||
@ -907,33 +955,34 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
currentFlowRecord = flowRecord;//当前流程 id
|
currentFlowRecord = flowRecord;//当前流程 id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
currentFlowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//当前审批己经完成
|
currentFlowRecord.setStatus(finishedStatus);//当前审批己经完成
|
||||||
flowRecordService.updateFlowRecordById(currentFlowRecord);
|
flowRecordService.updateFlowRecordById(currentFlowRecord);
|
||||||
if (flag) { //流程未向下走
|
if (flag) { //流程未向下走
|
||||||
return R.ok("审批成功");
|
return R.ok("恭喜您,审批成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
preFlowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//流程己走
|
preFlowRecord.setStatus(finishedStatus);//流程己走
|
||||||
flowRecordService.updateFlowRecordById(preFlowRecord);
|
flowRecordService.updateFlowRecordById(preFlowRecord);
|
||||||
FlowChart flowChart = flowService.selectFlowChartByChartId(preFlowRecord.getFlowId());
|
|
||||||
comment(approvalDto, flowChart);
|
|
||||||
}
|
}
|
||||||
|
// 找到当前下一个节点为0的 flowIndex
|
||||||
List<FlowRecord> nextFlowRecords = flowRecordService.selectFlowRecordByRecordIdStatusFlowIndex(approvalDto.getResultRecordId(),0,preFlowRecord.getFlowIndex() + 1 );
|
FlowRecord nextFlowRecord = flowRecordService.selectFlowRecordByRecordIdMinIdStatus(approvalDto.getResultRecordId(),preFlowRecord.getId(), 0);
|
||||||
if(CollectionUtils.isEmpty(nextFlowRecords)){
|
if(nextFlowRecord == null){
|
||||||
log.info("流程己经结束2");
|
log.info("流程己经结束2");
|
||||||
return R.ok("流程己经结束");
|
return R.ok("流程己经结束");
|
||||||
}
|
}
|
||||||
|
List<FlowRecord> nextFlowRecords = flowRecordService.selectFlowRecordByRecordIdStatusFlowIndex(approvalDto.getResultRecordId(), 0, nextFlowRecord.getFlowIndex());
|
||||||
|
if (CollectionUtils.isEmpty(nextFlowRecords)) {
|
||||||
|
log.info("流程己经结束3");
|
||||||
|
return R.ok("流程己经结束");
|
||||||
|
}
|
||||||
FlowRecord currentFlowRecord = nextFlowRecords.get(0);
|
FlowRecord currentFlowRecord = nextFlowRecords.get(0);
|
||||||
|
|
||||||
for (FlowRecord flowRecord : nextFlowRecords) {
|
for (FlowRecord flowRecord : nextFlowRecords) {
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
flowRecordService.updateFlowRecordById(flowRecord);
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
}
|
}
|
||||||
FlowChart flowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
|
FlowChart currentFlowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
|
||||||
|
resultRecord.setFlowProcess(currentFlowChart.getFlowProcess());
|
||||||
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
|
||||||
resultRecord.setFlowStaffIdRole(nextFlowRecords.size() == 1 ? currentFlowRecord.getFlowStaffIdRole() : null);
|
resultRecord.setFlowStaffIdRole(nextFlowRecords.size() == 1 ? currentFlowRecord.getFlowStaffIdRole() : null);
|
||||||
resultRecord.setCurrentApprovalStaffId(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffId() : null);
|
resultRecord.setCurrentApprovalStaffId(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffId() : null);
|
||||||
resultRecord.setCurrentApprovalStaffName(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffName() : null);
|
resultRecord.setCurrentApprovalStaffName(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffName() : null);
|
||||||
@ -941,7 +990,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private R newReject(ApprovalDto approvalDto) {
|
private R newReject(ApprovalDto approvalDto) {
|
||||||
List<FlowRecord> currentflowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
List<FlowRecord> currentflowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
if(currentflowRecords !=null && currentflowRecords.size() > 0 ){
|
if(currentflowRecords !=null && currentflowRecords.size() > 0 ){
|
||||||
@ -953,10 +1001,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
|
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
|
||||||
flowRecordService.updateFlowRecordById(flowRecord);
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
}
|
}
|
||||||
FlowRecord currentApprovalFlowRecord = currentFlowRecords.get(0);
|
|
||||||
FlowChart currentflowChart = flowService.selectFlowChartByChartId(currentApprovalFlowRecord.getFlowId());
|
|
||||||
comment(approvalDto, currentflowChart); //评论
|
|
||||||
|
|
||||||
// 恢复之前数据
|
// 恢复之前数据
|
||||||
// 获取之前审批过的结点
|
// 获取之前审批过的结点
|
||||||
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMaxIdStatus(approvalDto.getResultRecordId(),
|
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMaxIdStatus(approvalDto.getResultRecordId(),
|
||||||
@ -999,6 +1043,91 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R newResultRecordList(RecordDetailDto recordDetailDto) {
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByResultRecordId(recordDetailDto.getResultRecordId());
|
||||||
|
List<FlowRecordResp> flowRecordList = new ArrayList<>();
|
||||||
|
int flowIndex = -1;
|
||||||
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
|
if (flowRecord.getFlowIndex().equals(flowIndex)) { //表示有重复数据
|
||||||
|
FlowRecordResp lastResp = flowRecordList.get(flowRecordList.size() - 1);
|
||||||
|
List<FlowRecord> mulFlowRecord = flowRecordService.selectFlowRecordByRecordIdFlowIndex(recordDetailDto.getResultRecordId(), flowIndex);
|
||||||
|
FlowRecord fisrt = mulFlowRecord.get(0);
|
||||||
|
int stepIndex = fisrt.getType();
|
||||||
|
boolean flag0 = false;
|
||||||
|
boolean flag1 = false;
|
||||||
|
boolean flag2 = false;
|
||||||
|
boolean flag4 = false;
|
||||||
|
List<FlowDetailResp> flowDetailRespList = lastResp.getFlowDetailRespList();
|
||||||
|
mySetFlowDetailRespList(flowDetailRespList, flowRecord);
|
||||||
|
for (FlowRecord mul : mulFlowRecord) {
|
||||||
|
if (mul.getStatus().equals(FlowRecordStatusEnums.UN_TO_STATUS.getStatus())) {
|
||||||
|
flag0 = true;
|
||||||
|
} else if (mul.getStatus().equals(FlowRecordStatusEnums.FINISHED_STATUS.getStatus())) {
|
||||||
|
flag1 = true;
|
||||||
|
} else if (mul.getStatus().equals(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus())) {
|
||||||
|
flag2 = true;
|
||||||
|
} else if (mul.getStatus().equals(FlowRecordStatusEnums.SKIP_STATUS.getStatus())) {
|
||||||
|
flag4 = true;
|
||||||
|
}
|
||||||
|
if(mul.getApprovalStaffId().equals(recordDetailDto.getLoginUserId())){
|
||||||
|
lastResp.setStaffName(mul.getApprovalStaffName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stepIndex == 0 || stepIndex == 1) { // 依次
|
||||||
|
if(flag0){
|
||||||
|
lastResp.setStatus(0);
|
||||||
|
}else if(flag1){
|
||||||
|
lastResp.setStatus(1);
|
||||||
|
}else if(flag2){
|
||||||
|
lastResp.setStatus(1);
|
||||||
|
}else if (flag4){
|
||||||
|
lastResp.setStatus(4);
|
||||||
|
}
|
||||||
|
} else { //所有
|
||||||
|
if(flag0){ //只要有 0 表示当前节点所有的为0
|
||||||
|
lastResp.setStatus(0);
|
||||||
|
}else if(flag2){ // 只要有 2 表示所有的结点停留在当前
|
||||||
|
lastResp.setStatus(1);
|
||||||
|
}else if(flag1){
|
||||||
|
lastResp.setStatus(1); // 当前步骤中只存在1和4 ,那么当前结点肯定通过了
|
||||||
|
}else if (flag4){
|
||||||
|
lastResp.setStatus(4); // 当前步骤中所有的结点都跳过了
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
FlowRecordResp resp = new FlowRecordResp();
|
||||||
|
resp.setFlowName(flowRecord.getFlowName());
|
||||||
|
resp.setStaffName(flowRecord.getApprovalStaffName());
|
||||||
|
resp.setStatus(flowRecord.getStatus());
|
||||||
|
|
||||||
|
List<FlowDetailResp> flowDetailRespList = new ArrayList<>();
|
||||||
|
mySetFlowDetailRespList(flowDetailRespList,flowRecord);
|
||||||
|
|
||||||
|
resp.setFlowDetailRespList(flowDetailRespList);
|
||||||
|
flowRecordList.add(resp);
|
||||||
|
flowIndex = flowRecord.getFlowIndex();
|
||||||
|
}
|
||||||
|
FlowRecordResp end = new FlowRecordResp();
|
||||||
|
end.setFlowName("线束");
|
||||||
|
flowRecordList.add(end);
|
||||||
|
List<ResultComment> resultCommentList = resultCommentService.selectByRecordId(recordDetailDto.getResultRecordId());
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("flowRecordList", flowRecordList);
|
||||||
|
map.put("resultCommentList", resultCommentList);
|
||||||
|
return R.ok().put("data", map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void mySetFlowDetailRespList(List<FlowDetailResp> flowDetailRespList ,FlowRecord flowRecord){
|
||||||
|
FlowDetailResp flowDetailResp = new FlowDetailResp();
|
||||||
|
flowDetailResp.setCurrentStaffId(flowRecord.getApprovalStaffId());
|
||||||
|
flowDetailResp.setStaffName(flowRecord.getApprovalStaffName());
|
||||||
|
flowDetailResp.setFlowRecordId(flowRecord.getId());
|
||||||
|
flowDetailRespList.add(flowDetailResp);
|
||||||
|
}
|
||||||
|
|
||||||
public StaffEntity getDepartmentStaff(Long staffId, int level) {
|
public StaffEntity getDepartmentStaff(Long staffId, int level) {
|
||||||
DepartManagers departManagers = staffService.findLeader( staffId, level);
|
DepartManagers departManagers = staffService.findLeader( staffId, level);
|
||||||
List<StaffEntity> staffEntities = departManagers.getManagers();
|
List<StaffEntity> staffEntities = departManagers.getManagers();
|
||||||
|
|||||||
@ -118,7 +118,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectOneByStartIdAndStaffId" resultType="EvaluationStartStaff">
|
<select id="selectOneByStartIdAndStaffId" resultType="EvaluationStartStaff">
|
||||||
select * from lz_evaluation_start_staff where startId=#{startId} AND staffId =#{staffId} and is_delete = 0 limit 1
|
select * from lz_evaluation_start_staff where start_id=#{startId} AND staff_id =#{staffId} and is_delete = 0 limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectManagerEvaluationStartStaff" resultType="EvaluationStartStaff">
|
||||||
|
select * from lz_evaluation_start_staff where evaluation_id=#{evaluationId}
|
||||||
|
AND staff_id =#{staffId} and type = 1 is_delete = 0 and limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -284,6 +284,13 @@
|
|||||||
<select id="selectFlowRecordByRecordIdFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
|
<select id="selectFlowRecordByRecordIdFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and flow_index = #{flowIndex}
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and flow_index = #{flowIndex}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectFlowRecordByResultRecordId" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdMinIdStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and id > #{id} and status = #{status} order by id asc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public class MysqlMain {
|
|||||||
//list.add(new TablesBean("lz_flow_chart_detail_record"));
|
//list.add(new TablesBean("lz_flow_chart_detail_record"));
|
||||||
//list.add(new TablesBean("lz_flow_approval_role"));
|
//list.add(new TablesBean("lz_flow_approval_role"));
|
||||||
|
|
||||||
list.add(new TablesBean("lz_result_comment"));
|
list.add(new TablesBean("lz_result_detail"));
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user