Commit 4b87a854 by yao.xiao

测试印章上传

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