提交 c1b25f35 authored 作者: zhoushaopan's avatar zhoushaopan

[维修退回]修改了标题,[业务模块]新增了任务测回

上级 75778001
......@@ -82,7 +82,7 @@ public class AllotBill {
/**
* 配发类型
*/
@ApiModelProperty(value = "配发类型")
@ApiModelProperty(value = "配发类型",notes = "1 是纵向,")
private Integer allotType;
/**
* 签发人和发件经办人(A岗位)
......
......@@ -866,7 +866,7 @@ public class RepairController {
TaskBto task;
//草稿发起
if (repairBackBillSaveVo.getTaskId()==null) {
TaskBto taskBto1 = new TaskBto(StatusEnum.WAIT_BACK_RECEIVE.id, repairBackBillSaveVo.getSendUnit()+"维修退回型号"+StringSplitUtil.stringListToString(repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"共有"+repairBackBillSaveVo.getSendingCount()+"件至"+repairBackBillSaveVo.getReceiveUnit(), null, ".", deviceRepairBackBillEntity1.getId(), BusinessEnum.REPAIR_BACK.id, userPublicService.findUnitIdByName(repairBackBill.getReceiveUnit()), 1, null, userIds);
TaskBto taskBto1 = new TaskBto(StatusEnum.WAIT_BACK_RECEIVE.id, repairBackBillSaveVo.getSendUnit()+"维修退回型号"+StringSplitUtil.stringListToString(repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"共有"+repairBackBillSaveVo.getSendingCount()+"件至"+repairBackBillSaveVo.getReceiveUnit(), null, ".", deviceRepairBackBillEntity1.getId(), BusinessEnum.REPAIR_BACK.id, userPublicService.findUnitIdByName(repairBackBill.getReceiveUnit()), 1, null, userIds);
task = taskService.start(taskBto1);
}
else {
......@@ -874,7 +874,7 @@ public class RepairController {
taskBto1.setOwnUnit(userPublicService.findUnitIdByName(repairBackBill.getReceiveUnit()));
task = taskService.moveToSpecial(taskBto1,StatusEnum.WAIT_BACK_RECEIVE);
}
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_BACK_SEND_FILE.id, repairBackBillSaveVo.getSendUnit()+"维修退回型号"+StringSplitUtil.stringListToString(repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"共有"+repairBackBillSaveVo.getSendingCount()+"件至"+repairBackBillSaveVo.getReceiveUnit(), task.getId(), task.getNodeIdDetail() + task.getId() + ".", task.getBillId(), BusinessEnum.REPAIR_BACK.id, userPublicService.findUnitIdByName(repairBackBill.getSendUnit()), 0, null, Collections.singletonList(0));
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_BACK_SEND_FILE.id, repairBackBillSaveVo.getSendUnit()+"维修退回型号"+StringSplitUtil.stringListToString(repairBackBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"共有"+repairBackBillSaveVo.getSendingCount()+"件至"+repairBackBillSaveVo.getReceiveUnit(), task.getId(), task.getNodeIdDetail() + task.getId() + ".", task.getBillId(), BusinessEnum.REPAIR_BACK.id, userPublicService.findUnitIdByName(repairBackBill.getSendUnit()), 0, null, Collections.singletonList(0));
taskService.start(taskBto2);
//添加业务日志
List<FileVo> fileVoList = new ArrayList<>();
......
......@@ -2,6 +2,9 @@ package com.tykj.dev.device.task.controller;
import com.tykj.dev.config.GlobalMap;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.library.service.DeviceChangeService;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.task.repository.TaskDao;
import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.service.TaskService;
......@@ -59,6 +62,8 @@ public class TaskController {
@Autowired
private UserRecordDao userRecordDao;
@Autowired
private DeviceLibraryService deviceLibraryService;
@ApiOperation(value = "业务分页查询", notes = "可以通过这个接口分页查询业务")
@RequestMapping(method = RequestMethod.POST, value = "/manage/summary", produces = MediaType.APPLICATION_JSON_VALUE)
......@@ -317,6 +322,30 @@ public class TaskController {
return ResponseEntity.ok(map);
}
@ApiOperation(value = "任务撤回", notes = "根据任务id撤回任务")
@GetMapping("/revokeTask/taskId")
public ResponseEntity revokeTask(Integer taskId){
//根据任务id查询子任务 发件方是子任务 收件方是主任务
TaskBto taskBto = taskService.get(taskId);
Integer parentTaskId = taskBto.getParentTaskId();
//查询父任务
TaskBto parentTask = taskService.get(parentTaskId);
//父任务未被完成 可以被撤回
Integer billId = taskBto.getBillId();
String title = taskBto.getTitle();
List<DeviceLibrary> deviceLibraryList = deviceLibraryService.getListByBillId(billId);
for (DeviceLibrary deviceLibrary : deviceLibraryList) {
deviceLibrary.setLifeStatus(2);
}
//将任务都完结
taskService.moveToArchive(taskBto);
taskService.moveToArchive(parentTask);
return ResponseEntity.ok(title + "的任务撤回成功");
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论