Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
杜建超 2020-12-10 10:05:35 +08:00
commit 3c1607e1ec
15 changed files with 250 additions and 62 deletions

View File

@ -562,7 +562,8 @@ public class ResultRecordController extends AbstractController {
) { ) {
//下面设置计算公式 //下面设置计算公式
dto.setCalculate(setCalculateValue(calculateModels1, dto)) ; dto.setCalculate(setCalculateValue(calculateModels1, dto)) ;
List<ResultTask> resultTasks = resultTaskService.selectResultTasksByDetailId(dto.getId()); List<ResultTaskDto> resultTaskDtos = resultTaskService.selectResultTaskDtosByDetailId(dto.getId());
dto.setTaskDtos(resultTaskDtos);
weight = weight.add(dto.getCheckWeight()); weight = weight.add(dto.getCheckWeight());
if(scoreDtos.size() > 0){ if(scoreDtos.size() > 0){
//获取评分详细 //获取评分详细
@ -1454,4 +1455,12 @@ public class ResultRecordController extends AbstractController {
return R.ok(); return R.ok();
} }
} }

View File

@ -10,6 +10,7 @@ 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.enums.RoleEnums; import com.lz.modules.app.enums.RoleEnums;
import com.lz.modules.app.model.RoleModel; import com.lz.modules.app.model.RoleModel;
import com.lz.modules.app.model.TaskModel;
import com.lz.modules.app.resp.StaffRoleModel; import com.lz.modules.app.resp.StaffRoleModel;
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;
@ -23,6 +24,7 @@ import com.lz.modules.flow.service.RecordRoleService;
import com.lz.modules.flow.service.StaffRoleDepartmentService; import com.lz.modules.flow.service.StaffRoleDepartmentService;
import com.lz.modules.flow.service.StaffRoleEvaluationGroupService; import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
import com.lz.modules.flow.service.StaffRoleService; import com.lz.modules.flow.service.StaffRoleService;
import com.lz.modules.sys.controller.AbstractController;
import com.lz.modules.sys.entity.SysMenuEntity; import com.lz.modules.sys.entity.SysMenuEntity;
import com.lz.modules.sys.entity.SysRoleEntity; import com.lz.modules.sys.entity.SysRoleEntity;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -48,7 +50,7 @@ import java.util.stream.Collectors;
@RestController @RestController
@RequestMapping("user/lzstaffrole") @RequestMapping("user/lzstaffrole")
@Api(tags = "考评组管理员管理") @Api(tags = "考评组管理员管理")
public class StaffRoleController { public class StaffRoleController extends AbstractController {
@Autowired @Autowired
private StaffRoleService staffRoleService; private StaffRoleService staffRoleService;
@ -252,4 +254,25 @@ public class StaffRoleController {
return staffRoleService.delete(roleModel); return staffRoleService.delete(roleModel);
} }
// http://localhost:8080/lz_management/user/lzstaffrole/task/comment?taskId=1&content=xxx&staffId=294
@RequestMapping("/task/comment")
public R taskComment(TaskModel taskModel) {
if(taskModel.getStaffId() == null && getUser()!=null && getUserId() !=null){
taskModel.setStaffId(getUserId());
}
return staffRoleService.taskComment(taskModel);
}
//http://localhost:8080/lz_management/user/lzstaffrole/comment/list?detailId=4917&pageSize=2
@RequestMapping("/comment/list")
public R commentList(TaskModel taskModel) {
if(taskModel.getStaffId() == null && getUser()!=null && getUserId() !=null){
taskModel.setStaffId(getUserId());
}
return staffRoleService.commentList(taskModel);
}
} }

View File

@ -15,6 +15,7 @@ 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.enums.ResultRecordStatusEnum; import com.lz.modules.app.enums.ResultRecordStatusEnum;
import com.lz.modules.app.enums.RoleEnums; import com.lz.modules.app.enums.RoleEnums;
import com.lz.modules.app.model.TaskModel;
import com.lz.modules.app.resp.Step; import com.lz.modules.app.resp.Step;
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;
@ -306,7 +307,7 @@ public class TestController {
} }
// 重置http://localhost:8080/lz_management/test/approval?resultRecordId=3682&status=9&menuName=cccc&flowRecordId=33919&resetFlag=0 // 重置http://localhost:8080/lz_management/test/approval?resultRecordId=3702&status=9&menuName=cccc&flowRecordId=33987&resetFlag=0
@RequestMapping("/test/approval") @RequestMapping("/test/approval")
public R approval(ApprovalDto approvalDto) { public R approval(ApprovalDto approvalDto) {
try { try {
@ -315,4 +316,19 @@ public class TestController {
return R.error(e.getMessage()); return R.error(e.getMessage());
} }
} }
// http://localhost:8080/lz_management/test/task/comment?taskId=1&content=xxx&staffId=294
@RequestMapping("/test/task/comment")
public R taskComment(TaskModel taskModel) {
return staffRoleService.taskComment(taskModel);
}
//http://localhost:8080/lz_management/test/comment/list?detailId=4917&pageSize=2
@RequestMapping("/test/comment/list")
public R commentList(TaskModel taskModel) {
return staffRoleService.commentList(taskModel);
}
} }

