fix 制作合同返还数据

master
luoyang 5 years ago
parent 8cd237cd44
commit 7e9b36605c

@ -85,6 +85,7 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
}
complianceDetail.put("operator_id", manager.getString("manager_id"));
complianceDetail.put("status",1);
complianceDetail.put("description",' ');
clientComplianceCompanyMapper.update(complianceDetail);
clientFilesMapper.passCompliance(clientId);
}

@ -2005,47 +2005,46 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject result = new JSONObject();
String address = client.getString("address").trim();
if (address.contains(",")) {
result.put("address", address.substring(0, address.lastIndexOf(",")).trim());
result.put("address_sub", address.substring(address.lastIndexOf(",") + 1).trim());
client.put("address", address.substring(0, address.lastIndexOf(",")).trim());
client.put("address_sub", address.substring(address.lastIndexOf(",") + 1).trim());
}
if (client.getString("acn") != null && !client.getString("acn").equals("")) {
result.put("acn_type", "ACN: (" + client.getString("acn") + ")");
result.put("company_name_acn", client.getString("company_name") + " (ACN " + client.getString("acn") + ")");
client.put("acn_type", "ACN: (" + client.getString("acn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ACN " + client.getString("acn") + ")");
} else {
result.put("acn_type", "ABN: (" + client.getString("abn") + ")");
result.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")");
client.put("acn_type", "ABN: (" + client.getString("abn") + ")");
client.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")");
}
JSONObject weChatRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (weChatRate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
result.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
result.put("clean", "T+" + weChatRate.getString("clean_days"));
result.put("clean_days", weChatRate.getString("clean_days"));
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
try {
JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay");
if (alipayRate != null) {
result.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("alipay_rate", alipayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject bestPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Bestpay");
if (bestPayRate != null) {
result.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("bestpay_rate", bestPayRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject jdRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "jd");
if (jdRate != null) {
result.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("jd_rate", jdRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject alipayOnlineRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "AlipayOnline");
if (alipayOnlineRate != null) {
result.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
client.put("alipay_online_rate", alipayOnlineRate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN));
}
JSONObject cbBankPayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "CB_BankPay");
@ -2069,7 +2068,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
Date endDate = TimeZoneUtils.nextYearByCurrDay();
String end_date = DateFormatUtils.format(endDate, "dd/MM/yyyy");
result.put("end_date", end_date);
return result;
return client;
}
@Override

@ -3808,7 +3808,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
title: 'Warning',
content: 'This operation will delete the file, Are you sure?'
}).then(function () {
$http.put('/sys/partners/auth_file/' + $scope.file_id + '/delete').then(function (resp) {
$http.put('/sys/partners/auth_file/' + file_id + '/delete').then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Delete Successful',

@ -56,7 +56,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.passPartnerComplianceFiles = function () {
$http.put('/compliance/audit/'+$scope.file.client.client_id+'/pass/complianceFile',{}).then(function (resp) {
$scope.reload();
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})

Loading…
Cancel
Save