|
@@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -754,15 +755,15 @@ public class GLPPWXGQueryAddServiceImpl implements GLPPWXGQueryAddService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private String putCert(String image){
|
|
|
+ private String putCert(String image) throws IOException {
|
|
|
SimpleDateFormat sdfs = new SimpleDateFormat("yyyyMM/");
|
|
|
String fileId = "";
|
|
|
- String id = sdfs.format(new Date())+image;
|
|
|
- File newFile = new File(id);
|
|
|
+ String id = publicService.path(image);
|
|
|
+ File newFile = publicService.createf(id);
|
|
|
|
|
|
try{
|
|
|
baseService.saveToFile(greeLogic.greeFileUrl(image), newFile);
|
|
|
- ossUtil.uploadFile(id, new File(id));
|
|
|
+ ossUtil.uploadFile(id, newFile);
|
|
|
fileId = id;
|
|
|
return fileId;
|
|
|
} catch (Exception ex) {
|
|
@@ -869,7 +870,7 @@ public class GLPPWXGQueryAddServiceImpl implements GLPPWXGQueryAddService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void processBxInfo(InsureWorkerCommercialFile iwcfile){
|
|
|
+ private void processBxInfo(InsureWorkerCommercialFile iwcfile) throws IOException {
|
|
|
String id = putCert(iwcfile.getOutZjlj());
|
|
|
if (StringUtils.isNotEmpty(id)){
|
|
|
iwcfile.setFileUrl(id);
|