From b1b9b5fe77d5aea0388079d1d5de5d8cd6287e07 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 6 Sep 2021 20:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/dev/web/TestController.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index 78efe55b9..c2286d5be 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -177,6 +177,13 @@ public class TestController { sos.close(); } + /** + * 第二个版本的合同 + * @param clientMoniker + * @param manager + * @param httpResponse + * @throws Exception + */ @ManagerMapping(value = "/{clientMoniker}/export/aggregate/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) public void exportAggregateAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception { httpResponse.setContentType("application/pdf"); @@ -205,8 +212,24 @@ public class TestController { throw new BadRequestException("The Partner's Rate is not config!"); } client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)); - client.put("clean", "T+" + weChatRate.getString("clean_days")); + client.put("clean", weChatRate.getString("clean_days")); client.put("clean_days", weChatRate.getString("clean_days")); + if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){ +// clean_1 clean_1_friday clean_1_saturday + client.put("clean_1", weChatRate.getString("clean_days")); +// second, third or fourth + client.put("clean_1_friday", "first"); + client.put("clean_1_saturday", "second"); + }else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){ + client.put("clean_1", weChatRate.getString("clean_days")); + client.put("clean_1_friday", "second"); + client.put("clean_1_saturday", "third"); + + }else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){ + client.put("clean_1", weChatRate.getString("clean_days")); + client.put("clean_1_friday", "third"); + client.put("clean_1_saturday", "fourth"); + } try { JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay"); @@ -225,6 +248,7 @@ public class TestController { if (account == null || account.size() <= 0) { throw new BadRequestException("The Partner's Account is not config!"); } + client.put("bank", account.getString("bank")); client.put("bsb_no", account.getString("bsb_no")); client.put("account_no", account.getString("account_no")); @@ -240,6 +264,7 @@ public class TestController { client.put("legal_job_title", clientLegal.getString("job_title")); client.put("legal_phone", clientLegal.getString("phone")); client.put("legal_email", clientLegal.getString("email")); + client.put("contract_manager", clientLegal.getString("legal_person"));//client contract manager } PdfUtils pdu = new PdfUtils(); pdu.setTemplatePdfPath(aggragatePdfPath); @@ -248,6 +273,7 @@ public class TestController { ByteArrayOutputStream bos = pdu.templetPdfBos(file); sos.write(bos.toByteArray()); sos.close(); + logger.debug("结束!"); } /** * 制作卡支付合同