Commit afce51b8 authored by xixinzhao's avatar xixinzhao

巡检删除后端返回图片拼接ip端口

parent fff85edf
......@@ -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);
}
......
......@@ -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(), 0l,0l);
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(), 0l,0l);
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"));
}
}
});
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment