Merge branch 'develop'

master
liuxinxin 5 years ago
commit ed78df8443

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.3.11</version>
<version>1.3.12</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.4.0</jib-maven-plugin.version>

@ -17,6 +17,7 @@ import au.com.royalpay.payment.manage.customers.core.CouponValidateService;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl;
import au.com.royalpay.payment.manage.kyc.core.KycService;
import au.com.royalpay.payment.manage.kyc.enums.FilesAuthStatusEnum;
import au.com.royalpay.payment.manage.kyc.enums.FilesAuthTypeEnum;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.mappers.client.AuthAppMessageMapper;
@ -224,6 +225,8 @@ public class RetailAppServiceImp implements RetailAppService {
@Resource
private ClientFilesMapper clientFilesMapper;
@Resource
private RetailAppService 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/2019/10/22/1571723034726_5xK6A0FGv5aQPbMIDJzXJrUPKHFutv.pdf";
@ -2511,6 +2514,10 @@ public class RetailAppServiceImp implements RetailAppService {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject client = clientMapper.findClient(device.getIntValue("client_id"));
if(!("PINE".equals(client.getString("client_moniker"))
|| "LEOH".equals(client.getString("client_moniker"))) ){
return null;
}
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
JSONObject authFileStatus = new JSONObject();
@ -2524,6 +2531,8 @@ public class RetailAppServiceImp implements RetailAppService {
return null;
}
if(complianceFilesNotice != null){
JSONObject complianceStatus = retailAppService.getClientAuthFileStatus(device);
complianceFilesNotice.putAll(complianceStatus);
supplement_array.add(complianceFilesNotice);
}
if(kycFilesNotice != null){
@ -2546,6 +2555,9 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject file = checkKycFileStatusForApp(client);
JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(device.getIntValue("client_id"));
file.put("file_company", compliance);
if(compliance != null){
file.put("id_type", compliance.getString("id_type"));
}
return file;
}
@ -2562,7 +2574,8 @@ public class RetailAppServiceImp implements RetailAppService {
result.put("help_success", messageSource.getMessage("client.auth.file.help_success", null, RequestEnvironment.getLocale()));
result.put("client_less_file", lessKycFiles);
if (lessKycFiles) {
JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id"));
if (lessKycFiles || compliance != null) {
List<JSONObject> kycFiles = new ArrayList<>();
kycFiles = clientFilesMapper.findKycClientFileByClient(client.getIntValue("client_id"));
for (JSONObject file : kycFiles) {
@ -2593,20 +2606,21 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject complianceFilesNotice = new JSONObject();
JSONObject complianceFileStatus = signInAccountService.checkAuthFileStatus(client);
if(!complianceFileStatus.getBoolean("client_less_file")){
return null;
}
JSONObject compliance = clientComplianceCompanyMapper.findFileByClientId(account.getIntValue("client_id"));
complianceFilesNotice.put("auth_type",FilesAuthTypeEnum.COMPLIANCE.getAuthType());
complianceFilesNotice.put("type", messageSource.getMessage("client.auth.file.compliance.type", null, RequestEnvironment.getLocale()));
complianceFilesNotice.put("deadline","2020-01-31");
/* complianceFilesNotice.put("root_url","111");*/
complianceFilesNotice.put("client_less_file",complianceFileStatus.getBoolean("client_less_file"));
if(compliance != null){
complianceFilesNotice.put("refused_reason",compliance.getString("description"));
complianceFilesNotice.put("client_refuse_reason",compliance.getString("description"));
complianceFilesNotice.put("status",compliance.getString("status"));
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(compliance.getIntValue("status")) );
}else if( !complianceFileStatus.getBoolean("client_less_file")){
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(1) );
}else{
complianceFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(-1) );
}
complianceFilesNotice.put("status_type_description", messageSource.getMessage("client.auth.file.status."+ complianceFilesNotice.getString( "status_type").toLowerCase(), null, RequestEnvironment.getLocale()));
return complianceFilesNotice;
}
@ -2616,19 +2630,21 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject kycFileStatus = signInAccountService.checkKycFileStatusForApp(client,account);
JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(account.getIntValue("client_id"));
if(!kycFileStatus.getBoolean("client_less_file")){
/* if(!kycFileStatus.getBoolean("client_less_file")){
return null;
}
}*/
kycFilesNotice.put("auth_type",FilesAuthTypeEnum.KYC.getAuthType());
kycFilesNotice.put("type", messageSource.getMessage("client.auth.file.kyc.type", null, RequestEnvironment.getLocale()));
kycFilesNotice.put("deadline", "2020-01-31");
/* kycFilesNotice.put("root_url","111");*/
kycFilesNotice.put("client_less_file",kycFileStatus.getBoolean("client_less_file"));
if(compliance != null){
kycFilesNotice.put("refused_reason",compliance.getString("description"));
kycFilesNotice.put("client_refuse_reason",compliance.getString("description"));
kycFilesNotice.put("status",compliance.getString("status"));
kycFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(compliance.getIntValue("status")) );
}else{
kycFilesNotice.put( "status_type", FilesAuthStatusEnum.STATUS.getAuthStatus(-1) );
}
kycFilesNotice.put("status_type_description", messageSource.getMessage("client.auth.file.status."+ kycFilesNotice.getString( "status_type").toLowerCase(), null, RequestEnvironment.getLocale()));
return kycFilesNotice;
}
@ -2949,7 +2965,7 @@ public class RetailAppServiceImp implements RetailAppService {
res.put("base_info_lack", true);
}
clientLegalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(res.getIntValue("client_id"));
if (StringUtils.isEmpty(clientLegalInfo.getString("representative_person")) || StringUtils.isEmpty(clientLegalInfo.getString("job_title"))
if (clientLegalInfo == null||StringUtils.isEmpty(clientLegalInfo.getString("representative_person")) || StringUtils.isEmpty(clientLegalInfo.getString("job_title"))
|| StringUtils.isEmpty(clientLegalInfo.getString("phone"))
|| StringUtils.isEmpty(clientLegalInfo.getString("email"))
|| StringUtils.isEmpty(clientLegalInfo.getString("address"))

@ -137,7 +137,7 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
FilesAuthEnum.PASS_OPR.getAfterStatus(),
FilesAuthEnum.PASS_OPR.getBeforeStatus(),
FilesAuthEnum.PASS_OPR.getAuthType("kyc"));
String[] unrepeatFiles = {"client_bank_file","client_id_file"};
String[] unrepeatFiles = {"client_company_file","client_id_file"};
for(String fileName : unrepeatFiles){
clientFilesMapper.updateRepeatFilesAfterCommit(clientId,fileName);
}

@ -226,10 +226,13 @@ public class KycServiceImpl implements KycService {
if (clientAllAuthFiles == null || clientAllAuthFiles.size() == 0) {
throw new BadRequestException("Please check the information is uploaded completely");
}
String[] fileKeys = {"client_bank_file", "client_id_file"};
if( !"passport".equals(account.getString("id_type")) && !"driver_license".equals(account.getString("id_type"))){
throw new BadRequestException("Please check the Id Type is selected");
}
String[] fileKeys = {"client_company_file", "client_id_file"};
String[] fileNames = {"ASIC File", "ID"};
if(StringUtils.equalsIgnoreCase("passport",account.getString("id_type")) ){
String[] fileKeysPassport = {"client_bank_file", "kyc_utility_bill_file", "client_id_file"};
String[] fileKeysPassport = {"client_company_file", "kyc_utility_bill_file", "client_id_file"};
String[] fileNamesPassport = {"ASIC File", "Utility Bill Files", "ID"};
fileKeys = fileKeysPassport;
fileNames = fileNamesPassport;

@ -30,7 +30,7 @@ package au.com.royalpay.payment.manage.kyc.enums;
public String[] getAuthType(String type) {
switch (type) {
case "kyc":
return new String[]{"client_bank_file","client_id_file","kyc_utility_bill_file"};
return new String[]{"client_company_file","client_id_file","kyc_utility_bill_file"};
case "compliance":
return new String[]{"client_bank_file","client_id_file","client_agree_file","client_company_file"};
default:

@ -0,0 +1,38 @@
package au.com.royalpay.payment.manage.kyc.enums;
/**
* @Author: liuxinxin
* @Date: 2019-12-25
*/
public enum FilesAuthStatusEnum {
STATUS(0);
private final int TYPE;
public int getTYPE() {
return TYPE;
}
FilesAuthStatusEnum(int TYPE) {
this.TYPE = TYPE;
}
public String getAuthStatus(int status) {
switch (status) {
case 0:
case 9:
return "WAIT_AUTH";
case 1:
return "PASSED";
case 2:
return "REFUSED";
case -1:
return "NOT_SUBMITTED";
default:
return null;
}
}
}

@ -43,6 +43,8 @@ public interface ClientFilesMapper {
List<JSONObject> findRepetitiveFiles(@Param("client_id") int clientId,@Param("file_name") String fileType);
List<JSONObject> findRepetitiveFilesForDelete(@Param("client_id") int clientId,@Param("file_name") String fileType);
@AutoSql(type = SqlType.SELECT)
JSONObject findFileById(@Param("file_id") String file_id);

@ -19,6 +19,8 @@ public class ClientAuthFilesInfo {
private String file_apply_info;
private String utility_bill_info;
private int authStatus=0;
public JSONObject toJson(){
@ -73,6 +75,14 @@ public class ClientAuthFilesInfo {
this.file_id_info = file_id_info;
}
public String getUtility_bill_info() {
return utility_bill_info;
}
public void setUtility_bill_info(String utility_bill_info) {
this.utility_bill_info = utility_bill_info;
}
@Override
public String toString() {
return "ClientAuthFilesInfo{" +
@ -81,6 +91,7 @@ public class ClientAuthFilesInfo {
", file_id_info='" + file_id_info + '\'' +
", file_agreement_info='" + file_agreement_info + '\'' +
", file_apply_info='" + file_apply_info + '\'' +
", utility_bill_info='" + utility_bill_info + '\'' +
", authStatus=" + authStatus +
'}';
}

@ -7,7 +7,7 @@ import com.alibaba.fastjson.JSONObject;
*/
public class ClientKycFilesInfo {
private String file_bank_info;
private String file_company_info;
private String file_id_info;
@ -19,12 +19,12 @@ public class ClientKycFilesInfo {
return (JSONObject)JSONObject.toJSON(this);
}
public String getFile_bank_info() {
return file_bank_info;
public String getFile_company_info() {
return file_company_info;
}
public void setFile_bank_info(String file_bank_info) {
this.file_bank_info = file_bank_info;
public void setFile_company_info(String file_company_info) {
this.file_company_info = file_company_info;
}
public String getFile_id_info() {

@ -519,6 +519,8 @@ public interface ClientManager {
boolean isPartnerKycfilesComplete(String clientMoniker);
JSONObject isLessFiles(JSONObject partner);
/**
* /
*

@ -918,17 +918,31 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
clientMapper.update(info);
if (StringUtils.isNotBlank(info.getString("representative_person"))) {
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
legal.put("job_title", info.getString("representative_job_title"));
legal.put("phone", info.getString("representative_phone"));
legal.put("email", info.getString("representative_email"));
legal.put("address", info.getString("registered_address"));
legal.put("suburb", info.getString("registered_suburb"));
legal.put("state", info.getString("registered_state"));
legal.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legal);
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
if(legalInfo != null){
legalInfo.put("client_id", client.getIntValue("client_id"));
legalInfo.put("representative_person", info.getString("representative_person"));
legalInfo.put("job_title", info.getString("representative_job_title"));
legalInfo.put("phone", info.getString("representative_phone"));
legalInfo.put("email", info.getString("representative_email"));
legalInfo.put("address", info.getString("registered_address"));
legalInfo.put("suburb", info.getString("registered_suburb"));
legalInfo.put("state", info.getString("registered_state"));
legalInfo.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.update(legalInfo);
}else{
JSONObject legal = new JSONObject();
legal.put("client_id", client.getIntValue("client_id"));
legal.put("representative_person", info.getString("representative_person"));
legal.put("job_title", info.getString("representative_job_title"));
legal.put("phone", info.getString("representative_phone"));
legal.put("email", info.getString("representative_email"));
legal.put("address", info.getString("registered_address"));
legal.put("suburb", info.getString("registered_suburb"));
legal.put("state", info.getString("registered_state"));
legal.put("postcode", info.getString("registered_postcode"));
sysClientLegalPersonMapper.save(legal);
}
}
saveOrUpdateMailList(info, client);
clientInfoCacheSupport.clearClientCache(clientId);
@ -1105,6 +1119,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientModifySupport.processClientModify(auditModify);
sendCommissionWechatMessage(client);// wxMessage
if (pass == 1) {
createKycAuthStatus(manager,client);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
if (client.getIntValue("source") == 4) {
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id"));
@ -1126,6 +1141,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
public void createKycAuthStatus(JSONObject manager,JSONObject client){
JSONObject fileComp = new JSONObject();
fileComp.put("client_id", client.getIntValue("client_id"));
fileComp.put("submit_time", new Date());
fileComp.put("status", 1);
fileComp.put("source", 2);
fileComp.put("commit_by_id", manager.getString("display_name"));
fileComp.put("type", 2);
fileComp.put("is_valid", 1);
clientComplianceCompanyMapper.save(fileComp);
}
@Override
public void auditClientGreenChannel(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3404,6 +3431,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject file : clientFiles) {
fileJson.put(file.getString("file_name"), file.getString("file_value"));
}
String[] fileKeys = {"kyc_utility_bill_file"};
if (clientFiles.size() > 0) {
for (String fileKey : fileKeys) {
List<JSONObject> clientFileUrl = clientFiles.stream()
.filter(json -> (fileKey.equals(json.getString("file_name"))))
.sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date")))
.map(json -> {
JSONObject params = new JSONObject();
params.put("file_id", json.getString("file_id"));
params.put("file_value", json.getString("file_value"));
return params;
})
.collect(Collectors.toList());
if (clientFileUrl != null && clientFileUrl.size() > 0) {
fileJson.put(fileKey, clientFileUrl);
}
}
}
return fileJson;
}
@ -3423,7 +3469,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"};
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file","kyc_utility_bill_file"};
if (client == null) {
throw new InvalidShortIdException();
}
@ -3452,7 +3498,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public JSONObject getAllKycFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
String[] fileKeys = {"client_bank_file", "kyc_utility_bill_file", "client_id_file"};
String[] fileKeys = {"client_company_file", "kyc_utility_bill_file", "client_id_file"};
if (client == null) {
throw new InvalidShortIdException();
}
@ -3541,9 +3587,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
try {
updateSysClientFiles(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info());
updateSysClientFiles(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info());
updateSysClientFiles(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFiles(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFiles(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFilesWithoutRepeat(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFiles(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info());
} catch (Exception e) {
logger.error("上传合规文件失败", e);
}
@ -3563,7 +3610,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
try {
updateSysClientFiles(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFiles(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFiles(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFiles(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info());
} catch (Exception e) {
@ -3603,7 +3650,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
try {
updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info(),fileResult);
updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info(),fileResult);
updateFilesForWaitAuditWithoutRepeat(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info(),fileResult);
} catch (Exception e) {
@ -3987,6 +4034,29 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
public void updateSysClientFilesWithoutRepeat(JSONObject manager, int clientId, String fileType, String fileValue) {
List<JSONObject> repetitiveFiles = clientFilesMapper.findRepetitiveFilesForDelete(clientId,fileType);
if (fileValue != null) {
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
fileJson.put("last_update_date", new Date());
fileJson.put("last_update_by", manager.getString("display_name"));
fileJson.put("file_name", fileType);
fileJson.put("file_value", fileValue);
fileJson.put("status", 1);
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的fileType文件上传成功");
if(repetitiveFiles != null){
for(JSONObject repetitiveFile : repetitiveFiles){
clientFilesMapper.deleteByClientAndFileId(repetitiveFile.getString("file_id"));
}
}
}
}
public void updateSysClientFilesForWaitCompliance(JSONObject manager, int clientId, String fileType, String fileValue, List<JSONObject> fileResult) {
if (fileValue != null) {
String[] values = fileValue.split(",");
@ -5659,6 +5729,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The Partner's Bank Account is not config!");
}
JSONObject representativeInfo = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id"));
if (representativeInfo == null) {
throw new BadRequestException("The LegalPersonInfo is not config!Please upgrade the RoyalPay App version");
}
for (String str : representativeInfo.keySet()) {
if (representativeInfo.getString(str) == null || !(representativeInfo.getString(str).length() > 0) || !(client.getString("contact_job") != null && client.getString("contact_job").length() > 0)) {
throw new BadRequestException("The LegalPersonInfo is not config!Please upgrade the RoyalPay App version");
@ -6273,6 +6346,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}};
}
@Override
public JSONObject isLessFiles(JSONObject partner){
JSONObject client = clientMapper.findClientByMoniker(partner.getString("client_moniker"));
if (client == null) {
throw new InvalidShortIdException();
}
if(client.getIntValue("approve_result") == 1 && ("PINE".equals(client.getString("client_moniker"))
|| "LEOH".equals(client.getString("client_moniker"))) ){
boolean lessKycFiles = isPartnerKycfilesComplete(partner.getString("client_moniker"));
partner.put("lessKycFiles", lessKycFiles);
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
}
return partner;
}
@Override
public boolean isPartnerKycfilesComplete(String clientMoniker) {
boolean lessKycFiles = true;

@ -622,6 +622,12 @@ public class PartnerViewController {
clientManager.deleteAuthFiles(fileId);
}
@PartnerMapping(value = "/auth_file/{fileId}/deleteByAdmin", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public void deleteAuthFilesByAdmin(@PathVariable String fileId, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.deleteAuthFilesByAdmin(fileId);
}
/**
*
* @param clientMoniker

@ -751,13 +751,13 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
JSONObject result = new JSONObject();
boolean lessKycFiles = true;
JSONObject kycFilesAuth = clientComplianceCompanyMapper.findKycFileComplete(client.getIntValue("client_id"));
if(kycFilesAuth != null
|| !("PINE".equals(client.getString("client_moniker"))
if(kycFilesAuth != null|| !("PINE".equals(client.getString("client_moniker"))
|| "LEOH".equals(client.getString("client_moniker")))){
lessKycFiles = false;
}
result.put("client_less_file", lessKycFiles);
if (lessKycFiles || account.containsKey("manager_id")) {
JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(account.getIntValue("client_id"));
if (lessKycFiles || account.containsKey("manager_id") || compliance != null) {
List<JSONObject> kycFiles = new ArrayList<>();
if ("client".equals(sourceType.toLowerCase())) {
kycFiles = clientFilesMapper.findKycClientFileByClient(client.getIntValue("client_id"));

@ -186,9 +186,7 @@ public class SignInController {
@PartnerMapping(value = "/current_partner", method = RequestMethod.GET)
public JSONObject partnerLoginStatus(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
partner.put("has_incremental_setvice",clientManager.partnerIncrementalService(partner.getString("client_moniker")).getJSONArray("all_service").size()>0);
boolean lessKycFiles = ("PINE".equals(partner.getString("client_moniker")) || "LEOH".equals(partner.getString("client_moniker"))) && clientManager.isPartnerKycfilesComplete(partner.getString("client_moniker"));
partner.put("lessKycFiles", lessKycFiles);
partner.put("lessComplianceFiles",signInAccountService.checkAuthFileStatus(partner.getJSONObject("client")).getBoolean("client_less_file") );
partner = clientManager.isLessFiles(partner);
return partner;
}

@ -38,6 +38,17 @@
AND is_valid = 1
</select>
<select id="findRepetitiveFilesForDelete" resultType="com.alibaba.fastjson.JSONObject">
SELECT
*
FROM
sys_files
WHERE
client_id = #{client_id}
AND file_name = #{file_name}
AND is_valid = 1
</select>
<select id="findAllClientFile" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files where is_valid = 1
and client_id = #{client_id}
@ -46,13 +57,13 @@
<select id="findKycClientFileByClient" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files where is_valid = 1
and client_id = #{client_id}
and (status = 0 or status = 1 or status = 3) and file_name in ('client_bank_file','client_id_file','kyc_utility_bill_file')
and (status = 0 or status = 1 or status = 2 or status = 3) and file_name in ('client_company_file','client_id_file','kyc_utility_bill_file')
order by last_update_date asc
</select>
<select id="findKycClientFileByAudit" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files where is_valid = 1
and client_id = #{client_id}
and (status = 1 or status = 2 or status = 3) and file_name in ('client_bank_file','client_id_file','kyc_utility_bill_file')
and (status = 1 or status = 2 or status = 3) and file_name in ('client_company_file','client_id_file','kyc_utility_bill_file')
order by last_update_date asc
</select>
<update id="confirmAgreeFile">

@ -117,8 +117,11 @@ sys.mondelay.cancel.waring=Are you sure to quit this activity?
client.auth.file.title=RoyalPay is committed to providing a secure and safe platform for Chinese payments. As a part of this we regularly participate in communication with Austrac and China's Foreign Exchange Regulator. To ensure your business is fully compliant, we require certain documents from you by the 31st of October. If you believe you may not be able to submit these documents on time please get in touch with us as soon as possible.
client.auth.file.aggregate.title=Notice Of Supplementary Files
client.auth.file.compliance.type=Compliance Files
client.auth.file.kyc.type=KYC Files
client.auth.file.aggregate.deadline=Deadline 2020-1-20
client.auth.file.compliance.type=2019-10 KYC Certification Information Supplement(1)
client.auth.file.kyc.type=2020-01 KYC Certification Information Supplement(2)
client.auth.file.help_confirm=Please confirm whether you need help from customer service ?
client.auth.file.help_success=Successful notification, please wait for customer service to contact you.
client.auth.file.status.wait_auth=Pending examination and approval
client.auth.file.status.passed=Done
client.auth.file.status.refused=Refused
client.auth.file.status.not_submitted=Not Submitted

@ -110,8 +110,11 @@ sys.mondelay.cancel.waring=是否确认退出活动
client.auth.file.title=应澳洲政府反洗钱监管机构Austrac和中国外汇监管相关要求需要您配合补充完善基本资料以完成合规流程截止时间2019年10月31日前超期未提交将可能会影响您的正常交易谢谢您的配合。
client.auth.file.aggregate.title=补充材料通知
client.auth.file.compliance.type=合规材料
client.auth.file.kyc.type=KYC材料
client.auth.file.aggregate.deadline=截止时间 2020-1-20
client.auth.file.compliance.type=2019-10月KYC材料认证补充(1)
client.auth.file.kyc.type=2020-01月KYC材料认证补充(2)
client.auth.file.help_confirm=请确认您是否需要客服的帮助?
client.auth.file.help_success=通知成功,请等待客服与您联系。
client.auth.file.status.wait_auth=待审核
client.auth.file.status.passed=已完成
client.auth.file.status.refused=打回
client.auth.file.status.not_submitted=未提交

@ -87,4 +87,4 @@ require(['angular', 'jquery'], function (angular, $) {
angular.bootstrap(document.body, moduleNames)
})
}
});
});

@ -151,7 +151,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
sessionStorage.setItem($scope.file.client.client_moniker+'_idType',idType);
}
$scope.uploadBankFile = function (file) {
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -162,12 +162,12 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.file.file_company_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
if ($scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
} else {
$scope.bankIsImage = true;
$scope.companyIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
@ -205,7 +205,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}
}
};
$scope.uploadCompanyFile = function (file) {
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -263,8 +264,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
})
};
$scope.clientComplianceViewCommit = function () {
if (!$scope.file.file.client_bank_file && !$scope.file.file_company.bd_handle) {
commonDialog.alert({title: 'Error', content: '请提交* ASIC File', type: 'error'});
if (!$scope.file.file.client_company_file && !$scope.file.file_company.bd_handle) {
commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration(ASIC File)', type: 'error'});
return;
}
if (!$scope.file.file.client_id_file && !$scope.file.file_company.bd_handle) {

@ -31,7 +31,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}
//audit files
$scope.uploadBankFile = function (file) {
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -42,12 +42,12 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.file.file_company_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
if ($scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
} else {
$scope.bankIsImage = true;
$scope.companyIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
@ -89,7 +89,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
};
//上传账单流水
$scope.uploadCompanyFile = function (file) {
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -117,16 +117,16 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}
};
$scope.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.billIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
if ($scope.file.utility_bill_info && $scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
}
@ -161,8 +161,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
})
};
$scope.clientComplianceViewCommit = function () {
if (!$scope.file.client_bank_file) {
commonDialog.alert({title: 'Error', content: '请提交* ASIC File', type: 'error'});
if (!$scope.file.client_company_file) {
commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration(ASIC File)', type: 'error'});
return;
}
if (!$scope.file.client_id_file) {

@ -61,17 +61,17 @@
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3">* ASIC File</label>
<label class="control-label col-sm-3">* Certificate of Registration(ASIC File)</label>
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)">
ngf-select="uploadCompanyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<a target="_blank" ng-href="{{file.file.client_bank_file}}">
<img class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.file.client_bank_file}}"
<a target="_blank" ng-href="{{file.file.client_company_file}}">
<img class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.file.client_company_file}}"
class="col-sm-8"
onerror="this.src='/static/images/file_close.png'"></a>
</div>
@ -140,7 +140,7 @@
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)">
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>

@ -17,28 +17,29 @@
}
</style>
<section class="content-header">
<h1>商户KYC文件补充
<h1>2020-01月KYC材料认证补充(2)
<span class="small text-danger" style="margin: 20px 20px;font-size: 20px;" ng-if="file.file_company.description">
({{file.file_company.description}})</span>
</h1>
<br/>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充合规文件:<a ui-sref="compliance_to_perfect">点击前往</a></p>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充2019-10月KYC材料认证补充(1) :<a ui-sref="compliance_to_perfect">点击前往</a></p>
</section>
<div class="panel-body box box-warning ng-scope" style="margin-top: 20px;">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3">* ASIC File</label>
<label class="control-label col-sm-3">* Certificate of Registration(ASIC File)</label>
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)">
ng-if="currentUser.lessKycFiles"
ngf-select="uploadCompanyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}">
<img ng-if="file.client_bank_file"
class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.client_bank_file}}"
<a ng-if="companyIsImage" target="_blank" ng-href="{{file.client_company_file}}">
<img ng-if="file.client_company_file"
class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.client_company_file}}"
class="col-sm-8"
onerror="this.src='/static/images/file_close.png'"></a>
</div>
@ -56,11 +57,17 @@
<label class="control-label col-sm-3">* Choose ID Type </label>
<div class="col-sm-5">
<div class="form-control-static">
<select class="form-control" ng-model="file.id_type" style="width: 250px" ng-change="setSession(file.id_type)">
<select class="form-control"
ng-if="currentUser.lessKycFiles"
ng-model="file.id_type" style="width: 250px" ng-change="setSession(file.id_type)">
<option value="">Please Choose</option>
<option value="passport" >Passport</option>
<option value="driver_license">Driver's license</option>
</select>
<div ng-if="!currentUser.lessKycFiles">
<p ng-if="file.id_type == 'passport'" >Passport</p>
<p ng-if="file.id_type == 'driver_license' ">Driver's license</p>
</div>
<p class="text-info">
<i class="fa fa-info"></i> Please select the file type for uploading the ID.<br>
<i class="fa fa-info"></i> Uploading your passport file requires you to upload your utility bill file. <br>
@ -78,12 +85,13 @@
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ng-if="currentUser.lessKycFiles"
ngf-select="uploadIDFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_id_file}}">
<a ng-if="idIsImage" target="_blank" ng-href="{{file.client_id_file}}">
<img ng-if="file.client_id_file"
class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.client_id_file}}"
class="col-sm-8"
@ -108,7 +116,8 @@
<div class="col-sm-3">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)">
ng-if="currentUser.lessKycFiles"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
@ -122,6 +131,7 @@
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-if="currentUser.lessKycFiles"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
@ -150,9 +160,11 @@
<div class="row" style="text-align: center">
<button style="width: 30%;height: 50px;font-size: 20px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-success" type="button"
ng-if="currentUser.lessKycFiles"
ng-click="clientComplianceViewCommit()">Submit Files
</button>
<button style="width: 10%;height: 50px;font-size: 15px;margin-top: 40px;margin-bottom: 20px;" class="btn-group btn btn-warning" type="button"
ng-if="currentUser.lessKycFiles"
ng-click="needBDIntervention()">Need help?
</button>
</div>

@ -19,7 +19,7 @@
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* ASIC File</label>
<label class="control-label col-sm-2">* Certificate of Registration(ASIC File)</label>
<div class="col-sm-4">
<div class="form-control-static" ng-if="role =='compliance'">
<button class="btn btn-primary" type="button"
@ -29,14 +29,11 @@
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<!-- <a ng-if="bankIsImage" target="_blank" ng-repeat="src in file.client_bank_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8">
</a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_bank_file track by $index">
<tr ng-repeat="file_src in file.client_company_file track by $index">
<td ng-bind="$index+1+'.'" ALIGN="left" VALIGN="top" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}"class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
@ -85,7 +82,7 @@
<tbody>
<tr ng-repeat="file_src in file.client_id_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
@ -116,7 +113,7 @@
<div class="col-sm-4">
<div class="form-control-static" ng-if="role =='compliance'">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)">
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
@ -168,4 +165,3 @@
</div>
</div>
</div>

@ -3876,6 +3876,39 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.billIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.billIsImage = false;
}
//上传账单流水
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.billFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.billFileProgress;
$scope.file.utility_bill_info = resp.data.url;
$scope.updateFile();
if ($scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
} else {
$scope.billIsImage = true;
}
}, function (resp) {
delete $scope.billFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadCompanyFile = function (file) {
if (file != null) {
@ -4058,7 +4091,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.file = file.data || {};
//kyc files
$scope.uploadBankFile = function (file) {
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -4069,12 +4102,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.file.file_company_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
if ($scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
} else {
$scope.bankIsImage = true;
$scope.companyIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
@ -4086,10 +4119,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
$scope.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
@ -4129,7 +4163,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
//上传账单流水
$scope.uploadCompanyFile = function (file) {
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})

@ -328,6 +328,15 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
$scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
var id_type = sessionStorage.getItem($scope.partner.client_moniker+'_idType');
if(id_type != 'passport' && id_type != 'driver_license'){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料选择 ID Type再进行提交', type: 'info'});
return;
}
if(id_type == 'passport' && $scope.complianceFiles.kyc_utility_bill_file == null){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料提交Utility Bill Files再进行提交', type: 'info'});
return;
}
if ($scope.complianceFiles.client_id_file == null || $scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null) {
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return;
@ -651,8 +660,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
$scope.file = file.data || {};
$scope.file.id_type = sessionStorage.getItem($scope.partner.client_moniker+'_idType');
$scope.setSession = function(idType){
sessionStorage.setItem($scope.partner.client_moniker+'_idType',idType);
}
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
@ -701,6 +713,10 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.billIsImage = true;
if ($scope.file.utility_bill_info && $scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
}
$scope.uploadCompanyFile = function (file) {
if (file != null) {
@ -817,6 +833,35 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}
};
//上传账单流水
$scope.uploadBillFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.billFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.billFileProgress;
$scope.file.utility_bill_info = resp.data.url;
$scope.updateFile();
if ($scope.file.utility_bill_info.endsWith('pdf')) {
$scope.billIsImage = false;
} else {
$scope.billIsImage = true;
}
}, function (resp) {
delete $scope.billFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.billFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
@ -835,6 +880,26 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
})
};
$scope.deleteComplianceFiles = function (file_id) {
$scope.file_id = file_id;
commonDialog.confirm({
title: 'Warning',
content: 'This operation will delete the file, Are you sure?'
}).then(function () {
$http.put('/client/partner_info/auth_file/' + $scope.file_id + '/deleteByAdmin').then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Delete Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
function commitError() {
commonDialog.alert({
title: 'Error',

@ -62,6 +62,27 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Choose ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<select class="form-control"
ng-model="file.id_type" style="width: 250px" ng-change="setSession(file.id_type)">
<option value="">Please Choose</option>
<option value="passport" >Passport</option>
<option value="driver_license">Driver's license</option>
</select>
<p class="text-info">
<i class="fa fa-info"></i> If client have already attached surcharge in their own system, ignore this choice.<br>
<i class="fa fa-info"></i> It is recommended to notice customers about they will pay addition money as surcharge in the payment page. <br>
<i class="fa fa-info"></i> 请选择上传ID的文件类型.<br>
<i class="fa fa-info"></i> 上传护照文件需要您上传水电煤账单文件.<br>
<i class="fa fa-info"></i> 上传驾照,水电煤账单文件可以不填.
</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* ID </label>
<div class="col-sm-4">
@ -94,6 +115,51 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
</div>
<uib-progressbar value="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-5">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
<!-- <div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* Agreement</label>
@ -151,4 +217,4 @@
<!--<div class="margin-bottom margin-top">-->
<!--<button class="btn-group btn btn-success" type="button" ng-click="updateFile()">Save-->
<!--</button>-->
<!--</div>-->
<!--</div>-->

@ -17,12 +17,12 @@
}
</style>
<section class="content-header">
<h1>商户合规文件补充
<h1>2019-10月KYC材料认证补充(1)
<span class="small text-danger" style="margin: 20px 20px;font-size: 20px;" ng-if="file.client_refuse_reason">
({{file.client_refuse_reason}})</span>
</h1>
<br/>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充KYC文件<a ui-sref="kyc_files_perfect">点击前往</a></p>
<p ng-if="currentUser.lessComplianceFiles && currentUser.lessKycFiles">前去补充2020-01月KYC材料认证补充(2) <a ui-sref="kyc_files_perfect">点击前往</a></p>
</section>
<div class="panel-body box box-warning ng-scope" style="margin-top: 20px;">
<div class="form-horizontal">

@ -62,18 +62,29 @@
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-4" style="text-align: center;">bank statement
<label class="control-label col-sm-4" style="text-align: center;">Certificate of Registration(ASIC File)
<span ng-if="file.file_company.status==0" class="small text-danger">(待审核)</span>
<span ng-if="file.file_company.status==1" class="small text-success">(已通过)</span>
<span ng-if="file.file_company.status==2" class="small text-danger">(已驳回)</span>
</label>
<div class="col-sm-6">
<a target="_blank" ng-href="{{file.file.client_bank_file}}">
<img class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.file.client_bank_file}}" class="col-sm-8" onerror="this.src='/static/images/file_close.png'">
<a target="_blank" ng-href="{{file.file.client_company_file}}">
<img class="col-sm-6" style="border: 1px solid #ddd" ng-src="{{file.file.client_company_file}}" class="col-sm-8" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group" ng-if="file.file_company">
<label class="control-label col-sm-4" style="text-align: center;"> ID Type </label>
<div class="col-sm-6">
<div class="form-control-static">
<p ng-if="file.file_company.id_type == 'passport'" >Passport</p>
<p ng-if="file.file_company.id_type == 'driver_license' ">Driver's license</p>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" style="text-align: center;">ID
<span ng-if="file.file_company.status==0" class="small text-danger">(待审核)</span>

@ -13,16 +13,7 @@
<div class="row">
<div class="col-xs-12">
<div class="form-horizontal">
<!--<div class="form-group">-->
<!--&lt;!&ndash;<label class="control-label col-xs-3">Title</label>&ndash;&gt;-->
<!--<div class="col-xs-12">-->
<!--<p class="form-control-static">-->
<!--{{notice.title}}-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<div class="form-group">
<!--<label class="control-label col-xs-3">Content</label>-->
<div class="col-xs-12">
<a><h5 style="text-align: right"><span ng-click="changeLanguage('en')" ng-class="{'selectedLanguage':adviceLanguage == 'en'}"style="cursor: pointer;">EN</span> | <span ng-click="changeLanguage('zh')" ng-class="{'selectedLanguage':adviceLanguage == 'zh'}" style="cursor: pointer;">中文</span></h5></a>
<div ng-if="adviceLanguage == 'en'">
@ -73,39 +64,54 @@
<tr><th colspan="4" style="text-align: center">List Of Information To Be Supplemented</th></tr>
<tr>
<th>Supplement Type</th>
<th>Deadline</th>
<th>Status</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-if="file.client_less_file">
<td>Supplement Compliance File</td>
<td>2020-01-31</td>
<tr>
<td>2019-10 KYC Certification Information Supplement(1)</td>
<td>
<p ng-if="file.file_company" style="color: red">
<span ng-if="file.file_company.status == 2">Refused</span>
<p ng-if="file.file_company && file.file_company.status == 2" style="color: red">
<span >Refused</span>
<span ng-if="file.file_company.description">({{file.file_company.description}})</span>
</p>
<p ng-if=" !file.file_company">
<p ng-if="file.file_company && (file.file_company.status == 0 || file.file_company.status == 9)">
<span>Pending examination and approval</span>
</p>
<p ng-if="(file.file_company && file.file_company.status == 1) || !file.client_less_file" style="color: green">
<span>Done</span>
</p>
<p ng-if=" !file.file_company && file.client_less_file">
<span>Not Submitted</span>
</p>
</td>
<td><p><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">Go to replenish>></a></p></td>
<td>
<p ng-if="file.client_less_file"><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">Go to replenish>></a></p>
<p ng-if="!file.client_less_file"><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">View>></a></p>
</td>
</tr>
<tr ng-if="kycFile.client_less_file">
<td>KYC Certification Information Supplement</td>
<td>2020-01-31</td>
<tr >
<td>2020-01 KYC Certification Information Supplement(2)</td>
<td>
<p ng-if="kycFile.file_company" style="color: red">
<span ng-if="kycFile.file_company.status == 2">Refused</span>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 2" style="color: red">
<span>Refused</span>
<span ng-if="kycFile.file_company.description">({{kycFile.file_company.description}})</span>
</p>
<p ng-if="kycFile.file_company && (kycFile.file_company.status == 0 || kycFile.file_company.status == 9)">
<span>Pending examination and approval</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 1" style="color: green">
<span>Done</span>
</p>
<p ng-if=" !kycFile.file_company">
<span>Not Submitted</span>
</p>
</td>
<td><p><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">Go to replenish>></a></p></td>
<td>
<p ng-if="kycFile.client_less_file"><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">Go to replenish>></a></p>
<p ng-if="!kycFile.client_less_file"><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">View>></a></p>
</td>
</tr>
</tbody>
</table>
@ -118,39 +124,54 @@
<tr><th colspan="4" style="text-align: center">待补充资料列表</th></tr>
<tr>
<th>资料类型</th>
<th>截止时间</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-if="file.client_less_file">
<td>合规资料补充</td>
<td>2020-01-31</td>
<tr>
<td>2019-10月KYC材料认证补充(1)</td>
<td>
<p ng-if="file.file_company" style="color: red">
<span ng-if="file.file_company.status == 2">打回</span>
<p ng-if="file.file_company && file.file_company.status == 2" style="color: red">
<span>打回</span>
<span ng-if="file.file_company.description">({{file.file_company.description}})</span>
</p>
<p ng-if=" !file.file_company">
<p ng-if="file.file_company && (file.file_company.status == 0 || file.file_company.status == 9)">
<span>待审核</span>
</p>
<p ng-if="(file.file_company && file.file_company.status == 1) || !file.client_less_file" style="color: green">
<span>已完成</span>
</p>
<p ng-if=" !file.file_company && file.client_less_file">
<span>未提交</span>
</p>
</td>
<td><p><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">前往补充>></a></p></td>
<td>
<p ng-if="file.client_less_file"><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">前往补充>></a></p>
<p ng-if="!file.client_less_file"><a ui-sref="compliance_to_perfect" ng-click="$dismiss()">查看>></a></p>
</td>
</tr>
<tr ng-if="kycFile.client_less_file">
<td>KYC认证资料补充</td>
<td>2020-01-31</td>
<tr>
<td>2020-01月KYC材料认证补充(2)</td>
<td>
<p ng-if="kycFile.file_company" style="color: red">
<span ng-if="kycFile.file_company.status == 2">打回</span>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 2" style="color: red">
<span>打回</span>
<span ng-if="kycFile.file_company.description">({{kycFile.file_company.description}})</span>
</p>
<p ng-if="kycFile.file_company && (kycFile.file_company.status == 0 || kycFile.file_company.status == 9)">
<span>待审核</span>
</p>
<p ng-if="kycFile.file_company && kycFile.file_company.status == 1" style="color: green">
<span>已完成</span>
</p>
<p ng-if=" !kycFile.file_company">
<span>未提交</span>
</p>
</td>
<td><p><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">前往补充>></a></p></td>
<td>
<p ng-if="kycFile.client_less_file"><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">前往补充>></a></p>
<p ng-if="!kycFile.client_less_file"><a ui-sref="kyc_files_perfect" ng-click="$dismiss()">查看>></a></p>
</td>
</tr>
</tbody>
</table>

@ -209,6 +209,52 @@
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center">

@ -277,9 +277,9 @@
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".files">Compliance Files</a>
</li>
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<!--<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".kyc_files">KYC Files</a>
</li>
</li>-->
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".settlement({clientMoniker:partner.client_moniker})">Settlement</a>
</li>

Loading…
Cancel
Save