Commit a962c43e authored by chenzhao's avatar chenzhao Committed by hezhuozhi

工行代扣下载接口修改

parent 27c85f17
...@@ -180,9 +180,9 @@ public class IcbcWithholdController extends BaseController { ...@@ -180,9 +180,9 @@ public class IcbcWithholdController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = " 聚富通代扣信息回盘文件获取", notes = " 聚富通代扣信息回盘文件获取") @ApiOperation(httpMethod = "GET",value = " 聚富通代扣信息回盘文件获取", notes = " 聚富通代扣信息回盘文件获取")
@GetMapping(value = "/downLoadicbcFile") @GetMapping(value = "/downLoadicbcFile")
public ResponseModel<String> downLoadicbcFile( Long sequenceNbr,String batchNo ) throws Exception { public ResponseModel<String> downLoadicbcFile( Long sequenceNbr,String batchNo,HttpServletResponse response ) throws Exception {
icbcWithholdServiceImpl.downLoadicbcFile(batchNo,sequenceNbr,response);
return ResponseHelper.buildResponse(icbcWithholdServiceImpl.downLoadicbcFile(batchNo,sequenceNbr)); return ResponseHelper.buildResponse(null);
} }
/** /**
* 列表全部数据查询 * 列表全部数据查询
......
...@@ -64,9 +64,7 @@ import java.util.zip.ZipEntry; ...@@ -64,9 +64,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import static com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils.fileToMultipartFile; import static com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils.fileToMultipartFile;
import static com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils.fileToMultipartFileZip; import static com.yeejoin.amos.boot.module.hygf.api.util.FileUtils.*;
import static com.yeejoin.amos.boot.module.hygf.api.util.FileUtils.addFileToZip;
import static com.yeejoin.amos.boot.module.hygf.api.util.FileUtils.cleanup;
/** /**
* 聚富通代扣信息表服务实现类 * 聚富通代扣信息表服务实现类
...@@ -324,10 +322,10 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit ...@@ -324,10 +322,10 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
} }
} }
public String downLoadicbcFile(String batchNo,Long sequenceNbr) throws Exception { public void downLoadicbcFile(String batchNo,Long sequenceNbr,HttpServletResponse response) throws Exception {
IcbcWithhold model = this.getBaseMapper().selectById(sequenceNbr); IcbcWithhold model = this.getBaseMapper().selectById(sequenceNbr);
if (StringUtils.isNotEmpty(model.getReceiptFile())){ if (StringUtils.isNotEmpty(model.getReceiptFile())){
return model.getReceiptFile(); this.downloadAndSaveZipFile(model.getReceiptFile(),batchNo,"回盘文件",response);
} }
String path = new ClassPathResource(file+"secretKey/login-gxjrid_rsa").getPath(); String path = new ClassPathResource(file+"secretKey/login-gxjrid_rsa").getPath();
...@@ -354,6 +352,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit ...@@ -354,6 +352,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
model.setReceiptFile(url); model.setReceiptFile(url);
} }
this.saveOrUpdate(model); this.saveOrUpdate(model);
this.downloadAndSaveZipFile(model.getReceiptFile(),batchNo,"回盘文件",response);
} }
} catch ( Exception e) { } catch ( Exception e) {
logger.error("平台上传文件失败"); logger.error("平台上传文件失败");
...@@ -361,7 +360,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit ...@@ -361,7 +360,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
} finally { } finally {
cleanup(dirPath); cleanup(dirPath);
} }
return model.getReceiptFile();
} }
......
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