From 0857c57ccb4b0c0fb5121b8769c2e80700259c46 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.21>
Date: 星期二, 20 十一月 2018 10:29:01 +0800
Subject: [PATCH] 修改视频上传
---
gx_tieta/src/com/fgkj/actions/MyFileAction.java | 4 ++--
gx_tieta/src/com/fgkj/dto/BattInf.java | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gx_tieta/src/com/fgkj/actions/MyFileAction.java b/gx_tieta/src/com/fgkj/actions/MyFileAction.java
index daf7162..684ddc7 100644
--- a/gx_tieta/src/com/fgkj/actions/MyFileAction.java
+++ b/gx_tieta/src/com/fgkj/actions/MyFileAction.java
@@ -183,7 +183,7 @@
boolean isSuccess = false;
String loadpath = ActionUtil.getSession().getServletContext().getRealPath("/");
String str = new File(loadpath).getParentFile().getAbsolutePath(); //鑾峰彇鏈嶅姟鍣ㄦ墍鍦ㄧ殑缁濆璺緞
- String root = str+"/"+fileRoot+"/"+binf.getStationId()+"/video/"; // 涓婁紶璺緞
+ String root = str+"/"+fileRoot+"/"+binf.getStationId()+"/"+binf.getVideoOrImage()+"/"; // 涓婁紶璺緞
for(int i=0;i<file.length && binf != null;i++){
String filePath = root+fileFileName[i];
createFilefolderIFNotExist(filePath);
@@ -212,7 +212,7 @@
String loadpath = ActionUtil.getSession().getServletContext().getRealPath("/");
String str = new File(loadpath).getParentFile().getAbsolutePath();
if(binf != null && binf.getStationId() != null && binf.getStationName() != null){
- String filesource = str+File.separator+fileRoot+File.separator+binf.getStationId()+File.separator+binf.getStationName()+File.separator; //褰撳墠璇锋眰鐨勬満鎴挎墍鍦ㄧ殑璧勬簮鏂囦欢澶�
+ String filesource = str+File.separator+fileRoot+File.separator+binf.getStationId()+File.separator+binf.getVideoOrImage()+File.separator; //褰撳墠璇锋眰鐨勬満鎴挎墍鍦ㄧ殑璧勬簮鏂囦欢澶�
//System.out.println(filesource);
File source = new File(filesource);
File[] files = source.listFiles();
diff --git a/gx_tieta/src/com/fgkj/dto/BattInf.java b/gx_tieta/src/com/fgkj/dto/BattInf.java
index dc93b0e..740863e 100644
--- a/gx_tieta/src/com/fgkj/dto/BattInf.java
+++ b/gx_tieta/src/com/fgkj/dto/BattInf.java
@@ -85,6 +85,7 @@
private Battinf_ex binf_ex;
+ private String VideoOrImage ;//涓婁紶鏂囦欢鐨勬牸寮�
public BattInf() {
super();
}
@@ -552,6 +553,13 @@
public void setInstall_user(String install_user) {
this.install_user = install_user;
}
+
+ public String getVideoOrImage() {
+ return VideoOrImage;
+ }
+ public void setVideoOrImage(String videoOrImage) {
+ VideoOrImage = videoOrImage;
+ }
@Override
public String toString() {
return "BattInf [num=" + num + ", StationId=" + StationId
--
Gitblit v1.9.1