提交修改
This commit is contained in:
commit
15a32e6b74
@ -1,6 +1,5 @@
|
||||
package com.lz.modules.app.dto;
|
||||
|
||||
import com.lz.modules.performance.entity.TaskComment;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@ -29,11 +29,9 @@ import com.lz.modules.flow.dao.StaffRoleMapper;
|
||||
import com.lz.modules.flow.entity.*;
|
||||
import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.performance.dao.TaskCommentMapper;
|
||||
import com.lz.modules.performance.entity.ResultTask;
|
||||
import com.lz.modules.performance.entity.TaskProcessRecord;
|
||||
import com.lz.modules.performance.service.ResultTaskService;
|
||||
import com.lz.modules.performance.service.TaskCommentService;
|
||||
import com.lz.modules.performance.service.TaskProcessRecordService;
|
||||
import com.lz.modules.sys.entity.SysMenuEntity;
|
||||
import com.lz.modules.sys.entity.SysRoleEntity;
|
||||
@ -113,8 +111,6 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
||||
@Autowired
|
||||
private ResultDetailService resultDetailService;
|
||||
|
||||
@Autowired
|
||||
private TaskCommentService taskCommentService;
|
||||
|
||||
@Autowired
|
||||
private TaskProcessRecordService taskProcessRecordService;
|
||||
@ -122,8 +118,6 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
||||
@Autowired
|
||||
private DingtalkBusiness dingtalkBusiness;
|
||||
|
||||
@Autowired
|
||||
private TaskCommentMapper taskCommentMapper;
|
||||
|
||||
@Autowired
|
||||
private StaffOccupationService staffOccupationService;
|
||||
|
||||
@ -4,11 +4,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.dingtalk.api.DefaultDingTalkClient;
|
||||
import com.dingtalk.api.DingTalkClient;
|
||||
import com.dingtalk.api.request.OapiRoleListRequest;
|
||||
import com.dingtalk.api.request.OapiRoleSimplelistRequest;
|
||||
import com.dingtalk.api.request.OapiSmartworkHrmEmployeeQueryonjobRequest;
|
||||
import com.dingtalk.api.response.OapiRoleListResponse;
|
||||
import com.dingtalk.api.response.OapiRoleSimplelistResponse;
|
||||
import com.dingtalk.api.response.OapiSmartworkHrmEmployeeQueryonjobResponse;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||
@ -29,10 +25,9 @@ import com.lz.modules.flow.service.FlowRecordService;
|
||||
import com.lz.modules.flow.service.FlowStartService;
|
||||
import com.lz.modules.job.model.responseBo.DepartmentInfosBo;
|
||||
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
||||
import com.lz.modules.performance.entity.ResultTask;
|
||||
import com.lz.modules.performance.entity.TaskComment;
|
||||
import com.lz.modules.performance.entity.TaskProcessRecord;
|
||||
import com.lz.modules.performance.service.ResultTaskService;
|
||||
import com.lz.modules.performance.service.TaskCommentService;
|
||||
import com.lz.modules.performance.service.TaskProcessRecordService;
|
||||
import com.lz.modules.sys.dao.SysUserTokenDao;
|
||||
import com.lz.modules.sys.entity.SysUserTokenEntity;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
@ -45,14 +40,11 @@ import com.lz.modules.third.entity.WorkMsg;
|
||||
import com.lz.modules.third.service.ThirdAppConfigService;
|
||||
import com.lz.modules.third.service.ThirdMsgSendRecordService;
|
||||
import com.taobao.api.ApiException;
|
||||
import org.apache.commons.collections.map.CompositeMap;
|
||||
import org.apache.commons.collections.map.HashedMap;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.URLEncoder;
|
||||
@ -114,7 +106,7 @@ public class DingtalkBusiness {
|
||||
private ResultTaskService resultTaskService;
|
||||
|
||||
@Autowired
|
||||
private TaskCommentService taskCommentService;
|
||||
private TaskProcessRecordService taskProcessRecordService;
|
||||
|
||||
@Resource
|
||||
StaffDao staffDao;
|
||||
@ -702,14 +694,14 @@ public class DingtalkBusiness {
|
||||
public String sendTaskNoticeMsg(Long detailId, Long taskId) {
|
||||
ResultDetail resultDetail = resultDetailService.selectResultDetailById(detailId);
|
||||
logger.info("评论通知指标id{}, 任务id{}", detailId, taskId);
|
||||
/*if(resultDetail != null){
|
||||
TaskComment taskComment = null;
|
||||
if(resultDetail != null){
|
||||
TaskProcessRecord taskProcessRecord = null;
|
||||
if(taskId == null){
|
||||
taskComment = taskCommentService.selectTaskCommentByDetailId(detailId);
|
||||
taskProcessRecord = taskProcessRecordService.selectCommentTaskProcessRecordByDetailId(detailId);
|
||||
}else{
|
||||
taskComment = taskCommentService.selectTaskCommentByTaskId(taskId);
|
||||
taskProcessRecord = taskProcessRecordService.selectCommentTaskProcessRecordByTaskId(taskId);
|
||||
}
|
||||
StaffSimpleInfo fromStaffSimpleInfo = staffService.selectStaffSimpleInfo(taskComment.getStaffId());
|
||||
StaffSimpleInfo fromStaffSimpleInfo = staffService.selectStaffSimpleInfo(taskProcessRecord.getStaffId());
|
||||
StaffSimpleInfo toStaffSimpleInfo = staffService.selectStaffSimpleInfo(resultDetail.getStaffId());
|
||||
|
||||
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
|
||||
@ -743,7 +735,7 @@ public class DingtalkBusiness {
|
||||
}else{
|
||||
return "token无效";
|
||||
}
|
||||
}*/
|
||||
}
|
||||
return "OK";
|
||||
}
|
||||
public String sendNoticeMsg(ResultRecord lzResultRecord, List<StaffEntity> staffs) {
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
package com.lz.modules.performance.dao;
|
||||
/**
|
||||
* <p>
|
||||
* 任务评论表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-12-08
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lz.modules.app.model.TaskModel;
|
||||
import com.lz.modules.performance.entity.TaskComment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TaskCommentMapper extends BaseMapper<TaskComment> {
|
||||
|
||||
|
||||
TaskComment selectTaskCommentById(@Param("id") Long id);
|
||||
|
||||
|
||||
Long insertTaskComment(TaskComment taskComment);
|
||||
|
||||
|
||||
int updateTaskCommentById(TaskComment taskComment);
|
||||
|
||||
|
||||
int updateCoverTaskCommentById(TaskComment taskComment);
|
||||
|
||||
|
||||
int deleteTaskCommentById(@Param("id") Long id);
|
||||
|
||||
|
||||
int deleteTaskCommensByTaskId(@Param("taskId") Long taskId);
|
||||
|
||||
List<TaskComment> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
||||
|
||||
TaskComment selectTaskCommentByTaskId(Long taskId);
|
||||
|
||||
TaskComment selectTaskCommentByDetailId(Long detailId);
|
||||
}
|
||||
@ -31,13 +31,17 @@ public interface TaskProcessRecordMapper extends BaseMapper<TaskProcessRecord> {
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
TaskProcessRecord selectCommentTaskProcessRecordByDetailId(@Param("detailId") Long detailId);
|
||||
|
||||
TaskProcessRecord selectCommentTaskProcessRecordByTaskId(@Param("taskId") Long taskId);
|
||||
}
|
||||
@ -38,6 +38,6 @@ public class TaskProcessRecordDto {
|
||||
@ApiModelProperty(value = "任务名称", name = "name")
|
||||
private String name;
|
||||
//1,修改名称,2修改进度 ,3名称和进度都修改
|
||||
@ApiModelProperty(value = "0表示记录,1 表示评论", name = "useType")
|
||||
@ApiModelProperty(value = "0表示记录,不传全部", name = "useType")
|
||||
private Integer useType;
|
||||
}
|
||||
|
||||
@ -1,234 +0,0 @@
|
||||
package com.lz.modules.performance.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* </p>*任务评论表
|
||||
* @author quyixiao
|
||||
* @since 2020-12-08
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("lz_task_comment")
|
||||
@ApiModel(value = "任务评论表")
|
||||
public class TaskComment implements java.io.Serializable {
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
//是否删除状态,1:删除,0:有效
|
||||
@ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete")
|
||||
private Integer isDelete;
|
||||
//创建时间
|
||||
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
|
||||
private Date gmtCreate;
|
||||
//最后修改时间
|
||||
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
|
||||
private Date gmtModified;
|
||||
//任务id
|
||||
@ApiModelProperty(value = "任务id", name = "taskId")
|
||||
private Long taskId;
|
||||
//0表示对所有评论,1表示对单个具体的detail做评论
|
||||
@ApiModelProperty(value = "0表示对所有评论,1表示对单个具体的detail做评论", name = "type")
|
||||
private Integer type;
|
||||
//
|
||||
@ApiModelProperty(value = "", name = "detailId")
|
||||
private Long detailId;
|
||||
//lz_result_record表id
|
||||
@ApiModelProperty(value = "lz_result_record表id", name = "resultRecordId")
|
||||
private Long resultRecordId;
|
||||
//评论人员
|
||||
@ApiModelProperty(value = "评论人员", name = "staffId")
|
||||
private Long staffId;
|
||||
//评论内容
|
||||
@ApiModelProperty(value = "评论内容", name = "content")
|
||||
private String content;
|
||||
//评论人员名称
|
||||
@ApiModelProperty(value = "评论人员名称", name = "staffName")
|
||||
private String staffName;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
/**
|
||||
* 是否删除状态,1:删除,0:有效
|
||||
* @param isDelete
|
||||
*/
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
/**
|
||||
* 创建时间
|
||||
* @param gmtCreate
|
||||
*/
|
||||
public void setGmtCreate(Date gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
* @return
|
||||
*/
|
||||
public Date getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
/**
|
||||
* 最后修改时间
|
||||
* @param gmtModified
|
||||
*/
|
||||
public void setGmtModified(Date gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
* @return
|
||||
*/
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
/**
|
||||
* 任务id
|
||||
* @param taskId
|
||||
*/
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 0表示对所有评论,1表示对单个具体的detail做评论
|
||||
* @return
|
||||
*/
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
/**
|
||||
* 0表示对所有评论,1表示对单个具体的detail做评论
|
||||
* @param type
|
||||
*/
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getDetailId() {
|
||||
return detailId;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param detailId
|
||||
*/
|
||||
public void setDetailId(Long detailId) {
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lz_result_record表id
|
||||
* @return
|
||||
*/
|
||||
public Long getResultRecordId() {
|
||||
return resultRecordId;
|
||||
}
|
||||
/**
|
||||
* lz_result_record表id
|
||||
* @param resultRecordId
|
||||
*/
|
||||
public void setResultRecordId(Long resultRecordId) {
|
||||
this.resultRecordId = resultRecordId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论人员
|
||||
* @return
|
||||
*/
|
||||
public Long getStaffId() {
|
||||
return staffId;
|
||||
}
|
||||
/**
|
||||
* 评论人员
|
||||
* @param staffId
|
||||
*/
|
||||
public void setStaffId(Long staffId) {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
* @return
|
||||
*/
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
/**
|
||||
* 评论内容
|
||||
* @param content
|
||||
*/
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论人员名称
|
||||
* @return
|
||||
*/
|
||||
public String getStaffName() {
|
||||
return staffName;
|
||||
}
|
||||
/**
|
||||
* 评论人员名称
|
||||
* @param staffName
|
||||
*/
|
||||
public void setStaffName(String staffName) {
|
||||
this.staffName = staffName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TaskComment{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",gmtCreate=" + gmtCreate +
|
||||
",gmtModified=" + gmtModified +
|
||||
",taskId=" + taskId +
|
||||
",type=" + type +
|
||||
",detailId=" + detailId +
|
||||
",resultRecordId=" + resultRecordId +
|
||||
",staffId=" + staffId +
|
||||
",content=" + content +
|
||||
",staffName=" + staffName +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,6 @@ public class ChangeTaskListReq extends BasePage {
|
||||
@ApiModelProperty(value="详情id(二选一)",name = "detailId")
|
||||
private Long detailId;
|
||||
|
||||
@ApiModelProperty(value="0:不包含评论,1包含评论",name = "type")
|
||||
private int useType;
|
||||
@ApiModelProperty(value="0:记录 不传全部",name = "useType")
|
||||
private Integer useType;
|
||||
}
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
package com.lz.modules.performance.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.modules.performance.entity.TaskComment;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务评论表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-12-08
|
||||
*/
|
||||
public interface TaskCommentService extends IService<TaskComment> {
|
||||
|
||||
|
||||
|
||||
TaskComment selectTaskCommentById(Long id);
|
||||
|
||||
|
||||
Long insertTaskComment(TaskComment taskComment);
|
||||
|
||||
|
||||
int updateTaskCommentById(TaskComment taskComment);
|
||||
|
||||
|
||||
int updateCoverTaskCommentById(TaskComment taskComment);
|
||||
|
||||
|
||||
int deleteTaskCommentById(Long id);
|
||||
|
||||
|
||||
int deleteTaskCommensByTaskId(Long taskId);
|
||||
|
||||
TaskComment selectTaskCommentByDetailId(Long detailId);
|
||||
|
||||
TaskComment selectTaskCommentByTaskId(Long taskId);
|
||||
}
|
||||
@ -41,4 +41,8 @@ public interface TaskProcessRecordService extends IService<TaskProcessRecord> {
|
||||
int deleteTaskProcessRecordsByTaskId(Long taskId);
|
||||
|
||||
List<TaskProcessRecord> selectByCondition(IPage page, TaskModel taskModel);
|
||||
|
||||
TaskProcessRecord selectCommentTaskProcessRecordByDetailId(Long detailId);
|
||||
|
||||
TaskProcessRecord selectCommentTaskProcessRecordByTaskId(Long taskId);
|
||||
}
|
||||
@ -14,11 +14,9 @@ import com.lz.modules.performance.enums.ProcessRecordEnum;
|
||||
import com.lz.modules.performance.req.ResultUpdateTaskReq;
|
||||
import com.lz.modules.performance.res.ResultTaskDetailRes;
|
||||
import com.lz.modules.performance.service.ResultTaskService;
|
||||
import com.lz.modules.performance.service.TaskCommentService;
|
||||
import com.lz.modules.performance.service.TaskProcessRecordService;
|
||||
import com.lz.modules.sys.entity.app.ResultDetail;
|
||||
import com.lz.modules.sys.service.app.ResultDetailService;
|
||||
import com.sun.org.apache.regexp.internal.RE;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -28,7 +26,6 @@ import org.springframework.stereotype.Service;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -47,9 +44,7 @@ public class ResultTaskServiceImpl extends ServiceImpl<ResultTaskMapper, ResultT
|
||||
@Autowired
|
||||
private ResultTaskMapper resultTaskMapper;
|
||||
@Autowired
|
||||
private ResultDetailService resultDetailService;
|
||||
@Autowired
|
||||
private TaskCommentService taskCommentService;
|
||||
private ResultDetailService resultDetailService;;
|
||||
@Autowired
|
||||
private TaskProcessRecordService taskProcessRecordService;
|
||||
@Autowired
|
||||
@ -232,7 +227,6 @@ public class ResultTaskServiceImpl extends ServiceImpl<ResultTaskMapper, ResultT
|
||||
for (ResultTask task : tasks
|
||||
) {
|
||||
taskProcessRecordService.deleteTaskProcessRecordsByTaskId(task.getId());
|
||||
taskCommentService.deleteTaskCommensByTaskId(task.getId());
|
||||
}
|
||||
return resultTaskMapper.deleteResultTasksByDetailId(detailId);
|
||||
}
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
package com.lz.modules.performance.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lz.modules.performance.dao.TaskCommentMapper;
|
||||
import com.lz.modules.performance.entity.TaskComment;
|
||||
import com.lz.modules.performance.service.TaskCommentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务评论表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-12-08
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class TaskCommentServiceImpl extends ServiceImpl<TaskCommentMapper, TaskComment> implements TaskCommentService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private TaskCommentMapper taskCommentMapper;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TaskComment selectTaskCommentById(Long id){
|
||||
return taskCommentMapper.selectTaskCommentById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertTaskComment(TaskComment taskComment){
|
||||
return taskCommentMapper.insertTaskComment(taskComment);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateTaskCommentById(TaskComment taskComment){
|
||||
return taskCommentMapper.updateTaskCommentById(taskComment);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverTaskCommentById(TaskComment taskComment){
|
||||
return taskCommentMapper.updateCoverTaskCommentById(taskComment);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteTaskCommentById(Long id){
|
||||
return taskCommentMapper.deleteTaskCommentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteTaskCommensByTaskId(Long taskId){
|
||||
return taskCommentMapper.deleteTaskCommensByTaskId(taskId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskComment selectTaskCommentByDetailId(Long detailId){
|
||||
return taskCommentMapper.selectTaskCommentByDetailId(detailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskComment selectTaskCommentByTaskId(Long taskId){
|
||||
return taskCommentMapper.selectTaskCommentByTaskId(taskId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.model.TaskModel;
|
||||
@ -21,6 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
@ -97,7 +99,7 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
||||
if(CollectionUtils.isNotEmpty(resultTaskDtos)){
|
||||
List<Long> collect = resultTaskDtos.stream().map(resultTaskDto -> resultTaskDto.getId()).collect(Collectors.toList());
|
||||
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIds(page, collect,req.getUseType())
|
||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIdsAndType(page, collect,req.getUseType())
|
||||
);
|
||||
}
|
||||
|
||||
@ -140,4 +142,14 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
||||
public List<TaskProcessRecord> selectByCondition(IPage page, TaskModel taskModel) {
|
||||
return taskProcessRecordMapper.selectByCondition(page,taskModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskProcessRecord selectCommentTaskProcessRecordByDetailId(Long detailId){
|
||||
return taskProcessRecordMapper.selectCommentTaskProcessRecordByDetailId(detailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskProcessRecord selectCommentTaskProcessRecordByTaskId(Long taskId){
|
||||
return taskProcessRecordMapper.selectCommentTaskProcessRecordByTaskId(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.lz.modules.performance.dao.TaskCommentMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.lz.modules.performance.entity.TaskComment">
|
||||
<id column="id" property="id"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="task_id" property="taskId"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="detail_id" property="detailId"/>
|
||||
<result column="result_record_id" property="resultRecordId"/>
|
||||
<result column="staff_id" property="staffId"/>
|
||||
<result column="content" property="content"/>
|
||||
<result column="staff_name" property="staffName"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, task_id AS taskId, type AS type, detail_id AS detailId, result_record_id AS resultRecordId, staff_id AS staffId, content AS content, staff_name AS staffName
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectTaskCommentById" resultType="TaskComment" >
|
||||
select * from lz_task_comment where id=#{id} and is_delete = 0 limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertTaskComment" parameterType="TaskComment" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into lz_task_comment(
|
||||
<if test="taskId != null">task_id, </if>
|
||||
<if test="type != null">type, </if>
|
||||
<if test="detailId != null">detail_id, </if>
|
||||
<if test="resultRecordId != null">result_record_id, </if>
|
||||
<if test="staffId != null">staff_id, </if>
|
||||
<if test="content != null">content, </if>
|
||||
<if test="staffName != null">staff_name, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
)values(
|
||||
<if test="taskId != null">#{ taskId}, </if>
|
||||
<if test="type != null">#{ type}, </if>
|
||||
<if test="detailId != null">#{ detailId}, </if>
|
||||
<if test="resultRecordId != null">#{ resultRecordId}, </if>
|
||||
<if test="staffId != null">#{ staffId}, </if>
|
||||
<if test="content != null">#{ content}, </if>
|
||||
<if test="staffName != null">#{ staffName}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateTaskCommentById" parameterType="TaskComment" >
|
||||
update
|
||||
lz_task_comment
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="detailId != null">detail_id = #{detailId},</if>
|
||||
<if test="resultRecordId != null">result_record_id = #{resultRecordId},</if>
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="staffName != null">staff_name = #{staffName}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateCoverTaskCommentById" parameterType="TaskComment" >
|
||||
update
|
||||
lz_task_comment
|
||||
set
|
||||
is_delete = #{isDelete},
|
||||
gmt_create = #{gmtCreate},
|
||||
task_id = #{taskId},
|
||||
type = #{type},
|
||||
detail_id = #{detailId},
|
||||
result_record_id = #{resultRecordId},
|
||||
staff_id = #{staffId},
|
||||
content = #{content},
|
||||
staff_name = #{staffName}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectByCondition" resultType="com.lz.modules.performance.entity.TaskComment">
|
||||
select * from lz_task_comment where is_delete = 0
|
||||
and (detail_id = #{taskModel.detailId} or task_id=#{taskModel.taskId} )
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<update id="deleteTaskCommentById" parameterType="java.lang.Long">
|
||||
update lz_task_comment set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
<update id="deleteTaskCommensByTaskId" parameterType="java.lang.Long">
|
||||
update lz_task_comment set is_delete = 1 where task_id=#{taskId}
|
||||
</update>
|
||||
|
||||
<select id="selectTaskCommentByTaskId" resultType="TaskComment" >
|
||||
select * from lz_task_comment where task_id=#{taskId} and is_delete = 0 order by id desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectTaskCommentByDetailId" resultType="TaskComment" >
|
||||
select * from lz_task_comment where detail_id=#{detailId} and is_delete = 0 order by id desc limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -131,7 +131,11 @@
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
<update id="deleteTaskProcessRecordsByTaskId" parameterType="java.lang.Long">
|
||||
@ -139,12 +143,16 @@
|
||||
</update>
|
||||
|
||||
<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 id="selectTaskProcessRecordsByTaskIds" 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 id="selectTaskProcessRecordsByTaskIdsAndType" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0
|
||||
<if test="useType !=null">
|
||||
and use_type = #{useType}
|
||||
</if>
|
||||
and task_id in
|
||||
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
||||
#{taskId}
|
||||
@ -157,6 +165,16 @@
|
||||
select * from lz_task_process_record where is_delete = 0 and (detail_id = #{taskModel.detailId} or task_id=#{taskModel.taskId} ) and use_type=#{taskModel.useType} order by id desc
|
||||
</select>
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<select id="selectCommentTaskProcessRecordByDetailId" resultType="TaskProcessRecord" >
|
||||
select * from lz_task_process_record where detail_id=#{detailId} and is_delete = 0 and use_type=1 order by id desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectCommentTaskProcessRecordByTaskId" resultType="TaskProcessRecord" >
|
||||
select * from lz_task_process_record where task_id=#{taskId} and is_delete = 0 and use_type=1 order by id desc limit 1
|
||||
</select>
|
||||
|
||||
>>>>>>> 0759c9bb2ac2d85becab14db3150110f2bf20e63
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user