提交 f6ba2014 authored 作者: Matrix's avatar Matrix

[核查模块] 优化了代码

上级 0a91f018
......@@ -1202,8 +1202,7 @@ public class DeviceCheckController {
@ApiOperation(value = "新的回退接口,目前用于测试")
@PutMapping("/test/rollback/{id}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity rollBac(@PathVariable Integer id){
public ResponseEntity rollBack(@PathVariable Integer id){
//1. bill单的自查将百位数变为3
DeviceCheckDetail detail = detailRepo.getOne(id);
String detailString = detail.getCheckDetail();
......@@ -1225,6 +1224,7 @@ public class DeviceCheckController {
//2.当前任务结束,开启一个新的 退回任务(连带一个新的detail)
TaskBto currentTask = taskService.get(id, CONFIRM_CHECK_DETAIL.id);
TaskBto newTask = currentTask.toDo().copy().parse2Bto();
taskService.moveToEnd(currentTask);
// 创建新的detail
DeviceCheckDetail cDetail = detail.copyWithoutId();
......@@ -1232,9 +1232,9 @@ public class DeviceCheckController {
cDetail.setCheckDetail(initalDetail);
cDetail = detailRepo.save(cDetail);
// 创建新的任务
TaskBto newTask = currentTask.toDo().copy().parse2Bto();
newTask.setBillStatus(CHECK_EXAM_DETAIL_0.id);
newTask.setBillId(cDetail.getId());
newTask.setId(0);
taskService.start(newTask);
//3.父级任务变为进行中
......
......@@ -2,7 +2,6 @@ package com.tykj.dev.device.confirmcheck.entity.domain;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.misc.base.BaseEntity;
import com.tykj.dev.misc.base.BeanHelper;
import com.tykj.dev.misc.utils.TimestampUtil;
......
......@@ -6,8 +6,8 @@ import com.tykj.dev.config.cache.ConfigCache;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.repository.DeviceLogDao;
import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import com.tykj.dev.device.library.service.DeviceChangeService;
import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.service.DeviceLogService;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
......
package com.tykj.dev.device.library.service;
import com.oracle.tools.packager.mac.MacAppBundler;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import java.util.List;
......
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
......
......@@ -16,7 +16,6 @@ import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.socket.MyWebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
......
package com.tykj.dev.union;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
......
package com.tykj.dev.device.user.task;
import com.tykj.dev.device.user.subject.entity.*;
import com.tykj.dev.device.user.subject.entity.Permissions;
import com.tykj.dev.device.user.subject.entity.Role;
import com.tykj.dev.device.user.subject.entity.RolePermissions;
import com.tykj.dev.device.user.subject.entity.UserRole;
import com.tykj.dev.device.user.subject.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论