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
31eec17e0e
@ -650,10 +650,15 @@ public class ResultRecordController extends AbstractController {
|
|||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
|
// http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1&loginUserId=825
|
||||||
@RequestMapping("/new/approval")
|
@RequestMapping("/new/approval")
|
||||||
public R approval(ApprovalDto approvalDto) {
|
public R approval(ApprovalDto approvalDto) {
|
||||||
approvalDto.setLoginUserId(approvalDto.getLoginUserId());
|
try {
|
||||||
return resultRecordService.newApproval(approvalDto);
|
approvalDto.setLoginUserId(approvalDto.getLoginUserId());
|
||||||
|
return resultRecordService.newApproval(approvalDto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.error(e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -266,18 +266,5 @@ public class TestController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
// http://localhost:8080/lz_management/user/lzresultrecord/new/approval?resultRecordId=215&status=1
|
|
||||||
@RequestMapping("/new/approval")
|
|
||||||
public R approval(Long resultRecordId,Integer status ) {
|
|
||||||
ApprovalDto approvalDto = new ApprovalDto();
|
|
||||||
approvalDto.setResultRecordId(resultRecordId);
|
|
||||||
approvalDto.setStatus(status);
|
|
||||||
return resultRecordService.newApproval(approvalDto);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,8 +5,10 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class ApprovalDto {
|
public class ApprovalDto {
|
||||||
private Long resultRecordId;
|
private Long resultRecordId;
|
||||||
private Integer status; //1 提交审批,审批通过,2 撤回,3 催办,5 驳回,6 申述,7 流程终止
|
private Integer status; //1 提交审批,审批通过,2 撤回,3 催办,4 跳过,5 驳回,6 申述,7 流程终止,8 转交
|
||||||
private Long loginUserId;
|
private Long loginUserId;
|
||||||
private String menuName; //按钮名称
|
private String menuName; //按钮名称
|
||||||
private String comment;
|
private String comment;
|
||||||
|
private Long transferStaffId; // 转交员工 id
|
||||||
|
private Long currentStaffId; //当前用户 id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,8 @@ public enum FlowRecordStatusEnums {
|
|||||||
UN_TO_STATUS(0, "流程未到"),
|
UN_TO_STATUS(0, "流程未到"),
|
||||||
FINISHED_STATUS(1, "流程已走"),
|
FINISHED_STATUS(1, "流程已走"),
|
||||||
CURRENT_FLOW_STATUS(2, "当前流程"),
|
CURRENT_FLOW_STATUS(2, "当前流程"),
|
||||||
SKIP_STATUS(3, "跳过");
|
OTHER_APPROVAL(3,"其他人己审批"),
|
||||||
|
SKIP_STATUS(4, "跳过");
|
||||||
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private String desc ;
|
private String desc ;
|
||||||
|
|||||||
@ -64,4 +64,11 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
List<FlowRecord> selectFlowRecordByRecordIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("status") Integer status);
|
List<FlowRecord> selectFlowRecordByRecordIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("status") Integer status);
|
||||||
|
|
||||||
FlowRecord selectFlowRecordByRecordIdAndFlowId(@Param("resultRecordId") Long resultRecordId, @Param("flowId") Long flowId);
|
FlowRecord selectFlowRecordByRecordIdAndFlowId(@Param("resultRecordId") Long resultRecordId, @Param("flowId") Long flowId);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdStatusFlowIndex(@Param("resultRecordId") Long resultRecordId, @Param("status") int status, @Param("flowIndex") int flowIndex);
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
private String flowStaffIdRole;
|
private String flowStaffIdRole;
|
||||||
//状态名称
|
//状态名称
|
||||||
private String statusName;
|
private String statusName;
|
||||||
//类型 ,1 表示提交目标,2 表示提交结果
|
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||||
private Integer type;
|
private Integer type;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -63,4 +63,11 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
List<FlowRecord> selectFlowRecordByRecordIdStatus(Long resultRecordId,Integer status);
|
List<FlowRecord> selectFlowRecordByRecordIdStatus(Long resultRecordId,Integer status);
|
||||||
|
|
||||||
FlowRecord selectFlowRecordByRecordIdAndFlowId(Long resultRecordId, Long id);
|
FlowRecord selectFlowRecordByRecordIdAndFlowId(Long resultRecordId, Long id);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdStatusFlowIndex(Long resultRecordId, int status, int flowIndex);
|
||||||
|
|
||||||
|
|
||||||
|
FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(Long resultRecordId, Long id, int status);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(Long resultRecordId, Integer flowIndex);
|
||||||
}
|
}
|
||||||
@ -173,4 +173,21 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
public FlowRecord selectFlowRecordByRecordIdAndFlowId(Long resultRecordId, Long flowId) {
|
public FlowRecord selectFlowRecordByRecordIdAndFlowId(Long resultRecordId, Long flowId) {
|
||||||
return flowRecordMapper.selectFlowRecordByRecordIdAndFlowId(resultRecordId,flowId);
|
return flowRecordMapper.selectFlowRecordByRecordIdAndFlowId(resultRecordId,flowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdStatusFlowIndex(Long resultRecordId, int status, int flowIndex) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdStatusFlowIndex(resultRecordId,status,flowIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlowRecord selectPreFlowRecordByRecordIdMaxIdStatus(Long resultRecordId, Long id, int status) {
|
||||||
|
return flowRecordMapper.selectPreFlowRecordByRecordIdMaxIdStatus(resultRecordId,id,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByRecordIdFlowIndex(Long resultRecordId, Integer flowIndex) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByRecordIdFlowIndex(resultRecordId,flowIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,11 +11,15 @@ import com.lz.modules.performance.res.AssessManagerListRes;
|
|||||||
import com.lz.modules.performance.res.ChartStatistical;
|
import com.lz.modules.performance.res.ChartStatistical;
|
||||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||||
import com.lz.modules.performance.service.AssessManagerService;
|
import com.lz.modules.performance.service.AssessManagerService;
|
||||||
|
import com.lz.modules.performance.service.ChartResultService;
|
||||||
import com.lz.modules.sys.dao.app.ResultRecordMapper;
|
import com.lz.modules.sys.dao.app.ResultRecordMapper;
|
||||||
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: djc
|
* @Author: djc
|
||||||
* @Desc:
|
* @Desc:
|
||||||
@ -32,6 +36,8 @@ public class AssessManagerController {
|
|||||||
private AssessManagerService assessManagerService;
|
private AssessManagerService assessManagerService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResultRecordMapper resultRecordMapper;
|
private ResultRecordMapper resultRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private ChartResultService chartResultService;
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("assess/manager/list")
|
@PostMapping("assess/manager/list")
|
||||||
@ -46,6 +52,9 @@ public class AssessManagerController {
|
|||||||
@ApiOperation("获取考核详情列表")
|
@ApiOperation("获取考核详情列表")
|
||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = AssessManagerDetailRes.class)})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = AssessManagerDetailRes.class)})
|
||||||
public R assessDetail(@RequestBody AssessDetailReq req){
|
public R assessDetail(@RequestBody AssessDetailReq req){
|
||||||
|
if(req.getStartId()==null){
|
||||||
|
return R.error("考核id不能为空");
|
||||||
|
}
|
||||||
PageUtils pageUtils = assessManagerService.assessDetail(req);
|
PageUtils pageUtils = assessManagerService.assessDetail(req);
|
||||||
return R.ok().put("data",pageUtils);
|
return R.ok().put("data",pageUtils);
|
||||||
|
|
||||||
@ -54,9 +63,14 @@ public class AssessManagerController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("assess/manager/chart")
|
@PostMapping("assess/manager/chart")
|
||||||
|
@ApiOperation("获取考核详情列表人数统计")
|
||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatistical.class)})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatistical.class)})
|
||||||
public R assessChart(@RequestBody AssessDetailReq req){
|
public R assessChart(@RequestBody AssessDetailReq req){
|
||||||
return R.ok();
|
if(req.getStartId()==null){
|
||||||
|
return R.error("考核id不能为空");
|
||||||
|
}
|
||||||
|
List<ChartStatistical> process = chartResultService.countAssessNumByFlowProcess(req);
|
||||||
|
return R.ok().put("data",process);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import com.lz.modules.performance.res.ResultRankListRes;
|
|||||||
import com.lz.modules.performance.service.ChartResultService;
|
import com.lz.modules.performance.service.ChartResultService;
|
||||||
import com.lz.modules.sys.controller.AbstractController;
|
import com.lz.modules.sys.controller.AbstractController;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ public class ChartController extends AbstractController{
|
|||||||
@ApiOperation("获取绩效报表统计")
|
@ApiOperation("获取绩效报表统计")
|
||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
|
||||||
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
|
public R chartResult(@RequestParam(required = false) @ApiParam(name = "startId",value = "考核周期标识id") Long startId){
|
||||||
String defaultTime = StringUtils.EMPTY;
|
String defaultTime = StringUtil.EMPTY;
|
||||||
if(startId==null){
|
if(startId==null){
|
||||||
//取最近一条记录
|
//取最近一条记录
|
||||||
FlowStart flowStart = flowStartMapper.selectRecentlyLimt();
|
FlowStart flowStart = flowStartMapper.selectRecentlyLimt();
|
||||||
@ -46,7 +45,7 @@ public class ChartController extends AbstractController{
|
|||||||
startId = flowStart.getId();
|
startId = flowStart.getId();
|
||||||
defaultTime = flowStart.getName();
|
defaultTime = flowStart.getName();
|
||||||
}else {
|
}else {
|
||||||
return R.ok();
|
return R.ok("暂无记录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId,defaultTime);
|
List<ChartStatisticalRes> chartStatisticalRes = chartResultService.chartReport(startId,defaultTime);
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.lz.modules.performance.req;
|
package com.lz.modules.performance.req;
|
||||||
|
|
||||||
import com.lz.modules.equipment.entity.model.BasePage;
|
import com.lz.modules.equipment.entity.model.BasePage;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.models.auth.In;
|
import io.swagger.models.auth.In;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -12,17 +14,21 @@ import java.util.List;
|
|||||||
* @Date: 2020/10/13 18:00
|
* @Date: 2020/10/13 18:00
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ApiModel("获取考核详情实体")
|
||||||
public class AssessDetailReq extends BasePage{
|
public class AssessDetailReq extends BasePage{
|
||||||
//考勤组id
|
//考勤组id
|
||||||
private Long evaluationId;
|
@ApiModelProperty(value = "考勤组ids",name = "evaluationIds")
|
||||||
|
private List<Long> evaluationIds;
|
||||||
//发起考核的id
|
//发起考核的id
|
||||||
private int startId;
|
@ApiModelProperty(value = "发起考核的id",name = "startId")
|
||||||
|
private Long startId;
|
||||||
//员工名称
|
//员工名称
|
||||||
|
@ApiModelProperty(value = "员工名称",name = "staffName")
|
||||||
private String staffName;
|
private String staffName;
|
||||||
//部门ids数组
|
|
||||||
private List<Long> departments;
|
|
||||||
//人员id数组
|
//人员id数组
|
||||||
|
@ApiModelProperty(value = "人员id数组",name = "staffIds")
|
||||||
private List<Long> staffIds;
|
private List<Long> staffIds;
|
||||||
//状态 确认 执行 结果录入。。。
|
//状态 确认 执行 结果录入。。。
|
||||||
|
@ApiModelProperty(value = "状态 确认 执行 结果录入。。。",name = "flowProcess")
|
||||||
private Integer flowProcess;
|
private Integer flowProcess;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,4 @@ public class ChartStatistical {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "人数",name = "num")
|
@ApiModelProperty(value = "人数",name = "num")
|
||||||
private int num = 0;
|
private int num = 0;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否被选中",name = "check")
|
|
||||||
private int check;
|
|
||||||
}
|
}
|
||||||
@ -20,6 +20,9 @@ public class ChartStatisticalRes {
|
|||||||
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
|
@ApiModelProperty(value = "默认时间 ",name = "defaultTime")
|
||||||
private String defaultTime;
|
private String defaultTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "默认考核id ",name = "defaultId")
|
||||||
|
private Long defaultId;
|
||||||
|
|
||||||
private List<ChartStatistical> statisticals;
|
private List<ChartStatistical> statisticals;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.service;
|
|||||||
|
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.modules.equipment.entity.model.BasePage;
|
import com.lz.modules.equipment.entity.model.BasePage;
|
||||||
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.req.ChartStartsReq;
|
import com.lz.modules.performance.req.ChartStartsReq;
|
||||||
import com.lz.modules.performance.res.ChartStartsRes;
|
import com.lz.modules.performance.res.ChartStartsRes;
|
||||||
import com.lz.modules.performance.res.ChartStatistical;
|
import com.lz.modules.performance.res.ChartStatistical;
|
||||||
@ -24,4 +25,6 @@ public interface ChartResultService {
|
|||||||
|
|
||||||
PageUtils chartStarts(ChartStartsReq req);
|
PageUtils chartStarts(ChartStartsReq req);
|
||||||
|
|
||||||
|
List<ChartStatistical> countAssessNumByFlowProcess(AssessDetailReq req);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
@Override
|
@Override
|
||||||
public PageUtils assessDetail(AssessDetailReq req) {
|
public PageUtils assessDetail(AssessDetailReq req) {
|
||||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||||
page -> resultRecordMapper.selectAssessListByStartId(page,null)
|
page -> resultRecordMapper.selectAssessListByStartId(page,req)
|
||||||
);
|
);
|
||||||
return pageUtils;
|
return pageUtils;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.lz.modules.performance.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
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;
|
||||||
@ -11,6 +12,7 @@ import com.lz.modules.flow.entity.FlowStart;
|
|||||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||||
import com.lz.modules.flow.service.FlowStartService;
|
import com.lz.modules.flow.service.FlowStartService;
|
||||||
import com.lz.modules.performance.enums.ResultFlowProcessEnum;
|
import com.lz.modules.performance.enums.ResultFlowProcessEnum;
|
||||||
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.req.ChartStartsReq;
|
import com.lz.modules.performance.req.ChartStartsReq;
|
||||||
import com.lz.modules.performance.res.ChartStartsRes;
|
import com.lz.modules.performance.res.ChartStartsRes;
|
||||||
import com.lz.modules.performance.res.ChartStatistical;
|
import com.lz.modules.performance.res.ChartStatistical;
|
||||||
@ -24,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: djc
|
* @Author: djc
|
||||||
@ -60,6 +63,9 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setType(0);
|
res.setType(0);
|
||||||
res.setStatisticals(buildProcess(process,startId));
|
res.setStatisticals(buildProcess(process,startId));
|
||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
|
res.setDefaultId(startId);
|
||||||
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|
||||||
List<ChartStatistical> scoreLevel = resultRecordService.countNumByScoreLevel(startId);
|
List<ChartStatistical> scoreLevel = resultRecordService.countNumByScoreLevel(startId);
|
||||||
@ -67,6 +73,9 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setType(1);
|
res.setType(1);
|
||||||
res.setStatisticals(scoreLevel);
|
res.setStatisticals(scoreLevel);
|
||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
|
res.setDefaultId(startId);
|
||||||
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|
||||||
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(3L);
|
List<String> strings = evaluationGroupService.selectAllStaffIdsByGroupId(3L);
|
||||||
@ -75,6 +84,9 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
res.setType(2);
|
res.setType(2);
|
||||||
res.setStatisticals(depstaff);
|
res.setStatisticals(depstaff);
|
||||||
res.setDefaultTime(defaultTime);
|
res.setDefaultTime(defaultTime);
|
||||||
|
if(StringUtil.isNotBlank(defaultTime)){
|
||||||
|
res.setDefaultId(startId);
|
||||||
|
}
|
||||||
data.add(res);
|
data.add(res);
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
@ -144,6 +156,12 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ChartStatistical> countAssessNumByFlowProcess(AssessDetailReq req) {
|
||||||
|
List<ChartStatistical> process = resultRecordMapper.countAssessNumByFlowProcess(req);
|
||||||
|
List<ChartStatistical> data = buildProcess(process, req.getStartId());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
//构建流程默认人数
|
//构建流程默认人数
|
||||||
private List<ChartStatistical> buildProcess(List<ChartStatistical> process,Long startId){
|
private List<ChartStatistical> buildProcess(List<ChartStatistical> process,Long startId){
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.lz.modules.app.req.ReportListReq;
|
|||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
import com.lz.modules.app.resp.OwnResultResp;
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.flow.model.ResultRecordDto;
|
import com.lz.modules.flow.model.ResultRecordDto;
|
||||||
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
import com.lz.modules.performance.res.AssessManagerDetailRes;
|
||||||
import com.lz.modules.performance.res.ChartStatistical;
|
import com.lz.modules.performance.res.ChartStatistical;
|
||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
@ -84,5 +85,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
|||||||
|
|
||||||
ResultRecord selectOneByStartId(@Param("startId")Long startId);
|
ResultRecord selectOneByStartId(@Param("startId")Long startId);
|
||||||
|
|
||||||
List<AssessManagerDetailRes> selectAssessListByStartId(@Param("page") IPage page, @Param("startId")Long startId);
|
List<AssessManagerDetailRes> selectAssessListByStartId(@Param("page") IPage page, @Param("req")AssessDetailReq req);
|
||||||
|
|
||||||
|
List<ChartStatistical> countAssessNumByFlowProcess(@Param("req")AssessDetailReq req);
|
||||||
}
|
}
|
||||||
@ -110,5 +110,5 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
|||||||
|
|
||||||
R initFlowRecord(Long resultRecordId);
|
R initFlowRecord(Long resultRecordId);
|
||||||
|
|
||||||
R newApproval(ApprovalDto approvalDto);
|
R newApproval(ApprovalDto approvalDto) throws Exception;
|
||||||
}
|
}
|
||||||
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||||
|
import com.lz.common.exception.RRException;
|
||||||
import com.lz.common.utils.*;
|
import com.lz.common.utils.*;
|
||||||
import com.lz.modules.app.dao.DepartmentsDao;
|
import com.lz.modules.app.dao.DepartmentsDao;
|
||||||
import com.lz.modules.app.dao.DepartmentsStaffRelateDao;
|
import com.lz.modules.app.dao.DepartmentsStaffRelateDao;
|
||||||
@ -27,7 +28,6 @@ import com.lz.modules.flow.enums.FlowRecordEnum;
|
|||||||
import com.lz.modules.flow.model.*;
|
import com.lz.modules.flow.model.*;
|
||||||
import com.lz.modules.flow.service.*;
|
import com.lz.modules.flow.service.*;
|
||||||
import com.lz.modules.job.business.DingtalkBusiness;
|
import com.lz.modules.job.business.DingtalkBusiness;
|
||||||
import com.lz.modules.performance.req.AssessDetailReq;
|
|
||||||
import com.lz.modules.performance.res.ChartStatistical;
|
import com.lz.modules.performance.res.ChartStatistical;
|
||||||
import com.lz.modules.sys.dao.app.ResultRecordMapper;
|
import com.lz.modules.sys.dao.app.ResultRecordMapper;
|
||||||
import com.lz.modules.sys.entity.SysUserEntity;
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
@ -813,8 +813,17 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//1 提交审批,审批通过,2 撤回,3 催办,5 驳回,6 申述,7 流程终止
|
////1 提交审批,审批通过,2 撤回,3 催办,4 跳过,5 驳回,6 申述,7 流程终止,8 转交
|
||||||
public R newApproval(ApprovalDto approvalDto) {
|
public R newApproval(ApprovalDto approvalDto) throws Exception{
|
||||||
|
if(approvalDto.getResultRecordId() == null){
|
||||||
|
throw new RRException("resultRecordId 不能为空");
|
||||||
|
}
|
||||||
|
if(approvalDto.getStatus() == null ){
|
||||||
|
throw new RRException("status 不能为空");
|
||||||
|
}
|
||||||
|
if(StringUtil.isBlank(approvalDto.getMenuName())){
|
||||||
|
throw new RRException("menuName 不能为空");
|
||||||
|
}
|
||||||
switch (approvalDto.getStatus()) {
|
switch (approvalDto.getStatus()) {
|
||||||
case 1: //1 提交审批,审批通过
|
case 1: //1 提交审批,审批通过
|
||||||
return newSubmit(approvalDto);
|
return newSubmit(approvalDto);
|
||||||
@ -822,16 +831,29 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return reSubmit(approvalDto);
|
return reSubmit(approvalDto);
|
||||||
case 3: //3 催办
|
case 3: //3 催办
|
||||||
return urge(approvalDto);
|
return urge(approvalDto);
|
||||||
case 5: //4 驳回
|
case 5: //5 驳回
|
||||||
return newReject(approvalDto);
|
return newReject(approvalDto);
|
||||||
case 6: //6 申述
|
case 6: //6 申述
|
||||||
return explain(approvalDto);
|
return explain(approvalDto);
|
||||||
|
case 8: //6 转交
|
||||||
|
if (approvalDto.getTransferStaffId() == null) {
|
||||||
|
throw new RRException("transferStaffId 不能为空");
|
||||||
|
}
|
||||||
|
if(approvalDto.getCurrentStaffId() == null){
|
||||||
|
throw new RRException("currentStaffId 不能为空");
|
||||||
|
}
|
||||||
|
return transfer(approvalDto);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private R transfer(ApprovalDto approvalDto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
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){
|
||||||
@ -840,72 +862,128 @@ 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){
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
StaffEntity staffEntity = staffService.selectStaffById(approvalDto.getLoginUserId());
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(resultRecord.getCurrentApprovalStaffId());
|
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.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) {
|
||||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(approvalDto.getResultRecordId());
|
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
||||||
FlowRecord currentFlowRecord = null;
|
if(approvalDto.getLoginUserId() == null){
|
||||||
for(FlowRecord flowRecord: flowRecords){
|
approvalDto.setLoginUserId(resultRecord.getCurrentApprovalStaffId());
|
||||||
if(flowRecord.getStatus().equals(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus())){
|
}
|
||||||
log.info("flowRecordId:" + flowRecord.getId() + "更新为流程己走");
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),2);
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());
|
if(CollectionUtils.isEmpty(flowRecords)){
|
||||||
flowRecordService.updateFlowRecordById(flowRecord);
|
log.info("流程己经结束");
|
||||||
} else if (flowRecord.getStatus().equals(FlowRecordStatusEnums.SKIP_STATUS.getStatus())){
|
return R.ok("流程己经结束");
|
||||||
continue;
|
}
|
||||||
} else if (flowRecord.getStatus().equals(FlowRecordStatusEnums.UN_TO_STATUS.getStatus())){
|
FlowRecord preFlowRecord = flowRecords.get(0);
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
int stepType = preFlowRecord.getType();
|
||||||
log.info("flowRecordId:" + flowRecord.getId() + "更新为正在执行");
|
if (flowRecords != null && flowRecords.size() > 0) {
|
||||||
currentFlowRecord = flowRecord;
|
if (stepType == 0 || stepType == 1) { //表示只要一个人通过就可以了
|
||||||
flowRecordService.updateFlowRecordById(flowRecord);
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
break;
|
if (flowRecord.getApprovalStaffId().equals(approvalDto.getLoginUserId())) {
|
||||||
|
flowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//当前审批己经完成
|
||||||
|
} else {
|
||||||
|
flowRecord.setStatus(FlowRecordStatusEnums.OTHER_APPROVAL.getStatus()); //其他审批
|
||||||
|
}
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
boolean flag = false;
|
||||||
|
FlowRecord currentFlowRecord = null;
|
||||||
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
|
if (!flowRecord.getApprovalStaffId().equals(approvalDto.getLoginUserId())
|
||||||
|
&& flowRecord.getStatus().equals(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus())) {
|
||||||
|
flag = true;
|
||||||
|
} else {
|
||||||
|
currentFlowRecord = flowRecord;//当前流程 id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
currentFlowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//当前审批己经完成
|
||||||
|
flowRecordService.updateFlowRecordById(currentFlowRecord);
|
||||||
|
if (flag) { //流程未向下走
|
||||||
|
return R.ok("审批成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
preFlowRecord.setStatus(FlowRecordStatusEnums.FINISHED_STATUS.getStatus());//流程己走
|
||||||
|
flowRecordService.updateFlowRecordById(preFlowRecord);
|
||||||
|
FlowChart flowChart = flowService.selectFlowChartByChartId(preFlowRecord.getFlowId());
|
||||||
|
comment(approvalDto, flowChart);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<FlowRecord> nextFlowRecords = flowRecordService.selectFlowRecordByRecordIdStatusFlowIndex(approvalDto.getResultRecordId(),0,preFlowRecord.getFlowIndex() + 1 );
|
||||||
|
if(CollectionUtils.isEmpty(nextFlowRecords)){
|
||||||
|
log.info("流程己经结束2");
|
||||||
|
return R.ok("流程己经结束");
|
||||||
|
}
|
||||||
|
FlowRecord currentFlowRecord = nextFlowRecords.get(0);
|
||||||
|
|
||||||
|
for (FlowRecord flowRecord : nextFlowRecords) {
|
||||||
|
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
}
|
}
|
||||||
FlowChart flowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
|
FlowChart flowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
|
||||||
|
|
||||||
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
||||||
resultRecord.setFlowStaffIdRole(currentFlowRecord.getFlowStaffIdRole());
|
resultRecord.setFlowStaffIdRole(nextFlowRecords.size() == 1 ? currentFlowRecord.getFlowStaffIdRole() : null);
|
||||||
resultRecord.setCurrentApprovalStaffId(currentFlowRecord.getApprovalStaffId());
|
resultRecord.setCurrentApprovalStaffId(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffId() : null);
|
||||||
resultRecord.setCurrentApprovalStaffName(currentFlowRecord.getApprovalStaffName());
|
resultRecord.setCurrentApprovalStaffName(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffName() : null);
|
||||||
resultRecordService.updateResultRecordById(resultRecord);
|
resultRecordService.updateCoverResultRecordById(resultRecord);
|
||||||
comment(approvalDto,flowChart);
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private R newReject(ApprovalDto approvalDto) {
|
private R newReject(ApprovalDto approvalDto) {
|
||||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),2);
|
List<FlowRecord> currentflowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(approvalDto.getResultRecordId(),FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
if(flowRecords !=null && flowRecords.size() > 0 ){
|
if(currentflowRecords !=null && currentflowRecords.size() > 0 ){
|
||||||
FlowRecord currentFlowRecord = flowRecords.get(0);
|
FlowRecord currentFlowRecord = currentflowRecords.get(0);
|
||||||
for(FlowRecord flowRecord : flowRecords){
|
// 更新当前数据
|
||||||
flowRecord.setStatus(0);
|
// 获取当前审批结点组
|
||||||
|
List<FlowRecord> currentFlowRecords = flowRecordService.selectFlowRecordByRecordIdFlowIndex(approvalDto.getResultRecordId(), currentFlowRecord.getFlowIndex());
|
||||||
|
for(FlowRecord flowRecord : currentFlowRecords){
|
||||||
|
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 lastFlowRecord = flowRecordService.selectFlowRecordByRecordIdAndFlowId(approvalDto.getResultRecordId(),currentFlowRecord.getId());
|
// 恢复之前数据
|
||||||
lastFlowRecord.setStatus(2);
|
// 获取之前审批过的结点
|
||||||
flowRecordService.updateFlowRecordById(lastFlowRecord);
|
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMaxIdStatus(approvalDto.getResultRecordId(),
|
||||||
|
currentFlowRecord.getId(),FlowRecordStatusEnums.FINISHED_STATUS.getStatus());
|
||||||
|
if(preFlowRecord != null) {
|
||||||
|
// 获取之前审批结点组
|
||||||
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdFlowIndex(approvalDto.getResultRecordId(), preFlowRecord.getFlowIndex());
|
||||||
|
for (FlowRecord flowRecord : flowRecords) {
|
||||||
|
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
|
flowRecordService.updateFlowRecordById(flowRecord);
|
||||||
|
}
|
||||||
|
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
FlowRecord lastFlowRecord = flowRecords.get(0);
|
||||||
resultRecord.setCurrentApprovalStaffId(lastFlowRecord.getApprovalStaffId());
|
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
||||||
resultRecord.setCurrentApprovalStaffName(lastFlowRecord.getApprovalStaffName());
|
resultRecord.setCurrentApprovalStaffId(flowRecords.size() == 1 ? lastFlowRecord.getApprovalStaffId():null);
|
||||||
resultRecord.setFlowStaffIdRole(lastFlowRecord.getFlowStaffIdRole());
|
resultRecord.setCurrentApprovalStaffName(flowRecords.size() == 1 ?lastFlowRecord.getApprovalStaffName():null);
|
||||||
FlowChart flowChart = flowService.selectFlowChartByChartId(lastFlowRecord.getFlowId());
|
resultRecord.setFlowStaffIdRole(flowRecords.size() == 1 ?lastFlowRecord.getFlowStaffIdRole():null);
|
||||||
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
|
||||||
resultRecordService.updateResultRecordById(resultRecord);
|
FlowChart flowChart = flowService.selectFlowChartByChartId(lastFlowRecord.getFlowId());
|
||||||
comment(approvalDto,flowChart);
|
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
||||||
|
resultRecordService.updateCoverResultRecordById(resultRecord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private R urge(ApprovalDto approvalDto) {
|
private R urge(ApprovalDto approvalDto) {
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
|
||||||
if(!resultRecord.getCurrentApprovalStaffId().equals(approvalDto.getLoginUserId())){
|
if(!resultRecord.getCurrentApprovalStaffId().equals(approvalDto.getLoginUserId())){
|
||||||
@ -950,4 +1028,5 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
}
|
}
|
||||||
return new Flow();
|
return new Flow();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -387,21 +387,55 @@
|
|||||||
LEFT JOIN lz_evaluation_start_staff s
|
LEFT JOIN lz_evaluation_start_staff s
|
||||||
ON r.start_id = s.start_id and r.staff_id = s.staff_id
|
ON r.start_id = s.start_id and r.staff_id = s.staff_id
|
||||||
where r.is_delete = 0 and s.is_delete = 0
|
where r.is_delete = 0 and s.is_delete = 0
|
||||||
and r.start_id = #{startId}
|
and r.start_id = #{req.startId}
|
||||||
<if test="evaluationId !=null">
|
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=0">
|
||||||
and r.evaluation_id = #{evaluationId}
|
and r.evaluation_id in(
|
||||||
|
<foreach collection="req.evaluationIds" item="evaluation_id" separator=",">
|
||||||
|
#{evaluation_id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="flowProcess !=null">
|
<if test="req.flowProcess !=null">
|
||||||
and r.flow_process = #{flowProcess}
|
and r.flow_process = #{req.flowProcess}
|
||||||
</if>
|
</if>
|
||||||
<if test="staffIds !=null and staffIds.size() !=0">
|
<if test="req.staffName !=null and req.staffName!=''">
|
||||||
and staff_id in(
|
and r.staff_name = #{req.staffName}
|
||||||
<foreach collection="staffIds" item="staff_id" separator=",">
|
</if>
|
||||||
|
<if test="req.staffIds !=null and req.staffIds.size() !=0">
|
||||||
|
and r.staff_id in(
|
||||||
|
<foreach collection="req.staffIds" item="staff_id" separator=",">
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="countAssessNumByFlowProcess" resultType="com.lz.modules.performance.res.ChartStatistical">
|
||||||
|
SELECT count(flow_process) num,flow_process as 'desc' from lz_result_record
|
||||||
|
where is_delete=0
|
||||||
|
and start_id =#{req.startId}
|
||||||
|
<if test="req.evaluationIds !=null and req.evaluationIds.size()!=0">
|
||||||
|
and evaluation_id in(
|
||||||
|
<foreach collection="req.evaluationIds" item="evaluation_id" separator=",">
|
||||||
|
#{evaluation_id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="req.flowProcess !=null">
|
||||||
|
and flow_process = #{req.flowProcess}
|
||||||
|
</if>
|
||||||
|
<if test="req.staffName !=null and req.staffName!=''">
|
||||||
|
and staff_name = #{req.staffName}
|
||||||
|
</if>
|
||||||
|
<if test="req.staffIds !=null and req.staffIds.size() !=0">
|
||||||
|
and staff_id in(
|
||||||
|
<foreach collection="req.staffIds" item="staff_id" separator=",">
|
||||||
|
#{staff_id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
GROUP BY flow_process
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -266,10 +266,25 @@
|
|||||||
<select id="selectFlowRecordByRecordIdStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
<select id="selectFlowRecordByRecordIdStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and status = #{status}
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and status = #{status}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectFlowRecordByRecordIdAndFlowId" resultType="com.lz.modules.flow.entity.FlowRecord">
|
<select id="selectFlowRecordByRecordIdAndFlowId" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and #{flowId} > id order by id desc limit 1
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and #{flowId} > id order by id desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectFlowRecordByRecordIdStatusFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and status = #{status} and flow_index = #{flowIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPreFlowRecordByRecordIdMaxIdStatus" 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 desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user