提交 a950579d authored 作者: tykj's avatar tykj

feat:新增代管单位履历修正接口

上级 0ad4c514
......@@ -28,11 +28,13 @@ import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.selfcheck.controller.SelfCheckController;
import com.tykj.dev.device.task.repository.TaskDao;
import com.tykj.dev.device.task.repository.TaskLogDao;
import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.task.subject.domin.TaskLog;
import com.tykj.dev.device.user.base.enums.AuExample;
import com.tykj.dev.device.user.base.ret.UserShenRe;
import com.tykj.dev.device.user.cache.AreaCache;
......@@ -147,6 +149,31 @@ public class DeviceCheckController {
private UnitsService unitsService;
@Autowired
private CheckUnitService checkUnitService;
@Autowired
private TaskLogDao taskLogDao;
@GetMapping("/escow/taskLog")
@ApiOperation(value = "添加阅知信息:终止检查/核查任务")
public ResponseEntity fixEscowTaskLog(@RequestParam Integer detailId) {
Task task = taskRepo.findByBillIdAndBusinessType(detailId, 8).orElseThrow(() -> new ApiException("无法找到该任务,deatil:" + detailId));
List<TaskLog> logs = taskLogDao.findAllByTaskId(task.getId());
for (TaskLog taskLog : logs) {
if (taskLog.getRemark().contains("专管员A操作成功,等待专管员B操作")) {
taskLog.setDeleteTag(1);
taskLogDao.save(taskLog);
}
if (taskLog.getRemark().contains("专管员B处理完毕,任务结束")) {
taskLog.setRemark("任务结束");
taskLogDao.save(taskLog);
}
}
return ResponseEntity.ok("修改detail log");
}
@GetMapping("/msg")
@ApiOperation(value = "添加阅知信息:终止检查/核查任务")
......
......@@ -17,4 +17,11 @@ public interface TaskLogDao extends JpaRepository<TaskLog, Integer>, JpaSpecific
*/
List<TaskLog> getAllByTaskId(Integer taskId);
/**
* 根据id查找
* @param taskId task id
* @return rs
*/
List<TaskLog> findAllByTaskId(Integer taskId);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论