Commit 4b87a854 by yao.xiao

测试印章上传

parent 5cad6c31
......@@ -47,8 +47,9 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
byte[] bytes = sealFile.getBytes();
InputStream in = new ByteArrayInputStream(bytes);
InetAddress address = InetAddress.getLocalHost();
File outFile = new File(signImage + sealFile.getName());
System.out.println("http://" + address + signImage);
File outFile = new File(signImage + sealFile.getOriginalFilename());
System.out.println(address.getHostAddress());
System.out.println("http://" + address.getHostAddress() + signImage + sealFile.getOriginalFilename());
// File outFile = new File("D:\\"+sealFile.getOriginalFilename());
FileOutputStream out = new FileOutputStream(outFile);
byte[] bts = new byte[1024];
......@@ -59,7 +60,7 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
if (!CommonUtil.isNullOrZero(insurerBranchId)) {
AclInsurerBranch branch = new AclInsurerBranch();
branch.setId(insurerBranchId);
branch.setElectronicTaxSeal("http://" + address + signImage);
branch.setElectronicTaxSeal("http://" + address.getHostAddress() + signImage+sealFile.getOriginalFilename());
branch.setUpdatedAt(new Date());
branch.setUpdatedBy(loginId);
aclInsurerBranchDALService.update(branch);
......@@ -67,12 +68,12 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
if (!CommonUtil.isNullOrZero(insurerBranchDeptId)) {
AclInsurerBranchDept dept = new AclInsurerBranchDept();
dept.setId(insurerBranchDeptId);
dept.setElectronicTaxSeal("http://" + address + signImage);
dept.setElectronicTaxSeal("http://" + address.getHostAddress() + signImage+sealFile.getOriginalFilename());
dept.setUpdatedAt(new Date());
dept.setUpdatedBy(loginId);
aclInsurerBranchDeptDALService.update(dept);
}
responseVO.setFileUrl("http://" + address + signImage);
responseVO.setFileUrl("http://" + address.getHostAddress() + signImage+sealFile.getOriginalFilename());
} catch (Exception e) {
success = false;
message = ZHBErrorConfig.getErrorInfo("830025");
......
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