Commit 5e583e11 by 李辅翼

v11

parent 47fefcec
......@@ -93,6 +93,15 @@ public class PicController {
}
/**
* 根据序号插入车辆图片
* @param xh
*/
@GetMapping("/insertVehPicByXh")
public void insertVehPicByXh(@RequestParam("xh") String xh){
vehicle.insertVehPicByXh(xh);
}
/**
* 指定时间段驾驶人头像同步
* @param start
* @param end
......
......@@ -8,4 +8,6 @@ public interface Vehicle {
void insertVehPicByCar(String hphm, String hpzl);
void getVehPicStage(String start, String end);
void insertVehPicByXh(String xh);
}
......@@ -123,6 +123,16 @@ public class VehicleImpl implements Vehicle {
getPic(sql);
}
/**
* 根据序号插入图片
* @param xh
*/
@Override
public void insertVehPicByXh(String xh) {
String sql = "select * from GYJG.VEH_PICTURE where XH='"+xh+"'";
getPic(sql);
}
private void getPic(String sql) {
getHbaseVioPicTable();
......
......@@ -22,9 +22,6 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.sql.*;
import java.sql.Connection;
import java.util.Map;
......
......@@ -34,10 +34,10 @@ public class FileServiceImpl implements FileService {
return "/group" + path.split("group")[1];
} catch (Exception e) {
e.printStackTrace();
// e.printStackTrace();
logger.error("Upload Img Error, msg ={}", e);
uploadFile(file, fileName);
throw new RuntimeException("上传图片失败");
return uploadFile(file, fileName);
// throw new RuntimeException("上传图片失败");
}
}
......
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