fix 合规审核文件界面

master
luoyang 5 years ago
parent f70cc938da
commit eec19b4d3f

@ -202,7 +202,9 @@ public interface RetailAppService {
JSONObject getClientAggregateFile(JSONObject device, MultipartFile file) throws IOException;
void uploadGreenChannelAuthFiles(JSONObject device, ClientAuthFilesInfo filesInfo);
List<JSONObject> uploadGreenChannelAuthFiles(JSONObject device, ClientAuthFilesInfo filesInfo);
void deleteGreenChannelAuthFiles(JSONObject device, String filesInfo);
void commitAuthFilesToCompliance(JSONObject device);
}

@ -2253,6 +2253,7 @@ public class RetailAppServiceImp implements RetailAppService {
public JSONObject getClientAggregateFile(JSONObject device, MultipartFile file) throws IOException{
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
client.put("now", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
String clientName = "";
@ -2284,11 +2285,11 @@ public class RetailAppServiceImp implements RetailAppService {
ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(img, "png", out);
client.put("img","data:image/png;base64," + Base64.encodeBase64String(out.toByteArray()));
return exportImgAggregateFile(client);
return exportImgAggregateFile(account, client);
}
@Override
public void uploadGreenChannelAuthFiles(JSONObject device, ClientAuthFilesInfo clientAuthFilesInfo) {
public List<JSONObject> uploadGreenChannelAuthFiles(JSONObject device, ClientAuthFilesInfo clientAuthFilesInfo) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
@ -2296,7 +2297,14 @@ public class RetailAppServiceImp implements RetailAppService {
clientAuthFilesInfo.setAuthStatus(0);
clientAuthFilesInfo.setFile_agreement_info(null);
clientAuthFilesInfo.setFile_apply_info(null);
clientManager.uploadAuthFilesForWaitCompliance(account, client.getString("client_moniker"), clientAuthFilesInfo);
return clientManager.uploadAuthFilesForWaitCompliance(account, client.getString("client_moniker"), clientAuthFilesInfo);
}
@Override
public void deleteGreenChannelAuthFiles(JSONObject device, String fileId) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
clientManager.deleteAuthFiles(fileId);
}
@Override
@ -2308,7 +2316,7 @@ public class RetailAppServiceImp implements RetailAppService {
clientManager.commitAuthFilesToCompliance(client.getString("client_moniker"), account);
}
private JSONObject exportImgAggregateFile(JSONObject client) throws IOException{
private JSONObject exportImgAggregateFile(JSONObject account, JSONObject client) throws IOException{
JSONObject result = new JSONObject();
InputStream stream = null;
try {
@ -2318,7 +2326,15 @@ public class RetailAppServiceImp implements RetailAppService {
File file = new File(client.getString("client_moniker") + "_agreement.pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
stream = new ByteArrayInputStream(bos.toByteArray());
result = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_agreement.pdf", false);
JSONObject fileInfo = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_agreement.pdf", false);
ClientAuthFilesInfo clientAuthFilesInfo = new ClientAuthFilesInfo();
clientAuthFilesInfo.setFile_agreement_info(fileInfo.getString("url"));
clientAuthFilesInfo.setFile_apply_info(null);
clientAuthFilesInfo.setFile_bank_info(null);
clientAuthFilesInfo.setFile_company_info(null);
clientAuthFilesInfo.setFile_id_info(null);
clientAuthFilesInfo.setAuthStatus(0);
result = clientManager.uploadAuthFilesForWaitCompliance(account, client.getString("client_moniker"), clientAuthFilesInfo).get(0);
} catch (Exception e) {
logger.error("合同制作出现问题:", e);
} finally {

@ -745,7 +745,7 @@ public class RetailAppController {
* @param device
* @param file url
*/
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.POST)
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.PUT)
public JSONObject getClientAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam MultipartFile file) throws IOException {
//todo 后面需替换成正式合同
return retailAppService.getClientAggregateFile(device, file);
@ -757,8 +757,18 @@ public class RetailAppController {
* @param filesInfo url
*/
@RequestMapping(value = "/client/auth_file", method = RequestMethod.PUT)
public void uploadGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestBody ClientAuthFilesInfo filesInfo){
retailAppService.uploadGreenChannelAuthFiles(device, filesInfo);
public List<JSONObject> uploadGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestBody ClientAuthFilesInfo filesInfo){
return retailAppService.uploadGreenChannelAuthFiles(device, filesInfo);
}
/**
*
* @param device
* @param fileId Id
*/
@RequestMapping(value = "/client/auth_file/{fileId}/delete", method = RequestMethod.PUT)
public void deleteGreenChannelAuthFiles(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@PathVariable String fileId){
retailAppService.deleteGreenChannelAuthFiles(device, fileId);
}

@ -12,7 +12,6 @@ public class ClientComplianceQuery {
private int limit = 10;
private int page = 1;
private String status;
private String client_order_id;
private String client_moniker;
public JSONObject toJson(){
@ -20,9 +19,6 @@ public class ClientComplianceQuery {
if(StringUtils.isNotEmpty(status)){
jason.put("status",status);
}
if(StringUtils.isNotEmpty(client_order_id)){
jason.put("client_order_id",client_order_id);
}
if(StringUtils.isNotEmpty(client_moniker)){
jason.put("client_moniker",client_moniker);
}
@ -53,14 +49,6 @@ public class ClientComplianceQuery {
this.status = status;
}
public String getClient_order_id() {
return client_order_id;
}
public void setClient_order_id(String client_order_id) {
this.client_order_id = client_order_id;
}
public String getClient_moniker() {
return client_moniker;
}

@ -38,7 +38,7 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
params.put("bd_user", manager.getString("manager_id"));
}
PageList<JSONObject> partners = clientComplianceCompanyMapper.listClientCompliances(params, new PageBounds(applyQuery.getPage(), applyQuery.getLimit(), Order.formString("create_time.desc")));
PageList<JSONObject> partners = clientComplianceCompanyMapper.listClientCompliances(params, new PageBounds(applyQuery.getPage(), applyQuery.getLimit(), Order.formString("submit_time.desc")));
return PageListUtils.buildPageListResult(partners);
}

@ -27,7 +27,6 @@ public class ComplianceAuditController
@RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject clientComplianceList(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ClientComplianceQuery apply) {
/*return clientApply.listPartnerApply(manager,apply);*/
return clientComplianceApply.listClientComplianceApply(manager,apply);
}

@ -243,7 +243,7 @@ public interface ClientManager {
void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
void uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
List<JSONObject> uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
void commitAuthFilesToCompliance(String clientMoniker, JSONObject account);

@ -3173,18 +3173,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
public void uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) {
public List<JSONObject> uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
List<JSONObject> fileResult = new ArrayList<>();
if (client == null) {
throw new InvalidShortIdException();
}
int clientId = client.getIntValue("client_id");
try {
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info());
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info());
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info());
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info());
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info());
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_AGREE_FILE, filesInfo.getFile_agreement_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_APPLY_FILE, filesInfo.getFile_apply_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_COMPANY_FILE, filesInfo.getFile_company_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info(),fileResult);
} catch (Exception e) {
logger.error("上传合规文件失败", e);
}
@ -3193,6 +3194,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
// client.put("approve_result", 3);
// clientMapper.update(client);
// }
return fileResult;
}
@Override
@ -3217,13 +3219,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if(fileComp == null) {
fileComp = new JSONObject();
fileComp.put("client_id",client.getIntValue("client_id"));
fileComp.put("create_time",new Date());
fileComp.put("submit_time",new Date());
fileComp.put("status",0);
fileComp.put("commit_by_id",account.getString("account_id"));
clientComplianceCompanyMapper.save(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
} else {
fileComp.put("status",0);
fileComp.put("submit_time",new Date());
fileComp.put("commit_by_id",account.getString("account_id"));
clientComplianceCompanyMapper.update(fileComp);
clientFilesMapper.updateBeforeCompliance(client.getIntValue("client_id"));
@ -3282,7 +3285,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
public void updateSysClientFilesForWaitCompliance(JSONObject manager, int clientId, String fileType, String fileValue) {
public void updateSysClientFilesForWaitCompliance(JSONObject manager, int clientId, String fileType, String fileValue,List<JSONObject> fileResult) {
if (fileValue != null) {
String[] values = fileValue.split(",");
for (String value : values) {
@ -3291,11 +3294,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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("file_value", value);
fileJson.put("status", 0);
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的fileType文件上传成功");
logger.info(clientId + "的fileType文件上传成功" + fileJson.getString("file_id"));
JSONObject file = new JSONObject();
file.put("file_id", fileJson.getString("file_id"));
file.put("file_value", fileJson.getString("file_value"));
fileResult.add(file);
}
}
}

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper">
<select id="listClientCompliances" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.* FROM client_authfile_compliance c
SELECT c.client_moniker,c.short_name,c.create_time,c.bd_user_name,c.approve_result,c.approve_time,c.open_status,
c.source as client_source,a.* FROM client_authfile_compliance a INNER JOIN sys_clients c on c.client_id = a.client_id
</select>
</mapper>

@ -7,7 +7,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
templateUrl: 'static/sys/templates/partner_compliance_for_client.html',
controller: 'compliancePartnerForClientCtrl'
}).state('partner_apply.compliance_detail', {
url: '/{client_id}/compliance_detail',
url: '/{client_moniker}/compliance_detail',
templateUrl: '/static/payment/partner/templates/client_compliance_to_auth.html',
controller: 'partnerComplianceCompanyDetail',
resolve: {
@ -21,7 +21,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
app.controller('compliancePartnerForClientCtrl', ['$scope', '$sce', '$http', '$filter', '$uibModal', 'businessStructuresMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap',
function ($scope, $sce, $http, $filter, $uibModal, businessStructuresMap, industryMap, stateMap, sectorMap, countryMap) {
$scope.pagination = {};
$scope.industries = industryMap.configs()
$scope.industries = industryMap.configs();
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
$scope.params = {};

@ -39,24 +39,43 @@
<thead>
<tr>
<th>Client Moniker</th>
<th>Compliance Id</th>
<th>Create Time</th>
<th>Short Name</th>
<th>Compliance Status</th>
<th>Operator Id</th>
<th>Refuse Reason</th>
<th>Register Time</th>
<th>BD</th>
<th>AuthFile Status</th>
<th>Submit Time</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="compliance_company in compliances">
<td ng-bind="compliance_company.client_id"></td>
<td ng-bind="compliance_company.compliance_id"></td>
<td ng-bind="compliance_company.client_moniker"></td>
<td ng-bind="compliance_company.short_name"></td>
<td ng-class="{'bg-green':(compliance_company.approve_result==2 && (compliance_company.client_source==1 || compliance_company.client_source==2)),'bg-red':((compliance_company.open_status==1||compliance_company.open_status==2||compliance_company.open_status==4) && compliance_company.approve_result!=3)||(compliance_company.approve_result==3 && (!compliance_company.open_status || compliance_company.open_status==1 || compliance_company.open_status == 4))||(compliance_company.approve_result==4 && !compliance_company.open_status)||(compliance_company.open_status==10)}">
<span ng-if="compliance_company.approve_result==1 && compliance_company.approve_time">通过({{compliance_company.approve_time}})</span>
<span ng-if="!compliance_company.open_status && !compliance_company.approve_result && compliance_company.approve_result!=5 && compliance_company.client_source!=4">资料完善中</span>
<span ng-if="!compliance_company.open_status && !compliance_company.approve_result && compliance_company.approve_result!=5 && compliance_company.client_source==4">(自助开通)资料完善中</span>
<span ng-if="!compliance_company.open_status && compliance_company.approve_result==2 && compliance_company.approve_time">自助开通试用中({{compliance_company.approve_time}}~{{compliance_company.expiry_time}})</span>
<span ng-if="compliance_company.approve_result==0 && compliance_company.approve_time">不通过({{compliance_company.approve_time}})</span>
<span ng-if="compliance_company.approve_result==5 && compliance_company.approve_time && compliance_company.refuse_remark">申请打回({{compliance_company.refuse_remark|limitTo:15}})</span>
<span ng-if="(compliance_company.open_status==1||compliance_company.open_status==4) && compliance_company.approve_result!=3"><i ng-if="compliance_company.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="compliance_company.approve_result==3 && (!compliance_company.open_status || compliance_company.open_status==4)">自助开通(等待合规)</span>
<span ng-if="compliance_company.open_status==2">合同制作完成</span>
<span ng-if="compliance_company.open_status==3 && compliance_company.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="compliance_company.open_status==10">绿色通道申请中</span>
<span ng-if="compliance_company.approve_result==4 && !compliance_company.open_status"><i ng-if="compliance_company.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
</td>
<td ng-bind="compliance_company.create_time|date:'dd/MMM/yyyy'"></td>
<td ng-bind="compliance_company.status"></td>
<td ng-bind="compliance_company.operator_id"></td>
<td ng-bind="compliance_company.description"></td>
<td ng-bind="compliance_company.bd_user_name"></td>
<td>
<span ng-if="compliance_company.status==0">待审核</span>
<span ng-if="compliance_company.status==1">通过</span>
<span ng-if="compliance_company.status==2">打回</span>
</td>
<td ng-bind="compliance_company.submit_time|date:'dd/MMM/yyyy'"></td>
<td><a class="text-primary" role="button" title="Detail"
ui-sref="partner_apply.compliance_detail({client_id:compliance_company.client_id})"
ui-sref="compliance_company.apply.compliance_detail({client_moniker:compliance_company.client_moniker})">
<i class="fa fa-search"></i> Detail
</a></td>
<!--({client_id:compliance_company.client_id})-->
@ -78,6 +97,7 @@
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div>
</div>

Loading…
Cancel
Save