View File

@ -0,0 +1,9 @@
package com.lz.modules.app.dto;
import com.lz.modules.performance.entity.TaskComment;
import lombok.Data;
@Data
public class TaskCommentDto extends TaskComment {
private int isSelf;
}

View File

@ -0,0 +1,14 @@
package com.lz.modules.app.model;
import lombok.Data;
@Data
public class TaskModel {
private int currPage = 1;
private int pageSize = 10;
private Long taskId;
private Long detailId;
private String content;
private Long staffId;
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.common.utils.PageUtils; import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R; import com.lz.common.utils.R;
import com.lz.modules.app.model.RoleModel; import com.lz.modules.app.model.RoleModel;
import com.lz.modules.app.model.TaskModel;
import com.lz.modules.flow.entity.StaffRole; import com.lz.modules.flow.entity.StaffRole;
import com.lz.modules.sys.entity.SysMenuEntity; import com.lz.modules.sys.entity.SysMenuEntity;
import com.lz.modules.sys.entity.SysRoleEntity; import com.lz.modules.sys.entity.SysRoleEntity;
@ -76,4 +77,7 @@ public interface StaffRoleService extends IService<StaffRole> {
StaffRole selectStaffRolesByStaffIdDepartmentLevelList(Long loginUserId, List<String> asList); StaffRole selectStaffRolesByStaffIdDepartmentLevelList(Long loginUserId, List<String> asList);
R taskComment(TaskModel roleModel);
R commentList(TaskModel taskModel);
} }

View File

