自助开通合规流程改造

master
eason.qian 7 years ago
parent c7a80a9b26
commit 9944407894

@ -290,4 +290,6 @@ public interface ClientManager {
JSONObject getCheckClientInfo(int client_id,String account_id, String channel); JSONObject getCheckClientInfo(int client_id,String account_id, String channel);
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager); List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager);
void applyToCompliance(String client_moniker, JSONObject account);
} }

@ -778,7 +778,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId); List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
if (client.getIntValue("source") == 4) { if (client.getIntValue("source") == 4) {
sendAuthInitEmail(manager, client); JSONObject account = accounts.get(0);
sendInitEmail(manager, client, account.getString("username"), "*****");
} else { } else {
if (accounts.size() == 0) { if (accounts.size() == 0) {
initAdminUserAndSendEmail(manager, clientMoniker, client); initAdminUserAndSendEmail(manager, clientMoniker, client);
@ -3149,6 +3150,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return; return;
} }
if (client.getIntValue("open_status") == 4) { if (client.getIntValue("open_status") == 4) {
if (client.getIntValue("source")==4 && !StringUtils.isNotEmpty(bd_user_name)){
bd_user_name = "自助开通商户";
}
List<JSONObject> complianceList = managerMapper.getOnlyCompliance(); List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
if (complianceList != null && complianceList.size() > 0) { if (complianceList != null && complianceList.size() > 0) {
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
@ -3156,7 +3160,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); 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, "审核材料", "BD已提交合规材料,等待审核"); bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg); paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1" + e.getMessage());
@ -3391,4 +3395,48 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id")); return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
} }
@Override
public void applyToCompliance(String client_moniker, JSONObject client_account) {
JSONObject client = getClientInfoByMoniker(client_moniker);
if (client == null) {
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
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!");
}
int open_status_from = client.getIntValue("open_status");
OpenStatusModify openStatusModify = new OpenStatusModify(client_account, client_moniker, 4);
if ((client.getIntValue("source") == 1 || client.getIntValue("source") == 2) && client.getIntValue("approve_result") == 2) {
openStatusModify.setApprove_time(new Date());
} else {
openStatusModify.setApprove_time(new Date());
openStatusModify.setApprove_result(3);
}
client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account);
if (client_account != null) {
// sendMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
}
}
} }

@ -379,4 +379,10 @@ public class PartnerViewController {
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientContractService.confirmSourceAgreement(account.getIntValue("client_id"), account.getString("account_id"), "PC"); clientContractService.confirmSourceAgreement(account.getIntValue("client_id"), account.getString("account_id"), "PC");
} }
@PartnerMapping(value = "/compliance_audit", method = RequestMethod.POST, roles = PartnerRole.ADMIN)
@ResponseBody
public void commitAudit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.applyToCompliance(account.getString("client_moniker"),account);
}
} }

@ -60,6 +60,13 @@
<span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2" <span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span> 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">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span> <span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span> <span ng-if="partner.open_status==2">合同制作完成</span>
@ -68,6 +75,7 @@
<span ng-if="partner.open_status==5">通过</span> <span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span> <span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span> <span ng-if="partner.open_status==10">绿色通道申请中</span>
</b>
</h3> </h3>
</div> </div>
<div class="box-body"> <div class="box-body">
@ -114,7 +122,7 @@
<div class="box-body table-responsive pad"> <div class="box-body table-responsive pad">
<small> <small>
<div class="btn-group-vertical"> <div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary">BD完善资料</button> <button type="button" class="btn btn-xs btn-primary">完善资料</button>
</div> </div>
</small> </small>
<small ng-repeat="log in partner.audit_logs"> <small ng-repeat="log in partner.audit_logs">

@ -498,11 +498,10 @@
<td ng-class="{'bg-green':(partner.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.open_status==1||partner.open_status==2||partner.open_status==4) && partner.approve_result!=3)||(partner.approve_result==3 && (!partner.open_status || partner.open_status==1))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}"> <td ng-class="{'bg-green':(partner.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.open_status==1||partner.open_status==2||partner.open_status==4) && partner.approve_result!=3)||(partner.approve_result==3 && (!partner.open_status || partner.open_status==1))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}">
<span ng-if="partner.approve_result==1 && partner.approve_time">通过({{partner.approve_time}})</span> <span ng-if="partner.approve_result==1 && partner.approve_time">通过({{partner.approve_time}})</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source!=4">资料完善中</span> <span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source!=4">资料完善中</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source==4">(自助开通)资料完善中</span>
<span ng-if="!partner.open_status && partner.approve_result==2 && partner.approve_time">自助开通试用中({{partner.approve_time}}~{{partner.expiry_time}})</span> <span ng-if="!partner.open_status && partner.approve_result==2 && partner.approve_time">自助开通试用中({{partner.approve_time}}~{{partner.expiry_time}})</span>
<span ng-if="partner.approve_result==0 && partner.approve_time">不通过({{partner.approve_time}})</span> <span ng-if="partner.approve_result==0 && partner.approve_time">不通过({{partner.approve_time}})</span>
<span ng-if="partner.approve_result==5 && partner.approve_time && partner.refuse_remark">申请打回({{partner.refuse_remark|limitTo:15}})</span> <span ng-if="partner.approve_result==5 && partner.approve_time && partner.refuse_remark">申请打回({{partner.refuse_remark|limitTo:15}})</span>
<span ng-if="partner.approve_result==5 && partner.approve_time && !partner.refuse_remark">申请打回{{partner.refuse_remark|limitTo:15}}</span>
<span ng-if="!partner.approve_result && !partner.approve_time && partner.source==4">Quick Pass(等待同意协议)</span>
<span ng-if="(partner.open_status==1||partner.open_status==4) && partner.approve_result!=3"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span> <span ng-if="(partner.open_status==1||partner.open_status==4) && partner.approve_result!=3"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="partner.approve_result==3 && (!partner.open_status || partner.open_status==1)">自助开通(等待合规)</span> <span ng-if="partner.approve_result==3 && (!partner.open_status || partner.open_status==1)">自助开通(等待合规)</span>
<span ng-if="partner.open_status==2">合同制作完成</span> <span ng-if="partner.open_status==2">合同制作完成</span>

Loading…
Cancel
Save