修改文件访问ip
This commit is contained in:
parent
e4d3e2b8b0
commit
1baf1f537b
|
|
@ -24,9 +24,9 @@ public class IpAndPathConfig {
|
|||
public static String getUrl(){
|
||||
String os = System.getProperty("os.name");
|
||||
if(os.toLowerCase().startsWith("win")){
|
||||
return LINUX_URL;
|
||||
return WINDOWS_URL;
|
||||
}else{
|
||||
return WINDOWS_URL;
|
||||
return LINUX_URL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,8 +130,9 @@ public class PersonComprehensiveController {
|
|||
public R faceDetection(@RequestBody PersonComprehensiveBean bean) {
|
||||
try {
|
||||
String url = IpAndPathConfig.getFaceUrl();
|
||||
log.error("url:" + url);
|
||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
||||
FaceResult faceResult = arcFaceHelper.getFaceFeatures(url + bean.getFacePhoto());
|
||||
FaceResult faceResult = arcFaceHelper.getFaceFeatures(url + bean.getFacePhoto().replace("ynRealName/", ""));
|
||||
return R.ok(faceResult);
|
||||
}catch (Exception e){
|
||||
return R.fail("人脸检测失败:" + e.getMessage());
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public class SalaryStatServiceImpl implements SalaryStatService{
|
|||
ZipOutputStream zos = new ZipOutputStream(byteArrayOutputStream);
|
||||
try {
|
||||
for (TemporarySalaryFileBean bean : list) {
|
||||
URL url = new URL(IpAndPathConfig.getFaceUrl() + bean.getFilePath());
|
||||
URL url = new URL(IpAndPathConfig.getFaceUrl() + bean.getFilePath().replace("ynRealName/", ""));
|
||||
// URL url = new URL("http://192.168.0.14:1909/file/" + bean.getFilePath());
|
||||
try (InputStream in = url.openStream()) {
|
||||
// 添加文件到zip中
|
||||
|
|
|
|||
Loading…
Reference in New Issue