Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
cae9f1dc
提交
cae9f1dc
authored
3月 08, 2020
作者:
孙洁清
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git.yfzx.zjtys.com.cn:912-system/monitor/inspect
上级
544e6b90
ce64c408
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
4 行删除
+16
-4
InspectController.java
...n/java/com/zjty/inspect/controller/InspectController.java
+6
-1
Reform.java
src/main/java/com/zjty/inspect/entity/Reform.java
+3
-1
GitLabUtil.java
src/main/java/com/zjty/inspect/utils/GitLabUtil.java
+7
-2
没有找到文件。
src/main/java/com/zjty/inspect/controller/InspectController.java
浏览文件 @
cae9f1dc
...
...
@@ -125,7 +125,7 @@ public class InspectController {
@PostMapping
(
"/git"
)
@ApiOperation
(
"git下载代码进行评估"
)
public
ResponseEntity
inspect1
(
@RequestBody
InspectParameter
inspectParameter
)
{
String
path
=
GitLabUtil
.
downLoadProject
(
inspectParameter
.
getGitAddress
()
,
inspectParameter
.
getGitName
()
);
String
path
=
GitLabUtil
.
downLoadProject
(
inspectParameter
.
getGitAddress
());
inspectParameter
.
setId
(
UUIDUtil
.
getUUID
());
inspectParameter
.
setSourceAddress
(
path
);
ReportVo
reportVo
=
new
ReportVo
();
...
...
@@ -389,4 +389,9 @@ public class InspectController {
return
ResponseEntity
.
ok
(
"上传失败"
);
}
}
@PostMapping
(
"/gitdownload"
)
private
ResponseEntity
gitDownloads
(
String
gitAddress
){
String
gitPath
=
GitLabUtil
.
downLoadProject
(
gitAddress
);
return
ResponseEntity
.
ok
(
gitPath
);
}
}
src/main/java/com/zjty/inspect/entity/Reform.java
浏览文件 @
cae9f1dc
...
...
@@ -5,7 +5,9 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* <h4>Description : 应用系统改造替换表单</h4>
...
...
@@ -103,7 +105,7 @@ public class Reform {
/**
* 该应用类型
*/
private
Integer
applicationType
=
-
1
;
private
List
<
Integer
>
applicationType
=
new
ArrayList
<>()
;
/**
* 运行时间
...
...
src/main/java/com/zjty/inspect/utils/GitLabUtil.java
浏览文件 @
cae9f1dc
...
...
@@ -16,13 +16,13 @@ import java.time.LocalDate;
@Component
public
class
GitLabUtil
{
public
static
String
downLoadProject
(
String
path
,
String
name
)
{
public
static
String
downLoadProject
(
String
path
)
{
String
name1
=
LocalDate
.
now
().
toString
();
String
[]
split1
=
UUIDUtil
.
getUUID
().
split
(
"-"
);
//String REMOTE_URL = "https://git.yfzx.zjtys.com.cn:8888/912-system/monitor/adaptation-master.git";
CloneCommand
cloneCommand
=
Git
.
cloneRepository
();
cloneCommand
.
setURI
(
path
);
File
file
=
new
File
(
"./"
+
name1
+
"/"
+
split1
[
0
]+
"/"
+
name
);
File
file
=
new
File
(
"./"
+
name1
+
"/"
+
split1
[
0
]+
"/"
);
file
.
mkdirs
();
cloneCommand
.
setDirectory
(
file
);
try
{
...
...
@@ -38,6 +38,11 @@ public class GitLabUtil {
return
file
.
getAbsolutePath
();
}
public
static
void
main
(
String
[]
args
)
{
String
hostsss
=
GitLabUtil
.
downLoadProject
(
"https://git.yfzx.zjtys.com.cn/912-system/monitor/inspect.git"
);
System
.
out
.
println
(
hostsss
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论