|
|
|
@ -1,13 +1,30 @@
|
|
|
|
|
package com.bs.ct.controller;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.bs.cm.domain.CmAttach;
|
|
|
|
|
import com.bs.cm.service.ICmAttachService;
|
|
|
|
|
import com.bs.common.core.domain.entity.SysDept;
|
|
|
|
|
import com.bs.common.core.domain.entity.SysUser;
|
|
|
|
|
import com.bs.common.exception.UtilException;
|
|
|
|
|
import com.bs.ct.domain.CtTaskFeedback;
|
|
|
|
|
import com.bs.ct.domain.CtTaskInfo;
|
|
|
|
|
import com.bs.ct.service.ICtTaskFeedbackService;
|
|
|
|
|
import com.bs.ct.service.ICtTaskInfoService;
|
|
|
|
|
import com.bs.ct.vo.CtTaskBranchVO;
|
|
|
|
|
import com.bs.ct.vo.MyTaskVO;
|
|
|
|
|
import com.bs.system.service.ISysDeptService;
|
|
|
|
|
import com.bs.system.service.ISysUserService;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@ -44,6 +61,14 @@ public class CtTaskBranchController extends BaseController {
|
|
|
|
|
private ICtTaskBranchService ctTaskBranchService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysUserService userService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ICtTaskInfoService ctTaskInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysDeptService deptService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ICtTaskFeedbackService ctTaskFeedbackService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ICmAttachService cmAttachService;
|
|
|
|
|
/**
|
|
|
|
|
* 分页查询任务机构信息列表
|
|
|
|
|
*/
|
|
|
|
@ -57,6 +82,285 @@ public class CtTaskBranchController extends BaseController {
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页查询任务机构信息列表
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("分页查询任务机构信息列表")
|
|
|
|
|
@GetMapping("/pageListByBranch")
|
|
|
|
|
public TableDataInfo pageListByBranch(CtTaskBranch ctTaskBranch) {
|
|
|
|
|
Integer pageNum = ctTaskBranch.getPageNum() != null ? ctTaskBranch.getPageNum() : 1;
|
|
|
|
|
Integer pageSize = ctTaskBranch.getPageSize() != null ? ctTaskBranch.getPageSize() : 10;
|
|
|
|
|
List<Long> ownerDeptIds = deptService.getOwnerDeptIds();
|
|
|
|
|
if (ownerDeptIds.isEmpty()) {
|
|
|
|
|
ownerDeptIds.add(0L);
|
|
|
|
|
}
|
|
|
|
|
Long userId = getUserId();
|
|
|
|
|
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
|
|
|
|
|
condition(queryWrapper,ctTaskBranch);
|
|
|
|
|
if ((!ownerDeptIds.isEmpty() && ownerDeptIds.size() > 0) && 1 != userId && "1".equals(ctTaskBranch.getIsTask())) {
|
|
|
|
|
queryWrapper.in(CtTaskBranch::getBranchCode,ownerDeptIds);
|
|
|
|
|
}
|
|
|
|
|
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
|
|
|
|
|
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
|
|
|
|
|
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
|
|
|
|
|
setAll(list);
|
|
|
|
|
//过滤
|
|
|
|
|
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
|
|
|
|
|
Integer start = (pageNum - 1) * pageSize;
|
|
|
|
|
List<CtTaskBranch> result = ctTaskBranches.stream()
|
|
|
|
|
.skip(start) // 跳过前4条数据
|
|
|
|
|
.limit(pageSize) // 最多取6条数据
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
TableDataInfo data = getDataTable(result);
|
|
|
|
|
data.setTotal(ctTaskBranches.size());
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<CtTaskBranch> filterCtTaskBranchList(List<CtTaskBranch> list, CtTaskBranch filterParams) {
|
|
|
|
|
List<CtTaskBranch> filteredList = new ArrayList<>(list);
|
|
|
|
|
if (filterParams.getTaskType() != null && !filterParams.getTaskType().isEmpty()) {
|
|
|
|
|
filteredList = filteredList.stream()
|
|
|
|
|
.filter(item -> filterParams.getTaskType().equals(item.getTaskType()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
if (filterParams.getTaskTitle() != null && !filterParams.getTaskTitle().isEmpty()) {
|
|
|
|
|
filteredList = filteredList.stream()
|
|
|
|
|
.filter(item -> item.getTaskTitle() != null && item.getTaskTitle().contains(filterParams.getTaskTitle()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
if (filterParams.getTaskContent() != null && !filterParams.getTaskContent().isEmpty()) {
|
|
|
|
|
filteredList = filteredList.stream()
|
|
|
|
|
.filter(item -> item.getTaskContent() != null && item.getTaskContent().contains(filterParams.getTaskContent()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
if (filterParams.getTaskStatus() != null && !filterParams.getTaskStatus().isEmpty()) {
|
|
|
|
|
filteredList = filteredList.stream()
|
|
|
|
|
.filter(item -> item.getTaskStatus() != null && item.getTaskStatus().contains(filterParams.getTaskStatus()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
// 修改为使用 startDate 和 endDate 过滤
|
|
|
|
|
Date paramStartDate = filterParams.getStartDate();
|
|
|
|
|
Date paramEndDate = filterParams.getEndDate();
|
|
|
|
|
if (paramStartDate != null && paramEndDate != null) {
|
|
|
|
|
filteredList = filteredList.stream()
|
|
|
|
|
.filter(item -> {
|
|
|
|
|
Date itemStartDate = item.getStartDate();
|
|
|
|
|
Date itemEndDate = item.getEndDate();
|
|
|
|
|
return itemStartDate != null && itemEndDate != null
|
|
|
|
|
&&!itemStartDate.before(paramStartDate)
|
|
|
|
|
&&!itemEndDate.after(paramEndDate);
|
|
|
|
|
})
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
}
|
|
|
|
|
return filteredList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出任务交办列表
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("导出任务交办列表")
|
|
|
|
|
@Log(title = "任务交办导出", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PostMapping("/exportByAssigned")
|
|
|
|
|
public void exportByAssigned(HttpServletResponse response, CtTaskBranch ctTaskBranch) {
|
|
|
|
|
List<Long> ownerDeptIds = deptService.getOwnerDeptIds();
|
|
|
|
|
if (ownerDeptIds.isEmpty()) {
|
|
|
|
|
ownerDeptIds.add(0L);
|
|
|
|
|
}
|
|
|
|
|
Long userId = getUserId();
|
|
|
|
|
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
|
|
|
|
|
condition(queryWrapper,ctTaskBranch);
|
|
|
|
|
if ((!ownerDeptIds.isEmpty() && ownerDeptIds.size() > 0) && 1 != userId && "1".equals(ctTaskBranch.getIsTask())) {
|
|
|
|
|
queryWrapper.in(CtTaskBranch::getBranchCode,ownerDeptIds);
|
|
|
|
|
}
|
|
|
|
|
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
|
|
|
|
|
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
|
|
|
|
|
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
|
|
|
|
|
setAll(list);
|
|
|
|
|
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
|
|
|
|
|
List<CtTaskBranchVO> ctTaskBranchVOs = new ArrayList<>();
|
|
|
|
|
for (CtTaskBranch branch : ctTaskBranches) {
|
|
|
|
|
CtTaskBranchVO ctTaskBranchVO = new CtTaskBranchVO();
|
|
|
|
|
BeanUtils.copyProperties(branch,ctTaskBranchVO);
|
|
|
|
|
ctTaskBranchVOs.add(ctTaskBranchVO);
|
|
|
|
|
}
|
|
|
|
|
ExcelUtil<CtTaskBranchVO> util = new ExcelUtil<CtTaskBranchVO>(CtTaskBranchVO. class);
|
|
|
|
|
util.exportExcel(response, ctTaskBranchVOs, "任务交办数据");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页查询任务机构信息列表
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("分页查询任务机构信息列表")
|
|
|
|
|
@GetMapping("/pageListByUser")
|
|
|
|
|
public TableDataInfo pageListByUser(CtTaskBranch ctTaskBranch) {
|
|
|
|
|
Integer pageNum = ctTaskBranch.getPageNum() != null ? ctTaskBranch.getPageNum() : 1;
|
|
|
|
|
Integer pageSize = ctTaskBranch.getPageSize() != null ? ctTaskBranch.getPageSize() : 10;
|
|
|
|
|
String userId = String.valueOf(getUserId());
|
|
|
|
|
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
|
|
|
|
|
condition(queryWrapper,ctTaskBranch);
|
|
|
|
|
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
|
|
|
|
|
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
|
|
|
|
|
String inSqlConditionByUserId = "SELECT task_id FROM ct_task_branch WHERE del_flag = '0' and type = '人员' and user_id =" + userId;
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getId, inSqlConditionByUserId);
|
|
|
|
|
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
|
|
|
|
|
setAll(list);
|
|
|
|
|
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
|
|
|
|
|
Integer start = (pageNum - 1) * pageSize;
|
|
|
|
|
List<CtTaskBranch> result = ctTaskBranches.stream()
|
|
|
|
|
.skip(start) // 跳过前4条数据
|
|
|
|
|
.limit(pageSize) // 最多取6条数据
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
TableDataInfo data = getDataTable(result);
|
|
|
|
|
data.setTotal(ctTaskBranches.size());
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出任务交办列表
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("导出任务交办列表")
|
|
|
|
|
@Log(title = "任务交办导出", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PostMapping("/exportByUser")
|
|
|
|
|
public void exportByUser(HttpServletResponse response, CtTaskBranch ctTaskBranch) {
|
|
|
|
|
String userId = String.valueOf(getUserId());
|
|
|
|
|
LambdaQueryWrapper<CtTaskBranch> queryWrapper = new LambdaQueryWrapper();
|
|
|
|
|
condition(queryWrapper,ctTaskBranch);
|
|
|
|
|
queryWrapper.orderByDesc(CtTaskBranch::getCreateTime);
|
|
|
|
|
String inSqlCondition = "SELECT id FROM ct_task_info WHERE del_flag = '0'";
|
|
|
|
|
String inSqlConditionByUserId = "SELECT task_id FROM ct_task_branch WHERE del_flag = '0' and type = '人员' and user_id =" + userId;
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getTaskId, inSqlCondition);
|
|
|
|
|
queryWrapper.inSql(CtTaskBranch::getId, inSqlConditionByUserId);
|
|
|
|
|
List<CtTaskBranch> list = ctTaskBranchService.list(queryWrapper);
|
|
|
|
|
setAll(list);
|
|
|
|
|
List<CtTaskBranch> ctTaskBranches = filterCtTaskBranchList(list,ctTaskBranch);
|
|
|
|
|
List<MyTaskVO> ctTaskBranchVOs = new ArrayList<>();
|
|
|
|
|
for (CtTaskBranch branch : ctTaskBranches) {
|
|
|
|
|
MyTaskVO ctTaskBranchVO = new MyTaskVO();
|
|
|
|
|
BeanUtils.copyProperties(branch,ctTaskBranchVO);
|
|
|
|
|
ctTaskBranchVOs.add(ctTaskBranchVO);
|
|
|
|
|
}
|
|
|
|
|
ExcelUtil<MyTaskVO> util = new ExcelUtil<MyTaskVO>(MyTaskVO. class);
|
|
|
|
|
util.exportExcel(response, ctTaskBranchVOs, "我的任务");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setAll(List<CtTaskBranch> list) {
|
|
|
|
|
List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
|
|
|
|
Map<Long, String> deptMap = depts.stream()
|
|
|
|
|
.collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
|
|
|
|
Map<Long, Long> deptMapByParent = depts.stream()
|
|
|
|
|
.collect(Collectors.toMap(SysDept::getDeptId, SysDept::getParentId));
|
|
|
|
|
for (CtTaskBranch taskOtherBranch : list) {
|
|
|
|
|
Long branchCode = Long.valueOf(taskOtherBranch.getBranchCode());
|
|
|
|
|
Long branchCodeParent = deptMapByParent.get(branchCode);
|
|
|
|
|
String branchNameParent = deptMap.get(branchCodeParent);
|
|
|
|
|
taskOtherBranch.setBranchNameParent(branchNameParent);
|
|
|
|
|
CtTaskInfo byId = ctTaskInfoService.getById(taskOtherBranch.getTaskId());
|
|
|
|
|
if (null != byId) {
|
|
|
|
|
taskOtherBranch.setStatus(byId.getStatus());
|
|
|
|
|
taskOtherBranch.setTaskType(byId.getTaskType());
|
|
|
|
|
taskOtherBranch.setTaskTitle(byId.getTaskTitle());
|
|
|
|
|
taskOtherBranch.setTaskContent(byId.getTaskContent());
|
|
|
|
|
taskOtherBranch.setTaskDate(byId.getTaskDate());
|
|
|
|
|
taskOtherBranch.setSdTaskOther(byId);
|
|
|
|
|
}
|
|
|
|
|
List<CtTaskFeedback> feedbackListByCreateTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
|
|
|
|
|
.eq(CtTaskFeedback::getTaskBranchId, taskOtherBranch.getId())
|
|
|
|
|
.ne(CtTaskFeedback::getStatus, 0)
|
|
|
|
|
.orderByDesc(CtTaskFeedback::getCreateTime));
|
|
|
|
|
// 如果根据创建时间查询到的反馈列表不为空且至少有一个元素
|
|
|
|
|
if (!feedbackListByCreateTime.isEmpty() && feedbackListByCreateTime.size() > 0) {
|
|
|
|
|
// 将该列表中的第一个元素(因为是倒序排列,所以是最新的一条)设置到当前 SdTaskOtherBranch 对象中
|
|
|
|
|
taskOtherBranch.setSdTaskOtherFeedbackByCreate(feedbackListByCreateTime.get(0));
|
|
|
|
|
}
|
|
|
|
|
List<CtTaskFeedback> feedbackListByFeedbackTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
|
|
|
|
|
.eq(CtTaskFeedback::getTaskId, taskOtherBranch.getId())
|
|
|
|
|
.eq(CtTaskFeedback::getStatus, 1)
|
|
|
|
|
.orderByDesc(CtTaskFeedback::getFeedbackTime));
|
|
|
|
|
// 如果根据反馈时间查询到的反馈列表不为空且至少有一个元素
|
|
|
|
|
if (!feedbackListByFeedbackTime.isEmpty() && feedbackListByFeedbackTime.size() > 0) {
|
|
|
|
|
// 将该列表中的第一个元素(因为是倒序排列,所以是最新的一条)设置到当前 SdTaskOtherBranch 对象中
|
|
|
|
|
taskOtherBranch.setSdTaskOtherFeedbackByFeedback(feedbackListByFeedbackTime.get(0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (CtTaskBranch taskInfo : list) {
|
|
|
|
|
if (null != taskInfo.getSdTaskOther()) {
|
|
|
|
|
CtTaskInfo sdTaskOther = taskInfo.getSdTaskOther();
|
|
|
|
|
List<CmAttach> cmAttachList = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId,sdTaskOther.getFileId()));
|
|
|
|
|
taskInfo.setTaskInitiator(sdTaskOther.getTaskInitiator());
|
|
|
|
|
sdTaskOther.setFile(cmAttachList);
|
|
|
|
|
Date startDate = sdTaskOther.getStartDate();
|
|
|
|
|
Date endDate = sdTaskOther.getEndDate();
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
|
|
|
|
// 转换日期为字符串
|
|
|
|
|
String startDateStr = sdf.format(startDate);
|
|
|
|
|
String endDateStr = sdf.format(endDate);
|
|
|
|
|
taskInfo.setStartDate(startDate);
|
|
|
|
|
taskInfo.setEndDate(endDate);
|
|
|
|
|
taskInfo.setStartToEndDate(startDateStr + "-" + endDateStr);
|
|
|
|
|
String deptName = deptMap.get(sdTaskOther.getDeptId());
|
|
|
|
|
taskInfo.setDeptName(deptName);
|
|
|
|
|
if ("1".equals(taskInfo.getStatus()) || "0".equals(taskInfo.getStatus())) {
|
|
|
|
|
//未完成0
|
|
|
|
|
taskInfo.setTaskStatus("0");
|
|
|
|
|
// 获取当前日期
|
|
|
|
|
Date currentDate = new Date();
|
|
|
|
|
if (endDate.compareTo(currentDate) < 0) {
|
|
|
|
|
//已逾期1
|
|
|
|
|
taskInfo.setTaskStatus("1");
|
|
|
|
|
}
|
|
|
|
|
} else if ("2".equals(taskInfo.getStatus())) {
|
|
|
|
|
//已完成
|
|
|
|
|
taskInfo.setTaskStatus("2");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<CtTaskBranch> ctTaskBranches = ctTaskBranchService.list(new LambdaQueryWrapper<CtTaskBranch>()
|
|
|
|
|
.eq(CtTaskBranch::getTaskId,taskInfo.getId())
|
|
|
|
|
.eq(CtTaskBranch::getType,"人员"));
|
|
|
|
|
String transactDeptNames = "";
|
|
|
|
|
String transactInitiator = "";
|
|
|
|
|
String transactBranchNames = "";
|
|
|
|
|
if (null != ctTaskBranches) {
|
|
|
|
|
List<String> deptNameList = new ArrayList<>();
|
|
|
|
|
List<String> parentDeptNameList = new ArrayList<>();
|
|
|
|
|
List<String> userNameList = new ArrayList<>();
|
|
|
|
|
List<String> userIdList = new ArrayList<>();
|
|
|
|
|
for (CtTaskBranch ctTaskBranchesItem : ctTaskBranches) {
|
|
|
|
|
String deptNameVo = deptMap.get(Long.valueOf(ctTaskBranchesItem.getBranchCode()));
|
|
|
|
|
Long parentTaskId = deptMapByParent.get(Long.valueOf(ctTaskBranchesItem.getBranchCode()));
|
|
|
|
|
String parentDeptName = deptMap.get(parentTaskId);
|
|
|
|
|
String userName = ctTaskBranchesItem.getUserName();
|
|
|
|
|
String userId = ctTaskBranchesItem.getUserId();
|
|
|
|
|
if (deptNameVo != null) {
|
|
|
|
|
deptNameList.add(deptNameVo);
|
|
|
|
|
}
|
|
|
|
|
if (parentDeptName != null) {
|
|
|
|
|
parentDeptNameList.add(parentDeptName);
|
|
|
|
|
}
|
|
|
|
|
if (userName != null) {
|
|
|
|
|
userNameList.add(userName);
|
|
|
|
|
}
|
|
|
|
|
if (null != userId) {
|
|
|
|
|
userIdList.add(userId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
transactDeptNames = String.join(",", deptNameList);
|
|
|
|
|
transactInitiator = String.join(",", userNameList);
|
|
|
|
|
transactBranchNames = String.join(",", parentDeptNameList);
|
|
|
|
|
taskInfo.setTransactDeptName(transactDeptNames);
|
|
|
|
|
taskInfo.setTransactInitiator(transactInitiator);
|
|
|
|
|
taskInfo.setTransactBranchName(transactBranchNames);
|
|
|
|
|
taskInfo.setUserIds(userIdList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询任务机构信息列表
|
|
|
|
|
*/
|
|
|
|
@ -148,6 +452,17 @@ public class CtTaskBranchController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isTaskUserCombinationExists(Long taskId, String userId) {
|
|
|
|
|
CtTaskBranch branchServiceById = ctTaskBranchService.getById(taskId);
|
|
|
|
|
if (null != branchServiceById) {
|
|
|
|
|
Long taskIdVo = branchServiceById.getTaskId();
|
|
|
|
|
CtTaskInfo ctTaskInfoServiceById = ctTaskInfoService.getById(taskIdVo);
|
|
|
|
|
if (null != ctTaskInfoServiceById) {
|
|
|
|
|
String status = ctTaskInfoServiceById.getStatus();
|
|
|
|
|
if ("0".equals(status)) {
|
|
|
|
|
throw new UtilException("该任务还未发布");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<CtTaskBranch> list = ctTaskBranchService.list(new LambdaQueryWrapper<CtTaskBranch>()
|
|
|
|
|
.eq(CtTaskBranch::getTaskId, taskId)
|
|
|
|
|
.eq(CtTaskBranch::getType,"人员")
|
|
|
|
@ -211,9 +526,9 @@ public class CtTaskBranchController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//任务状态
|
|
|
|
|
if(Validator.isNotEmpty(ctTaskBranch.getTaskStatus())){
|
|
|
|
|
queryWrapper.eq(CtTaskBranch::getTaskStatus,ctTaskBranch.getTaskStatus());
|
|
|
|
|
}
|
|
|
|
|
// if(Validator.isNotEmpty(ctTaskBranch.getTaskStatus())){
|
|
|
|
|
// queryWrapper.eq(CtTaskBranch::getTaskStatus,ctTaskBranch.getTaskStatus());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//备注
|
|
|
|
|
if(Validator.isNotEmpty(ctTaskBranch.getRemarks())){
|
|
|
|
|