Commit 537f89d5 authored by 李成龙's avatar 李成龙

统一文件路径

parent a6c80144
...@@ -27,7 +27,7 @@ public class FireRectificationServiceImpl implements FireRectificationService { ...@@ -27,7 +27,7 @@ public class FireRectificationServiceImpl implements FireRectificationService {
/** /**
* 文件服务器地址 * 文件服务器地址
*/ */
@Value("${file.downLoad.url}") @Value("${file.url}")
private String ipUrl; private String ipUrl;
/** /**
......
...@@ -10,7 +10,7 @@ public class PropertiesLoader { ...@@ -10,7 +10,7 @@ public class PropertiesLoader {
/** /**
* 图片服务器地址 * 图片服务器地址
*/ */
@Value("${pic-server.uri}") @Value("${file.url}")
private String picUri; private String picUri;
/** /**
......
...@@ -95,12 +95,14 @@ public class CheckController extends AbstractBaseController { ...@@ -95,12 +95,14 @@ public class CheckController extends AbstractBaseController {
@Value("${linux.img.path}") @Value("${linux.img.path}")
private String linuxImgPath; private String linuxImgPath;
@Value("${file.ip}") // @Value("${file.ip}")
private String fileIp; // private String fileIp;
//
@Value("${file.port}") // @Value("${file.port}")
private String filePort; // private String filePort;
@Value("${file.url}")
private String fileUrl;
@Value("${amosRefresh.patrol.topic}") @Value("${amosRefresh.patrol.topic}")
private String patrolTopic; private String patrolTopic;
@Autowired @Autowired
...@@ -222,9 +224,9 @@ public class CheckController extends AbstractBaseController { ...@@ -222,9 +224,9 @@ public class CheckController extends AbstractBaseController {
CheckInfoPageParam param = CheckPageParamUtil.fillCheckInfoParam(queryRequests, null, paramMap); CheckInfoPageParam param = CheckPageParamUtil.fillCheckInfoParam(queryRequests, null, paramMap);
List<Map<String, Object>> list = checkService.getCheckInfoImgsList(param); List<Map<String, Object>> list = checkService.getCheckInfoImgsList(param);
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", rootPath + map.get("photoData").toString()); map.put("photoData", fileUrl + map.get("photoData").toString());
} }
FileHelper.exportZip(list, fileName, response); FileHelper.exportZip(list, fileName, response);
} }
...@@ -236,9 +238,9 @@ public class CheckController extends AbstractBaseController { ...@@ -236,9 +238,9 @@ public class CheckController extends AbstractBaseController {
HttpServletResponse response) { HttpServletResponse response) {
List<Map<String, Object>> list = checkService.getCheckInfoImgsList(ids); List<Map<String, Object>> list = checkService.getCheckInfoImgsList(ids);
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", rootPath + map.get("photoData").toString()); map.put("photoData", fileUrl + map.get("photoData").toString());
} }
FileHelper.exportZip(list, fileName, response); FileHelper.exportZip(list, fileName, response);
} }
......
...@@ -146,12 +146,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -146,12 +146,14 @@ public class CheckServiceImpl implements ICheckService {
@Autowired @Autowired
IPointDao iPointDao; IPointDao iPointDao;
@Value("${file.ip}") // @Value("${file.ip}")
private String fileIp; // private String fileIp;
//
@Value("${file.port}") // @Value("${file.port}")
private String filePort; // private String filePort;
@Value("${file.url}")
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) {
long total = checkMapper.countCheckInfoData(param); long total = checkMapper.countCheckInfoData(param);
...@@ -517,12 +519,12 @@ public class CheckServiceImpl implements ICheckService { ...@@ -517,12 +519,12 @@ public class CheckServiceImpl implements ICheckService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
// InetAddress address = InetAddress.getLocalHost(); // InetAddress address = InetAddress.getLocalHost();
// String ip = address.getHostAddress(); // String ip = address.getHostAddress();
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
List<String> pointImgUrls = new ArrayList<>(); List<String> pointImgUrls = new ArrayList<>();
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(ipPort + action.getPhotoData()); pointImgUrls.add(fileUrl + action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -559,7 +561,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -559,7 +561,7 @@ 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(ipPort + inputShot.getPhotoData()); pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -601,12 +603,12 @@ public class CheckServiceImpl implements ICheckService { ...@@ -601,12 +603,12 @@ public class CheckServiceImpl implements ICheckService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
// InetAddress address = InetAddress.getLocalHost(); // InetAddress address = InetAddress.getLocalHost();
// String ip = address.getHostAddress(); // String ip = address.getHostAddress();
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
List<String> pointImgUrls = new ArrayList<>(); List<String> pointImgUrls = new ArrayList<>();
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(ipPort + action.getPhotoData()); pointImgUrls.add(fileUrl + action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -647,7 +649,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -647,7 +649,7 @@ 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(ipPort + inputShot.getPhotoData()); pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -735,11 +737,11 @@ public class CheckServiceImpl implements ICheckService { ...@@ -735,11 +737,11 @@ public class CheckServiceImpl implements ICheckService {
Map<String, Object> resp = new HashMap<>(); Map<String, Object> resp = new HashMap<>();
resp.put("check", check); resp.put("check", check);
resp.put("inputItems", checkInputItems); resp.put("inputItems", checkInputItems);
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", ipPort + imgPath); map.put("photoData", fileUrl + imgPath);
map.put("openOperUrl", "window.open('" + ipPort + imgPath + "')"); map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')");
} }
resp.put("imgs", checkimgs); resp.put("imgs", checkimgs);
return resp; return resp;
...@@ -1082,7 +1084,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1082,7 +1084,7 @@ public class CheckServiceImpl implements ICheckService {
equip.put("IsOK", PointStatusEnum.QUALIFIED.getName()); equip.put("IsOK", PointStatusEnum.QUALIFIED.getName());
List<HashMap<String, Object>> inputContent = checkMapper.getEquipInputByCheckId(param); List<HashMap<String, Object>> inputContent = checkMapper.getEquipInputByCheckId(param);
List<HashMap<String, Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID()); List<HashMap<String, Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID());
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
inputContent.forEach(e -> { inputContent.forEach(e -> {
List<String> photoList = new ArrayList<>(); List<String> photoList = new ArrayList<>();
//查询图片 //查询图片
...@@ -1090,7 +1092,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1090,7 +1092,7 @@ 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(ipPort + imgContent.get(i).get("photoData")); photoList.add(fileUrl + imgContent.get(i).get("photoData"));
} }
if (PointStatusEnum.UNQUALIFIED.getName().equals(e.get("IsOK").toString())) { if (PointStatusEnum.UNQUALIFIED.getName().equals(e.get("IsOK").toString())) {
...@@ -1161,14 +1163,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1161,14 +1163,14 @@ public class CheckServiceImpl implements ICheckService {
Long checkID = param.getCheckID(); Long checkID = param.getCheckID();
List<HashMap<String, Object>> content = checkMapper.getEquipInputByCheckId(param); List<HashMap<String, Object>> content = checkMapper.getEquipInputByCheckId(param);
List<HashMap<String, Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID()); List<HashMap<String, Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID());
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
content.forEach(e -> { content.forEach(e -> {
//查询图片 //查询图片
for (int i = 0; i < imgContent.size(); i++) { for (int i = 0; i < imgContent.size(); i++) {
//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", ipPort + imgContent.get(i).get("photoData")); e.put("photoData", fileUrl + imgContent.get(i).get("photoData"));
} }
} }
}); });
......
...@@ -178,10 +178,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -178,10 +178,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Value("${server.port}") @Value("${server.port}")
private String port; private String port;
@Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
private String photoUrlPre; // private String photoUrlPre;
@Value("${file.url}")
@Value("${upload.server.address}") private String fileUrl;
@Value("${file.url}")
private String fileServerAddress; private String fileServerAddress;
@Value("${params.work.flow.processDefinitionKey}") @Value("${params.work.flow.processDefinitionKey}")
...@@ -417,7 +419,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -417,7 +419,7 @@ 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(photoUrlPre+url); photoUrlsB.append(fileUrl+url);
photoUrlsB.append(","); photoUrlsB.append(",");
} }
} }
...@@ -438,7 +440,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -438,7 +440,7 @@ 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",photoUrlPre+flowJson.getString("photoUrls")); flowJson.put("photoUrls",fileUrl+flowJson.getString("photoUrls"));
} }
record.setFlowJson(flowJson != null ? flowJson.toJSONString() : null); record.setFlowJson(flowJson != null ? flowJson.toJSONString() : null);
record.setFlowTaskName(taskName); record.setFlowTaskName(taskName);
......
...@@ -102,9 +102,10 @@ public class TaskServiceImpl implements ITaskService { ...@@ -102,9 +102,10 @@ public class TaskServiceImpl implements ITaskService {
@Autowired @Autowired
private CheckMapper checkMapper; private CheckMapper checkMapper;
@Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
private String photoUrl; // private String photoUrl;
@Value("${file.url}")
private String fileUrl;
@Override @Override
@Transactional @Transactional
public Long addNewTask(TaskParam param) { public Long addNewTask(TaskParam param) {
...@@ -172,7 +173,7 @@ public class TaskServiceImpl implements ITaskService { ...@@ -172,7 +173,7 @@ 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(photoUrl+ picList.get(i)); list.add(fileUrl+ picList.get(i));
} }
feedbackBo.setFeedbackPics(list); feedbackBo.setFeedbackPics(list);
feedbackList.add(feedbackBo); feedbackList.add(feedbackBo);
......
...@@ -98,12 +98,15 @@ public class CheckController extends AbstractBaseController { ...@@ -98,12 +98,15 @@ public class CheckController extends AbstractBaseController {
@Value("${linux.img.path}") @Value("${linux.img.path}")
private String linuxImgPath; private String linuxImgPath;
@Value("${file.ip}") // @Value("${file.ip}")
private String fileIp; // private String fileIp;
//
@Value("${file.port}") // @Value("${file.port}")
private String filePort; // private String filePort;
@Value("${file.url}")
private String fileUrl;
@Value("${amosRefresh.patrol.topic}") @Value("${amosRefresh.patrol.topic}")
private String patrolTopic; private String patrolTopic;
@Autowired @Autowired
...@@ -191,9 +194,9 @@ public class CheckController extends AbstractBaseController { ...@@ -191,9 +194,9 @@ public class CheckController extends AbstractBaseController {
CheckInfoPageParam param = CheckPageParamUtil.fillCheckInfoParam(queryRequests, null, paramMap); CheckInfoPageParam param = CheckPageParamUtil.fillCheckInfoParam(queryRequests, null, paramMap);
List<Map<String, Object>> list = checkService.getCheckInfoImgsList(param); List<Map<String, Object>> list = checkService.getCheckInfoImgsList(param);
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", rootPath + map.get("photoData").toString()); map.put("photoData", fileUrl + map.get("photoData").toString());
} }
FileHelper.exportZip(list, fileName, response); FileHelper.exportZip(list, fileName, response);
} }
...@@ -205,9 +208,9 @@ public class CheckController extends AbstractBaseController { ...@@ -205,9 +208,9 @@ public class CheckController extends AbstractBaseController {
HttpServletResponse response) { HttpServletResponse response) {
List<Map<String, Object>> list = checkService.getCheckInfoImgsList(ids); List<Map<String, Object>> list = checkService.getCheckInfoImgsList(ids);
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", rootPath + map.get("photoData").toString()); map.put("photoData", fileUrl + map.get("photoData").toString());
} }
FileHelper.exportZip(list, fileName, response); FileHelper.exportZip(list, fileName, response);
} }
......
...@@ -137,12 +137,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -137,12 +137,14 @@ public class CheckServiceImpl implements ICheckService {
@Autowired @Autowired
private IPointClassifyDao iPointClassifyDao; private IPointClassifyDao iPointClassifyDao;
@Value("${file.ip}") // @Value("${file.ip}")
private String fileIp; // private String fileIp;
//
@Value("${file.port}") // @Value("${file.port}")
private String filePort; // private String filePort;
@Value("${file.url}")
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) {
long total = checkMapper.countCheckInfoData(param); long total = checkMapper.countCheckInfoData(param);
...@@ -541,12 +543,12 @@ public class CheckServiceImpl implements ICheckService { ...@@ -541,12 +543,12 @@ public class CheckServiceImpl implements ICheckService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
// InetAddress address = InetAddress.getLocalHost(); // InetAddress address = InetAddress.getLocalHost();
// String ip = address.getHostAddress(); // String ip = address.getHostAddress();
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
List<String> pointImgUrls = new ArrayList<>(); List<String> pointImgUrls = new ArrayList<>();
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(ipPort + action.getPhotoData()); pointImgUrls.add(fileUrl + action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -583,7 +585,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -583,7 +585,7 @@ 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(ipPort + inputShot.getPhotoData()); pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -625,12 +627,12 @@ public class CheckServiceImpl implements ICheckService { ...@@ -625,12 +627,12 @@ public class CheckServiceImpl implements ICheckService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
// InetAddress address = InetAddress.getLocalHost(); // InetAddress address = InetAddress.getLocalHost();
// String ip = address.getHostAddress(); // String ip = address.getHostAddress();
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
List<String> pointImgUrls = new ArrayList<>(); List<String> pointImgUrls = new ArrayList<>();
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(ipPort + action.getPhotoData()); pointImgUrls.add(fileUrl + action.getPhotoData());
}); });
Check check = checkDao.findById(checkId).get(); Check check = checkDao.findById(checkId).get();
pointCheckRespone.setPointId(pointCheckDetailBo.getPointId()); pointCheckRespone.setPointId(pointCheckDetailBo.getPointId());
...@@ -671,7 +673,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -671,7 +673,7 @@ 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(ipPort + inputShot.getPhotoData()); pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
}); });
AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone(); AppCheckInputRespone appCheckInputRespone = new AppCheckInputRespone();
appCheckInputRespone.setCheckInputId(action.getCheckInputId()); appCheckInputRespone.setCheckInputId(action.getCheckInputId());
...@@ -759,11 +761,11 @@ public class CheckServiceImpl implements ICheckService { ...@@ -759,11 +761,11 @@ public class CheckServiceImpl implements ICheckService {
Map<String, Object> resp = new HashMap<>(); Map<String, Object> resp = new HashMap<>();
resp.put("check", check); resp.put("check", check);
resp.put("inputItems", checkInputItems); resp.put("inputItems", checkInputItems);
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", ipPort + imgPath); map.put("photoData", fileUrl + imgPath);
map.put("openOperUrl", "window.open('" + ipPort + imgPath + "')"); map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')");
} }
resp.put("imgs", checkimgs); resp.put("imgs", checkimgs);
return resp; return resp;
...@@ -1107,7 +1109,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1107,7 +1109,7 @@ public class CheckServiceImpl implements ICheckService {
equip.put("IsOK",PointStatusEnum.QUALIFIED.getName()); equip.put("IsOK",PointStatusEnum.QUALIFIED.getName());
List<HashMap<String,Object>> inputContent = checkMapper.getEquipInputByCheckId(param); List<HashMap<String,Object>> inputContent = checkMapper.getEquipInputByCheckId(param);
List<HashMap<String,Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID()); List<HashMap<String,Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID());
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
inputContent.forEach(e -> { inputContent.forEach(e -> {
List<String> photoList = new ArrayList<>(); List<String> photoList = new ArrayList<>();
//查询图片 //查询图片
...@@ -1115,7 +1117,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1115,7 +1117,7 @@ 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(ipPort + imgContent.get(i).get("photoData")); photoList.add(fileUrl + imgContent.get(i).get("photoData"));
} }
if (PointStatusEnum.UNQUALIFIED.getName().equals(e.get("IsOK").toString())) { if (PointStatusEnum.UNQUALIFIED.getName().equals(e.get("IsOK").toString())) {
...@@ -1167,14 +1169,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1167,14 +1169,14 @@ public class CheckServiceImpl implements ICheckService {
Long checkID = param.getCheckID(); Long checkID = param.getCheckID();
List<HashMap<String,Object>> content = checkMapper.getEquipInputByCheckId(param); List<HashMap<String,Object>> content = checkMapper.getEquipInputByCheckId(param);
List<HashMap<String,Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID()); List<HashMap<String,Object>> imgContent = checkMapper.getEquipInfoImgsByCheckIdsList(param.getCheckID());
String ipPort = "http://" + fileIp + ":" + filePort + "/"; // String ipPort = "http://" + fileIp + ":" + filePort + "/";
content.forEach(e -> { content.forEach(e -> {
//查询图片 //查询图片
for (int i = 0; i <imgContent.size() ; i++) { for (int i = 0; i <imgContent.size() ; i++) {
//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",ipPort+imgContent.get(i).get("photoData")); e.put("photoData",fileUrl+imgContent.get(i).get("photoData"));
} }
} }
}); });
......
...@@ -178,10 +178,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -178,10 +178,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Value("${server.port}") @Value("${server.port}")
private String port; private String port;
@Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
private String photoUrlPre; // private String photoUrlPre;
@Value("${file.url}")
@Value("${upload.server.address}") private String fileUrl;
@Value("${file.url}")
private String fileServerAddress; private String fileServerAddress;
@Value("${params.work.flow.processDefinitionKey}") @Value("${params.work.flow.processDefinitionKey}")
...@@ -417,7 +419,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -417,7 +419,7 @@ 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(photoUrlPre+url); photoUrlsB.append(fileUrl+url);
photoUrlsB.append(","); photoUrlsB.append(",");
} }
} }
...@@ -438,7 +440,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService { ...@@ -438,7 +440,7 @@ 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",photoUrlPre+flowJson.getString("photoUrls")); flowJson.put("photoUrls",fileUrl+flowJson.getString("photoUrls"));
} }
record.setFlowJson(flowJson != null ? flowJson.toJSONString() : null); record.setFlowJson(flowJson != null ? flowJson.toJSONString() : null);
record.setFlowTaskName(taskName); record.setFlowTaskName(taskName);
......
...@@ -103,9 +103,10 @@ public class TaskServiceImpl implements ITaskService { ...@@ -103,9 +103,10 @@ public class TaskServiceImpl implements ITaskService {
@Autowired @Autowired
private CheckMapper checkMapper; private CheckMapper checkMapper;
@Value("${LatentDanger.flow.photoUrls}") // @Value("${LatentDanger.flow.photoUrls}")
private String photoUrl; // private String photoUrl;
@Value("${file.url}")
private String fileUrl;
@Override @Override
@Transactional @Transactional
public Long addNewTask(TaskParam param) { public Long addNewTask(TaskParam param) {
...@@ -173,7 +174,7 @@ public class TaskServiceImpl implements ITaskService { ...@@ -173,7 +174,7 @@ 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(photoUrl+ picList.get(i)); list.add(fileUrl+ picList.get(i));
} }
feedbackBo.setFeedbackPics(list); feedbackBo.setFeedbackPics(list);
feedbackList.add(feedbackBo); feedbackList.add(feedbackBo);
......
...@@ -55,5 +55,5 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -55,5 +55,5 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
#文件服务器地址 #文件服务器地址
file.downLoad.url=http://39.98.45.134:9000/ file.url=http://39.98.45.134:9000/
...@@ -50,5 +50,5 @@ emqx.broker=tcp://172.16.11.33:1883 ...@@ -50,5 +50,5 @@ emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
#文件服务器地址 #文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/ file.url=http://39.98.246.31:8888/
...@@ -55,5 +55,5 @@ emqx.broker=tcp://172.16.11.33:1883 ...@@ -55,5 +55,5 @@ emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
#文件服务器地址 #文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/ file.url=http://39.98.246.31:8888/
...@@ -50,5 +50,5 @@ emqx.broker=tcp://172.16.11.33:1883 ...@@ -50,5 +50,5 @@ emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
#文件服务器地址 #文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/ file.url=http://39.98.246.31:8888/
...@@ -53,6 +53,6 @@ emqx.max-inflight=1000 ...@@ -53,6 +53,6 @@ emqx.max-inflight=1000
diy-config.report.record-data=true diy-config.report.record-data=true
#pic server uri #pic server uri
pic-server.uri=http://39.98.45.134:9000/ file.url=http://39.98.45.134:9000/
#pic router mark #pic router mark
pic-server.router=/fileURI/ pic-server.router=/fileURI/
\ No newline at end of file
...@@ -54,6 +54,6 @@ emqx.max-inflight=1000 ...@@ -54,6 +54,6 @@ emqx.max-inflight=1000
diy-config.report.record-data=true diy-config.report.record-data=true
#pic server uri #pic server uri
pic-server.uri=http://39.98.246.31:8888/ file.url=http://39.98.246.31:8888/
#pic router mark #pic router mark
pic-server.router=/fileURI/ pic-server.router=/fileURI/
\ No newline at end of file
...@@ -54,6 +54,6 @@ emqx.max-inflight=1000 ...@@ -54,6 +54,6 @@ emqx.max-inflight=1000
diy-config.report.record-data=false diy-config.report.record-data=false
#pic server uri #pic server uri
pic-server.uri=http://39.98.246.31:8888/ file.url=http://39.98.246.31:8888/
#pic router mark #pic router mark
pic-server.router=/fileURI/ pic-server.router=/fileURI/
\ No newline at end of file
...@@ -5,10 +5,6 @@ spring.datasource.password= root_123 ...@@ -5,10 +5,6 @@ spring.datasource.password= root_123
## eureka properties: ## eureka properties:
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
#Photo--图片服务器地址
file.ip = 39.98.45.134
file.port = 9000
security.password=a1234560 security.password=a1234560
security.loginId=jc_wjk006 security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB security.productWeb=STUDIO_APP_WEB
...@@ -46,10 +42,6 @@ spring.http.multipart.MaxRequestSize = 80480000 ...@@ -46,10 +42,6 @@ spring.http.multipart.MaxRequestSize = 80480000
windows.img.path = D:\\ windows.img.path = D:\\
linux.img.path = / linux.img.path = /
#隐患治理图片上传地址
LatentDanger.flow.photoUrls = http://39.98.45.134:9000/
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
...@@ -58,5 +50,4 @@ emqx.user-name=super ...@@ -58,5 +50,4 @@ emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
upload.root.path=D:/nginx/upload/ file.url=http://39.98.45.134:9000/
upload.server.address=http://39.98.45.134:9000/ \ No newline at end of file
\ No newline at end of file
...@@ -26,10 +26,6 @@ spring.datasource.hikari.maximum-pool-size = 10 ...@@ -26,10 +26,6 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1 spring.datasource.validationQuery = SELECT 1
#Photo--图片服务器地址
file.ip = 39.98.45.134
file.port = 9000
security.password=a1234560 security.password=a1234560
security.loginId=jc_wjk006 security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB security.productWeb=STUDIO_APP_WEB
...@@ -82,10 +78,6 @@ spring.http.multipart.MaxRequestSize = 80480000 ...@@ -82,10 +78,6 @@ spring.http.multipart.MaxRequestSize = 80480000
windows.img.path = D:\\ windows.img.path = D:\\
linux.img.path = / linux.img.path = /
#隐患治理图片上传地址
LatentDanger.flow.photoUrls = http://172.16.10.72/
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
...@@ -94,5 +86,4 @@ emqx.user-name=super ...@@ -94,5 +86,4 @@ emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
upload.root.path=D:/nginx/upload/ file.url=http://39.98.45.134:9000/
upload.server.address=http://39.98.45.134:9000/ \ No newline at end of file
\ No newline at end of file
...@@ -21,9 +21,6 @@ spring.datasource.hikari.maximum-pool-size = 10 ...@@ -21,9 +21,6 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1 spring.datasource.validationQuery = SELECT 1
#Photo--图片服务器地址
file.ip = 39.98.246.31
file.port = 8888
security.password=a1234560 security.password=a1234560
security.loginId=jc_wjk006 security.loginId=jc_wjk006
...@@ -77,10 +74,6 @@ spring.http.multipart.MaxRequestSize = 80480000 ...@@ -77,10 +74,6 @@ spring.http.multipart.MaxRequestSize = 80480000
windows.img.path = D:\\ windows.img.path = D:\\
linux.img.path = / linux.img.path = /
#隐患治理图片上传地址
LatentDanger.flow.photoUrls = http://172.16.10.72/
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
...@@ -89,5 +82,4 @@ emqx.user-name=super ...@@ -89,5 +82,4 @@ emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
upload.root.path=D:/nginx/upload/ file.url=http://39.98.45.134:9000/
upload.server.address=http://39.100.241.164:9999/ \ No newline at end of file
\ No newline at end of file
...@@ -21,9 +21,6 @@ spring.datasource.hikari.maximum-pool-size = 10 ...@@ -21,9 +21,6 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1 spring.datasource.validationQuery = SELECT 1
#Photo--图片服务器地址
file.ip = 39.98.246.31
file.port = 8888
security.password=a1234560 security.password=a1234560
security.loginId=jc_wjk006 security.loginId=jc_wjk006
...@@ -77,10 +74,6 @@ spring.http.multipart.MaxRequestSize = 80480000 ...@@ -77,10 +74,6 @@ spring.http.multipart.MaxRequestSize = 80480000
windows.img.path = D:\\ windows.img.path = D:\\
linux.img.path = / linux.img.path = /
#隐患治理图片上传地址
LatentDanger.flow.photoUrls = http://172.16.10.72/
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
...@@ -89,5 +82,4 @@ emqx.user-name=super ...@@ -89,5 +82,4 @@ emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
upload.root.path=D:/nginx/upload/ file.url=http://39.98.45.134:9000/
upload.server.address=http://39.100.241.164:9999/ \ No newline at end of file
\ No newline at end of file
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