Upd:信用卡合规流程

master
dulingling 5 years ago
parent 9d9499cfc8
commit 4d4ad058b1

@ -52,6 +52,8 @@ public interface ClientFilesMapper {
JSONObject getSourceAgreeFilesByClientId(@Param("client_id") int clientId);
JSONObject getSourceCardAgreeFilesByClientId(@Param("client_id") int clientId,@Param("file_name")String file_name);
void deleteByClientAndFileId(@Param("file_id") String file_id);
void deleteAggreeByClientId(@Param("client_id") int file_id);

@ -53,6 +53,8 @@ public interface ClientRateMapper {
JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestCardChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestExpiryConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);

@ -272,6 +272,8 @@ public interface ClientManager {
JSONObject getSourceAgreeFiles(JSONObject manage, String clientMoniker);
JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName);
void deleteAuthFiles(String fileId);
void deleteAuthFilesByAdmin(String fileId);
@ -300,6 +302,8 @@ public interface ClientManager {
void commitToCompliance(String clientMoniker, JSONObject manager);
void commitToCardCompliance(String clientMoniker, JSONObject manager);
void commitToDoAgreeFile(String clientMoniker, JSONObject manager);
/**
@ -387,6 +391,10 @@ public interface ClientManager {
void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,Date promotionalEffectiveDate,int promotionalPeriod) throws Exception;
void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void temporaryExportPdf(String clientMoniker, JSONObject manager, HttpServletResponse httpResponse) throws Exception;
@ -395,6 +403,8 @@ public interface ClientManager {
void completeAgree(String clientMoniker, JSONObject manager);
void cardCompleteAgree(String clientMoniker, JSONObject manager);
void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception;
void downloadMWComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception;
@ -596,10 +606,4 @@ public interface ClientManager {
void selectBillCodeVersion(JSONObject manager, String clientMoniker, String version);
void exportLetterOfferPDF(String clientMoniker,HttpServletResponse response);
void exportPromotionalOfferPDF(String moniker, String date, HttpServletResponse response);
void exportTermsConditionsPDF(String clientMoniker,HttpServletResponse response);
}

@ -183,6 +183,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientIncrementalMapper clientIncrementalMapper;
@Value("${client_card.account_reserve}")
private String cardAccountReserve;
@Value("${client_card.annual_rate}")
private String cardAnnualRate;
@Value("${app.redis.prefix}")
private String redisPrefix;
private ApplicationEventPublisher publisher;
@ -340,6 +345,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private static final String CLIENT_AGREE_FILE = "client_agree_file";
private static final String CLIENT_COMPANY_FILE = "client_company_file";
private static final String CLIENT_APPLY_FILE = "client_apply_file";
//卡支付合同文件
private static final String LETTER_OF_OFFER_FILE="letter_of_offer_file";
private static final String PROMOTIONAL_OFFER_FILE="promotional_offer_file";
private static final String TERMS_AND_CONDITIONS_FILE="terms_and_conditions_file";
private static final List<String> tags = new ArrayList<>();
private static final String KYC_UTILITY_BILL_FILE = "kyc_utility_bill_file";
@ -1642,7 +1654,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, permissionKey, allow));
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
upayProfileInfo.put(permissionKey,allow);
sysClientUpayProfileMapper.update(upayProfileInfo);
}
@Override
@ -3157,6 +3171,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
@Transactional
public void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
exportLetterOfferPDF(clientMoniker,manager);
exportTermsConditionsPDF(clientMoniker,manager);
if (!renewal) {
JSONObject cardFlow = clientCardFlowMapper.findClient(client.getInteger("client_id"));
cardFlow.put("open_status",2);
clientCardFlowMapper.update(cardFlow);
}
if (manager != null) {
saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager,2);
}
}
@Override
@Transactional
public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,Date promotionalEffectiveDate,int promotionalPeriod){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
exportPromotionalOfferPDF(clientMoniker,manager,promotionalEffectiveDate,promotionalPeriod);
}
@Override
public void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3376,6 +3419,24 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendCommissionWechatMessage(client);
}
@Override
public void cardCompleteAgree(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> existLeffterFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), LETTER_OF_OFFER_FILE);
List<JSONObject> existConditionsFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), TERMS_AND_CONDITIONS_FILE);
if (CollectionUtils.isEmpty(existLeffterFiles) && CollectionUtils.isEmpty(existConditionsFiles)) {
throw new BadRequestException("The Agree File is not Complete!");
}
JSONObject cardFlowInfo = clientCardFlowMapper.findClient(client.getInteger("client_id"));
cardFlowInfo.put("open_status", 3);
clientCardFlowMapper.update(cardFlowInfo);
saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成等待BD处理", manager,2);
sendCardCommissionWechatMessage(client);
}
@Override
public void downloadComplianceZip(String clientMoniker, HttpServletResponse response) throws Exception {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3711,6 +3772,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return sourceFile;
}
@Override
public JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName){
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject sourceFile = clientFilesMapper.getSourceCardAgreeFilesByClientId(client.getIntValue("client_id"),fileName);
if (sourceFile != null) {
sourceFile.put(sourceFile.getString("file_name"), sourceFile.getString("file_value"));
}
return sourceFile;
}
@Override
public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -4588,6 +4662,45 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
@Transactional
public void commitToCardCompliance(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
if (bdOperatClientRole <= 0) {
throw new ForbiddenException();
}
}
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (rate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
if (clientFiles == null || clientFiles.equals("")) {
throw new BadRequestException("The Compliance File Must Be Uploaded!");
}
JSONObject account = getBankAccountByClientId(client.getIntValue("client_id"));
if (account == null) {
throw new BadRequestException("The Partner's Bank Account is not config!");
}
JSONObject cardFlowInfo = clientCardFlowMapper.findClient(client.getInteger("client_id"));
int open_status_from = cardFlowInfo.getIntValue("open_status");
cardFlowInfo.put("approve_time",new Date());
cardFlowInfo.put("approve_result",4);
cardFlowInfo.put("open_status", 4);
clientCardFlowMapper.update(cardFlowInfo);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager,2);
if (manager != null) {
sendCardCommissionWechatMessage(client);
}
}
private void saveClientAuditProcess(int client_id, Integer open_status_form, Integer open_status_to, String remark, JSONObject manager,int type) {
JSONObject log = new JSONObject();
try {
@ -4640,6 +4753,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.putAll(clientConfigService.find(clientId));
beforeCommitToDoAgreeValid(client, manager);
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (surCharge == null || surCharge.size() <= 0) {
throw new BadRequestException("The Partner's Rpaypmt Card Rate is not config!");
}
JSONObject cardFlowInfo = clientCardFlowMapper.findClient(clientId);
if(null != cardFlowInfo){
JSONObject cardFlow = new JSONObject(){{
@ -5606,7 +5724,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String wxopenid = compliance.getString("wx_openid");
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), "BD申请制作卡支付合同" + client_moniker,
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), "BD申请制作信用卡支付合同" + client_moniker,
bd_user_name, "制作卡支付合同申请", "BD申请制作" + short_name + "的卡支付合同");
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
@ -5624,7 +5742,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (wxopenid != null) {
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "卡支付合同制作完成",
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡支付合同制作完成",
"Compliance", "合规材料", "上传完整合规材料,商户:" + short_name);
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
@ -5647,7 +5765,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String wxopenid = compliance.getString("wx_openid");
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "卡支付合规材料已提交",
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡卡支付合规材料已提交",
bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
@ -7217,12 +7335,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
@Override
public void exportLetterOfferPDF(String clientMoniker, HttpServletResponse response) {
private void exportLetterOfferPDF(String clientMoniker,JSONObject manage) {
JSONObject info = convertClientLetterOfferInfo(clientMoniker);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf";
String fileName = clientMoniker + "_Letter_of_Offer.pdf";
publishExcelCardPDFFile(fileName, pdfPath, info, response);
publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, info,LETTER_OF_OFFER_FILE);
}
private JSONObject convertClientLetterOfferInfo(String clientMoniker) {
@ -7236,46 +7353,45 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
//获取数据源
int clientId = client.getInteger("client_id");
JSONObject clientRate = clientRateMapper.latestChannelCleanDays("rpaypmt_card", clientId);
JSONObject clientRate = clientRateMapper.latestCardChannelCleanDays("rpaypmt_card", clientId);
if (clientRate == null) {
throw new BadRequestException("rpaypmt_card rate Not configured");
}
JSONObject cardRate = clientRate.getJSONObject("ext_rates");
JSONObject bankAccountInfo = clientBankAccountMapper.clientBankAccounts(clientId).get(0);
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(clientId);
//装在数据
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("bussiness_name", client.getString("business_name") + " ABN");//商圈类型
info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):client.getString("contact_person")) + " ABN");//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
info.put("partner_state", client.getString("state"));//洲
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("clean_days", client.getInteger("clean_days"));//T+规则清算天数
info.put("partner_industry_mcc", client.getInteger("industry"));//商户行业编码
info.put("legal_bussiness", client.getString("contact_person") + " AS " + client.getString("business_name") + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("annual_rate", "0");//年费率
info.put("partner_industry_mcc", upayProfileInfo.getString("mv_industy"));//信用卡注册商户行业编码
info.put("legal_bussiness", client.getString("contact_person") + " AS " + (client.containsKey("business_name")?client.getString("business_name"):client.getString("contact_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("annual_rate",cardAnnualRate);//年费率
info.put("cost_per_transaction", clientRate.getString("transaction_fee"));//每次交易成本
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", cardRate.getString("overseas_rate_value"));//国际服务费
info.put("account_reserve", "1000");//账户储备金
info.put("account_reserve", cardAccountReserve);//账户储备金
//银行账号信息
info.put("account_name", bankAccountInfo.getString("account_name"));//
info.put("bsb", bankAccountInfo.getString("bsb_no"));
info.put("account_no", bankAccountInfo.getString("account_no"));
info.put("card_acceptor_name", "xxxxxxxxxxxxx");
info.put("card_acceptor_name", upayProfileInfo.getString("acceptor_name"));
return info;
}
@Override
public void exportPromotionalOfferPDF(String clientMoniker, String date, HttpServletResponse response) {
JSONObject info = convertPromotionalOfferInfo(clientMoniker, date);
private void exportPromotionalOfferPDF(String clientMoniker,JSONObject manager,Date promotionalEffectiveDate,int promotionalPeriod) {
JSONObject info = convertPromotionalOfferInfo(clientMoniker,convertDateEnglish(promotionalEffectiveDate),promotionalPeriod);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/promotional_offer.pdf";
String fileName = clientMoniker + "_Promotional_Offer.pdf";
publishExcelCardPDFFile(fileName, pdfPath, info, response);
publishExcelCardPDFFile(clientMoniker,manager,fileName, pdfPath, info,PROMOTIONAL_OFFER_FILE);
}
private JSONObject convertPromotionalOfferInfo(String clientMoniker, String date) {
private JSONObject convertPromotionalOfferInfo(String clientMoniker,String promotionalEffectiveDate,int promotionalPeriod) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -7285,7 +7401,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The merchant failed the audit!");
}
int clientId = client.getInteger("client_id");
JSONObject clientRate = clientRateMapper.latestChannelCleanDays("rpaypmt_card", clientId);
JSONObject clientRate = clientRateMapper.latestCardChannelCleanDays("rpaypmt_card", clientId);
if (clientRate == null) {
throw new BadRequestException("rpaypmt_card rate Not configured");
}
@ -7294,22 +7410,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("bussiness_name", client.getString("business_name") + " ABN");//商圈类型
info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):client.getString("contact_person")) + " ABN");//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
info.put("partner_state", client.getString("state"));//洲
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("letter_offer_sub_time", date);
info.put("legal_bussiness", client.getString("contact_person") + " AS " + client.getString("business_name") + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("legal_bussiness", client.getString("contact_person") + " AS " + (client.containsKey("business_name")?client.getString("business_name"):client.getString("contact_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", cardRate.getString("overseas_rate_value"));//国际服务费
info.put("promotional_effective_date", "xxxxxxxxx");
info.put("promotional_period", "xxxxxxxxx");
info.put("promotional_effective_date", promotionalEffectiveDate);
info.put("promotional_period", promotionalPeriod);
return info;
}
@Override
public void exportTermsConditionsPDF(String clientMoniker, HttpServletResponse response) {
private void exportTermsConditionsPDF(String clientMoniker,JSONObject manage) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -7319,24 +7433,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/terms_and_conditions.pdf";
String fileName = clientMoniker + "_Terms_And_Conditions.pdf";
publishExcelCardPDFFile(fileName, pdfPath, new JSONObject(), response);
publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, new JSONObject(),TERMS_AND_CONDITIONS_FILE);
}
private void publishExcelCardPDFFile(String fileName, String pdfPath, JSONObject info, HttpServletResponse response) {
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
private void publishExcelCardPDFFile(String clientMoniker,JSONObject manager, String fileName, String pdfPath, JSONObject info, String fileLabel) {
try {
OutputStream outs = response.getOutputStream();
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(pdfPath);
pdu.setPdfTemplate(info);
File file = new File(fileName);
ByteArrayOutputStream bos = pdu.templetPdfBos(file, "", "");
outs.write(bos.toByteArray(), 0, bos.toByteArray().length);
outs.flush();
outs.close();
} catch (IOException e) {
e.printStackTrace();
try {
File file = new File(fileName);
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
InputStream stream = new ByteArrayInputStream(bos.toByteArray());
JSONObject fileRes = attachmentClient.uploadFile(stream, fileName, false);
if (fileRes != null) {
importCardAgreeFile(clientMoniker, manager, fileRes.getString("url"), fileLabel);
}
stream.close();
} catch (Exception e) {
logger.error("合同制作出现问题:", e);
}
} catch (Exception e) {
e.printStackTrace();
}
@ -7352,6 +7468,41 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return day + " " + months[month] + " " + year;
}
private void importCardAgreeFile(String clientMoniker, JSONObject manager, String sourceFile, String fileLabel) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
if (sourceFile != null) {
List<JSONObject> existFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), fileLabel);
JSONObject existFile = null;
if (!CollectionUtils.isEmpty(existFiles)) {
existFile = existFiles.get(0);
}
Date now = new Date();
JSONObject file = new JSONObject();
file.put("file_name", fileLabel);
file.put("file_value", sourceFile);
file.put("client_id", client.getIntValue("client_id"));
file.put("last_update_date", now);
file.put("status", 1);
file.put("is_valid", 1);
if (manager == null) {
file.put("last_update_by", "System Import");
} else {
file.put("last_update_by", manager.getString("display_name"));
}
JSONObject contract = clientsContractMapper.findByClientId(client.getIntValue("client_id"));
if (contract == null || now.compareTo(contract.getDate("expiry_date")) > 0 || !contract.getBoolean("has_sign") || existFile == null
|| existFile.isEmpty()) {
clientFilesMapper.save(file);
} else {
file.put("file_id", existFile.getString("file_id"));
clientFilesMapper.update(file);
}
}
}
public void saveLegalAndMarketingInfo(JSONObject partner) {
JSONObject representativeInfo = new JSONObject();
representativeInfo.put("client_id", partner.getIntValue("client_id"));

@ -595,6 +595,17 @@ public class PartnerManageController {
return clientManager.getSourceAgreeFiles(manager, clientMoniker);
}
/**
*
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/file/source_card_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT})
public JSONObject getSourceCardAgreeAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("fileName") String fileName){
return clientManager.getSourceCardAgreeFiles(clientMoniker,manager,fileName);
}
@ManagerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void deleteAuthFiles(@PathVariable String fileId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.deleteAuthFilesByAdmin(fileId);
@ -634,12 +645,21 @@ public class PartnerManageController {
clientManager.commitToCompliance(clientMoniker, manager);
}
/**
* BD
* @param clientMoniker
* @param manager
*/
@ManagerMapping(value = "/{clientMoniker}/to_card_compliance", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToCardCompliance(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToCardCompliance(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/make_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToDoAgreeFile(clientMoniker, manager);
}
//TODO BD提交申请卡合规
/**
*
* @param clientMoniker
@ -665,6 +685,29 @@ public class PartnerManageController {
clientManager.getAggregateAgreeFile(clientMoniker, manager, false);
}
/**
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception {
clientManager.getAggregateCardAgreeFile(clientMoniker, manager, false);
}
/**
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_promotiona_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardPromotionaAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("date") Date promotionalEffectiveDate,@RequestParam("period") int promotionalPeriod) throws Exception {
clientManager.getAggregateCardPromotionaAgreeFile(clientMoniker, manager, false,promotionalEffectiveDate,promotionalPeriod);
}
@ManagerMapping(value = "/{clientMoniker}/temp/export/pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void temporaryExportPDF(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
clientManager.temporaryExportPdf(clientMoniker, manager, httpResponse);
@ -680,6 +723,16 @@ public class PartnerManageController {
clientManager.completeAgree(clientMoniker, manager);
}
/**
* BD
* @param clientMoniker
* @param manager
*/
@ManagerMapping(value = "/{clientMoniker}/notify/cardCompleteAgree", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void cardCompleteAgree(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.cardCompleteAgree(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/download/complianceAsZIP", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception {
clientManager.downloadComplianceZip(clientMoniker, response);
@ -961,33 +1014,4 @@ public class PartnerManageController {
clientManager.switchPermission(manager, clientMoniker, "enable_international_card", pass.getBooleanValue("allow"));
}
/**
* Letter of Offer pdf
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/export/letter_of_offer_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void exportLetterOfferPDF(@PathVariable String clientMoniker,HttpServletResponse response){
clientManager.exportLetterOfferPDF(clientMoniker,response);
}
/**
* Promotional Offer pdf
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/export/promotional_offer_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void exportPromotionalOfferPDF(@PathVariable String clientMoniker, @RequestParam("date")String date, HttpServletResponse response){
clientManager.exportPromotionalOfferPDF(clientMoniker,date,response);
}
/**
* Terms Conditions pdf
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/export/terms_conditions_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void exportTermsConditionsPDF(@PathVariable String clientMoniker,HttpServletResponse response){
clientManager.exportTermsConditionsPDF(clientMoniker,response);
}
}

@ -68,6 +68,11 @@ app:
tax:
type: GST
client_card:
account_reserve: 1000
annual_rate: 0
apple:
message:
apns:
@ -153,6 +158,12 @@ spring:
port: 6379
thymeleaf:
mode: HTML
logging:
level:
au:
com:
royalpay:
payment: debug

@ -19,6 +19,14 @@
and file_name = 'source_agree_file'
order by last_update_date desc limit 1
</select>
<select id="getSourceCardAgreeFilesByClientId" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files
where client_id = #{client_id}
and file_name = #{file_name}
order by last_update_date desc limit 1
</select>
<select id="deleteAggreeByClientId" resultType="com.alibaba.fastjson.JSONObject">
update sys_files set is_valid = 0
where client_id = #{client_id}

@ -177,6 +177,16 @@
limit 1
</select>
<select id="latestCardChannelCleanDays" resultType="com.alibaba.fastjson.JSONObject">
SELECT cr.*,c.clean_days c_clean_days FROM sys_client_rates cr
INNER JOIN sys_clients c on c.client_id= cr.client_id and c.is_valid = 1
INNER JOIN sys_clients_card_flow cf ON cf.client_id = c.client_id AND ( cf.approve_result = 4 AND cf.open_status NOT IN (0,5) )
where cr.client_id = #{client_id}
and cr.rate_name = #{rate_name}
order by cr.expiry_time desc
limit 1
</select>
<select id="latestExpiryConfig" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM
sys_client_rates

@ -460,7 +460,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.fileManager = resp.data;
});
};
$scope.showCardFile = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/file/source_card_agree_file?fileName=letter_of_offer_file').then(function (resp) {
$scope.letterOfOfferFileManager = resp.data;
});
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/file/source_card_agree_file?fileName=promotional_offer_file').then(function (resp) {
$scope.promotionalOfferFileManager = resp.data;
});
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/file/source_card_agree_file?fileName=terms_and_conditions_file').then(function (resp) {
$scope.termsAndConditionsFile = resp.data;
});
};
$scope.showFile();
$scope.showCardFile();
$scope.passClient = function () {
if ($scope.partner.enable_hf) {
if ($scope.partner.hfindustry == null) {
@ -578,7 +592,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
choises: choises,
contentHtml: contentHtml
}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_audit', {pass: 1}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/card_promotiona_agree_pdf', {pass: 1}).then(function () {
if ($scope.partner.approve_result == 2 && ($scope.partner.source == 1 || $scope.partner.source == 2)) {
commonDialog.alert({
title: 'Success',
@ -649,8 +663,63 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$state.reload();
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
};
//制作卡支付合同
$scope.exportCardAgreegatePDF = function(){
$scope.showCardBg = true;
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/export/aggregate/card_agree_pdf').then(function () {
commonDialog.alert({
title: 'Success',
content: 'Agreement File Generate Succeed! Please notify BD!',
type: 'success'
});
$scope.showCardBg = false;
$state.reload();
}, function (resp) {
$scope.showCardBg = false;
$state.reload();
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
//制作促销合同
$scope.exportCardPromotionaAgreegatePDF = function(){
var title = 'Warning';
$scope.cardPromotionaparams={}
var contentHtml = $sce.trustAsHtml('<lable>请选择优惠生效日:</lable>'+ ' <input placeholder="From" uib-datepicker-popup\n' +
' is-open="ctrl.from" ng-click="ctrl.from=true" ng-model="cardPromotionaparams.date"\n' +
' datepicker-options="{maxDate:filter.to}"><div style="margin-bottom: 2px"></div>' +
' <lable>请输入活动周期:</lable> <input ng-model="cardPromotionaparams.period">');
var choises = [{label: '取消', className: 'btn-danger', key: '2', dismiss: true},
{label: '确认提交', className: 'btn-success', key: '1'}];
var content = '';
$scope.showCardPromotionaBg = true;
commonDialog.confirm({
title: title,
content: content,
choises: choises,
contentHtml: contentHtml
}).then(function (res) {
if(params != null){
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/export/aggregate/card_promotiona_agree_pdf').then(function () {
commonDialog.alert({
title: 'Success',
content: 'Agreement File Generate Succeed! Please notify BD!',
type: 'success'
});
$scope.showCardPromotionaBg = false;
$state.reload();
}, function (resp) {
$scope.showCardPromotionaBg = false;
$state.reload();
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
});
}
$scope.Export = function () {
var url = '/dev/' + $scope.partner.client_moniker + '/export/aggregate/agreepdf';
return url;
@ -681,6 +750,33 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
};
$scope.uploadCardAgreeFile = function (file) {
if (file != null) {
if (file.size > 2 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB请压缩后重试', type: 'error'})
} else {
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.agree_file_import = resp.data.url;
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', {source_agree_file: $scope.agree_file_import}).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Succeed Imported! Please notify BD',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}, function (resp) {
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
})
}
}
};
$scope.notifyBD = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/notify/completeAgree').then(function () {
commonDialog.alert({
@ -694,6 +790,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
};
$scope.cardNotifyBD = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/notify/cardCompleteAgree').then(function () {
commonDialog.alert({
title: 'Success',
content: 'Notify BD Successed!.',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'});
});
};
$scope.downTempPdf = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/temp/export/pdf';
return url;
@ -779,6 +888,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
})
};
$scope.commitToCardCompliance = function(){
commonDialog.confirm({
title: 'Commit to Compliance',
content: 'Are you sure to commit ' + $scope.partner.company_name + ' to compliance',
choises: [
{label: 'Submit', className: 'btn-success', key: 1},
{label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true}
]
}).then(function (choice) {
if (choice == 1) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/to_card_compliance', {}).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Commit to Compliance successfully',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
})
}
$scope.apply2makeAgreeFile = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/make_agree_file').then(function () {
commonDialog.alert({

@ -60,188 +60,178 @@
</section>
<div class="content">
<!-- 跨境支付审核 -->
<div class="box box-warning" ng-if="('10'|withRole)">
<div class="box-header with-border">
<h3 class="box-title"> <img style="height: 20px;width: 20px" height="20px" src="/static/images/royalpay_sign_s.png"> Compliance <span ng-if="partner.approve_result==5 || partner.refuse_remark.length>0"
style="color: red">(Refused
<small class=""
ng-if="partner.approve_result==5 || partner.refuse_remark.length>0">:{{partner.refuse_remark}}</small>)</span>
<span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="!partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
<b ng-if="partner.source!=4">
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</b>
<span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</h3>
<button ng-if="!partner.is_valid" type="button" class="btn btn-success" style="float:right;"
ng-click="revertClient()">Revert
</button>
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<div ng-if="partner.open_status != 5 && partner.open_status!=10">
<!--<a role="button" type="button" class="btn btn-success" ng-click="exportPDF()">-->
<!--制作合同</a>-->
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download"></i>制作临时合同</a>
<a role="button" type="button" class="btn btn-success" ng-click="exportAgreegatePDF()">
制作全支付合同</a>
<a role="button" type="button" class="btn btn-warning" ngf-select="uploadAgreeFile($file)"
accept="pdf/*">
上传合同</a> (通用合同请选择制作合同,非通用合同模板请人工制作合同后上传)
</div>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" ng-if="partner.open_status!=10 && partner.approve_result!=1"
class="btn btn-success" ng-click="passClient()">Pass
</button>
<button ng-if="(partner.open_status==1||partner.open_status==10) && partner.approve_result>3 || partner.open_status==4"
type="button" class="btn btn-primary" ng-click="refuse()">Refuse
</button>
</div>
<div ng-if="partner.open_status==10" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-success" ng-click="pass2GreenChannel()">
<i class="fa fa-paper-plane"></i>
Agree Green Channel
</button>
</div>
<a style="margin-top: 5px" ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning" style="margin-top: 5px"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i
class="fa fa-download"></i>下载合同</a>
<span style="margin-top: 5px" ng-if="partner.open_status != 5">
<a ng-if="partner.open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="notifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a>
</span>
<div ng-if="partner.audit_logs">
<hr>
<!--<p>-->
<!--<large><span class="label label-primary">BD完善资料</span></large>-->
<!--<large ng-repeat="log in partner.audit_logs"><i class="fa fa-arrow-right" aria-hidden="true"></i>-->
<!--<span class="label label-primary" ng-class="{'label-danger':log.remark.indexOf('打回')>-1,'label-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}} (<b>{{log.operator}}</b> | {{log.create_time}})</span>-->
<!--</large>-->
<!--</p>-->
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary">完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
ng-class="{'box-warning':partner.approve_result!=5,'box-danger':partner.approve_result==5}">
<div class="box-header with-border">
<h3 class="box-title">
<img style="height: 20px;width: 20px" src="/static/images/royalpay_sign_s.png">
RP Operation <span ng-if="partner.approve_result==5" style="color: red">
(Refused
<small class="" ng-if="partner.approve_result==5">:{{partner.refuse_remark}}</small>
)</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</h3>
</div>
<div class="box-body">
<!--<div class="pull-left" ng-if="partner.approve_result==5">Remark:{{partner.refuse_remark}}</div>-->
<a ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"> <i
class="fa fa-download"></i>下载合同</a>
<div ng-if="partner.open_status==3" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
</button>
</div>
<div ng-if="!partner.open_status || (partner.open_status==9 && partner.approve_result==5)"
class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-success" ng-click="commit2GreenChannel()">
<i class="fa fa-paper-plane"></i>
绿色通道
</button>
</div>
<div ng-if="!partner.open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeAgreeFile()">
<i class="fa fa-paper-plane"></i>
提交合规制作合同
</button>
</div>
<div ng-if="partner.audit_logs">
<hr>
<!--<p>-->
<!--<large><span class="label label-primary">BD完善资料</span></large>-->
<!--<large ng-repeat="log in partner.audit_logs"><i class="fa fa-arrow-right" aria-hidden="true"></i>-->
<!--<span class="label label-primary" ng-class="{'label-danger':log.remark.indexOf('打回')>-1,'label-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}} (<b>{{log.operator}}</b> | {{log.create_time}})</span>-->
<!--</large>-->
<!--</p>-->
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary">BD完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true" style="margin-top: 5px"></i>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<div class="box box-warning" ng-if="partner.approve_result==1 && partner.approve_email_send==2">
<div class="box-header with-border">
<h3 class="box-title">Solved</h3>
</div>
<div class="box-body">
<div class="pull-left">Make sure you have send the email to client.</div>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="markAuditEmail()">Sure</button>
</div>
</div>
</div>
<div class="box box-warning" ng-if="('10'|withRole)">
<div class="box-header with-border">
<h3 class="box-title"> <img style="height: 20px;width: 20px" height="20px" src="/static/images/royalpay_sign_s.png"> Compliance <span ng-if="partner.approve_result==5 || partner.refuse_remark.length>0"
style="color: red">(Refused
<small class=""
ng-if="partner.approve_result==5 || partner.refuse_remark.length>0">:{{partner.refuse_remark}}</small>)</span>
<span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="!partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
<b ng-if="partner.source!=4">
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</b>
<span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</h3>
<button ng-if="!partner.is_valid" type="button" class="btn btn-success" style="float:right;"
ng-click="revertClient()">Revert
</button>
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<div ng-if="partner.open_status != 5 && partner.open_status!=10">
<!--<a role="button" type="button" class="btn btn-success" ng-click="exportPDF()">-->
<!--制作合同</a>-->
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download"></i>制作临时合同</a>
<a role="button" type="button" class="btn btn-success" ng-click="exportAgreegatePDF()">
制作全支付合同</a>
<a role="button" type="button" class="btn btn-warning" ngf-select="uploadAgreeFile($file)"
accept="pdf/*">
上传合同</a> (通用合同请选择制作合同,非通用合同模板请人工制作合同后上传)
</div>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" ng-if="partner.open_status!=10 && partner.approve_result!=1"
class="btn btn-success" ng-click="passClient()">Pass
</button>
<button ng-if="(partner.open_status==1||partner.open_status==10) && partner.approve_result>3 || partner.open_status==4"
type="button" class="btn btn-primary" ng-click="refuse()">Refuse
</button>
</div>
<div ng-if="partner.open_status==10" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-success" ng-click="pass2GreenChannel()">
<i class="fa fa-paper-plane"></i>
Agree Green Channel
</button>
</div>
<a style="margin-top: 5px" ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning" style="margin-top: 5px"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i
class="fa fa-download"></i>下载合同</a>
<span style="margin-top: 5px" ng-if="partner.open_status != 5">
<a ng-if="partner.open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="notifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a>
</span>
<div ng-if="partner.audit_logs">
<hr>
<!--<p>-->
<!--<large><span class="label label-primary">BD完善资料</span></large>-->
<!--<large ng-repeat="log in partner.audit_logs"><i class="fa fa-arrow-right" aria-hidden="true"></i>-->
<!--<span class="label label-primary" ng-class="{'label-danger':log.remark.indexOf('打回')>-1,'label-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}} (<b>{{log.operator}}</b> | {{log.create_time}})</span>-->
<!--</large>-->
<!--</p>-->
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary">完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
ng-class="{'box-warning':partner.approve_result!=5,'box-danger':partner.approve_result==5}">
<div class="box-header with-border">
<h3 class="box-title">
<img style="height: 20px;width: 20px" src="/static/images/royalpay_sign_s.png">
Operation <span ng-if="partner.approve_result==5" style="color: red">
(Refused
<small class="" ng-if="partner.approve_result==5">:{{partner.refuse_remark}}</small>
)</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</h3>
</div>
<div class="box-body">
<!--<div class="pull-left" ng-if="partner.approve_result==5">Remark:{{partner.refuse_remark}}</div>-->
<a ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"> <i
class="fa fa-download"></i>下载合同</a>
<div ng-if="partner.open_status==3" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
</button>
</div>
<div ng-if="!partner.open_status || (partner.open_status==9 && partner.approve_result==5)"
class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-success" ng-click="commit2GreenChannel()">
<i class="fa fa-paper-plane"></i>
绿色通道
</button>
</div>
<div ng-if="!partner.open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeAgreeFile()">
<i class="fa fa-paper-plane"></i>
提交合规制作合同
</button>
</div>
<div ng-if="partner.audit_logs">
<hr>
<!--<p>-->
<!--<large><span class="label label-primary">BD完善资料</span></large>-->
<!--<large ng-repeat="log in partner.audit_logs"><i class="fa fa-arrow-right" aria-hidden="true"></i>-->
<!--<span class="label label-primary" ng-class="{'label-danger':log.remark.indexOf('打回')>-1,'label-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}} (<b>{{log.operator}}</b> | {{log.create_time}})</span>-->
<!--</large>-->
<!--</p>-->
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary">BD完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true" style="margin-top: 5px"></i>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<!-- 卡支付审核 -->
<!-- 给合规权限查看 -->
@ -277,29 +267,35 @@
</button>
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<div ng-if="partner.card_flow_info.open_status != 5">
<div style="margin-bottom: 5px" ng-if="partner.card_flow_info.open_status != 5">
<!--<a role="button" type="button" class="btn btn-success" ng-click="exportPDF()">-->
<!--制作合同</a>-->
<a role="button" type="button" class="btn btn-success" ng-click="exportAgreegatePDF()">
制作全支付合同</a>
<a role="button" type="button" class="btn btn-warning" ngf-select="uploadAgreeFile($file)"
accept="pdf/*">
上传合同</a> (通用合同请选择制作合同,非通用合同模板请人工制作合同后上传)
<a role="button" type="button" class="btn btn-success" ng-click="exportCardAgreegatePDF()">
制作卡支付合同</a>
<a role="button" type="button" class="btn btn-success" ng-click="exportCardPromotionaAgreegatePDF()">
制作促销合同</a>
</div>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" ng-if="partner.card_flow_info.approve_result!=1"
<button type="button" ng-if="partner.card_flow_info.open_status==1 && partner.card_flow_info.approve_result>1 || partner.card_flow_info.open_status==4"
class="btn btn-success" ng-click="passCardClient()">Pass
</button>
<button ng-if="partner.card_flow_info.open_status==1 ||partner.card_flow_info.open_status==4"
type="button" class="btn btn-primary" ng-click="cardRefuse()">Refuse
</button>
</div>
<a style="margin-top: 5px" ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i
class="fa fa-download"></i>下载合同</a>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<span style="margin-top: 5px"ng-if="partner.card_flow_info.open_status != 5">
<a ng-if="partner.card_flow_info.open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="notifyBD()">
ng-click="cardNotifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a>
</span>
<div ng-if="partner.audit_card_logs">
@ -329,9 +325,9 @@
</div>
<!-- 给BD权限查看 -->
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
ng-class="{'box-warning':partnercard_flow_info.approve_result!=5,'box-danger':partnercard_flow_info.approve_result==5}">
ng-class="{'box-warning':partner.card_flow_info.approve_result!=5,'box-danger':partner.card_flow_info.approve_result==5}">
<div class="box-header with-border">
<h3 class="box-title"><img style="height: 20px;width: 20px" src="/static/images/card_payment_sign.png"> Card Payment Operation <span ng-if="partner.card_flow_info.approve_result==5" style="color: red">
<h3 class="box-title"><img style="height: 20px;width: 20px" src="/static/images/card_payment_sign.png"> Operation <span ng-if="partner.card_flow_info.approve_result==5" style="color: red">
(Refused
<small class="" ng-if="partner.card_flow_info.approve_result==5">:{{partner.card_flow_info.refuse_remark}}</small>
)</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
@ -348,14 +344,30 @@
</h3>
</div>
<div class="box-body">
<!--<div class="pull-left" ng-if="partner.approve_result==5">Remark:{{partner.refuse_remark}}</div>-->
<a ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"> <i
class="fa fa-download"></i>下载合同</a>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<div ng-if="partner.card_flow_info.open_status==3" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
<button type="button" class="btn btn-danger" ng-click="commitToCardCompliance()">Commit to Compliance
</button>
</div>
<!--<div>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.card_flow_info.open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Promotional Offer合同</a>
</div>-->
<div ng-if="!partner.card_flow_info.open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeCardAgreeFile()">
<i class="fa fa-paper-plane"></i>
@ -387,8 +399,10 @@
</div>
</div>
</div>
<!-- 邮件通知 -->
<div class="box box-warning" ng-if="partner.card_flow_info && partner.card_flow_info.approve_result==1 && partner.card_flow_info.approve_email_send==2">
<!-- 邮件重发通知 -->
<div class="box box-warning" ng-if="(partner.approve_result==1 && partner.approve_email_send==2) ||
(partner.card_flow_info && partner.card_flow_info.approve_result==1 && partner.card_flow_info.approve_email_send==2)">
<div class="box-header with-border">
<h3 class="box-title">Solved</h3>
</div>
@ -1293,7 +1307,7 @@
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope"
ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
<a role="button" style="margin-bottom: 25px;" class="btn btn-danger btn-sm ng-scope" ng-click="deleteClient()">Delete</a>
<a role="button" style="margin-bottom: 25px;" class="btn btn-danger btn-sm ng-scope" ng-click="deleteClient()">Cancel</a>
</div>
</div>
</div>

@ -490,7 +490,7 @@
</div>
</div>
<!-- 卡支付配置 -->
<div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)">
<div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)" ng-if="paymentInfo.enable_international_card">
<div class="panel-heading">Card Payment Config</div>
<div class="panel-body">
<div class="form-horizontal">

@ -503,7 +503,7 @@
<span ng-if="partner.approve_result==4 && !partner.open_status"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
</div>
<div ng-if="!partner.card_approve_flow_info" class="col-xs-5">
<img height="20px" src="/static/images/card_payment_sign.png"><span>等待BD上传材料审核</span>
<img height="20px" src="/static/images/card_payment_sign.png"><span> 资料完善中</span>
</div>
<div ng-if="partner.card_approve_flow_info" class="col-xs-5" style="margin-left: 2px" ng-class="{'bg-green':(partner.card_approve_flow_info.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.card_approve_flow_info.open_status==1||partner.card_approve_flow_info.open_status==2||partner.card_approve_flow_info.open_status==4) && partner.card_approve_flow_info.approve_result!=3)||(partner.card_approve_flow_info.approve_result==3 && (!partner.card_approve_flow_info.open_status || partner.card_approve_flow_info.open_status==1 || partner.card_approve_flow_info.open_status == 4))||(partner.card_approve_flow_info.approve_result==4 && !partner.card_approve_flow_info.open_status)}">
<img height="20px" src="/static/images/card_payment_sign.png">
@ -511,7 +511,7 @@
<span ng-if="!partner.card_approve_flow_info.open_status && !partner.card_approve_flow_info.approve_result && partner.card_approve_flow_info.approve_result!=5 && partner.source!=4">资料完善中</span>
<span ng-if="!partner.card_approve_flow_info.open_status && !partner.card_approve_flow_info.approve_result && partner.card_approve_flow_info.approve_result!=5 && partner.source==4">(自助开通)资料完善中</span>
<span ng-if="partner.card_approve_flow_info.approve_result==0 && partner.card_approve_flow_info.approve_time">不通过({{partner.card_approve_flow_info.approve_time}})</span>
<span ng-if="partner.card_approve_flow_info.approve_result==5 && partner.card_approve_flow_info.approve_time && !partner.card_approve_flow_info.open_status">申请打回({{partner.card_approve_flow_info.refuse_remark|limitTo:15}})</span>
<span ng-if="partner.card_approve_flow_info.approve_result==5">申请打回({{partner.card_approve_flow_info.refuse_remark|limitTo:15}})</span>
<span ng-if="(partner.card_approve_flow_info.open_status==1||partner.card_approve_flow_info.open_status==4)"><i ng-if="partner.card_approve_flow_info.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="partner.card_approve_flow_info.open_status==2">合同制作完成</span>
<span ng-if="partner.card_approve_flow_info.open_status==3 && partner.card_approve_flow_info.approve_result!=5">等待BD上传材料审核</span>

Loading…
Cancel
Save