diff --git a/pom.xml b/pom.xml
index 9c56b3ed5..9f955a141 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
4.0.0
manage
- 1.1.36
+ 1.2.0
UTF-8
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ATOReportServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ATOReportServiceImpl.java
index 5ecb72367..ecc98a8cd 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ATOReportServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/ATOReportServiceImpl.java
@@ -90,13 +90,13 @@ public class ATOReportServiceImpl implements ATOReportService {
DateTime startOfMon = new DateTime(fromDateTime);
DateTime endOfMon = new DateTime(fromDateTime.plusMonths(1).withDayOfMonth(1));
while (endOfMon.isBefore(toDateTime)) {
- logger.debug("Exporting date range:" + startOfMon.toString("yyyy-MM-dd") + " ~ " + endOfMon.toString("yyyy-MM-dd"));
+ logger.debug("Exporting date range:{} ~ {}", startOfMon.toString("yyyy-MM-dd"), endOfMon.toString("yyyy-MM-dd"));
loadMonthTransactions(reportingParty, startOfMon, endOfMon);
startOfMon = new DateTime(endOfMon);
endOfMon = new DateTime(endOfMon.plusMonths(1));
}
endOfMon = new DateTime(toDateTime);
- logger.debug("Exporting date range:" + startOfMon.toString("yyyy-MM-dd") + " ~ " + endOfMon.toString("yyyy-MM-dd"));
+ logger.debug("Exporting date range:{} ~ {}", startOfMon.toString("yyyy-MM-dd"), endOfMon.toString("yyyy-MM-dd"));
loadMonthTransactions(reportingParty, startOfMon, endOfMon);
logger.info("output BTTPS file");
return data.outputBTTPS();
@@ -109,7 +109,7 @@ public class ATOReportServiceImpl implements ATOReportService {
private void loadClientMonthTransactions(ReportingPartyData reportingParty, Integer clientId, DateTime startOfMon, DateTime endOfMon) {
BusinessData biz = reportingParty.findBusiness(clientId);
- logger.debug("Exporting date range for client[" + clientId + "]:" + startOfMon.toString("yyyy-MM-dd") + " ~ " + endOfMon.toString("yyyy-MM-dd"));
+ logger.debug("Exporting date range for client[{}]:{} ~ {}",clientId,startOfMon.toString("yyyy-MM-dd"), endOfMon.toString("yyyy-MM-dd"));
if (biz == null) {
JSONObject cli = clientMapper.findClientIgnoreInvalid(clientId);
AddressInfo addr = new AddressInfo(cli.getString("address"), cli.getString("suburb"), cli.getString("state"), cli.getString("postcode"), cli.getString("country"));
diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysClientLegalPersonMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysClientLegalPersonMapper.java
new file mode 100644
index 000000000..3119f082b
--- /dev/null
+++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysClientLegalPersonMapper.java
@@ -0,0 +1,20 @@
+package au.com.royalpay.payment.manage.mappers.system;
+
+import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
+import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
+import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
+import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.ibatis.annotations.Param;
+
+@AutoMapper(tablename = "sys_client_legal_person", pkName = "client_id")
+public interface SysClientLegalPersonMapper{
+ @AutoSql(type = SqlType.INSERT)
+ void save(JSONObject representativeInfo);
+
+ @AutoSql(type = SqlType.UPDATE)
+ void update(JSONObject representativeInfo);
+
+ @AutoSql(type = SqlType.SELECT)
+ JSONObject findRepresentativeInfo(@Param("client_id") int clientId);
+}
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
index 67bf76bc9..0ce7454c9 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java
@@ -57,6 +57,22 @@ public class ClientRegisterInfo {
private String suburb;
private String postcode;
private String state;
+ @JSONField(name = "legal_representative_person")
+ private String representativePerson ;
+ @JSONField(name = "legal_representative_phone")
+ private String representativePhone;
+ @JSONField(name = "legal_representative_email")
+ private String representativeEmail;
+ @JSONField(name = "legal_representative_job")
+ private String representativeJobTitle;
+ @JSONField(name = "registered_address")
+ private String registeredAddress;
+ @JSONField(name = "registered_suburb")
+ private String registeredSuburb;
+ @JSONField(name = "registered_postcode")
+ private String registeredPostcode;
+ @JSONField(name = "registered_state")
+ private String registeredState;
@NotEmpty(message = "error.payment.valid.param_missing")
private String country;
@Pattern(regexp = "^((Australia/West)|(Australia/Eucla)|(Australia/North)|(Australia/South)|(Australia/Brisbane)|(Australia/Melbourne)|(Australia/LHI))$", message = "error.payment.valid.invalid_timezone")
@@ -433,4 +449,68 @@ public class ClientRegisterInfo {
public void setLakalapaysettle(String lakalapaysettle) {
this.lakalapaysettle = lakalapaysettle;
}
+
+ public String getRepresentativePerson() {
+ return representativePerson;
+ }
+
+ public void setRepresentativePerson(String representativePerson) {
+ this.representativePerson = representativePerson;
+ }
+
+ public String getRepresentativePhone() {
+ return representativePhone;
+ }
+
+ public void setRepresentativePhone(String representativePhone) {
+ this.representativePhone = representativePhone;
+ }
+
+ public String getRepresentativeEmail() {
+ return representativeEmail;
+ }
+
+ public void setRepresentativeEmail(String representativeEmail) {
+ this.representativeEmail = representativeEmail;
+ }
+
+ public String getRegisteredAddress() {
+ return registeredAddress;
+ }
+
+ public void setRegisteredAddress(String registeredAddress) {
+ this.registeredAddress = registeredAddress;
+ }
+
+ public String getRegisteredSuburb() {
+ return registeredSuburb;
+ }
+
+ public void setRegisteredSuburb(String registeredSuburb) {
+ this.registeredSuburb = registeredSuburb;
+ }
+
+ public String getRegisteredPostcode() {
+ return registeredPostcode;
+ }
+
+ public void setRegisteredPostcode(String registeredPostcode) {
+ this.registeredPostcode = registeredPostcode;
+ }
+
+ public String getRegisteredState() {
+ return registeredState;
+ }
+
+ public void setRegisteredState(String registeredState) {
+ this.registeredState = registeredState;
+ }
+
+ public String getRepresentativeJobTitle() {
+ return representativeJobTitle;
+ }
+
+ public void setRepresentativeJobTitle(String representativeJobTitle) {
+ this.representativeJobTitle = representativeJobTitle;
+ }
}
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
index 71aa9360e..ce72db820 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
@@ -144,6 +144,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientConfigService clientConfigService;
@Resource
+ private SysClientLegalPersonMapper sysClientLegalPersonMapper;
+ @Resource
private ClientDeviceMapper clientDeviceMapper;
@Resource
private ClientAccountMapper clientAccountMapper;
@@ -469,7 +471,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("enable_gateway_version2", partnerGatewaySign.getBooleanValue("is_valid"));
client.put("gateway_sign", partnerGatewaySign);
}
-
+ if (sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id")) != null) {
+ client.put("representativeInfo", sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id")));
+ }
return client;
}
@@ -761,6 +765,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
}
+ try {
+ JSONObject representativeInfo = new JSONObject();
+ representativeInfo.put("client_id",partner.getIntValue("client_id"));
+ representativeInfo.put("representative_person",partner.getString("legal_representative_person"));
+ representativeInfo.put("phone",partner.getString("legal_representative_phone"));
+ representativeInfo.put("email",partner.getString("legal_representative_email"));
+ representativeInfo.put("job_title",partner.getString("legal_representative_job"));
+ representativeInfo.put("address",partner.getString("registered_address"));
+ representativeInfo.put("suburb",partner.getString("registered_suburb"));
+ representativeInfo.put("postcode",partner.getString("registered_postcode"));
+ representativeInfo.put("state",partner.getString("registered_state"));
+ sysClientLegalPersonMapper.save(representativeInfo);
+ System.out.println("aaaa");
+ } catch (Exception e) {
+ throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
+ }
+
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
JSONObject client_bd = new JSONObject();
client_bd.put("client_id", partner.getIntValue("client_id"));
@@ -811,6 +832,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
updateInfo.put("client_id", clientId);
+ JSONObject representativeInfo = new JSONObject();
+ representativeInfo.put("client_id",clientId);
+ representativeInfo.put("representative_person",info.getRepresentativePerson());
+ representativeInfo.put("phone",info.getRepresentativePhone());
+ representativeInfo.put("email",info.getRepresentativeEmail());
+ representativeInfo.put("job_title",info.getRepresentativeJobTitle());
+ representativeInfo.put("address",info.getRegisteredAddress());
+ representativeInfo.put("suburb",info.getRegisteredSuburb());
+ representativeInfo.put("postcode",info.getRegisteredPostcode());
+ representativeInfo.put("state",info.getRegisteredState());
+
+ if(sysClientLegalPersonMapper.findRepresentativeInfo(clientId) != null){
+ sysClientLegalPersonMapper.update(representativeInfo);
+ }else{
+ sysClientLegalPersonMapper.save(representativeInfo);
+ }
+
int originReferrerId = client.getIntValue("referrer_id");
int updateReferrerId = Integer.parseInt(info.getReferrer_id() == null ? "0" : info.getReferrer_id());
if (originReferrerId == 0 && updateReferrerId != 0) {
diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js
index 264c84bf3..5ae63e109 100644
--- a/src/main/ui/static/payment/partner/partner-manage.js
+++ b/src/main/ui/static/payment/partner/partner-manage.js
@@ -231,7 +231,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.exportPartnersExcel = function () {
var params = angular.copy($scope.params);
- var param_str = keys(params).map(function (key) {
+ var param_str = Object.keys(params).map(function (key) {
var value = params[key];
if (angular.isDate(value)) {
value = $filter('date')(value, 'yyyy-MM-ddTHH:mm:ssZ')
@@ -414,6 +414,37 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
removeClientPayDesc($scope.partner.client_pay_desc, '20');
}
};
+ $scope.partner.sameAsContactPerson = false;
+ $scope.checkboxOnclick = function (){
+ $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
+ if($scope.partner.sameAsContactPerson)
+ {
+ $scope.partner.legal_representative_person = $scope.partner.contact_person;
+
+ $scope.partner.legal_representative_phone_a = $scope.partner.contact_phone_a;
+
+ $scope.partner.legal_representative_phone_c = $scope.partner.contact_phone_c;
+
+ $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p;
+
+ $scope.partner.legal_representative_email = $scope.partner.contact_email;
+ }
+ }
+
+ $scope.partner.sameAsAddress=false;
+ $scope.sameAddress = function (){
+ $scope.partner.sameAsAddress = !($scope.partner.sameAsAddress);
+ if($scope.partner.sameAsAddress)
+ {
+ $scope.partner.registered_address = $scope.partner.address;
+
+ $scope.partner.registered_suburb = $scope.partner.suburb;
+
+ $scope.partner.registered_postcode = $scope.partner.postcode;
+
+ $scope.partner.registered_state = $scope.partner.state;
+ }
+ }
var compare = function (x, y) {
x = parseInt(x);
@@ -593,6 +624,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
+ $scope.partner.legal_representative_phone = '+' + $scope.partner.legal_representative_phone_c + ( $scope.partner.legal_representative_phone_a || '') + $scope.partner.legal_representative_phone_p;
if ($scope.partner.company_phone.indexOf(' ') != -1) {
alert('Company Phone can not contain space character');
@@ -602,14 +634,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert('Contact Phone can not contain space character');
return;
}
+ if ($scope.partner.legal_representative_phone.indexOf(' ') != -1) {
+ alert('Representative phone can not contain space character');
+ return;
+ }
if ($scope.partner.contact_email.indexOf(' ') != -1) {
alert('Contact email Phone can not contain space character');
return;
}
+ if ($scope.partner.legal_representative_email.indexOf(' ') != -1) {
+ alert('Representative email Phone can not contain space character');
+ return;
+ }
if ($scope.partner.suburb.indexOf(' ') != -1) {
alert('suburb can not contain two and more continuous space characters');
return;
}
+ if ($scope.partner.registered_suburb.indexOf(' ') != -1) {
+ alert('Registered suburb can not contain two and more continuous space characters');
+ return;
+ }
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
if ($scope.partner.acn.length != 9) {
alert('Acn is not valid');
@@ -1231,6 +1275,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
function ($scope, $http, $state, Upload, commonDialog, timezone, partner) {
$scope.timezones = timezone.configs();
$scope.partner = partner.data;
+ if($scope.partner.representativeInfo != null)
+ {
+ $scope.partner.registered_address = $scope.partner.representativeInfo.address;
+ $scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb;
+ $scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
+ $scope.partner.registered_state = $scope.partner.representativeInfo.state;
+ $scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person;
+ $scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone;
+ $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email;
+ $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title;
+ }
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
@@ -1281,6 +1336,34 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
+ $scope.partner.sameAsContactPerson = false;
+ $scope.checkboxOnclick = function (){
+ $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
+ if($scope.partner.sameAsContactPerson)
+ {
+ $scope.partner.legal_representative_person = $scope.partner.contact_person;
+
+ $scope.partner.legal_representative_phone = $scope.partner.contact_phone;
+
+ $scope.partner.legal_representative_email = $scope.partner.contact_email;
+ }
+ }
+
+ $scope.partner.sameAsAddress=false;
+ $scope.sameAddress = function (){
+ $scope.partner.sameAsAddress=!($scope.partner.sameAsAddress);
+ if($scope.partner.sameAsAddress)
+ {
+ $scope.partner.registered_address = $scope.partner.address;
+
+ $scope.partner.registered_suburb = $scope.partner.suburb;
+
+ $scope.partner.registered_postcode = $scope.partner.postcode;
+
+ $scope.partner.registered_state = $scope.partner.state;
+ }
+ }
+
$scope.listReferrers = function () {
$http.get('/sys/orgs/referrer').then(function (resp) {
$scope.referrers = resp.data;
@@ -2964,6 +3047,38 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// $scope.t2city_map = angular.copy(t2city_map);
+ $scope.partner.sameAsContactPerson = false;
+ $scope.checkboxOnclick = function (){
+ $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
+ if($scope.partner.sameAsContactPerson)
+ {
+ $scope.partner.legal_representative_person = $scope.partner.contact_person;
+
+ $scope.partner.legal_representative_phone_a = $scope.partner.contact_phone_a;
+
+ $scope.partner.legal_representative_phone_c = $scope.partner.contact_phone_c;
+
+ $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p;
+
+ $scope.partner.legal_representative_email = $scope.partner.contact_email;
+ }
+ }
+
+ $scope.partner.sameAsAddress=false;
+ $scope.sameAddress = function (){
+ $scope.partner.sameAsAddress=!($scope.partner.sameAsAddress);
+ if($scope.partner.sameAsAddress)
+ {
+ $scope.partner.registered_address = $scope.partner.address;
+
+ $scope.partner.registered_suburb = $scope.partner.suburb;
+
+ $scope.partner.registered_postcode = $scope.partner.postcode;
+
+ $scope.partner.registered_state = $scope.partner.state;
+ }
+ }
+
$scope.timezones = timezone.configs();
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
@@ -3007,6 +3122,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
+ $scope.partner.legal_representative_phone = '+' + $scope.partner.legal_representative_phone_c + ( $scope.partner.legal_representative_phone_a || '') + $scope.partner.legal_representative_phone_p;
if ($scope.partner.company_phone.indexOf(' ') != -1) {
alert('Company Phone can not contain space character');
diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html
index c7849f0c9..59013a5ea 100644
--- a/src/main/ui/static/payment/partner/templates/add_partner.html
+++ b/src/main/ui/static/payment/partner/templates/add_partner.html
@@ -669,6 +669,121 @@
Characters(including symbols and spaces)
+
+
+
+
+
+
+
+ Legal Representative
+
@@ -794,6 +909,94 @@
+
+
+
+
+
+
+ Registered Office Address
+
+
+
+
+
Location
diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
index 36e4cda01..51c5ecb14 100644
--- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
+++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
@@ -575,6 +575,120 @@
+
+
+
+
+
+ Legal Representative
+
@@ -668,6 +782,93 @@
+
+
+
+
+
+
+ Registered Office Address
+
+
+
+
+
+
+
Legal Representative
+
+
+
+
+
+
+
Registered Address Information
+
+
+
+
+
+
+
+ Legal Representative
+
@@ -679,6 +762,93 @@
+
+
+
+
+
+
+ Registered Office Address
+
+
+
+
+
+
+
{{merchant_location}}
Location
diff --git a/src/main/ui/static/payment/partner/templates/partner_new_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_rate.html
index 07eb1c0e4..1dab67e54 100644
--- a/src/main/ui/static/payment/partner/templates/partner_new_rate.html
+++ b/src/main/ui/static/payment/partner/templates/partner_new_rate.html
@@ -7,7 +7,7 @@