提交 919c1fea authored 作者: zhoushaopan's avatar zhoushaopan

[业务模块]新增了查询task接口

上级 5f50346f
...@@ -94,6 +94,7 @@ public class DeviceLogDto { ...@@ -94,6 +94,7 @@ public class DeviceLogDto {
deviceLog.setType(this.type); deviceLog.setType(this.type);
deviceLog.setDeviceId(this.deviceId); deviceLog.setDeviceId(this.deviceId);
deviceLog.setRemark(this.remark); deviceLog.setRemark(this.remark);
deviceLog.setTaskId(this.taskId);
if (this.createUserId!=null){ if (this.createUserId!=null){
deviceLog.setCreateUserId(createUserId); deviceLog.setCreateUserId(createUserId);
} }
......
...@@ -60,6 +60,7 @@ public class TaskController { ...@@ -60,6 +60,7 @@ public class TaskController {
@Autowired @Autowired
private UserRecordDao userRecordDao; private UserRecordDao userRecordDao;
@ApiOperation(value = "业务分页查询", notes = "可以通过这个接口分页查询业务") @ApiOperation(value = "业务分页查询", notes = "可以通过这个接口分页查询业务")
@RequestMapping(method = RequestMethod.POST, value = "/manage/summary", produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(method = RequestMethod.POST, value = "/manage/summary", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity getTaskPage(@RequestBody TaskSelectVo taskSelectVo) { public ResponseEntity getTaskPage(@RequestBody TaskSelectVo taskSelectVo) {
...@@ -291,4 +292,11 @@ public class TaskController { ...@@ -291,4 +292,11 @@ public class TaskController {
public ResponseEntity selectAllLogs(@RequestBody TaskLogSelectVo taskLogSelectVo){ public ResponseEntity selectAllLogs(@RequestBody TaskLogSelectVo taskLogSelectVo){
return ResponseEntity.ok( PageUtil.getPerPage(taskLogSelectVo.getPage(), taskLogSelectVo.getSize(), taskLogService.getAllByTime(taskLogSelectVo), taskLogSelectVo.getPageable())); return ResponseEntity.ok( PageUtil.getPerPage(taskLogSelectVo.getPage(), taskLogSelectVo.getSize(), taskLogService.getAllByTime(taskLogSelectVo), taskLogSelectVo.getPageable()));
} }
@ApiOperation(value = "任务对象", notes = "根据任务id查询任务对象")
@GetMapping("/task/id")
public ResponseEntity getTask(Integer taskId){
return ResponseEntity.ok(taskService.findByTaskId(taskId).toVo());
}
} }
...@@ -208,5 +208,7 @@ public interface TaskService { ...@@ -208,5 +208,7 @@ public interface TaskService {
*/ */
TaskBto findBillTypeAndFatherId(Integer billType,Integer fatherId); TaskBto findBillTypeAndFatherId(Integer billType,Integer fatherId);
TaskBto findByTaskId(Integer taskId);
} }
...@@ -585,9 +585,8 @@ public class TaskServiceImpl implements TaskService { ...@@ -585,9 +585,8 @@ public class TaskServiceImpl implements TaskService {
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
taskUserVos = taskUserVos.stream() taskUserVos = taskUserVos.stream()
.filter(taskUserVo -> businesses.contains(taskUserVo.getBusinessType())) .filter(taskUserVo -> !businesses.contains(taskUserVo.getBusinessType()) || (taskUserVo.getParentTaskId() == null || taskUserVo.getParentTaskId() == 0)).collect(Collectors.toList());
.filter(taskUserVo -> taskUserVo.getParentTaskId() == null || taskUserVo.getParentTaskId() == 0).collect(Collectors.toList()); //如果存在集合中
//如果存在集合中
// if (businesses.contains(taskUserVo.getBusinessType())){ // if (businesses.contains(taskUserVo.getBusinessType())){
// if (taskUserVo.getParentTaskId() != null && taskUserVo.getParentTaskId() !=0 ){ // if (taskUserVo.getParentTaskId() != null && taskUserVo.getParentTaskId() !=0 ){
// return false; // return false;
...@@ -865,6 +864,11 @@ public class TaskServiceImpl implements TaskService { ...@@ -865,6 +864,11 @@ public class TaskServiceImpl implements TaskService {
return taskDao.findByParentTaskIdAndBusinessType(fatherId,billType).parse2Bto(); return taskDao.findByParentTaskIdAndBusinessType(fatherId,billType).parse2Bto();
} }
@Override
public TaskBto findByTaskId(Integer taskId) {
return taskDao.findById(taskId).get().parse2Bto();
}
@Override @Override
public void moveAllSonNodeToEnd(Integer taaskId) { public void moveAllSonNodeToEnd(Integer taaskId) {
List<Task> tasks = taskDao.findAllByParentTaskId(taaskId); List<Task> tasks = taskDao.findAllByParentTaskId(taaskId);
......
...@@ -51,7 +51,6 @@ public class TaskBto { ...@@ -51,7 +51,6 @@ public class TaskBto {
@ApiModelProperty(value = "所属单位") @ApiModelProperty(value = "所属单位")
private Integer ownUnit; private Integer ownUnit;
@ApiModelProperty(value = "数字类型,用于代表指针目前的下标") @ApiModelProperty(value = "数字类型,用于代表指针目前的下标")
private Integer currentPoint; private Integer currentPoint;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论