add app合规文件后端支持,修复后付费账户生成时间

master
luoyang 5 years ago
parent bef5184e23
commit da102239b0

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.1.7</version> <version>1.1.8</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -718,7 +718,6 @@ public class RetailAppController {
return retailAppService.toggleCBBankCustomerSurcharge(device, customerSurcharge.getBooleanValue("customerSurcharge")); return retailAppService.toggleCBBankCustomerSurcharge(device, customerSurcharge.getBooleanValue("customerSurcharge"));
} }
@RequestMapping(value = "/cbbank_pay/aggregate_file", method = RequestMethod.GET) @RequestMapping(value = "/cbbank_pay/aggregate_file", method = RequestMethod.GET)
public void getCBBankAggragateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,HttpServletResponse httpResponse) { public void getCBBankAggragateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,HttpServletResponse httpResponse) {
retailAppService.getCBBankAggregateFile(device, httpResponse); retailAppService.getCBBankAggregateFile(device, httpResponse);

@ -47,6 +47,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/** /**
* account service for sign in Created by yixian on 2016-06-29. * account service for sign in Created by yixian on 2016-06-29.
@ -84,6 +85,8 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
@Resource @Resource
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;
@Resource @Resource
private ClientFilesMapper clientFilesMapper;
@Resource
private SmsSender smsSender; private SmsSender smsSender;
private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT"; private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT";
private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT"; private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT";
@ -159,6 +162,32 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
} }
client.putAll(clientConfigService.find(client_id)); client.putAll(clientConfigService.find(client_id));
client = clientInfoWithNoSecretInfo(client); client = clientInfoWithNoSecretInfo(client);
if (client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) {
List<JSONObject> resultFiles = new ArrayList<>();
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"};
String[] putKeys = {"file_bank_info", "file_company_info", "file_id_info", "file_agreement_info", "file_apply_info"};
String[] fileNames = {"* bank statement", "* Certificate of Registration", "* ID", "* Agreement" ,"Application Form(optional)"};
boolean clientFilesIsLess = false;
for (int i = 0; i < fileKeys.length; i++) {
String fileKey = fileKeys[i];
if (clientFiles.stream().noneMatch(fileJson -> fileKey.equals(fileJson.getString("file_name")))) {
JSONObject fileJson = new JSONObject();
fileJson.put("key", putKeys[i]);
fileJson.put("name", fileNames[i]);
fileJson.put("file_value", "not Configure");
resultFiles.add(fileJson);
if (!"client_apply_file".equals(fileKey)) {
clientFilesIsLess = true;
}
}
}
client.put("greenChannel", 1);
client.put("client_less_file", clientFilesIsLess);
if (clientFilesIsLess) {
client.put("client_files", resultFiles);
}
}
if (client.getInteger("parent_client_id") != null) { if (client.getInteger("parent_client_id") != null) {
JSONObject rootPartner = clientManager.getClientInfoIgnoreInvalid(client.getIntValue("parent_client_id")); JSONObject rootPartner = clientManager.getClientInfoIgnoreInvalid(client.getIntValue("parent_client_id"));
rootPartner.putAll(clientConfigService.find(client.getIntValue("parent_client_id"))); rootPartner.putAll(clientConfigService.find(client.getIntValue("parent_client_id")));
@ -442,7 +471,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
String[] columns = { "client_id", "client_moniker", "parent_client_id", "company_name", "address", "business_name", "business_structure", "abn", "acn", String[] columns = { "client_id", "client_moniker", "parent_client_id", "company_name", "address", "business_name", "business_structure", "abn", "acn",
"company_phone", "suburb", "postcode", "state", "contact_person", "contact_phone", "contact_email", "short_name", "logo_url", "enable_refund", "company_phone", "suburb", "postcode", "state", "contact_person", "contact_phone", "contact_email", "short_name", "logo_url", "enable_refund",
"enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark", "logo_thumbnail", "creator", "create_time", "approver", "enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark", "logo_thumbnail", "creator", "create_time", "approver",
"approve_result", "approve_time", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat", "approve_result", "approve_time", "open_status", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat",
"enable_bestpay", "manual_settle", "skip_clearing" ,"mail_confirm","surcharge_mode"}; "enable_bestpay", "manual_settle", "skip_clearing" ,"mail_confirm","surcharge_mode"};
for (String col : columns) { for (String col : columns) {
simpleClient.put(col, client.get(col)); simpleClient.put(col, client.get(col));

@ -16,7 +16,7 @@ public class SurchargeAccountMonthTask {
@Resource @Resource
private SurchargeAccountService surchargeAccountService; private SurchargeAccountService surchargeAccountService;
@Scheduled(cron = "0 30 23 1 * ?") @Scheduled(cron = "0 0 10 1 * ?")
public void generateSurchargeAccountDetail() { public void generateSurchargeAccountDetail() {
synchronizedScheduler.executeProcess("manage_task:generateSurchargeAccountMonth", 120_000, () -> synchronizedScheduler.executeProcess("manage_task:generateSurchargeAccountMonth", 120_000, () ->
surchargeAccountService.generatorMonthDetail()); surchargeAccountService.generatorMonthDetail());

Loading…
Cancel
Save