Commit afce51b8 authored by xixinzhao's avatar xixinzhao

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

parent fff85edf
...@@ -104,8 +104,8 @@ public class CheckController extends AbstractBaseController { ...@@ -104,8 +104,8 @@ public class CheckController extends AbstractBaseController {
// @Value("${file.port}") // @Value("${file.port}")
// private String filePort; // private String filePort;
@Value("${file.url}") // @Value("${file.url}")
private String fileUrl; // private String fileUrl;
@Value("${amosRefresh.patrol.topic}") @Value("${amosRefresh.patrol.topic}")
private String patrolTopic; private String patrolTopic;
...@@ -196,7 +196,8 @@ public class CheckController extends AbstractBaseController { ...@@ -196,7 +196,8 @@ public class CheckController extends AbstractBaseController {
String fileName = "巡检记录图片" + new Date().getTime() + ".zip"; String fileName = "巡检记录图片" + new Date().getTime() + ".zip";
// String rootPath = "http://" + fileIp + ":" + filePort + "/"; // String rootPath = "http://" + fileIp + ":" + filePort + "/";
for (Map<String, Object> map : list) { 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); FileHelper.exportZip(list, fileName, response);
} }
...@@ -210,7 +211,8 @@ public class CheckController extends AbstractBaseController { ...@@ -210,7 +211,8 @@ public class CheckController extends AbstractBaseController {
String fileName = "巡检记录图片" + new Date().getTime() + ".zip"; String fileName = "巡检记录图片" + new Date().getTime() + ".zip";
// String rootPath = "http://" + fileIp + ":" + filePort + "/"; // String rootPath = "http://" + fileIp + ":" + filePort + "/";
for (Map<String, Object> map : list) { 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); FileHelper.exportZip(list, fileName, response);
} }
......
...@@ -142,8 +142,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -142,8 +142,8 @@ public class CheckServiceImpl implements ICheckService {
// //
// @Value("${file.port}") // @Value("${file.port}")
// private String filePort; // private String filePort;
@Value("${file.url}") // @Value("${file.url}")
private String fileUrl; // private String fileUrl;
@Override @Override
public Page<CheckInfoVo> getCheckInfo(String toke,String product,String appKey,CheckInfoPageParam param) { public Page<CheckInfoVo> getCheckInfo(String toke,String product,String appKey,CheckInfoPageParam param) {
...@@ -549,7 +549,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -549,7 +549,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo pointCheckDetailBo = list.get(0); PointCheckDetailBo pointCheckDetailBo = list.get(0);
List<CheckShot> pointShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), 0l,0l); List<CheckShot> pointShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), 0l,0l);
pointShot.forEach(action -> { pointShot.forEach(action -> {
pointImgUrls.add(fileUrl + action.getPhotoData()); // pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls.add(action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -586,7 +587,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -586,7 +587,8 @@ public class CheckServiceImpl implements ICheckService {
List<String> pointInputImgUrls = new ArrayList<>(); List<String> pointInputImgUrls = new ArrayList<>();
List<CheckShot> pointInputShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), action.getCheckInputId(),action.getClassifyId()); List<CheckShot> pointInputShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), action.getCheckInputId(),action.getClassifyId());
pointInputShot.forEach(inputShot -> { pointInputShot.forEach(inputShot -> {
pointInputImgUrls.add(fileUrl + inputShot.getPhotoData()); // pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls.add(inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -633,7 +635,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -633,7 +635,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo pointCheckDetailBo = list.get(0); PointCheckDetailBo pointCheckDetailBo = list.get(0);
List<CheckShot> pointShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), 0l,0l); List<CheckShot> pointShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), 0l,0l);
pointShot.forEach(action -> { pointShot.forEach(action -> {
pointImgUrls.add(fileUrl + action.getPhotoData()); // pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls.add(action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -674,7 +677,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -674,7 +677,8 @@ public class CheckServiceImpl implements ICheckService {
List<String> pointInputImgUrls = new ArrayList<>(); List<String> pointInputImgUrls = new ArrayList<>();
List<CheckShot> pointInputShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), action.getCheckInputId(),action.getClassifyId()); List<CheckShot> pointInputShot = checkShotDao.findAllByCheckIdAndCheckInputIdAndClassifyId(pointCheckDetailBo.getCheckId(), action.getCheckInputId(),action.getClassifyId());
pointInputShot.forEach(inputShot -> { pointInputShot.forEach(inputShot -> {
pointInputImgUrls.add(fileUrl + inputShot.getPhotoData()); // pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls.add(inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -765,8 +769,10 @@ public class CheckServiceImpl implements ICheckService { ...@@ -765,8 +769,10 @@ public class CheckServiceImpl implements ICheckService {
// String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
for (Map<String, Object> map : checkimgs) { for (Map<String, Object> map : checkimgs) {
String imgPath = map.get("photoData").toString().replace("\\", "/"); String imgPath = map.get("photoData").toString().replace("\\", "/");
map.put("photoData", fileUrl + imgPath); // map.put("photoData", fileUrl + imgPath);
map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')"); // map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')");
map.put("photoData", imgPath);
map.put("openOperUrl", "window.open('" + imgPath + "')");
} }
resp.put("imgs", checkimgs); resp.put("imgs", checkimgs);
return resp; return resp;
...@@ -1118,8 +1124,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1118,8 +1124,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId //checkInputId
if (e.get("inputId").toString().equals(imgContent.get(i).get("checkInputId").toString()) if (e.get("inputId").toString().equals(imgContent.get(i).get("checkInputId").toString())
&& e.get("classifyId").toString().equals(imgContent.get(i).get("classifyId").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())) { if (PointStatusEnum.UNQUALIFIED.getName().equals(e.get("IsOK").toString())) {
equip.put("IsOK", PointStatusEnum.UNQUALIFIED.getName()); equip.put("IsOK", PointStatusEnum.UNQUALIFIED.getName());
...@@ -1177,7 +1183,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1177,7 +1183,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId //checkInputId
if(e.get("checkInputId").toString().equals(imgContent.get(i).get("checkInputId").toString()) if(e.get("checkInputId").toString().equals(imgContent.get(i).get("checkInputId").toString())
&& e.get("classifyId").toString().equals(imgContent.get(i).get("classifyId").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 { ...@@ -179,8 +179,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// @Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrlPre; // private String photoUrlPre;
@Value("${file.url}") // @Value("${file.url}")
private String fileUrl; // private String fileUrl;
@Value("${file.url}") @Value("${file.url}")
private String fileServerAddress; private String fileServerAddress;
...@@ -418,7 +418,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -418,7 +418,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String[] photoUrlsList = photoUrls.split(","); String[] photoUrlsList = photoUrls.split(",");
for (String url : photoUrlsList) { for (String url : photoUrlsList) {
if (!"".equals(url)){ if (!"".equals(url)){
photoUrlsB.append(fileUrl+url); // photoUrlsB.append(fileUrl+url);
photoUrlsB.append(url);
photoUrlsB.append(","); photoUrlsB.append(",");
} }
} }
...@@ -439,7 +440,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -439,7 +440,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
record.setExcuteUserId(userId); record.setExcuteUserId(userId);
record.setExcuteDepartmentId(departmentId); record.setExcuteDepartmentId(departmentId);
if(flowJson != null && org.apache.commons.lang3.StringUtils.isNotBlank(flowJson.getString("photoUrls"))){ 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.setFlowJson(flowJson != null ? flowJson.toJSONString() : null);
record.setFlowTaskName(taskName); record.setFlowTaskName(taskName);
......
...@@ -105,8 +105,8 @@ public class TaskServiceImpl implements ITaskService { ...@@ -105,8 +105,8 @@ public class TaskServiceImpl implements ITaskService {
// @Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrl; // private String photoUrl;
@Value("${file.url}") // @Value("${file.url}")
private String fileUrl; // private String fileUrl;
@Override @Override
@Transactional @Transactional
public Long addNewTask(TaskParam param) { public Long addNewTask(TaskParam param) {
...@@ -174,7 +174,8 @@ public class TaskServiceImpl implements ITaskService { ...@@ -174,7 +174,8 @@ public class TaskServiceImpl implements ITaskService {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
List<String> picList = taskPictureMapper.queryTaskFeedbackPic(feedback.getId()); List<String> picList = taskPictureMapper.queryTaskFeedbackPic(feedback.getId());
for (int i = 0; i <picList.size() ; i++) { 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); feedbackBo.setFeedbackPics(list);
feedbackList.add(feedbackBo); 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