@ -9,10 +9,7 @@ import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil; import com.lz.common.utils.StringUtil;
import com.lz.modules.app.dao.DepartmentsDao; import com.lz.modules.app.dao.DepartmentsDao;
import com.lz.modules.app.dao.StaffDao; import com.lz.modules.app.dao.StaffDao;
import com.lz.modules.app.dto.EvaluationGroupInfo; import com.lz.modules.app.dto.*;
import com.lz.modules.app.dto.StaffRoleDetailInfo;
import com.lz.modules.app.dto.StaffRoleInfo;
import com.lz.modules.app.dto.StaffRoleResp;
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;
@ -21,6 +18,7 @@ import com.lz.modules.app.enums.EvaluationGroupEnums;
import com.lz.modules.app.enums.RoleEnums; import com.lz.modules.app.enums.RoleEnums;
import com.lz.modules.app.enums.RoleMenuEnums; import com.lz.modules.app.enums.RoleMenuEnums;
import com.lz.modules.app.model.RoleModel; import com.lz.modules.app.model.RoleModel;
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.flow.dao.RecordRoleMapper; import com.lz.modules.flow.dao.RecordRoleMapper;
@ -28,8 +26,16 @@ import com.lz.modules.flow.dao.StaffRoleDepartmentMapper;
import com.lz.modules.flow.dao.StaffRoleMapper; import com.lz.modules.flow.dao.StaffRoleMapper;
import com.lz.modules.flow.entity.*; import com.lz.modules.flow.entity.*;
import com.lz.modules.flow.service.*; 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.TaskComment;
import com.lz.modules.performance.service.ResultTaskService;
import com.lz.modules.performance.service.TaskCommentService;
import com.lz.modules.sys.entity.SysMenuEntity; import com.lz.modules.sys.entity.SysMenuEntity;
import com.lz.modules.sys.entity.SysRoleEntity; import com.lz.modules.sys.entity.SysRoleEntity;
import com.lz.modules.sys.entity.app.ResultDetail;
import com.lz.modules.sys.service.app.ResultDetailService;
import com.lz.modules.sys.service.app.ResultRecordService; import com.lz.modules.sys.service.app.ResultRecordService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
@ -98,6 +104,21 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
private RecordAuthService recordAuthService; private RecordAuthService recordAuthService;
@Autowired
private ResultTaskService resultTaskService;
@Autowired
private ResultDetailService resultDetailService;
@Autowired
private TaskCommentService taskCommentService;
@Autowired
private DingtalkBusiness dingtalkBusiness;
@Autowired
private TaskCommentMapper taskCommentMapper;
@Override @Override
public StaffRole selectStaffRoleById(Long id) { public StaffRole selectStaffRoleById(Long id) {
return staffRoleMapper.selectStaffRoleById(id); return staffRoleMapper.selectStaffRoleById(id);
@ -595,4 +616,52 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
return staffRoleMapper.selectStaffRolesByStaffIdDepartmentLevelList(staffId, departmentLevels); return staffRoleMapper.selectStaffRolesByStaffIdDepartmentLevelList(staffId, departmentLevels);
} }
@Override
public R taskComment(TaskModel roleModel) {
if (roleModel.getDetailId() == null && roleModel.getTaskId() == null) {
return R.error("detailId和taskId不能同时为空");
}
TaskComment taskComment = new TaskComment();
taskComment.setContent(roleModel.getContent());
taskComment.setTaskId(roleModel.getTaskId());
if (roleModel.getTaskId() != null) {
ResultTask resultTask = resultTaskService.selectResultTaskById(roleModel.getTaskId());
taskComment.setDetailId(resultTask.getDetailId());
taskComment.setType(1);
} else {
taskComment.setDetailId(roleModel.getDetailId());
taskComment.setType(0);//
}
ResultDetail resultDetail = resultDetailService.selectResultDetailById(taskComment.getDetailId());
taskComment.setResultRecordId(resultDetail.getRecordId());
StaffEntity staffEntity = staffDao.selectStaffById(roleModel.getStaffId());
if (staffEntity != null) {
taskComment.setStaffId(staffEntity.getId());
taskComment.setStaffName(staffEntity.getName());
}
taskCommentService.insertTaskComment(taskComment);
dingtalkBusiness.sendTaskNoticeMsg(taskComment.getDetailId(), taskComment.getTaskId());
return R.ok();
}
@Override
public R commentList(TaskModel taskModel) {
PageUtils pageUtils = PageUtils.startPage(taskModel.getCurrPage(), taskModel.getPageSize()).doSelect(
page -> taskCommentMapper.selectByCondition(page, taskModel)
);
List<TaskComment> taskComments = pageUtils.getList();
List<TaskCommentDto> taskCommentDtoList = new ArrayList<>();
for (TaskComment taskComment : taskComments) {
TaskCommentDto taskCommentDto = new TaskCommentDto();
BeanUtils.copyProperties(taskComment, taskCommentDto);
if(taskComment.getStaffId().equals(taskModel.getStaffId())){
taskCommentDto.setIsSelf(1);
}
taskCommentDtoList.add(taskCommentDto);
}
pageUtils.setList(taskCommentDtoList);
return R.ok().put("data", pageUtils);
}
} }

View File

@ -646,6 +646,7 @@ public class DingtalkBusiness {
} }
public String sendTaskNoticeMsg(Long detailId, Long taskId) { public String sendTaskNoticeMsg(Long detailId, Long taskId) {
return "OK"; return "OK";
} }
public String sendNoticeMsg(ResultRecord lzResultRecord, List<StaffEntity> staffs) { public String sendNoticeMsg(ResultRecord lzResultRecord, List<StaffEntity> staffs) {

View File

@ -8,9 +8,14 @@ package com.lz.modules.performance.dao;
* @since 2020-12-08 * @since 2020-12-08
*/ */
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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 com.lz.modules.performance.entity.TaskComment;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper @Mapper
public interface TaskCommentMapper extends BaseMapper<TaskComment> { public interface TaskCommentMapper extends BaseMapper<TaskComment> {
@ -31,4 +36,6 @@ public interface TaskCommentMapper extends BaseMapper<TaskComment> {
int deleteTaskCommensByTaskId(@Param("taskId") Long taskId); int deleteTaskCommensByTaskId(@Param("taskId") Long taskId);
List<TaskComment> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
} }

View File

@ -44,4 +44,5 @@ public interface ResultTaskService extends IService<ResultTask> {
List<ResultTask> selectResultTasksByDetailId(Long detailId); List<ResultTask> selectResultTasksByDetailId(Long detailId);
void deleteTask(Long taskId); void deleteTask(Long taskId);
List<ResultTaskDto> selectResultTaskDtosByDetailId(Long detailId);
} }

View File

@ -227,4 +227,9 @@ public class ResultTaskServiceImpl extends ServiceImpl<ResultTaskMapper, ResultT
taskProcessRecord.setLabel("" +resultTask.getName() + "任务删除"); taskProcessRecord.setLabel("" +resultTask.getName() + "任务删除");
taskProcessRecordService.insertTaskProcessRecord(taskProcessRecord); taskProcessRecordService.insertTaskProcessRecord(taskProcessRecord);
} }
@Override
public List<ResultTaskDto> selectResultTaskDtosByDetailId(Long detailId){
return resultTaskMapper.selectResultTaskDtosByDetailId(detailId);
}
} }

