提交修改
This commit is contained in:
commit
4f06d45467
@ -696,7 +696,6 @@ public class DingtalkBusiness {
|
|||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "OK";
|
return "OK";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class ResultTaskController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("/result/changeTask")
|
@PostMapping("/result/changeTask")
|
||||||
@ApiOperation("任务修改")
|
@ApiOperation("任务新增或修改")
|
||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
||||||
public R changeTask(@RequestBody ResultUpdateTaskReq req){
|
public R changeTask(@RequestBody ResultUpdateTaskReq req){
|
||||||
int i = resultTaskService.saveOrUpdateResultTask(req);
|
int i = resultTaskService.saveOrUpdateResultTask(req);
|
||||||
|
|||||||
@ -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);
|
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") int 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);
|
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIds(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") int useType);
|
||||||
|
|
||||||
List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
||||||
}
|
}
|
||||||
@ -35,7 +35,10 @@ public class ResultTaskDto {
|
|||||||
//姓名
|
//姓名
|
||||||
@ApiModelProperty(value = "姓名", name = "staffName")
|
@ApiModelProperty(value = "姓名", name = "staffName")
|
||||||
private String staffName;
|
private String staffName;
|
||||||
//标签
|
/* //标签
|
||||||
@ApiModelProperty(value = "标签", name = "label")
|
@ApiModelProperty(value = "标签", name = "label")
|
||||||
private String label;
|
private String label;*/
|
||||||
|
//标签
|
||||||
|
@ApiModelProperty(value = "类型", name = "描述")
|
||||||
|
private String typeDesc;
|
||||||
}
|
}
|
||||||
@ -31,4 +31,7 @@ public class TaskProcessRecordDto {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "头像", name = "avatar")
|
@ApiModelProperty(value = "头像", name = "avatar")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
//标签
|
||||||
|
@ApiModelProperty(value = "类型", name = "描述")
|
||||||
|
private String typeDesc;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,4 +20,7 @@ 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")
|
||||||
|
private int useType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,8 +111,9 @@ public class ResultTaskServiceImpl extends ServiceImpl<ResultTaskMapper, ResultT
|
|||||||
resultTasks.forEach(resultTaskDto -> {
|
resultTasks.forEach(resultTaskDto -> {
|
||||||
TaskProcessRecordDto taskProcessRecordDto = taskProcessRecordMapper.selectTaskProcessRecordLastByTaskId(resultTaskDto.getId());
|
TaskProcessRecordDto taskProcessRecordDto = taskProcessRecordMapper.selectTaskProcessRecordLastByTaskId(resultTaskDto.getId());
|
||||||
if(taskProcessRecordDto != null){
|
if(taskProcessRecordDto != null){
|
||||||
|
//resultTaskDto.setLabel(taskProcessRecordDto.getLabel());
|
||||||
ProcessRecordEnum byType = ProcessRecordEnum.findByType(taskProcessRecordDto.getType());
|
ProcessRecordEnum byType = ProcessRecordEnum.findByType(taskProcessRecordDto.getType());
|
||||||
Optional.ofNullable(byType).ifPresent(processRecordEnum -> resultTaskDto.setLabel(byType.getDesc()));
|
Optional.ofNullable(byType).ifPresent(processRecordEnum -> resultTaskDto.setTypeDesc(byType.getDesc()));
|
||||||
if(finalStaffEntity !=null){
|
if(finalStaffEntity !=null){
|
||||||
resultTaskDto.setAvatar(finalStaffEntity.getAvatar());
|
resultTaskDto.setAvatar(finalStaffEntity.getAvatar());
|
||||||
resultTaskDto.setStaffName(finalStaffEntity.getName());
|
resultTaskDto.setStaffName(finalStaffEntity.getName());
|
||||||
|
|||||||
@ -19,7 +19,6 @@ import com.lz.modules.sys.service.app.ResultDetailService;
|
|||||||
import org.apache.commons.collections.CollectionUtils;
|
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 sun.jvm.hotspot.oops.TypeArrayKlass;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@ -97,14 +96,14 @@ 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)
|
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIds(page, collect,req.getUseType())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskId(page, req.getTaskId())
|
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskId(page, req.getTaskId(),req.getUseType())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -129,7 +129,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<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 from lz_task_process_record where task_id=#{taskId} and is_delete = 0 order by gmt_create desc
|
select gmt_create,remark,label,type from lz_task_process_record where task_id=#{taskId} and use_type = #{useType} 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">
|
||||||
@ -142,9 +142,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectTaskProcessRecordsByTaskIds" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
<select id="selectTaskProcessRecordsByTaskIds" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||||
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0
|
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0 and use_type = #{useType}
|
||||||
and
|
and task_id in
|
||||||
task_id in
|
|
||||||
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
||||||
#{taskId}
|
#{taskId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user