|
@@ -8,8 +8,6 @@ import com.trade.service.filestorage.util.FileUtil;
|
|
import com.trade.service.thirdparty.xiaotu.dto.BusinessCommonRequest;
|
|
import com.trade.service.thirdparty.xiaotu.dto.BusinessCommonRequest;
|
|
import com.trade.service.thirdparty.xiaotu.dto.customsDeclarationFileResponse;
|
|
import com.trade.service.thirdparty.xiaotu.dto.customsDeclarationFileResponse;
|
|
import com.trade.service.thirdparty.xiaotu.service.XiaotuRequestService;
|
|
import com.trade.service.thirdparty.xiaotu.service.XiaotuRequestService;
|
|
-import com.trade.service.thirdparty.xiaotu.utils.MultipartFileExtend;
|
|
|
|
-import com.trade.service.thirdparty.xiaotu.utils.XiaoTuUtil;
|
|
|
|
import com.trade.service.trade.salesorder.domain.CustomsDeclarationFile;
|
|
import com.trade.service.trade.salesorder.domain.CustomsDeclarationFile;
|
|
import com.trade.service.trade.salesorder.mapper.CustomsDeclarationFileMapper;
|
|
import com.trade.service.trade.salesorder.mapper.CustomsDeclarationFileMapper;
|
|
import com.trade.service.trade.salesorder.service.ICustomsDeclarationFileService;
|
|
import com.trade.service.trade.salesorder.service.ICustomsDeclarationFileService;
|
|
@@ -17,7 +15,6 @@ import com.trade.service.trade.filingdoc.vo.SalesOrder4CustomsFileQueryVO;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.io.IOException;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -55,27 +52,21 @@ public class CustomsDeclarationFileServiceImpl extends ServiceImpl<CustomsDeclar
|
|
.customsDeclarationFileQuery(fileQueryVO.getQueryNo(), fileQueryVO.getType(), businessCommonRequest);
|
|
.customsDeclarationFileQuery(fileQueryVO.getQueryNo(), fileQueryVO.getType(), businessCommonRequest);
|
|
try {
|
|
try {
|
|
if (null != fileResponse.getBgdBlob()) {
|
|
if (null != fileResponse.getBgdBlob()) {
|
|
- MultipartFileExtend bgdFile = XiaoTuUtil.getMultipartFileExtend(
|
|
|
|
- fileQueryVO.getQueryNo() + FileUtil.getSuffix(fileResponse.getBgdWjm()),
|
|
|
|
- fileResponse.getBgdWjm(), fileResponse.getBgdBlob());
|
|
|
|
- TFileStorage fileStorage = ossFileService.addStorage(bgdFile, FileModuleEnum.CUSTOMS_DECLARATION);
|
|
|
|
|
|
+ TFileStorage fileStorage = ossFileService.addStorageWithBase64Str(fileResponse.getBgdWjm(),
|
|
|
|
+ fileResponse.getBgdBlob(), FileModuleEnum.CUSTOMS_DECLARATION);
|
|
customsDeclarationFile.setCustomsFileId(fileStorage.getId());
|
|
customsDeclarationFile.setCustomsFileId(fileStorage.getId());
|
|
}
|
|
}
|
|
- } catch (IOException e) {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
if (null != fileResponse.getWtbgxyBlob()) {
|
|
if (null != fileResponse.getWtbgxyBlob()) {
|
|
- MultipartFileExtend wtbgxyFile = XiaoTuUtil.getMultipartFileExtend(
|
|
|
|
- fileQueryVO.getQueryNo() + "_" + fileResponse.getXybh()
|
|
|
|
- + FileUtil.getSuffix(fileResponse.getWtbgxyWjm()),
|
|
|
|
- fileResponse.getWtbgxyWjm(), fileResponse.getWtbgxyBlob());
|
|
|
|
- TFileStorage fileStorage = ossFileService.addStorage(wtbgxyFile,
|
|
|
|
- FileModuleEnum.ENTRUSTED_CUSTOMS_AGREEMENT);
|
|
|
|
|
|
+ TFileStorage fileStorage = ossFileService.addStorageWithBase64Str(fileResponse.getWtbgxyWjm(),
|
|
|
|
+ fileResponse.getWtbgxyBlob(), FileModuleEnum.ENTRUSTED_CUSTOMS_AGREEMENT);
|
|
customsDeclarationFile.setEntrustFileId(fileStorage.getId());
|
|
customsDeclarationFile.setEntrustFileId(fileStorage.getId());
|
|
customsDeclarationFile.setEntrustNo(fileResponse.getXybh());
|
|
customsDeclarationFile.setEntrustNo(fileResponse.getXybh());
|
|
}
|
|
}
|
|
- } catch (IOException e) {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
if (null != customsDeclarationFile.getId()) {
|
|
if (null != customsDeclarationFile.getId()) {
|