Merge remote-tracking branch 'origin/develop_newAuthFile_T863' into develop_newAuthFile_T863

master
liuxinxin 5 years ago
commit 2668a3b9b8

@ -198,7 +198,7 @@ public interface RetailAppService {
void getCBBankAggregateFile(JSONObject device, HttpServletResponse httpResponse);
void getSourceAggregateFile(JSONObject device, HttpServletResponse httpResponse);
JSONObject getSourceAggregateFile(JSONObject device);
JSONObject getClientAggregateFile(JSONObject device, MultipartFile file) throws IOException;

@ -2216,7 +2216,7 @@ public class RetailAppServiceImp implements RetailAppService {
}
@Override
public void getSourceAggregateFile(JSONObject device, HttpServletResponse httpResponse) {
public JSONObject getSourceAggregateFile(JSONObject device) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
@ -2246,7 +2246,7 @@ public class RetailAppServiceImp implements RetailAppService {
client.put("bank_account_number", bankAccount.getString("account_no"));
client.put("bank_account_name", bankAccount.getString("account_name"));
}
exportAggregateFile(client, httpResponse);
return exportClientAggregateFile(client);
}
@Override
@ -2361,6 +2361,24 @@ public class RetailAppServiceImp implements RetailAppService {
}
}
private JSONObject exportClientAggregateFile(JSONObject client) {
InputStream stream = null;
JSONObject result = new JSONObject();
try {
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(CBBANK_AGGREGATE_FILE);
pdu.setPdfTemplate(client);
File file = new File(client.getString("client_moniker") + "_agreement.pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
stream = new ByteArrayInputStream(bos.toByteArray());
JSONObject fileInfo = attachmentClient.uploadFile(stream, client.getString("client_moniker") + "_agreement_source.pdf", false);
result.put("file_value", fileInfo.getString("url"));
} catch (Exception e) {
throw new BadRequestException("获取合同文件失败");
}
return result;
}
private void deleteAccountEmailKey(String codeKey){
stringRedisTemplate.delete(getUpdateAccountEmailKey(codeKey));
}

@ -732,12 +732,11 @@ public class RetailAppController {
/**
*
* @param device
* @param httpResponse
*/
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.GET)
public void getSourceAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,HttpServletResponse httpResponse) {
public JSONObject getSourceAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
//todo 后面需替换成正式合同
retailAppService.getSourceAggregateFile(device, httpResponse);
return retailAppService.getSourceAggregateFile(device);
}
/**

@ -164,6 +164,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) {
List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id"));
if (clientFiles != null && clientFiles.size() > 0) {
clientFiles = clientFiles.stream().filter(fileJson -> ((fileJson.getIntValue("status") == 1 || fileJson.getIntValue("status") == 2))).collect(Collectors.toList());
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file"};
for (String fileKey : fileKeys) {
if (clientFiles.stream().noneMatch(fileJson -> fileKey.equals(fileJson.getString("file_name")))) {

@ -44,6 +44,16 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
})
pwdcount++;
}
$scope.ComplianceToperfect = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/compliance_files_advice.html',
backdrop: false
})
};
if($scope.currentUser.client.client_less_file)
{
$scope.ComplianceToperfect();
}
connectWebSocket();
if ($scope.currentUser.role == 1 || $scope.currentUser.role == 2) {
$scope.getAgStatus();

@ -974,22 +974,6 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
})
}
/* '$scope', '$http','partner',*/
$scope.ComplianceToPrefect = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/compliance_files_advice.html',
backdrop: false,
})
};
/*if($scope.currentUser.client.client_less_file)
{
debugger;
var a = $scope.currentUser.client.client_less_file;
$scope.ComplianceToPrefect();
}*/
}]);
app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) {

@ -38,8 +38,8 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
}]
}
}).state('basic.compliance_to_perfect', {
url: '/compliance_to_prefect',
templateUrl: '/static/payment/partner/templates/client_compliance_to_prefect.html',
url: '/compliance_to_perfect',
templateUrl: '/static/payment/partner/templates/client_compliance_to_perfect.html',
controller: 'clientCommitToComplianceFilesCtrl',
resolve: {
file: ['$http', function ($http) {

@ -73,8 +73,8 @@
<table><tbody>
<tr ng-repeat="file_src in client_files.client_company_file.file_value 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}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8" onerror="this.src='https://static.easyicon.net/preview/118/1184255.gif'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="client_files.client_company_file.file_write && file_src.status !=1 && file.file_company.status != 0 && file.file_company.status!=1">X</button>
</td>
@ -117,8 +117,8 @@
<tbody>
<tr ng-repeat="file_src in client_files.client_id_file.file_value 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}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8">
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8" onerror="this.src='https://static.easyicon.net/preview/118/1184255.gif'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)" ng-if="client_files.client_id_file.file_write && file_src.status !=1 && file.file_company.status != 0 && file.file_company.status!=1 ">X</button>
</td>

@ -53,8 +53,8 @@
<a ui-sref=".compliance_files">Compliance files</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".compliance_to_perfect">Compliance to prefect</a>
<li ui-sref-active="active" ng-if="currentUser.client.client_less_file">
<a ui-sref=".compliance_to_perfect">Compliance to perfect</a>
<p ngif app>(资料审核中)</p>
</li>

@ -72,7 +72,7 @@
<table><tbody>
<tr ng-repeat="file_src in file.client_company_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="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='https://static.easyicon.net/preview/118/1184255.gif'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>

Loading…
Cancel
Save