|
|
|
@ -148,8 +148,12 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
JSONObject distributedDetail = clearingDistributedSurchargeMapper.findByClearingId(clientId, clearingDetailId);
|
|
|
|
|
String date = DateFormatUtils.format(distributedDetail.getDate("settle_date"), "dd MMM yyyy", Locale.US);
|
|
|
|
|
List<JSONObject> distributedDetail = clearingDistributedSurchargeMapper.findByClearingId(clientId, clearingDetailId);
|
|
|
|
|
if (distributedDetail.size() > 1) {
|
|
|
|
|
throw new BadRequestException("此次清算扣款已回滚");
|
|
|
|
|
}
|
|
|
|
|
JSONObject detial = distributedDetail.get(0);
|
|
|
|
|
String date = DateFormatUtils.format(detial.getDate("settle_date"), "dd MMM yyyy", Locale.US);
|
|
|
|
|
httpResponse.setContentType("application/pdf");
|
|
|
|
|
httpResponse.setHeader("content-disposition", "attachment;filename="+ client.getString("client_moniker") + "_Invoice_" + date + ".pdf");
|
|
|
|
|
ServletOutputStream sos = null;
|
|
|
|
|