Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankPatrolRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bank
AmosBankPatrolRoot
Commits
721fb555
Commit
721fb555
authored
Aug 24, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改代码(下载到浏览器)
parent
f57d7759
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
CheckServiceImpl.java
...atrol/service/business/service/impl/CheckServiceImpl.java
+26
-27
StringUtil.java
...com/yeejoin/amos/patrol/service/core/util/StringUtil.java
+4
-2
No files found.
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/business/service/impl/CheckServiceImpl.java
View file @
721fb555
...
...
@@ -122,7 +122,7 @@ public class CheckServiceImpl implements ICheckService {
//deptMap = deptList.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr, DepartmentModel::getDepartmentName));
for
(
int
i
=
0
;
i
<
deptList
.
size
();
i
++)
{
deptMap
.
put
(
String
.
valueOf
(
deptList
.
get
(
i
).
get
(
"sequenceNbr"
)),
String
.
valueOf
(
deptList
.
get
(
i
).
get
(
"departmentName"
)));
deptMap
.
put
(
String
Util
.
toString
(
deptList
.
get
(
i
).
get
(
"sequenceNbr"
)),
StringUtil
.
toString
(
deptList
.
get
(
i
).
get
(
"departmentName"
)));
}
...
...
@@ -167,11 +167,11 @@ public class CheckServiceImpl implements ICheckService {
planTask
=
planTaskDao
.
findById
(
requestParam
.
getPlanTaskId
()).
get
();
// routeParam.put("routeId", planTask.getRouteId());
// routeParam.put("pointId", requestParam.getPointId());
check
.
setPlanTaskDetailId
(
Long
.
parseLong
(
String
.
valueOf
(
detail
.
get
(
"planTaskDetailId"
))));
check
.
setRouteId
(
Long
.
parseLong
(
String
.
valueOf
(
detail
.
get
(
"routeId"
))));
check
.
setPlanTaskDetailId
(
Long
.
parseLong
(
String
Util
.
toString
(
detail
.
get
(
"planTaskDetailId"
))));
check
.
setRouteId
(
Long
.
parseLong
(
String
Util
.
toString
(
detail
.
get
(
"routeId"
))));
check
.
setPlanTaskId
(
requestParam
.
getPlanTaskId
());
check
.
setPlanId
(
planTask
.
getPlanId
());
check
.
setDepId
(
String
.
valueOf
(
detail
.
get
(
"depId"
)));
check
.
setDepId
(
String
Util
.
toString
(
detail
.
get
(
"depId"
)));
}
}
else
{
planTask
=
new
PlanTask
();
...
...
@@ -1014,8 +1014,8 @@ public class CheckServiceImpl implements ICheckService {
//新安全
checkAnalysisVos
.
forEach
(
s
->
{
listd
.
forEach
(
s1
->
{
if
(
s
.
getName
().
equals
(
String
.
valueOf
(
s1
.
get
(
"sequenceNbr"
))))
{
s
.
setName
(
String
.
valueOf
(
s1
.
get
(
"departmentName"
)));
if
(
s
.
getName
().
equals
(
String
Util
.
toString
(
s1
.
get
(
"sequenceNbr"
))))
{
s
.
setName
(
String
Util
.
toString
(
s1
.
get
(
"departmentName"
)));
}
});
});
...
...
@@ -1042,20 +1042,20 @@ public class CheckServiceImpl implements ICheckService {
faildRate
+=
Double
.
parseDouble
(
checkAnalysisVo
.
getFaildRate
());
}
countVo
.
setName
(
"合计"
);
countVo
.
setPlanTaskCount
(
String
.
valueOf
(
planTaskCount
));
countVo
.
setCheckCount
(
String
.
valueOf
(
checkCount
));
countVo
.
setOk
(
String
.
valueOf
(
ok
));
countVo
.
setFaild
(
String
.
valueOf
(
faild
));
countVo
.
setMissed
(
String
.
valueOf
(
missed
));
countVo
.
setPlanTaskCount
(
String
Util
.
toString
(
planTaskCount
));
countVo
.
setCheckCount
(
String
Util
.
toString
(
checkCount
));
countVo
.
setOk
(
String
Util
.
toString
(
ok
));
countVo
.
setFaild
(
String
Util
.
toString
(
faild
));
countVo
.
setMissed
(
String
Util
.
toString
(
missed
));
if
(
size
==
0
)
{
countVo
.
setScore
(
"0"
);
countVo
.
setMissedRate
(
"0"
);
countVo
.
setFaildRate
(
"0"
);
}
else
{
countVo
.
setScore
(
String
.
valueOf
(
score
/
size
));
countVo
.
setMissedRate
(
String
.
valueOf
(
missedRate
/
size
));
countVo
.
setFaildRate
(
String
.
valueOf
(
faildRate
/
size
));
countVo
.
setScore
(
String
Util
.
toString
(
score
/
size
));
countVo
.
setMissedRate
(
String
Util
.
toString
(
missedRate
/
size
));
countVo
.
setFaildRate
(
String
Util
.
toString
(
faildRate
/
size
));
}
checkAnalysisVos
.
add
(
countVo
);
return
checkAnalysisVos
;
...
...
@@ -1091,8 +1091,8 @@ public class CheckServiceImpl implements ICheckService {
//新安全
checkAnalysisVos
.
forEach
(
s
->
{
listd
.
forEach
(
s1
->
{
if
(!
ObjectUtils
.
isEmpty
(
s
.
getName
())
&&
s
.
getName
().
equals
(
String
.
valueOf
(
s1
.
get
(
"sequenceNbr"
))))
{
s
.
setName
(
DeptEnum
.
getEnumCode
(
String
.
valueOf
(
s1
.
get
(
"departmentName"
))));
if
(!
ObjectUtils
.
isEmpty
(
s
.
getName
())
&&
s
.
getName
().
equals
(
String
Util
.
toString
(
s1
.
get
(
"sequenceNbr"
))))
{
s
.
setName
(
DeptEnum
.
getEnumCode
(
String
Util
.
toString
(
s1
.
get
(
"departmentName"
))));
}
});
});
...
...
@@ -1248,8 +1248,7 @@ public class CheckServiceImpl implements ICheckService {
setRow
(
checkInfoList
,
sheet
,
contentStyle
,
alignLeftStyle
);
}
//PoiUtil.export(wb, response);
PoiUtil
.
exportLocal
(
wb
,
"D:/upload"
,
"机构客户信息表.xls"
);
PoiUtil
.
export
(
wb
,
response
);
}
private
Map
<
String
,
Object
>
getStateMap
(
String
idState
)
{
...
...
@@ -1405,8 +1404,8 @@ public class CheckServiceImpl implements ICheckService {
boolean
flag2
=
true
;
for
(
int
i
=
0
;
i
<
checkInfoList
.
size
();
i
++)
{
String
pointName
=
String
.
valueOf
(
checkInfoList
.
get
(
i
).
get
(
"pointName"
));
String
classifyName
=
String
.
valueOf
(
checkInfoList
.
get
(
i
).
get
(
"classifyName"
));
String
pointName
=
String
Util
.
toString
(
checkInfoList
.
get
(
i
).
get
(
"pointName"
));
String
classifyName
=
String
Util
.
toString
(
checkInfoList
.
get
(
i
).
get
(
"classifyName"
));
if
(
flag1
)
{
lastPointName
=
pointName
;
flag1
=
false
;
...
...
@@ -1451,14 +1450,14 @@ public class CheckServiceImpl implements ICheckService {
}
row
=
sheet
.
createRow
(
i
+
3
);
HSSFCell
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
String
.
valueOf
(
checkInfoList
.
get
(
i
).
get
(
"pointName"
)));
cell
.
setCellValue
(
String
Util
.
toString
(
checkInfoList
.
get
(
i
).
get
(
"pointName"
)));
cell
.
setCellStyle
(
contentStyle
);
HSSFCell
cell1
=
row
.
createCell
(
1
);
cell1
.
setCellValue
(
String
.
valueOf
(
checkInfoList
.
get
(
i
).
get
(
"classifyName"
)));
cell1
.
setCellValue
(
String
Util
.
toString
(
checkInfoList
.
get
(
i
).
get
(
"classifyName"
)));
cell1
.
setCellStyle
(
contentStyle
);
HSSFCell
cell2
=
row
.
createCell
(
2
);
cell2
.
setCellStyle
(
contentStyle
);
cell2
.
setCellValue
(
String
.
valueOf
(
checkInfoList
.
get
(
i
).
get
(
"inputItemName"
)));
cell2
.
setCellValue
(
String
Util
.
toString
(
checkInfoList
.
get
(
i
).
get
(
"inputItemName"
)));
for
(
int
j
=
0
;
j
<
sp
.
length
;
j
++)
{
Map
<
String
,
Object
>
checkInfoMap
=
checkInfoList
.
get
(
i
);
HSSFCell
cellA
=
row
.
createCell
(
3
+
j
);
...
...
@@ -1477,9 +1476,9 @@ public class CheckServiceImpl implements ICheckService {
children
.
forEach
(
y
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
key
=
DeptEnum
.
getEnumCode
(
String
.
valueOf
(
y
.
get
(
"departmentName"
)));
String
key
=
DeptEnum
.
getEnumCode
(
String
Util
.
toString
(
y
.
get
(
"departmentName"
)));
map
.
put
(
"key"
,
key
);
map
.
put
(
"label"
,
String
.
valueOf
(
y
.
get
(
"departmentName"
)));
map
.
put
(
"label"
,
String
Util
.
toString
(
y
.
get
(
"departmentName"
)));
list
.
add
(
map
);
}
);
...
...
@@ -1511,7 +1510,7 @@ public class CheckServiceImpl implements ICheckService {
Collection
<
Map
>
children
=
x
.
getChildren
();
children
.
forEach
(
y
->
{
String
key
=
DeptEnum
.
getEnumCode
(
String
.
valueOf
(
y
.
get
(
"departmentName"
)));
String
key
=
DeptEnum
.
getEnumCode
(
String
Util
.
toString
(
y
.
get
(
"departmentName"
)));
List
<
CheckAnalysisVo
>
collect
=
checkAnalysisVos
.
stream
().
filter
(
z
->
key
.
equals
(
z
.
getName
())
&&
z
.
getCheckTime
().
equals
(
day
)).
collect
(
Collectors
.
toList
());
String
plantaskCount
=
getCount
(
collect
,
PLANTASK_COUNT
);
String
checkCount
=
getCount
(
collect
,
CHECK_COUNT
);
...
...
@@ -1564,7 +1563,7 @@ public class CheckServiceImpl implements ICheckService {
private
void
getTotal
(
Map
<
String
,
Object
>
totalMap
,
String
type
,
String
key
,
Long
num
)
{
long
total
=
0
;
if
(!
ObjectUtils
.
isEmpty
(
totalMap
.
get
(
type
+
key
)))
{
total
=
Long
.
valueOf
(
String
.
valueOf
(
totalMap
.
get
(
type
+
key
)));
total
=
Long
.
valueOf
(
String
Util
.
toString
(
totalMap
.
get
(
type
+
key
)));
}
num
+=
total
;
totalMap
.
put
(
type
+
key
,
num
.
toString
());
...
...
AmosBankPatrolService/src/main/java/com/yeejoin/amos/patrol/service/core/util/StringUtil.java
View file @
721fb555
...
...
@@ -55,8 +55,6 @@ public class StringUtil {
/**
* 判断是否数字表示
*
* @param src
* 源字符串
* @return 是否数字的标志
*/
...
...
@@ -156,4 +154,8 @@ public class StringUtil {
return
codes
[
0
]
+
"*"
+
codes
[
1
];
}
}
public
static
String
toString
(
Object
str
){
return
str
+
""
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment