Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
ae6e936b
提交
ae6e936b
authored
4月 15, 2020
作者:
马晨俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mcj:更新excel导入导出
上级
67a97991
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
23 行删除
+35
-23
Details.java
src/main/java/com/zjty/inspect/entity/Details.java
+3
-3
Reform.java
src/main/java/com/zjty/inspect/entity/Reform.java
+2
-2
BudgetUitl.java
src/main/java/com/zjty/inspect/utils/BudgetUitl.java
+5
-4
ExcelUtil.java
src/main/java/com/zjty/inspect/utils/ExcelUtil.java
+25
-14
没有找到文件。
src/main/java/com/zjty/inspect/entity/Details.java
浏览文件 @
ae6e936b
...
@@ -36,12 +36,12 @@ public class Details {
...
@@ -36,12 +36,12 @@ public class Details {
* 台数
* 台数
*/
*/
@ApiModelProperty
(
value
=
"台数"
)
@ApiModelProperty
(
value
=
"台数"
)
private
Integer
num
;
private
String
num
;
/**
/**
* CPU核数
* CPU核数
*/
*/
@ApiModelProperty
(
value
=
"CPU核数"
)
@ApiModelProperty
(
value
=
"CPU核数"
)
private
Integer
cpuNum
;
private
String
cpuNum
;
/**
/**
* 单核主频
* 单核主频
*/
*/
...
@@ -51,7 +51,7 @@ public class Details {
...
@@ -51,7 +51,7 @@ public class Details {
* 服务器总空间
* 服务器总空间
*/
*/
@ApiModelProperty
(
value
=
"服务器总空间"
)
@ApiModelProperty
(
value
=
"服务器总空间"
)
private
double
space
;
private
String
space
;
/**
/**
* 其他
* 其他
*/
*/
...
...
src/main/java/com/zjty/inspect/entity/Reform.java
浏览文件 @
ae6e936b
...
@@ -188,9 +188,9 @@ public class Reform {
...
@@ -188,9 +188,9 @@ public class Reform {
@ApiModelProperty
(
value
=
"迁移策略"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"迁移策略"
,
example
=
"1"
)
private
Integer
strategy
=
-
1
;
private
Integer
strategy
=
-
1
;
@ApiModelProperty
(
value
=
"RTO"
)
@ApiModelProperty
(
value
=
"RTO"
)
private
Integer
rto
;
private
Integer
rto
=
-
1
;
@ApiModelProperty
(
value
=
"RPO"
)
@ApiModelProperty
(
value
=
"RPO"
)
private
Integer
rpo
;
private
Integer
rpo
=
-
1
;
/**
/**
* 额外申请
* 额外申请
*/
*/
...
...
src/main/java/com/zjty/inspect/utils/BudgetUitl.java
浏览文件 @
ae6e936b
...
@@ -63,12 +63,13 @@ public class BudgetUitl {
...
@@ -63,12 +63,13 @@ public class BudgetUitl {
inspectParameter
.
setMoneyRate
(
Double
.
valueOf
(
doubleHashMap
.
get
(
1
)));
inspectParameter
.
setMoneyRate
(
Double
.
valueOf
(
doubleHashMap
.
get
(
1
)));
Double
moneyRate
=
inspectParameter
.
getMoneyRate
();
Double
moneyRate
=
inspectParameter
.
getMoneyRate
();
System
.
out
.
println
(
JSON
.
toJSONString
(
"inspectParameter:"
+
inspectParameter
));
System
.
out
.
println
(
JSON
.
toJSONString
(
"inspectParameter:"
+
inspectParameter
));
int
mouth
=
inspectParameter
.
getYears
();
int
year
=
inspectParameter
.
getYears
();
if
(
inspectParameter
.
getYears
()==-
1
){
if
(
inspectParameter
.
getYears
()==-
1
){
mouth
=
1
;
year
=
1
;
}
}
double
pow
=
Math
.
pow
(
moneyRate
,
mouth
);
double
pow
=
Math
.
pow
(
moneyRate
,
year
);
BigDecimal
.
valueOf
(
pow
);
double
v
=
pow
+
1
D
;
//带修正系数资金
//带修正系数资金
ArrayList
<
String
>
strings
=
new
ArrayList
<>();
ArrayList
<
String
>
strings
=
new
ArrayList
<>();
strings
.
add
(
"安全能力"
);
strings
.
add
(
"安全能力"
);
...
...
src/main/java/com/zjty/inspect/utils/ExcelUtil.java
浏览文件 @
ae6e936b
...
@@ -82,8 +82,7 @@ public class ExcelUtil {
...
@@ -82,8 +82,7 @@ public class ExcelUtil {
String
cycle
=
getExcelCell
(
5
,
2
,
sheetAt
);
String
cycle
=
getExcelCell
(
5
,
2
,
sheetAt
);
String
s
=
cycle
.
replaceAll
(
"年"
,
""
);
String
s
=
cycle
.
replaceAll
(
"年"
,
""
);
reform
.
setCycle
(
returnNum
(
s
)
*
12
);
reform
.
setCycle
(
returnNum
(
s
));
String
time
=
getExcelCell
(
6
,
2
,
sheetAt
);
String
time
=
getExcelCell
(
6
,
2
,
sheetAt
);
if
(!
""
.
equals
(
time
))
{
if
(!
""
.
equals
(
time
))
{
if
(
"10年以上"
.
equals
(
time
))
{
if
(
"10年以上"
.
equals
(
time
))
{
...
@@ -175,7 +174,7 @@ public class ExcelUtil {
...
@@ -175,7 +174,7 @@ public class ExcelUtil {
List
<
BaseDes
>
fontTechnologies
=
new
ArrayList
<>();
List
<
BaseDes
>
fontTechnologies
=
new
ArrayList
<>();
for
(
int
i
=
22
;
i
<
2
7
;
i
++)
{
for
(
int
i
=
22
;
i
<
2
8
;
i
++)
{
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
if
(
""
.
equals
(
framework
))
{
if
(
""
.
equals
(
framework
))
{
continue
;
continue
;
...
@@ -192,10 +191,10 @@ public class ExcelUtil {
...
@@ -192,10 +191,10 @@ public class ExcelUtil {
fontTechnologies
.
add
(
font
);
fontTechnologies
.
add
(
font
);
}
}
}
}
developLanguageSystem
.
setFontDevTechnologies
(
fontTechnologies
);
List
<
BaseDes
>
fontDevTechnologies
=
new
ArrayList
<>();
developLanguageSystem
.
setFontDevTechnologies
(
fontTechnologies
);
for
(
int
i
=
28
;
i
<
33
;
i
++)
{
ArrayList
<
BaseDes
>
fontDevTechnologies
=
new
ArrayList
<
BaseDes
>();
for
(
int
i
=
28
;
i
<
34
;
i
++)
{
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
if
(
""
.
equals
(
framework
))
{
if
(
""
.
equals
(
framework
))
{
continue
;
continue
;
...
@@ -214,6 +213,7 @@ public class ExcelUtil {
...
@@ -214,6 +213,7 @@ public class ExcelUtil {
}
}
developLanguageSystem
.
setCsDevTechnologies
(
fontDevTechnologies
);
developLanguageSystem
.
setCsDevTechnologies
(
fontDevTechnologies
);
List
<
BaseDes
>
opGAS
=
new
ArrayList
<>();
List
<
BaseDes
>
opGAS
=
new
ArrayList
<>();
for
(
int
i
=
34
;
i
<
39
;
i
++)
{
for
(
int
i
=
34
;
i
<
39
;
i
++)
{
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
String
framework
=
getExcelCell
(
i
,
2
,
sheetAt
);
...
@@ -276,7 +276,7 @@ public class ExcelUtil {
...
@@ -276,7 +276,7 @@ public class ExcelUtil {
middleware
.
setMiddlewareEnums
(
middlewareEnums
);
middleware
.
setMiddlewareEnums
(
middlewareEnums
);
ArrayList
<
OtherApi
>
otherApis
=
new
ArrayList
<>();
ArrayList
<
OtherApi
>
otherApis
=
new
ArrayList
<>();
for
(
int
i
=
51
;
i
<
6
1
;
i
++)
{
for
(
int
i
=
51
;
i
<
6
2
;
i
++)
{
String
api
=
getExcelCell
(
i
,
2
,
sheetAt
);
String
api
=
getExcelCell
(
i
,
2
,
sheetAt
);
if
(
""
.
equals
(
api
))
{
if
(
""
.
equals
(
api
))
{
continue
;
continue
;
...
@@ -293,7 +293,7 @@ public class ExcelUtil {
...
@@ -293,7 +293,7 @@ public class ExcelUtil {
middleware
.
setOtherApis
(
otherApis
);
middleware
.
setOtherApis
(
otherApis
);
List
<
BaseDes
>
microServices
=
new
ArrayList
<>();
List
<
BaseDes
>
microServices
=
new
ArrayList
<>();
for
(
int
i
=
62
;
i
<
7
2
;
i
++)
{
for
(
int
i
=
62
;
i
<
7
3
;
i
++)
{
String
name
=
getExcelCell
(
i
,
2
,
sheetAt
);
String
name
=
getExcelCell
(
i
,
2
,
sheetAt
);
if
(
name
==
null
||
""
.
equals
(
name
))
{
if
(
name
==
null
||
""
.
equals
(
name
))
{
continue
;
continue
;
...
@@ -402,6 +402,9 @@ public class ExcelUtil {
...
@@ -402,6 +402,9 @@ public class ExcelUtil {
browser
.
setBrowserPlugs
(
browserPlugs
);
browser
.
setBrowserPlugs
(
browserPlugs
);
reform
.
setBrowser
(
browser
);
reform
.
setBrowser
(
browser
);
String
excelCell
=
getExcelCell
(
108
,
2
,
sheetAt
);
String
apply
=
getExcelCell
(
110
,
2
,
sheetAt
);
String
apply
=
getExcelCell
(
110
,
2
,
sheetAt
);
Apply
apply1
=
new
Apply
();
Apply
apply1
=
new
Apply
();
apply1
.
setCost
(
Double
.
valueOf
(
apply
));
apply1
.
setCost
(
Double
.
valueOf
(
apply
));
...
@@ -428,6 +431,9 @@ public class ExcelUtil {
...
@@ -428,6 +431,9 @@ public class ExcelUtil {
Details
vpsdetails
=
getSysDetails
(
118
,
2
,
sheetAt
);
Details
vpsdetails
=
getSysDetails
(
118
,
2
,
sheetAt
);
systemStructure
.
setVps
(
vpsdetails
);
systemStructure
.
setVps
(
vpsdetails
);
Details
otherEquipment
=
getSysDetails
(
119
,
2
,
sheetAt
);
systemStructure
.
setOtherEquipment
(
otherEquipment
);
reform
.
setSystemStructure
(
systemStructure
);
reform
.
setSystemStructure
(
systemStructure
);
String
rpo
=
getExcelCell
(
121
,
2
,
sheetAt
);
String
rpo
=
getExcelCell
(
121
,
2
,
sheetAt
);
...
@@ -612,6 +618,8 @@ public class ExcelUtil {
...
@@ -612,6 +618,8 @@ public class ExcelUtil {
return
"单机运行"
;
return
"单机运行"
;
case
4
:
case
4
:
return
"分布式"
;
return
"分布式"
;
default
:
break
;
}
}
return
""
;
return
""
;
}
}
...
@@ -667,7 +675,7 @@ public class ExcelUtil {
...
@@ -667,7 +675,7 @@ public class ExcelUtil {
private
static
int
returnNum
(
String
target
)
{
private
static
int
returnNum
(
String
target
)
{
if
(!
""
.
equals
(
target
))
{
if
(!
""
.
equals
(
target
))
{
return
Integer
.
valueOf
(
target
);
return
Integer
.
parseInt
(
target
);
}
else
{
}
else
{
return
0
;
return
0
;
}
}
...
@@ -675,7 +683,7 @@ public class ExcelUtil {
...
@@ -675,7 +683,7 @@ public class ExcelUtil {
private
static
double
returnDouble
(
String
target
)
{
private
static
double
returnDouble
(
String
target
)
{
if
(!
""
.
equals
(
target
))
{
if
(!
""
.
equals
(
target
))
{
return
Double
.
valueOf
(
target
);
return
Double
.
parseDouble
(
target
);
}
else
{
}
else
{
return
0
;
return
0
;
}
}
...
@@ -715,18 +723,21 @@ public class ExcelUtil {
...
@@ -715,18 +723,21 @@ public class ExcelUtil {
details
.
setDeploy
(
2
);
details
.
setDeploy
(
2
);
}
}
String
num3
=
getExcelCell
(
rowNum
,
cellNum
+
1
,
sheetAt
);
String
num3
=
getExcelCell
(
rowNum
,
cellNum
+
1
,
sheetAt
);
details
.
setNum
(
returnNum
(
num3
)
);
details
.
setNum
(
num3
);
String
slbsys
=
getExcelCell
(
rowNum
,
cellNum
+
2
,
sheetAt
);
String
slbsys
=
getExcelCell
(
rowNum
,
cellNum
+
2
,
sheetAt
);
OperateSystem
slbByName
=
OperateSystem
.
getByName
(
slbsys
);
OperateSystem
slbByName
=
OperateSystem
.
getByName
(
slbsys
);
details
.
setOperateSystem
(
slbByName
);
details
.
setOperateSystem
(
slbByName
);
details
.
setCode
(
slbByName
.
getCode
());
details
.
setCode
(
slbByName
.
getCode
());
String
cpu3
=
getExcelCell
(
rowNum
,
cellNum
+
3
,
sheetAt
);
String
cpu3
=
getExcelCell
(
rowNum
,
cellNum
+
3
,
sheetAt
);
details
.
setCpuNum
(
returnNum
(
cpu3
)
);
details
.
setCpuNum
(
cpu3
);
String
ghz3
=
getExcelCell
(
rowNum
,
cellNum
+
4
,
sheetAt
);
String
ghz3
=
getExcelCell
(
rowNum
,
cellNum
+
4
,
sheetAt
);
details
.
setGhz
(
ghz3
);
details
.
setGhz
(
ghz3
);
String
space3
=
getExcelCell
(
rowNum
,
cellNum
+
5
,
sheetAt
);
String
memory
=
getExcelCell
(
rowNum
,
cellNum
+
5
,
sheetAt
);
details
.
setSpace
(
returnDouble
(
space3
));
details
.
setMemory
(
memory
);
String
space3
=
getExcelCell
(
rowNum
,
cellNum
+
6
,
sheetAt
);
details
.
setSpace
(
space3
);
return
details
;
return
details
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论