|
|
|
@ -2216,7 +2216,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void getSourceAggregateFile(JSONObject device, HttpServletResponse httpResponse) {
|
|
|
|
|
public JSONObject getSourceAggregateFile(JSONObject device) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
@ -2246,7 +2246,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
client.put("bank_account_number", bankAccount.getString("account_no"));
|
|
|
|
|
client.put("bank_account_name", bankAccount.getString("account_name"));
|
|
|
|
|
}
|
|
|
|
|
exportAggregateFile(client, httpResponse);
|
|
|
|
|
return exportClientAggregateFile(client);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -2361,6 +2361,24 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private JSONObject exportClientAggregateFile(JSONObject client) {
|
|
|
|
|
InputStream stream = null;
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
try {
|
|
|
|
|
PdfUtils pdu = new PdfUtils();
|
|
|
|
|
pdu.setTemplatePdfPath(CBBANK_AGGREGATE_FILE);
|
|
|
|
|
pdu.setPdfTemplate(client);
|
|
|
|
|
File file = new File(client.getString("client_moniker") + "_agreement.pdf");
|
|
|
|
|
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
|
|
|
|
|
stream = new ByteArrayInputStream(bos.toByteArray());
|
|
|
|
|
JSONObject fileInfo = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_agreement_source.pdf", false);
|
|
|
|
|
result.put("file_value", fileInfo.getString("url"));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new BadRequestException("获取合同文件失败");
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void deleteAccountEmailKey(String codeKey){
|
|
|
|
|
stringRedisTemplate.delete(getUpdateAccountEmailKey(codeKey));
|
|
|
|
|
}
|
|
|
|
|