|
@@ -3,7 +3,7 @@ package com.fd.controller;
|
|
|
import com.fd.Dto.FdageDto;
|
|
|
import com.fd.Dto.PageDto;
|
|
|
import com.fd.constant.CommandMsg;
|
|
|
-import com.fd.constant.ErrorCode;
|
|
|
+import com.fd.constant.MsgCode;
|
|
|
import com.fd.constant.TypeCode;
|
|
|
import com.fd.entity.FileEntity;
|
|
|
import com.fd.entity.GenerateFileEntity;
|
|
@@ -106,7 +106,7 @@ public class VtsModelController {
|
|
|
|
|
|
Optional<FileEntity> entity = fileRepository.findById(fileId);
|
|
|
if (!entity.isPresent()) {
|
|
|
- return new ResponseResult(50002, ErrorCode.E50002);
|
|
|
+ return new ResponseResult(50002, MsgCode.E50002);
|
|
|
}
|
|
|
|
|
|
FileEntity fileEntity = entity.get();
|
|
@@ -143,7 +143,7 @@ public class VtsModelController {
|
|
|
log.info("run CmdSlpk2vtsThread");
|
|
|
Integer s = cmdServer.exeCmdSlpk2vts(cmd, fileId);
|
|
|
if (s == 1) {
|
|
|
- log.info("cmd run: {}", ErrorCode.E50005);
|
|
|
+ log.info("cmd run: {}", MsgCode.E50005);
|
|
|
}
|
|
|
log.info("cmd run : success");
|
|
|
fileEntity.setStatus(1); // 1:表示文件执行完成
|
|
@@ -181,7 +181,7 @@ public class VtsModelController {
|
|
|
|
|
|
Optional<FileEntity> entity = fileRepository.findById(fileId);
|
|
|
if (!entity.isPresent()) {
|
|
|
- return new ResponseResult(50002, ErrorCode.E50002);
|
|
|
+ return new ResponseResult(50002, MsgCode.E50002);
|
|
|
}
|
|
|
|
|
|
FileEntity fileEntity = entity.get();
|
|
@@ -219,7 +219,7 @@ public class VtsModelController {
|
|
|
log.info("run CmdVtsThread");
|
|
|
Integer s = cmdServer.exeCmdVts(cmd, fileId);
|
|
|
if (s == 1) {
|
|
|
- log.info("cmd run: {}", ErrorCode.E50005);
|
|
|
+ log.info("cmd run: {}", MsgCode.E50005);
|
|
|
}
|
|
|
log.info("cmd run : success");
|
|
|
fileEntity.setStatus(2); // 2:表示VTS命令执行完成
|
|
@@ -237,7 +237,7 @@ public class VtsModelController {
|
|
|
log.info("run commandVtsRemove");
|
|
|
GenerateFileEntity entity = generateFileRepository.findByFileId(fileId);
|
|
|
if (entity == null) {
|
|
|
- return new ResponseResult(50002, ErrorCode.E50002);
|
|
|
+ return new ResponseResult(50002, MsgCode.E50002);
|
|
|
}
|
|
|
|
|
|
String fileName = entity.getFileName();
|
|
@@ -246,8 +246,8 @@ public class VtsModelController {
|
|
|
|
|
|
Integer s = cmdServer.exeCmd(cmd);
|
|
|
if (s ==1) {
|
|
|
- log.info("cmd run: {}", ErrorCode.E50005);
|
|
|
- return new ResponseResult(50005, ErrorCode.E50005);
|
|
|
+ log.info("cmd run: {}", MsgCode.E50005);
|
|
|
+ return new ResponseResult(50005, MsgCode.E50005);
|
|
|
}
|
|
|
log.info("cmd run : success");
|
|
|
|
|
@@ -262,8 +262,8 @@ public class VtsModelController {
|
|
|
|
|
|
Integer s = cmdServer.exeCmd(CommandMsg.MODEL_USER_VTS);
|
|
|
if (s ==1) {
|
|
|
- log.info("cmd run: {}", ErrorCode.E50005);
|
|
|
- return new ResponseResult(50005, ErrorCode.E50005);
|
|
|
+ log.info("cmd run: {}", MsgCode.E50005);
|
|
|
+ return new ResponseResult(50005, MsgCode.E50005);
|
|
|
}
|
|
|
log.info("cmd run : success");
|
|
|
|
|
@@ -280,13 +280,13 @@ public class VtsModelController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @GetMapping("test")
|
|
|
- private ResponseResult test() {
|
|
|
- log.info("run test: {}");
|
|
|
-
|
|
|
-
|
|
|
- return new ResponseResult(200, "123");
|
|
|
- }
|
|
|
+// @GetMapping("test")
|
|
|
+// private ResponseResult test() {
|
|
|
+// log.info("run test: {}");
|
|
|
+//
|
|
|
+//
|
|
|
+// return new ResponseResult(200, "123");
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|