fix
This commit is contained in:
parent
441457439e
commit
a2ce4c51a5
@ -56,4 +56,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
//查看自己要审批的记录 status为1代表流程走到了这里
|
//查看自己要审批的记录 status为1代表流程走到了这里
|
||||||
List<TaskListDto> selectTodoTasksByApprovalStaffId(@Param("approvalStaffId") Long approvalStaffId, @Param("page") IPage page);
|
List<TaskListDto> selectTodoTasksByApprovalStaffId(@Param("approvalStaffId") Long approvalStaffId, @Param("page") IPage page);
|
||||||
|
|
||||||
|
List<TaskListDto> selectFinishTasksByApprovalStaffId(@Param("approvalStaffId") Long approvalStaffId, @Param("page") IPage page);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -56,5 +56,5 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
|
|
||||||
Long copyFlowRecord(FlowRecord flowRecord);
|
Long copyFlowRecord(FlowRecord flowRecord);
|
||||||
|
|
||||||
PageUtils selectTodoTasksByApprovalStaffId(AssessTaskReq req, Long approvalStaffId);
|
PageUtils selectTaskListByApprovalStaffId(AssessTaskReq req, Long approvalStaffId);
|
||||||
}
|
}
|
||||||
@ -143,10 +143,19 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils selectTodoTasksByApprovalStaffId(AssessTaskReq req, Long approvalStaffId) {
|
public PageUtils selectTaskListByApprovalStaffId(AssessTaskReq req, Long approvalStaffId) {
|
||||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
|
PageUtils pageUtils = new PageUtils();
|
||||||
page -> flowRecordMapper.selectTodoTasksByApprovalStaffId(approvalStaffId,page)
|
if(req.getStatus()==0){
|
||||||
);
|
pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
|
||||||
|
page -> flowRecordMapper.selectTodoTasksByApprovalStaffId(approvalStaffId,page)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if(req.getStatus()==1){
|
||||||
|
pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect(
|
||||||
|
page -> flowRecordMapper.selectFinishTasksByApprovalStaffId(approvalStaffId,page)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return pageUtils;
|
return pageUtils;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.lz.modules.performance.dto.TaskListDto;
|
|||||||
import com.lz.modules.performance.req.AssessDetailReq;
|
import com.lz.modules.performance.req.AssessDetailReq;
|
||||||
import com.lz.modules.performance.req.AssessListReq;
|
import com.lz.modules.performance.req.AssessListReq;
|
||||||
import com.lz.modules.performance.req.AssessTaskReq;
|
import com.lz.modules.performance.req.AssessTaskReq;
|
||||||
|
import com.lz.modules.performance.req.ChartResultReq;
|
||||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||||
import com.lz.modules.performance.res.TaskListRes;
|
import com.lz.modules.performance.res.TaskListRes;
|
||||||
import com.lz.modules.performance.service.AssessTaskService;
|
import com.lz.modules.performance.service.AssessTaskService;
|
||||||
@ -39,8 +40,8 @@ import java.util.function.Consumer;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/performance")
|
@RequestMapping("/performance")
|
||||||
@Api(value="任务事项", tags={"任务相关接口"})
|
@Api(value="智能绩效", tags={"智能绩效部分接口"})
|
||||||
public class TaskController extends AbstractController{
|
public class SmartPerformanceController extends AbstractController{
|
||||||
@Autowired
|
@Autowired
|
||||||
private AssessTaskService assessTaskService;
|
private AssessTaskService assessTaskService;
|
||||||
|
|
||||||
@ -54,6 +55,14 @@ public class TaskController extends AbstractController{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("chart/result")
|
||||||
|
public R chartResult(@RequestBody ChartResultReq req){
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("assess/group/list")
|
@RequestMapping("assess/group/list")
|
||||||
public R groupList(@RequestBody AssessListReq req){
|
public R groupList(@RequestBody AssessListReq req){
|
||||||
ChartStatisticalRes res = new ChartStatisticalRes();
|
ChartStatisticalRes res = new ChartStatisticalRes();
|
||||||
@ -66,8 +75,4 @@ public class TaskController extends AbstractController{
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("chart/result")
|
|
||||||
public R chartResult(@RequestBody AssessDetailReq req){
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -21,4 +21,8 @@ public class TaskListDto {
|
|||||||
private String monthTime;
|
private String monthTime;
|
||||||
|
|
||||||
private Date gmtModified;
|
private Date gmtModified;
|
||||||
|
|
||||||
|
private int flowProcess;
|
||||||
|
|
||||||
|
private int type;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.lz.modules.performance.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/14 17:00
|
||||||
|
*/
|
||||||
|
public enum ResultFlowProcessEnum {
|
||||||
|
TARGET(0,"制定目标"),
|
||||||
|
CONFIRM(1,"目标确认"),
|
||||||
|
DO(2,"执行中"),
|
||||||
|
SCORE(4,"评分"),
|
||||||
|
FINISH(5,"考核结束"),
|
||||||
|
;
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ResultFlowProcessEnum(int status, String desc) {
|
||||||
|
this.status = status;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.lz.modules.performance.req;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/14 16:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ChartResultReq {
|
||||||
|
//考核类型 月度 季度
|
||||||
|
private int assessType;
|
||||||
|
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.lz.modules.performance.service;
|
||||||
|
|
||||||
|
import com.lz.modules.performance.req.ChartResultReq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/14 16:52
|
||||||
|
*/
|
||||||
|
public interface ChartResultService {
|
||||||
|
void ChartReport(ChartResultReq req);
|
||||||
|
}
|
||||||
@ -37,35 +37,28 @@ public class AssessTaskServiceImpl implements AssessTaskService {
|
|||||||
public PageUtils assessTaskList(AssessTaskReq req,Long userId) {
|
public PageUtils assessTaskList(AssessTaskReq req,Long userId) {
|
||||||
PageUtils data = new PageUtils();
|
PageUtils data = new PageUtils();
|
||||||
List<TaskListRes> list = new ArrayList<>();
|
List<TaskListRes> list = new ArrayList<>();
|
||||||
//获取待办
|
PageUtils pageUtils = flowRecordService.selectTaskListByApprovalStaffId(req,userId);
|
||||||
if(req.getStatus() == 0){
|
if(CollectionUtils.isEmpty(pageUtils.getList())){
|
||||||
PageUtils pageUtils = flowRecordService.selectTodoTasksByApprovalStaffId(req,userId);
|
return data;
|
||||||
if(CollectionUtils.isEmpty(pageUtils.getList())){
|
}
|
||||||
return data;
|
List<TaskListDto> dtos = pageUtils.getList();
|
||||||
|
dtos.stream().forEach(taskListDto -> {
|
||||||
|
TaskListRes res = new TaskListRes();
|
||||||
|
StaffEntity staffEntity = staffService.selectStaffById(taskListDto.getStaffId());
|
||||||
|
res.setAvatar(Optional.ofNullable(staffEntity.getAvatar()).orElse(StringUtil.EMPTY));
|
||||||
|
String name = staffEntity.getName();
|
||||||
|
if(taskListDto.getStaffId().equals(taskListDto.getCurrentApprovalStaffId())){
|
||||||
|
name = "您";
|
||||||
}
|
}
|
||||||
List<TaskListDto> dtos = pageUtils.getList();
|
//根据状态拼接文案
|
||||||
dtos.stream().forEach(taskListDto -> {
|
res.setTitle(name + "的" + taskListDto.getMonthTime() + "");
|
||||||
TaskListRes res = new TaskListRes();
|
res.setTime(DateUtils.format(taskListDto.getGmtModified(),DateUtils.DATE_TIME_PATTERN));
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(taskListDto.getStaffId());
|
//跳转绩效详情页
|
||||||
res.setAvatar(Optional.ofNullable(staffEntity.getAvatar()).orElse(StringUtil.EMPTY));
|
res.setUrl("?" + taskListDto.getRecordId());
|
||||||
String name = staffEntity.getName();
|
list.add(res);
|
||||||
if(taskListDto.getStaffId().equals(taskListDto.getCurrentApprovalStaffId())){
|
});
|
||||||
name = "您";
|
data.setTotalCount(pageUtils.getTotalCount());
|
||||||
}
|
data.setTotalPage(pageUtils.getTotalPage());
|
||||||
//根据状态拼接文案
|
|
||||||
res.setTitle(name + "的" + taskListDto.getMonthTime() + "");
|
|
||||||
res.setTime(DateUtils.format(taskListDto.getGmtModified(),DateUtils.DATE_TIME_PATTERN));
|
|
||||||
//跳转绩效详情页
|
|
||||||
res.setUrl("?" + taskListDto.getRecordId());
|
|
||||||
list.add(res);
|
|
||||||
});
|
|
||||||
data.setTotalCount(pageUtils.getTotalCount());
|
|
||||||
data.setTotalPage(pageUtils.getTotalPage());
|
|
||||||
}
|
|
||||||
//获取历史
|
|
||||||
if(req.getStatus() == 0){
|
|
||||||
|
|
||||||
}
|
|
||||||
data.setList(list);
|
data.setList(list);
|
||||||
data.setPageSize(req.getPageSize());
|
data.setPageSize(req.getPageSize());
|
||||||
data.setCurrPage(req.getCurrPage());
|
data.setCurrPage(req.getCurrPage());
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.lz.modules.performance.service.impl;
|
||||||
|
|
||||||
|
import com.lz.modules.performance.req.ChartResultReq;
|
||||||
|
import com.lz.modules.performance.service.ChartResultService;
|
||||||
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/10/14 16:53
|
||||||
|
*/
|
||||||
|
@Service("chartResultService")
|
||||||
|
public class ChartResultServiceImpl implements ChartResultService {
|
||||||
|
@Autowired
|
||||||
|
private ResultRecordService resultRecordService;
|
||||||
|
@Override
|
||||||
|
public void ChartReport(ChartResultReq req) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -201,14 +201,18 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectTodoTasksByApprovalStaffId" resultType="com.lz.modules.performance.dto.TaskListDto">
|
<select id="selectFinishTasksByApprovalStaffId" resultType="com.lz.modules.performance.dto.TaskListDto">
|
||||||
SELECT DISTINCT(record_id) from lz_flow_record f
|
SELECT DISTINCT(record_id),flow_process,current_approval_staff_id,staff_id,month_time,r.gmt_modified,f.type from lz_flow_record f
|
||||||
LEFT JOIN lz_result_record r
|
LEFT JOIN lz_result_record r
|
||||||
ON f.record_id = r.id
|
ON f.record_id = r.id
|
||||||
where f.is_delete=0 and r.is_delete=0
|
where f.is_delete=0 and r.is_delete=0
|
||||||
and approval_staff_id = #{approvalStaffId}
|
and approval_staff_id = #{approvalStaffId}
|
||||||
and r.status = 0
|
|
||||||
and f.status = 1
|
and f.status = 1
|
||||||
|
order by r.gmt_modified desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTodoTasksByApprovalStaffId" resultType="com.lz.modules.performance.dto.TaskListDto">
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user