Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
0
Merge Requests
0
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
项目统一框架
amos-boot-biz
Commits
afce51b8
Commit
afce51b8
authored
Sep 16, 2021
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检删除后端返回图片拼接ip端口
parent
fff85edf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
22 deletions
+34
-22
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+6
-4
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+18
-11
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+6
-4
TaskServiceImpl.java
...in/amos/patrol/business/service/impl/TaskServiceImpl.java
+4
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
afce51b8
...
...
@@ -104,8 +104,8 @@ public class CheckController extends AbstractBaseController {
// @Value("${file.port}")
// private String filePort;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Value
(
"${amosRefresh.patrol.topic}"
)
private
String
patrolTopic
;
...
...
@@ -196,7 +196,8 @@ public class CheckController extends AbstractBaseController {
String
fileName
=
"巡检记录图片"
+
new
Date
().
getTime
()
+
".zip"
;
// String rootPath = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
list
)
{
map
.
put
(
"photoData"
,
fileUrl
+
map
.
get
(
"photoData"
).
toString
());
// map.put("photoData", fileUrl + map.get("photoData").toString());
map
.
put
(
"photoData"
,
map
.
get
(
"photoData"
).
toString
());
}
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
...
...
@@ -210,7 +211,8 @@ public class CheckController extends AbstractBaseController {
String
fileName
=
"巡检记录图片"
+
new
Date
().
getTime
()
+
".zip"
;
// String rootPath = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
list
)
{
map
.
put
(
"photoData"
,
fileUrl
+
map
.
get
(
"photoData"
).
toString
());
// map.put("photoData", fileUrl + map.get("photoData").toString());
map
.
put
(
"photoData"
,
map
.
get
(
"photoData"
).
toString
());
}
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
afce51b8
...
...
@@ -142,8 +142,8 @@ public class CheckServiceImpl implements ICheckService {
//
// @Value("${file.port}")
// private String filePort;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Override
public
Page
<
CheckInfoVo
>
getCheckInfo
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
)
{
...
...
@@ -549,7 +549,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo
pointCheckDetailBo
=
list
.
get
(
0
);
List
<
CheckShot
>
pointShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
0
l
,
0
l
);
pointShot
.
forEach
(
action
->
{
pointImgUrls
.
add
(
fileUrl
+
action
.
getPhotoData
());
// pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls
.
add
(
action
.
getPhotoData
());
});
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
pointCheckRespone
.
setPointId
(
pointCheckDetailBo
.
getPointId
());
...
...
@@ -586,7 +587,8 @@ public class CheckServiceImpl implements ICheckService {
List
<
String
>
pointInputImgUrls
=
new
ArrayList
<>();
List
<
CheckShot
>
pointInputShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
action
.
getCheckInputId
(),
action
.
getClassifyId
());
pointInputShot
.
forEach
(
inputShot
->
{
pointInputImgUrls
.
add
(
fileUrl
+
inputShot
.
getPhotoData
());
// pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls
.
add
(
inputShot
.
getPhotoData
());
});
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
appCheckInputRespone
.
setCheckInputId
(
action
.
getCheckInputId
());
...
...
@@ -633,7 +635,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo
pointCheckDetailBo
=
list
.
get
(
0
);
List
<
CheckShot
>
pointShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
0
l
,
0
l
);
pointShot
.
forEach
(
action
->
{
pointImgUrls
.
add
(
fileUrl
+
action
.
getPhotoData
());
// pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls
.
add
(
action
.
getPhotoData
());
});
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
pointCheckRespone
.
setPointId
(
pointCheckDetailBo
.
getPointId
());
...
...
@@ -674,7 +677,8 @@ public class CheckServiceImpl implements ICheckService {
List
<
String
>
pointInputImgUrls
=
new
ArrayList
<>();
List
<
CheckShot
>
pointInputShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
action
.
getCheckInputId
(),
action
.
getClassifyId
());
pointInputShot
.
forEach
(
inputShot
->
{
pointInputImgUrls
.
add
(
fileUrl
+
inputShot
.
getPhotoData
());
// pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls
.
add
(
inputShot
.
getPhotoData
());
});
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
appCheckInputRespone
.
setCheckInputId
(
action
.
getCheckInputId
());
...
...
@@ -765,8 +769,10 @@ public class CheckServiceImpl implements ICheckService {
// String ipPort = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
checkimgs
)
{
String
imgPath
=
map
.
get
(
"photoData"
).
toString
().
replace
(
"\\"
,
"/"
);
map
.
put
(
"photoData"
,
fileUrl
+
imgPath
);
map
.
put
(
"openOperUrl"
,
"window.open('"
+
fileUrl
+
imgPath
+
"')"
);
// map.put("photoData", fileUrl + imgPath);
// map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')");
map
.
put
(
"photoData"
,
imgPath
);
map
.
put
(
"openOperUrl"
,
"window.open('"
+
imgPath
+
"')"
);
}
resp
.
put
(
"imgs"
,
checkimgs
);
return
resp
;
...
...
@@ -1118,8 +1124,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId
if
(
e
.
get
(
"inputId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"checkInputId"
).
toString
())
&&
e
.
get
(
"classifyId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"classifyId"
).
toString
()))
{
photoList
.
add
(
fileUrl
+
imgContent
.
get
(
i
).
get
(
"photoData"
));
//
photoList.add(fileUrl + imgContent.get(i).get("photoData"));
photoList
.
add
(
String
.
valueOf
(
imgContent
.
get
(
i
).
get
(
"photoData"
)));
}
if
(
PointStatusEnum
.
UNQUALIFIED
.
getName
().
equals
(
e
.
get
(
"IsOK"
).
toString
()))
{
equip
.
put
(
"IsOK"
,
PointStatusEnum
.
UNQUALIFIED
.
getName
());
...
...
@@ -1177,7 +1183,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId
if
(
e
.
get
(
"checkInputId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"checkInputId"
).
toString
())
&&
e
.
get
(
"classifyId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"classifyId"
).
toString
())){
e
.
put
(
"photoData"
,
fileUrl
+
imgContent
.
get
(
i
).
get
(
"photoData"
));
// e.put("photoData",fileUrl+imgContent.get(i).get("photoData"));
e
.
put
(
"photoData"
,
imgContent
.
get
(
i
).
get
(
"photoData"
));
}
}
});
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
afce51b8
...
...
@@ -179,8 +179,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrlPre;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Value
(
"${file.url}"
)
private
String
fileServerAddress
;
...
...
@@ -418,7 +418,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String
[]
photoUrlsList
=
photoUrls
.
split
(
","
);
for
(
String
url
:
photoUrlsList
)
{
if
(!
""
.
equals
(
url
)){
photoUrlsB
.
append
(
fileUrl
+
url
);
// photoUrlsB.append(fileUrl+url);
photoUrlsB
.
append
(
url
);
photoUrlsB
.
append
(
","
);
}
}
...
...
@@ -439,7 +440,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
record
.
setExcuteUserId
(
userId
);
record
.
setExcuteDepartmentId
(
departmentId
);
if
(
flowJson
!=
null
&&
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
flowJson
.
getString
(
"photoUrls"
))){
flowJson
.
put
(
"photoUrls"
,
fileUrl
+
flowJson
.
getString
(
"photoUrls"
));
// flowJson.put("photoUrls",fileUrl+flowJson.getString("photoUrls"));
flowJson
.
put
(
"photoUrls"
,
flowJson
.
getString
(
"photoUrls"
));
}
record
.
setFlowJson
(
flowJson
!=
null
?
flowJson
.
toJSONString
()
:
null
);
record
.
setFlowTaskName
(
taskName
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/TaskServiceImpl.java
View file @
afce51b8
...
...
@@ -105,8 +105,8 @@ public class TaskServiceImpl implements ITaskService {
// @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrl;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Override
@Transactional
public
Long
addNewTask
(
TaskParam
param
)
{
...
...
@@ -174,7 +174,8 @@ public class TaskServiceImpl implements ITaskService {
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
picList
=
taskPictureMapper
.
queryTaskFeedbackPic
(
feedback
.
getId
());
for
(
int
i
=
0
;
i
<
picList
.
size
()
;
i
++)
{
list
.
add
(
fileUrl
+
picList
.
get
(
i
));
// list.add(fileUrl+ picList.get(i));
list
.
add
(
picList
.
get
(
i
));
}
feedbackBo
.
setFeedbackPics
(
list
);
feedbackList
.
add
(
feedbackBo
);
...
...
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