View File

@ -942,16 +942,19 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
private R resetNode(ApprovalDto approvalDto) { private R resetNode(ApprovalDto approvalDto) {
FlowRecord f = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId()); FlowRecord f = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdGeFlowIndex(f.getRecordId(),f.getFlowIndex()); List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdGeFlowIndex(f.getRecordId(),f.getFlowIndex());
boolean flag = false ;
for(FlowRecord flowRecord:flowRecords){ for(FlowRecord flowRecord:flowRecords){
// 如果结果录入己经走了 // 如果结果录入己经走了
if (new Integer(2).equals(flowRecord.getFlowProcess()) && (flowRecord.getStatus() == 1 || flowRecord.getStatus() == 4) ) { if (new Integer(2).equals(flowRecord.getFlowProcess()) && (flowRecord.getStatus() == 1 || flowRecord.getStatus() == 4) ) {
flowRecord.setStatus(4); //表示流程己经被重置 flowRecord.setStatus(4); //表示流程己经被重置
flag = true;
}else{ }else{
flowRecord.setStatus(0); //表示流程己经被重置 flowRecord.setStatus(0); //表示流程己经被重置
} }
flowRecordService.updateFlowRecordById(flowRecord); flowRecordService.updateFlowRecordById(flowRecord);
} }
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMinIdStatusList(f.getRecordId(), f.getFlowIndex() - 1, Arrays.asList(1, 2));
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMinIdStatusList(f.getRecordId(), f.getFlowIndex(), Arrays.asList(1, 2,4));
List<FlowRecord> runing = new ArrayList<>(); List<FlowRecord> runing = new ArrayList<>();
if (preFlowRecord != null) { if (preFlowRecord != null) {
runing = flowRecordService.selectFlowRecordByRecordIdFlowIndex(f.getRecordId(), preFlowRecord.getFlowIndex()); runing = flowRecordService.selectFlowRecordByRecordIdFlowIndex(f.getRecordId(), preFlowRecord.getFlowIndex());
@ -962,13 +965,28 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
r.setStatus(2); r.setStatus(2);
flowRecordService.updateFlowRecordById(r); flowRecordService.updateFlowRecordById(r);
} }
if(flag) { //如果录入己经走了设置新的数据结果录入己走
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(f.getRecordId());
for(int i = 0 ;i < newflowRecords.size() ; i ++){
FlowRecord newFlowRecord = newflowRecords.get(i) ;
if (new Integer(2).equals(newFlowRecord.getFlowProcess()) ) {
newFlowRecord.setStatus(4);
flowRecordService.updateFlowRecordById(newFlowRecord);
}
}
}
return R.ok(); return R.ok();
} }
private R resetAll(ApprovalDto approvalDto) { private R resetAll(ApprovalDto approvalDto) {
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId()); FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecord.getRecordId()); Long flowRecordId = approvalDto.getResultRecordId();
if(flowRecord != null ){
flowRecordId = flowRecord.getRecordId();
}
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecordId);
List<Long> flowRecordIds =new ArrayList<>(); List<Long> flowRecordIds =new ArrayList<>();
boolean flag = false ; boolean flag = false ;
for(FlowRecord f: flowRecords){ for(FlowRecord f: flowRecords){
@ -978,9 +996,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flag = true; flag = true;
} }
} }
flowRecordService.deleteFlowRecordByRecordId(flowRecord.getRecordId()); flowRecordService.deleteFlowRecordByRecordId(flowRecordId);
initFlowRecord(flowRecord.getRecordId()); initFlowRecord(flowRecordId);
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecord.getRecordId()); List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecordId);
for(int i = 0 ;i < newflowRecords.size() ; i ++){ for(int i = 0 ;i < newflowRecords.size() ; i ++){
flowRecordService.updateFlowRecordIdById(newflowRecords.get(i).getId(),flowRecordIds.get(i)); flowRecordService.updateFlowRecordIdById(newflowRecords.get(i).getId(),flowRecordIds.get(i));
if(flag ){ //如果录入己经走了设置新的数据结果录入己走 if(flag ){ //如果录入己经走了设置新的数据结果录入己走
@ -991,7 +1009,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
} }
} }
} }
resultRecordService.resetData(flowRecord.getRecordId(),approvalDto.getClearFlag()); resultRecordService.resetData(flowRecordId,approvalDto.getClearFlag());
return R.ok(); return R.ok();
} }
@ -1440,6 +1458,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
int flowIndex = 0; int flowIndex = 0;
List<ResetDataResp> resetDataResps = new ArrayList<>(); List<ResetDataResp> resetDataResps = new ArrayList<>();
for (FlowRecord flowRecord : flowRecords) { for (FlowRecord flowRecord : flowRecords) {
if(new Integer(2).equals(flowRecord.getFlowProcess())){ //过虑掉flowProcess
continue;
}
if (flowRecord.getFlowIndex().equals(flowIndex - 1)) { //表示有重复数据 if (flowRecord.getFlowIndex().equals(flowIndex - 1)) { //表示有重复数据
ResetDataResp resetDataResp = resetDataResps.get(flowIndex - 1); ResetDataResp resetDataResp = resetDataResps.get(flowIndex - 1);
resetDataResp.getStaffNames().add(flowRecord.getApprovalStaffName()); resetDataResp.getStaffNames().add(flowRecord.getApprovalStaffName());
@ -1463,7 +1484,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
log.info("需要删除指标个数{}", resultDetails.size()); log.info("需要删除指标个数{}", resultDetails.size());
if(resultDetails.size() > 0){ if(resultDetails.size() > 0){
if(clearFlag == 1){ if(clearFlag == 0){
log.info("全部清空,删除所有指标即可"); log.info("全部清空,删除所有指标即可");
resultDetailService.deleteResultDetailByRecordId(recordId); resultDetailService.deleteResultDetailByRecordId(recordId);
for(ResultDetail detail : resultDetails){ for(ResultDetail detail : resultDetails){

View File

@ -327,7 +327,7 @@
</select> </select>
<select id="selectFlowRecordByRecordIdGeFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord"> <select id="selectFlowRecordByRecordIdGeFlowIndex" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index >= #{flowIndex} select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index > #{flowIndex}
</select> </select>
@ -335,9 +335,10 @@
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index <![CDATA[<=]]> #{flowIndex} select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and flow_index <![CDATA[<=]]> #{flowIndex}
</select> </select>
<select id="selectPreFlowRecordByRecordIdMinIdStatusList" resultType="com.lz.modules.flow.entity.FlowRecord"> <select id="selectPreFlowRecordByRecordIdMinIdStatusList" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and flow_index <![CDATA[<=]]> #{flowIndex} select * from lz_flow_record where is_delete = 0 and flow_index <![CDATA[<=]]> #{flowIndex}
and record_id = #{recordId} and record_id = #{recordId} and flow_process !=2
and status in and status in
<foreach item="item" collection="statusList" open="(" separator="," close=")"> <foreach item="item" collection="statusList" open="(" separator="," close=")">
#{item} #{item}

View File

@ -93,7 +93,7 @@
</update> </update>
<select id="selectResultTaskDtosByDetailId" resultType="com.lz.modules.performance.dto.ResultTaskDto" > <select id="selectResultTaskDtosByDetailId" resultType="com.lz.modules.performance.dto.ResultTaskDto" >
select name,process_rate from lz_result_task where detail_id=#{detailId} and is_delete = 0 order by order_by asc select id, is_delete, name,process_rate from lz_result_task where detail_id=#{detailId} and is_delete = 0 order by order_by asc
</select> </select>
</mapper> </mapper>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lz.modules.performance.daor.TaskCommentMapper"> <mapper namespace="com.lz.modules.performance.dao.TaskCommentMapper">
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.performance.entity.TaskComment"> <resultMap id="BaseResultMap" type="com.lz.modules.performance.entity.TaskComment">
@ -95,11 +95,19 @@
</update> </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 id="deleteTaskCommentById" parameterType="java.lang.Long">
update lz_task_comment set is_delete = 1 where id=#{id} limit 1 update lz_task_comment set is_delete = 1 where id=#{id} limit 1
</update> </update>
<update id="deleteTaskCommentById" parameterType="java.lang.Long"> <update id="deleteTaskCommensByTaskId" parameterType="java.lang.Long">
update lz_task_comment set is_delete = 1 where task_id=#{taskId} update lz_task_comment set is_delete = 1 where task_id=#{taskId}
</update> </update>