新的商户合同

master
dalong306 3 years ago
parent e2d8ba8828
commit 552a2fdb8f

@ -233,7 +233,8 @@ public class RetailAppServiceImp implements RetailAppService {
@Resource
private DeviceManager deviceManager;
private final String CBBANK_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/08/05/1564972204689_uwZvpTBjtLUMcN8c540xcZvux1Rd3O.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
// private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf";
@Resource
private SmsSender smsSender;
@ -2747,6 +2748,23 @@ public class RetailAppServiceImp implements RetailAppService {
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
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");
}
String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates");
JSONObject sysConfigRate = JSON.parseObject(rateConfig);
@ -2788,6 +2806,7 @@ public class RetailAppServiceImp implements RetailAppService {
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("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
return exportClientAggregateFile(client);
}

@ -115,7 +115,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
private ClientBDMapper clientBDMapper;
private ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2019/09/06/1567741055646_qeWC7kwqEwsJjRHisJSyAjqnB9nnnh.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf";
@Resource
private SmsSender smsSender;
@Resource
@ -314,6 +314,23 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
apply.put("company_name_acn", apply.getString("company_name") + " (ABN " + apply.getString("abn") + ")");
apply.put("clean", "T+" + clean_days.trim());
apply.put("clean_days", clean_days);
apply.put("located_country", "Australia");
if("1".equalsIgnoreCase(apply.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
apply.put("clean_1", apply.getString("clean_days"));
apply.put("clean_1_friday", "first");
apply.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(apply.getString("clean_days"))){
apply.put("clean_1", apply.getString("clean_days"));
apply.put("clean_1_friday", "second");
apply.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(apply.getString("clean_days"))){
apply.put("clean_1", apply.getString("clean_days"));
apply.put("clean_1_friday", "third");
apply.put("clean_1_saturday", "fourth");
}
JSONObject sysConfig = sysConfigManager.getSysConfig();
JSONObject test = JSON.parseObject(sysConfig.getString("sys_apply_rates"));
@ -340,6 +357,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
apply.put("legal_job_title", apply.getString("representative_job_title"));
apply.put("legal_phone", apply.getString("representative_phone"));
apply.put("legal_email", apply.getString("representative_email"));
apply.put("client_contract_manager", apply.getString("representative_person"));//client contract manager
return exportClientAggregateFile(apply);
}

@ -185,9 +185,12 @@ public class TestController {
* @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 {
public void exportAggregateAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) {
logger.info("===>exportAggregateAgreeFile:path:"+aggragatePdfPath);
httpResponse.setContentType("application/pdf");
httpResponse.setHeader("content-disposition", "attachment;filename=" + clientMoniker + "_AGREEMENT_" + new Date() + ".pdf");
try {
ServletOutputStream sos = httpResponse.getOutputStream();
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
@ -212,12 +215,13 @@ 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", weChatRate.getString("clean_days"));
client.put("clean", "T+"+weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
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"))){
@ -264,16 +268,22 @@ 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("representative_person"));//client contract manager
client.put("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(aggragatePdfPath);
pdu.setPdfTemplate(client);
File file = new File(clientMoniker + "_agreement.pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
sos.write(bos.toByteArray());
sos.close();
logger.debug("结束!");
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
sos.write(bos.toByteArray());
sos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*

@ -356,7 +356,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private String agreetemplatePdfPath;
@Value("${app.agreetemplate.aggregate.path}")
private String aggregateAgreetemplatePdfPath;
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
// private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf";
@Resource
@ -2979,9 +2980,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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", "T+"+weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
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");
if (alipayRate != null) {
@ -3011,6 +3028,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(aggregateAgreetemplatePdfPath);
@ -3098,6 +3116,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("wechat_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + p.getString("clean_days"));
client.put("clean_days", p.getString("clean_days"));
if("1".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
}
} else if ("Alipay".equals(rate_name)) {
client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
} else if ("AlipayOnline".equals(rate_name)) {
@ -3115,12 +3147,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("account_name", account.getString("account_name"));
String start_date = DateFormatUtils.format(new Date(), "dd/MM/yyyy");
client.put("start_date", start_date);
client.put("located_country", "Australia");
JSONObject clientLegal = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id"));
if (clientLegal != null) {
client.put("legal_person", clientLegal.getString("representative_person"));
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("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(aggregateAgreetemplatePdfPath);
@ -3169,6 +3204,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
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");
@ -3202,6 +3254,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(aggregateAgreetemplatePdfPath);
@ -4052,6 +4105,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
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");
}
String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates");
JSONObject sysConfigRate = JSON.parseObject(rateConfig);
@ -4098,6 +4168,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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("client_contract_manager", clientLegal.getString("representative_person"));//client contract manager
}
return exportImgAggregateFile(account, client);
}

@ -6,7 +6,8 @@ app:
enable: true
agreetemplate:
aggregate:
path: https://file.royalpay.com.au/open/2021/09/06/1630922747745_tAG7kwvv8KWvOmm0NukmSnba7NOAPI.pdf
# path: https://file.royalpay.com.au/open/2020/08/19/1597805249800_iNrLHtY7gxCDBtgTnKdtB62DdADxFt.pdf
path: https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf
classic:
path: https://file.royalpay.com.au/open/2017/07/10/1499665073802_qV7fpEuS9rdbTnpa4po6rmbW9CSUfE.pdf
allow-clearing-generation: false

@ -22,7 +22,8 @@ app:
enable: true
agreetemplate:
aggregate:
path: https://file.royalpay.com.au/open/2020/08/19/1597805249800_iNrLHtY7gxCDBtgTnKdtB62DdADxFt.pdf
path: https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf
# path: https://file.royalpay.com.au/open/2020/08/19/1597805249800_iNrLHtY7gxCDBtgTnKdtB62DdADxFt.pdf
classic:
path: https://file.royalpay.com.au/open/2017/07/10/1499665073802_qV7fpEuS9rdbTnpa4po6rmbW9CSUfE.pdf
allow-clearing-generation: false

Loading…
Cancel
Save