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
279ee3c390
@ -20,5 +20,6 @@ public class TaskCommentDto {
|
|||||||
private String atStaffNames;
|
private String atStaffNames;
|
||||||
private String avatar;
|
private String avatar;
|
||||||
private String taskName;
|
private String taskName;
|
||||||
|
private String position;//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,5 +38,6 @@ public interface StaffOccupationService extends IService<StaffOccupationEntity>
|
|||||||
List<StaffOccupationEntity> selectAll();
|
List<StaffOccupationEntity> selectAll();
|
||||||
|
|
||||||
List<StaffTypeDto> selectStaffTypesByStaffIds(List<Long> staffIds);
|
List<StaffTypeDto> selectStaffTypesByStaffIds(List<Long> staffIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.lz.modules.app.dto.*;
|
|||||||
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.entity.StaffOccupationEntity;
|
||||||
import com.lz.modules.app.enums.DepartmentPMEnums;
|
import com.lz.modules.app.enums.DepartmentPMEnums;
|
||||||
import com.lz.modules.app.enums.EvaluationGroupEnums;
|
import com.lz.modules.app.enums.EvaluationGroupEnums;
|
||||||
import com.lz.modules.app.enums.RoleEnums;
|
import com.lz.modules.app.enums.RoleEnums;
|
||||||
@ -21,6 +22,7 @@ import com.lz.modules.app.model.RoleModel;
|
|||||||
import com.lz.modules.app.model.TaskModel;
|
import com.lz.modules.app.model.TaskModel;
|
||||||
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.StaffOccupationService;
|
||||||
import com.lz.modules.flow.dao.RecordRoleMapper;
|
import com.lz.modules.flow.dao.RecordRoleMapper;
|
||||||
import com.lz.modules.flow.dao.StaffRoleDepartmentMapper;
|
import com.lz.modules.flow.dao.StaffRoleDepartmentMapper;
|
||||||
import com.lz.modules.flow.dao.StaffRoleMapper;
|
import com.lz.modules.flow.dao.StaffRoleMapper;
|
||||||
@ -117,6 +119,9 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
private DingtalkBusiness dingtalkBusiness;
|
private DingtalkBusiness dingtalkBusiness;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffOccupationService staffOccupationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StaffRole selectStaffRoleById(Long id) {
|
public StaffRole selectStaffRoleById(Long id) {
|
||||||
return staffRoleMapper.selectStaffRoleById(id);
|
return staffRoleMapper.selectStaffRoleById(id);
|
||||||
@ -686,8 +691,13 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
taskCommentDto.setTaskName(resultTask.getName());
|
taskCommentDto.setTaskName(resultTask.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
StaffOccupationEntity staffOccupationEntity = staffOccupationService.getStaffOccupationByStaffId(staffEntity.getId());
|
||||||
|
if(staffOccupationEntity !=null ){
|
||||||
|
taskCommentDto.setPosition(staffOccupationEntity.getPosition());
|
||||||
|
}
|
||||||
taskCommentDtoList.add(taskCommentDto);
|
taskCommentDtoList.add(taskCommentDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
pageUtils.setList(taskCommentDtoList);
|
pageUtils.setList(taskCommentDtoList);
|
||||||
return R.ok().put("data", pageUtils);
|
return R.ok().put("data", pageUtils);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,13 +31,13 @@ public interface TaskProcessRecordMapper extends BaseMapper<TaskProcessRecord> {
|
|||||||
|
|
||||||
int deleteTaskProcessRecordById(@Param("id") Long id);
|
int deleteTaskProcessRecordById(@Param("id") Long id);
|
||||||
|
|
||||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") int useType);
|
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") Integer useType);
|
||||||
|
|
||||||
int deleteTaskProcessRecordsByTaskId(@Param("taskId") Long taskId);
|
int deleteTaskProcessRecordsByTaskId(@Param("taskId") Long taskId);
|
||||||
|
|
||||||
TaskProcessRecordDto selectTaskProcessRecordLastByTaskId(@Param("taskId") Long taskId);
|
TaskProcessRecordDto selectTaskProcessRecordLastByTaskId(@Param("taskId") Long taskId);
|
||||||
|
|
||||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIds(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") int useType);
|
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIdsAndType(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") Integer useType);
|
||||||
|
|
||||||
List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,9 @@ public class TaskProcessRecordDto {
|
|||||||
@ApiModelProperty(value = "任务名称", name = "name")
|
@ApiModelProperty(value = "任务名称", name = "name")
|
||||||
private String name;
|
private String name;
|
||||||
//1,修改名称,2修改进度 ,3名称和进度都修改
|
//1,修改名称,2修改进度 ,3名称和进度都修改
|
||||||
@ApiModelProperty(value = "0表示记录,1 表示评论", name = "useType")
|
@ApiModelProperty(value = "0表示记录,不传全部", name = "useType")
|
||||||
private Integer useType;
|
private Integer useType;
|
||||||
|
//1,修改名称,2修改进度 ,3名称和进度都修改
|
||||||
|
@ApiModelProperty(value = "职位", name = "position")
|
||||||
|
private String position;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,6 @@ public class ChangeTaskListReq extends BasePage {
|
|||||||
@ApiModelProperty(value="详情id(二选一)",name = "detailId")
|
@ApiModelProperty(value="详情id(二选一)",name = "detailId")
|
||||||
private Long detailId;
|
private Long detailId;
|
||||||
|
|
||||||
@ApiModelProperty(value="0:不包含评论,1包含评论",name = "type")
|
@ApiModelProperty(value="0:记录 不传全部",name = "useType")
|
||||||
private int useType;
|
private Integer useType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,12 @@ package com.lz.modules.performance.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
|
import com.lz.modules.app.entity.StaffOccupationEntity;
|
||||||
import com.lz.modules.app.model.TaskModel;
|
import com.lz.modules.app.model.TaskModel;
|
||||||
|
import com.lz.modules.app.service.StaffOccupationService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.performance.dao.TaskProcessRecordMapper;
|
import com.lz.modules.performance.dao.TaskProcessRecordMapper;
|
||||||
import com.lz.modules.performance.dto.ResultTaskDto;
|
import com.lz.modules.performance.dto.ResultTaskDto;
|
||||||
@ -21,6 +24,7 @@ import org.apache.commons.collections.CollectionUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
@ -51,6 +55,8 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StaffService staffService;
|
private StaffService staffService;
|
||||||
|
@Autowired
|
||||||
|
private StaffOccupationService staffOccupationService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -97,7 +103,7 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
|||||||
if(CollectionUtils.isNotEmpty(resultTaskDtos)){
|
if(CollectionUtils.isNotEmpty(resultTaskDtos)){
|
||||||
List<Long> collect = resultTaskDtos.stream().map(resultTaskDto -> resultTaskDto.getId()).collect(Collectors.toList());
|
List<Long> collect = resultTaskDtos.stream().map(resultTaskDto -> resultTaskDto.getId()).collect(Collectors.toList());
|
||||||
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIds(page, collect,req.getUseType())
|
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIdsAndType(page, collect,req.getUseType())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,13 +116,14 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
|||||||
|
|
||||||
List list = pageUtils.getList();
|
List list = pageUtils.getList();
|
||||||
if(CollectionUtils.isNotEmpty(list)){
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
|
|
||||||
if(detailId == null){
|
if(detailId == null){
|
||||||
ResultTask resultTask = resultTaskService.selectResultTaskById(taskId);
|
ResultTask resultTask = resultTaskService.selectResultTaskById(taskId);
|
||||||
detailId = resultTask.getDetailId();
|
detailId = resultTask.getDetailId();
|
||||||
}
|
}
|
||||||
ResultDetail resultDetail = resultDetailService.selectResultDetailById(detailId);
|
ResultDetail resultDetail = resultDetailService.selectResultDetailById(detailId);
|
||||||
StaffEntity staffEntity = staffService.selectStaffById(resultDetail.getStaffId());
|
StaffEntity staffEntity = staffService.selectStaffById(resultDetail.getStaffId());
|
||||||
|
StaffOccupationEntity staffOccupationByStaffId = staffOccupationService.getStaffOccupationByStaffId(resultDetail.getStaffId());
|
||||||
|
|
||||||
List<TaskProcessRecordDto> dtos = list;
|
List<TaskProcessRecordDto> dtos = list;
|
||||||
for(TaskProcessRecordDto dto:dtos){
|
for(TaskProcessRecordDto dto:dtos){
|
||||||
dto.setTypeDesc(ProcessRecordEnum.findByType(dto.getType()).getDesc());
|
dto.setTypeDesc(ProcessRecordEnum.findByType(dto.getType()).getDesc());
|
||||||
@ -124,6 +131,7 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
|||||||
dto.setAvatar(staffEntity1.getAvatar());
|
dto.setAvatar(staffEntity1.getAvatar());
|
||||||
dto.setStaffName(staffEntity1.getName());
|
dto.setStaffName(staffEntity1.getName());
|
||||||
});
|
});
|
||||||
|
Optional.ofNullable(staffOccupationByStaffId).ifPresent(staffOccupationEntity -> dto.setPosition(staffOccupationEntity.getPosition()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -131,7 +131,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectTaskProcessRecordsByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
<select id="selectTaskProcessRecordsByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||||
select gmt_create,remark,label,type,name,use_type from lz_task_process_record where task_id=#{taskId} and use_type = #{useType} and is_delete = 0 order by gmt_create desc
|
select gmt_create,remark,label,type,name,use_type from lz_task_process_record where task_id=#{taskId}
|
||||||
|
<if test="useType !=null">
|
||||||
|
and use_type = #{useType}
|
||||||
|
</if>
|
||||||
|
and is_delete = 0 order by gmt_create desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="deleteTaskProcessRecordsByTaskId" parameterType="java.lang.Long">
|
<update id="deleteTaskProcessRecordsByTaskId" parameterType="java.lang.Long">
|
||||||
@ -139,12 +143,16 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectTaskProcessRecordLastByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
<select id="selectTaskProcessRecordLastByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||||
select gmt_create,remark,label,type from lz_task_process_record where task_id=#{taskId} and is_delete = 0 order by id desc limit 1
|
select gmt_create,remark,label,type from lz_task_process_record where task_id=#{taskId} and is_delete = 0
|
||||||
|
order by id desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectTaskProcessRecordsByTaskIds" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
<select id="selectTaskProcessRecordsByTaskIdsAndType" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||||
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0 and use_type = #{useType}
|
select gmt_create,remark,label,type,use_type from lz_task_process_record where is_delete = 0
|
||||||
|
<if test="useType !=null">
|
||||||
|
and use_type = #{useType}
|
||||||
|
</if>
|
||||||
and task_id in
|
and task_id in
|
||||||
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
||||||
#{taskId}
|
#{taskId}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user