MIFOSX-1642: Added sub status to client resource
This commit is contained in:
+21
-9
@@ -20,19 +20,31 @@ public class CodeValueData implements Serializable {
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private final Integer position;
|
private final Integer position;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private final String description;
|
||||||
|
|
||||||
public static CodeValueData instance(final Long id, final String name, final Integer position) {
|
public static CodeValueData instance(final Long id, final String name, final Integer position) {
|
||||||
return new CodeValueData(id, name, position);
|
String description = null;
|
||||||
}
|
return new CodeValueData(id, name, position, description);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CodeValueData instance(final Long id, final String name, final String description) {
|
||||||
|
Integer position = null;
|
||||||
|
return new CodeValueData(id, name, position, description);
|
||||||
|
}
|
||||||
|
|
||||||
public static CodeValueData instance(final Long id, final String name) {
|
public static CodeValueData instance(final Long id, final String name) {
|
||||||
return new CodeValueData(id, name, null);
|
String description = null;
|
||||||
}
|
Integer position=null;
|
||||||
|
return new CodeValueData(id, name, position, description);
|
||||||
|
}
|
||||||
|
|
||||||
private CodeValueData(final Long id, final String name, final Integer position) {
|
private CodeValueData(final Long id, final String name, final Integer position, final String description) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.position = position;
|
this.position = position;
|
||||||
}
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
|
|||||||
+129
-37
@@ -30,6 +30,8 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
private final String externalId;
|
private final String externalId;
|
||||||
|
|
||||||
private final EnumOptionData status;
|
private final EnumOptionData status;
|
||||||
|
private final CodeValueData subStatus;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private final Boolean active;
|
private final Boolean active;
|
||||||
private final LocalDate activationDate;
|
private final LocalDate activationDate;
|
||||||
@@ -78,17 +80,44 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
final Collection<StaffData> staffOptions, final Collection<CodeValueData> closureReasons,
|
final Collection<StaffData> staffOptions, final Collection<CodeValueData> closureReasons,
|
||||||
final Collection<CodeValueData> genderOptions, final Collection<SavingsProductData> savingProductOptions,
|
final Collection<CodeValueData> genderOptions, final Collection<SavingsProductData> savingProductOptions,
|
||||||
final Collection<CodeValueData> clientTypeOptions, final Collection<CodeValueData> clientClassificationOptions) {
|
final Collection<CodeValueData> clientTypeOptions, final Collection<CodeValueData> clientClassificationOptions) {
|
||||||
|
final String accountNo = null;
|
||||||
|
final EnumOptionData status = null;
|
||||||
|
final CodeValueData subStatus = null;
|
||||||
|
final String officeName = null;
|
||||||
|
final Long transferToOfficeId = null;
|
||||||
|
final String transferToOfficeName = null;
|
||||||
|
final Long id = null;
|
||||||
|
final String firstname = null;
|
||||||
|
final String middlename = null;
|
||||||
|
final String lastname = null;
|
||||||
|
final String fullname = null;
|
||||||
|
final String displayName = null;
|
||||||
|
final String externalId = null;
|
||||||
|
final String mobileNo = null;
|
||||||
|
final LocalDate dateOfBirth = null;
|
||||||
|
final CodeValueData gender = null;
|
||||||
|
final Long imageId = null;
|
||||||
|
final Long staffId = null;
|
||||||
|
final String staffName = null;
|
||||||
|
final Collection<GroupGeneralData> groups = null;
|
||||||
|
final ClientTimelineData timeline = null;
|
||||||
|
final Long savingsProductId = null;
|
||||||
|
final String savingsProductName = null;
|
||||||
|
final Long savingsAccountId = null;
|
||||||
|
final Collection<SavingsAccountData> savingAccountOptions = null;
|
||||||
final CodeValueData clientType = null;
|
final CodeValueData clientType = null;
|
||||||
final CodeValueData clientClassification = null;
|
final CodeValueData clientClassification = null;
|
||||||
return new ClientData(null, null, officeId, null, null, null, null, null, null, null, null, null, null, null, null, null,
|
return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
joinedDate, null, null, null, officeOptions, null, staffOptions, closureReasons, genderOptions, null, savingProductOptions,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, joinedDate, imageId, staffId,
|
||||||
null, null, null, null, clientType, clientClassification, clientTypeOptions, clientClassificationOptions);
|
staffName, officeOptions, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions,
|
||||||
|
savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification,
|
||||||
|
clientTypeOptions, clientClassificationOptions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ClientData templateOnTop(final ClientData clientData, final ClientData templateData) {
|
public static ClientData templateOnTop(final ClientData clientData, final ClientData templateData) {
|
||||||
|
|
||||||
return new ClientData(clientData.accountNo, clientData.status, clientData.officeId, clientData.officeName,
|
return new ClientData(clientData.accountNo, clientData.status, clientData.subStatus, clientData.officeId, clientData.officeName,
|
||||||
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
||||||
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
||||||
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
||||||
@@ -103,7 +132,7 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
public static ClientData templateWithSavingAccountOptions(final ClientData clientData,
|
public static ClientData templateWithSavingAccountOptions(final ClientData clientData,
|
||||||
final Collection<SavingsAccountData> savingAccountOptions) {
|
final Collection<SavingsAccountData> savingAccountOptions) {
|
||||||
|
|
||||||
return new ClientData(clientData.accountNo, clientData.status, clientData.officeId, clientData.officeName,
|
return new ClientData(clientData.accountNo, clientData.status, clientData.subStatus, clientData.officeId, clientData.officeName,
|
||||||
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
||||||
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
||||||
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
||||||
@@ -115,7 +144,7 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ClientData setParentGroups(final ClientData clientData, final Collection<GroupGeneralData> parentGroups) {
|
public static ClientData setParentGroups(final ClientData clientData, final Collection<GroupGeneralData> parentGroups) {
|
||||||
return new ClientData(clientData.accountNo, clientData.status, clientData.officeId, clientData.officeName,
|
return new ClientData(clientData.accountNo, clientData.status, clientData.subStatus, clientData.officeId, clientData.officeName,
|
||||||
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename,
|
||||||
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo,
|
||||||
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
clientData.dateOfBirth, clientData.gender, clientData.activationDate, clientData.imageId, clientData.staffId,
|
||||||
@@ -126,56 +155,118 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ClientData clientIdentifier(final Long id, final String accountNo, final EnumOptionData status, final String firstname,
|
public static ClientData clientIdentifier(final Long id, final String accountNo, final EnumOptionData status,
|
||||||
final String middlename, final String lastname, final String fullname, final String displayName, final Long officeId,
|
final CodeValueData subStatus, final String firstname, final String middlename, final String lastname, final String fullname,
|
||||||
final String officeName) {
|
final String displayName, final Long officeId, final String officeName) {
|
||||||
|
|
||||||
|
final Long transferToOfficeId = null;
|
||||||
|
final String transferToOfficeName = null;
|
||||||
|
final String externalId = null;
|
||||||
|
final String mobileNo = null;
|
||||||
|
final LocalDate dateOfBirth = null;
|
||||||
|
final CodeValueData gender = null;
|
||||||
|
final LocalDate activationDate = null;
|
||||||
|
final Long imageId = null;
|
||||||
|
final Long staffId = null;
|
||||||
|
final String staffName = null;
|
||||||
|
final Collection<OfficeData> allowedOffices = null;
|
||||||
|
final Collection<GroupGeneralData> groups = null;
|
||||||
|
final Collection<StaffData> staffOptions = null;
|
||||||
|
final Collection<CodeValueData> closureReasons = null;
|
||||||
|
final Collection<CodeValueData> genderOptions = null;
|
||||||
|
final ClientTimelineData timeline = null;
|
||||||
|
final Collection<SavingsProductData> savingProductOptions = null;
|
||||||
|
final Long savingsProductId = null;
|
||||||
|
final String savingsProductName = null;
|
||||||
|
final Long savingsAccountId = null;
|
||||||
|
final Collection<SavingsAccountData> savingAccountOptions = null;
|
||||||
final CodeValueData clientType = null;
|
final CodeValueData clientType = null;
|
||||||
final CodeValueData clientClassification = null;
|
final CodeValueData clientClassification = null;
|
||||||
final Collection<CodeValueData> clientTypeOptions = null;
|
final Collection<CodeValueData> clientTypeOptions = null;
|
||||||
final Collection<CodeValueData> clientClassificationOptions = null;
|
final Collection<CodeValueData> clientClassificationOptions = null;
|
||||||
return new ClientData(accountNo, status, officeId, officeName, null, null, id, firstname, middlename, lastname, fullname,
|
return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
displayName, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId,
|
||||||
null, clientType, clientClassification, clientTypeOptions, clientClassificationOptions);
|
staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions,
|
||||||
|
savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification,
|
||||||
|
clientTypeOptions, clientClassificationOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ClientData lookup(final Long id, final String displayName, final Long officeId, final String officeName) {
|
public static ClientData lookup(final Long id, final String displayName, final Long officeId, final String officeName) {
|
||||||
|
final String accountNo = null;
|
||||||
|
final EnumOptionData status = null;
|
||||||
|
final CodeValueData subStatus = null;
|
||||||
|
final Long transferToOfficeId = null;
|
||||||
|
final String transferToOfficeName = null;
|
||||||
|
final String firstname = null;
|
||||||
|
final String middlename = null;
|
||||||
|
final String lastname = null;
|
||||||
|
final String fullname = null;
|
||||||
|
final String externalId = null;
|
||||||
|
final String mobileNo = null;
|
||||||
|
final LocalDate dateOfBirth = null;
|
||||||
|
final CodeValueData gender = null;
|
||||||
|
final LocalDate activationDate = null;
|
||||||
|
final Long imageId = null;
|
||||||
|
final Long staffId = null;
|
||||||
|
final String staffName = null;
|
||||||
|
final Collection<OfficeData> allowedOffices = null;
|
||||||
|
final Collection<GroupGeneralData> groups = null;
|
||||||
|
final Collection<StaffData> staffOptions = null;
|
||||||
|
final Collection<CodeValueData> closureReasons = null;
|
||||||
|
final Collection<CodeValueData> genderOptions = null;
|
||||||
|
final ClientTimelineData timeline = null;
|
||||||
|
final Collection<SavingsProductData> savingProductOptions = null;
|
||||||
|
final Long savingsProductId = null;
|
||||||
|
final String savingsProductName = null;
|
||||||
|
final Long savingsAccountId = null;
|
||||||
|
final Collection<SavingsAccountData> savingAccountOptions = null;
|
||||||
final CodeValueData clientType = null;
|
final CodeValueData clientType = null;
|
||||||
final CodeValueData clientClassification = null;
|
final CodeValueData clientClassification = null;
|
||||||
final Collection<CodeValueData> clientTypeOptions = null;
|
final Collection<CodeValueData> clientTypeOptions = null;
|
||||||
final Collection<CodeValueData> clientClassificationOptions = null;
|
final Collection<CodeValueData> clientClassificationOptions = null;
|
||||||
return new ClientData(null, null, officeId, officeName, null, null, id, null, null, null, null, displayName, null, null, null,
|
return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clientType,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId,
|
||||||
clientClassification, clientTypeOptions, clientClassificationOptions);
|
staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions,
|
||||||
|
savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification,
|
||||||
|
clientTypeOptions, clientClassificationOptions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ClientData instance(final String accountNo, final EnumOptionData status, final Long officeId, final String officeName,
|
public static ClientData instance(final String accountNo, final EnumOptionData status, final CodeValueData subStatus,
|
||||||
final Long transferToOfficeId, final String transferToOfficeName, final Long id, final String firstname,
|
final Long officeId, final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id,
|
||||||
final String middlename, final String lastname, final String fullname, final String displayName, final String externalId,
|
final String firstname, final String middlename, final String lastname, final String fullname, final String displayName,
|
||||||
final String mobileNo, final LocalDate dateOfBirth, final CodeValueData gender, final LocalDate activationDate,
|
final String externalId, final String mobileNo, final LocalDate dateOfBirth, final CodeValueData gender,
|
||||||
final Long imageId, final Long staffId, final String staffName, final ClientTimelineData timeline, final Long savingsProductId,
|
final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName,
|
||||||
final String savingsProductName, final Long savingsAccountId, final CodeValueData clientType,
|
final ClientTimelineData timeline, final Long savingsProductId, final String savingsProductName, final Long savingsAccountId,
|
||||||
final CodeValueData clientClassification) {
|
final CodeValueData clientType, final CodeValueData clientClassification) {
|
||||||
|
|
||||||
|
final Collection<OfficeData> allowedOffices = null;
|
||||||
|
final Collection<GroupGeneralData> groups = null;
|
||||||
|
final Collection<StaffData> staffOptions = null;
|
||||||
|
final Collection<CodeValueData> closureReasons = null;
|
||||||
|
final Collection<CodeValueData> genderOptions = null;
|
||||||
|
final Collection<SavingsProductData> savingProductOptions = null;
|
||||||
final Collection<CodeValueData> clientTypeOptions = null;
|
final Collection<CodeValueData> clientTypeOptions = null;
|
||||||
final Collection<CodeValueData> clientClassificationOptions = null;
|
final Collection<CodeValueData> clientClassificationOptions = null;
|
||||||
return new ClientData(accountNo, status, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename,
|
return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId, staffName,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId,
|
||||||
null, null, null, null, null, timeline, null, savingsProductId, savingsProductName, savingsAccountId, null, clientType,
|
staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions,
|
||||||
clientClassification, clientTypeOptions, clientClassificationOptions);
|
savingsProductId, savingsProductName, savingsAccountId, null, clientType, clientClassification, clientTypeOptions,
|
||||||
|
clientClassificationOptions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClientData(final String accountNo, final EnumOptionData status, final Long officeId, final String officeName,
|
private ClientData(final String accountNo, final EnumOptionData status, final CodeValueData subStatus, final Long officeId,
|
||||||
final Long transferToOfficeId, final String transferToOfficeName, final Long id, final String firstname,
|
final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id,
|
||||||
final String middlename, final String lastname, final String fullname, final String displayName, final String externalId,
|
final String firstname, final String middlename, final String lastname, final String fullname, final String displayName,
|
||||||
final String mobileNo, final LocalDate dateOfBirth, final CodeValueData gender, final LocalDate activationDate,
|
final String externalId, final String mobileNo, final LocalDate dateOfBirth, final CodeValueData gender,
|
||||||
final Long imageId, final Long staffId, final String staffName, final Collection<OfficeData> allowedOffices,
|
final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName,
|
||||||
final Collection<GroupGeneralData> groups, final Collection<StaffData> staffOptions,
|
final Collection<OfficeData> allowedOffices, final Collection<GroupGeneralData> groups,
|
||||||
final Collection<CodeValueData> closureReasons, final Collection<CodeValueData> genderOptions,
|
final Collection<StaffData> staffOptions, final Collection<CodeValueData> closureReasons,
|
||||||
final ClientTimelineData timeline, final Collection<SavingsProductData> savingProductOptions, final Long savingsProductId,
|
final Collection<CodeValueData> genderOptions, final ClientTimelineData timeline,
|
||||||
final String savingsProductName, final Long savingsAccountId, final Collection<SavingsAccountData> savingAccountOptions,
|
final Collection<SavingsProductData> savingProductOptions, final Long savingsProductId, final String savingsProductName,
|
||||||
final CodeValueData clientType, final CodeValueData clientClassification, final Collection<CodeValueData> clientTypeOptions,
|
final Long savingsAccountId, final Collection<SavingsAccountData> savingAccountOptions, final CodeValueData clientType,
|
||||||
|
final CodeValueData clientClassification, final Collection<CodeValueData> clientTypeOptions,
|
||||||
final Collection<CodeValueData> clientClassificationOptions) {
|
final Collection<CodeValueData> clientClassificationOptions) {
|
||||||
this.accountNo = accountNo;
|
this.accountNo = accountNo;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
@@ -184,6 +275,7 @@ final public class ClientData implements Comparable<ClientData> {
|
|||||||
} else {
|
} else {
|
||||||
this.active = null;
|
this.active = null;
|
||||||
}
|
}
|
||||||
|
this.subStatus = subStatus;
|
||||||
this.officeId = officeId;
|
this.officeId = officeId;
|
||||||
this.officeName = officeName;
|
this.officeName = officeName;
|
||||||
this.transferToOfficeId = transferToOfficeId;
|
this.transferToOfficeId = transferToOfficeId;
|
||||||
|
|||||||
+25
-8
@@ -274,8 +274,8 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
public ClientMembersOfGroupMapper() {
|
public ClientMembersOfGroupMapper() {
|
||||||
final StringBuilder sqlBuilder = new StringBuilder(200);
|
final StringBuilder sqlBuilder = new StringBuilder(200);
|
||||||
|
|
||||||
sqlBuilder.append("c.id as id, c.account_no as accountNo, c.external_id as externalId, c.status_enum as statusEnum, ");
|
sqlBuilder.append("c.id as id, c.account_no as accountNo, c.external_id as externalId, c.status_enum as statusEnum,c.sub_status as subStatus, ");
|
||||||
sqlBuilder.append("c.office_id as officeId, o.name as officeName, ");
|
sqlBuilder.append("cvSubStatus.code_value as subStatusValue,cvSubStatus.code_description as subStatusDesc,c.office_id as officeId, o.name as officeName, ");
|
||||||
sqlBuilder.append("c.transfer_to_office_id as transferToOfficeId, transferToOffice.name as transferToOfficeName, ");
|
sqlBuilder.append("c.transfer_to_office_id as transferToOfficeId, transferToOffice.name as transferToOfficeName, ");
|
||||||
sqlBuilder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, ");
|
sqlBuilder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, ");
|
||||||
sqlBuilder.append("c.fullname as fullname, c.display_name as displayName, ");
|
sqlBuilder.append("c.fullname as fullname, c.display_name as displayName, ");
|
||||||
@@ -319,6 +319,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
sqlBuilder.append("left join m_code_value cv on cv.id = c.gender_cv_id ");
|
sqlBuilder.append("left join m_code_value cv on cv.id = c.gender_cv_id ");
|
||||||
sqlBuilder.append("left join m_code_value cvclienttype on cvclienttype.id = c.client_type_cv_id ");
|
sqlBuilder.append("left join m_code_value cvclienttype on cvclienttype.id = c.client_type_cv_id ");
|
||||||
sqlBuilder.append("left join m_code_value cvclassification on cvclassification.id = c.client_classification_cv_id ");
|
sqlBuilder.append("left join m_code_value cvclassification on cvclassification.id = c.client_classification_cv_id ");
|
||||||
|
sqlBuilder.append("left join m_code_value cvSubStatus on cvSubStatus.id = c.sub_status ");
|
||||||
|
|
||||||
this.schema = sqlBuilder.toString();
|
this.schema = sqlBuilder.toString();
|
||||||
}
|
}
|
||||||
@@ -335,6 +336,11 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
||||||
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
||||||
|
|
||||||
|
final Long subStatusId = JdbcSupport.getLong(rs, "subStatus");
|
||||||
|
final String subStatusValue = rs.getString("subStatusValue");
|
||||||
|
final String subStatusDesc = rs.getString("subStatusDesc");
|
||||||
|
final CodeValueData subStatus = CodeValueData.instance(subStatusId, subStatusValue, subStatusDesc);
|
||||||
|
|
||||||
final Long officeId = JdbcSupport.getLong(rs, "officeId");
|
final Long officeId = JdbcSupport.getLong(rs, "officeId");
|
||||||
final String officeName = rs.getString("officeName");
|
final String officeName = rs.getString("officeName");
|
||||||
|
|
||||||
@@ -390,7 +396,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
submittedByLastname, activationDate, activatedByUsername, activatedByFirstname, activatedByLastname, closedOnDate,
|
submittedByLastname, activationDate, activatedByUsername, activatedByFirstname, activatedByLastname, closedOnDate,
|
||||||
closedByUsername, closedByFirstname, closedByLastname);
|
closedByUsername, closedByFirstname, closedByLastname);
|
||||||
|
|
||||||
return ClientData.instance(accountNo, status, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
return ClientData.instance(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId,
|
||||||
staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, classification);
|
staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, classification);
|
||||||
|
|
||||||
@@ -419,8 +425,8 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
public ClientMapper() {
|
public ClientMapper() {
|
||||||
final StringBuilder builder = new StringBuilder(400);
|
final StringBuilder builder = new StringBuilder(400);
|
||||||
|
|
||||||
builder.append("c.id as id, c.account_no as accountNo, c.external_id as externalId, c.status_enum as statusEnum, ");
|
builder.append("c.id as id, c.account_no as accountNo, c.external_id as externalId, c.status_enum as statusEnum,c.sub_status as subStatus, ");
|
||||||
builder.append("c.office_id as officeId, o.name as officeName, ");
|
builder.append("cvSubStatus.code_value as subStatusValue,cvSubStatus.code_description as subStatusDesc,c.office_id as officeId, o.name as officeName, ");
|
||||||
builder.append("c.transfer_to_office_id as transferToOfficeId, transferToOffice.name as transferToOfficeName, ");
|
builder.append("c.transfer_to_office_id as transferToOfficeId, transferToOffice.name as transferToOfficeName, ");
|
||||||
builder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, ");
|
builder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, ");
|
||||||
builder.append("c.fullname as fullname, c.display_name as displayName, ");
|
builder.append("c.fullname as fullname, c.display_name as displayName, ");
|
||||||
@@ -463,6 +469,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
builder.append("left join m_code_value cv on cv.id = c.gender_cv_id ");
|
builder.append("left join m_code_value cv on cv.id = c.gender_cv_id ");
|
||||||
builder.append("left join m_code_value cvclienttype on cvclienttype.id = c.client_type_cv_id ");
|
builder.append("left join m_code_value cvclienttype on cvclienttype.id = c.client_type_cv_id ");
|
||||||
builder.append("left join m_code_value cvclassification on cvclassification.id = c.client_classification_cv_id ");
|
builder.append("left join m_code_value cvclassification on cvclassification.id = c.client_classification_cv_id ");
|
||||||
|
builder.append("left join m_code_value cvSubStatus on cvSubStatus.id = c.sub_status ");
|
||||||
|
|
||||||
this.schema = builder.toString();
|
this.schema = builder.toString();
|
||||||
}
|
}
|
||||||
@@ -479,6 +486,11 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
||||||
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
||||||
|
|
||||||
|
final Long subStatusId = JdbcSupport.getLong(rs, "subStatus");
|
||||||
|
final String subStatusValue = rs.getString("subStatusValue");
|
||||||
|
final String subStatusDesc = rs.getString("subStatusDesc");
|
||||||
|
final CodeValueData subStatus = CodeValueData.instance(subStatusId, subStatusValue, subStatusDesc);
|
||||||
|
|
||||||
final Long officeId = JdbcSupport.getLong(rs, "officeId");
|
final Long officeId = JdbcSupport.getLong(rs, "officeId");
|
||||||
final String officeName = rs.getString("officeName");
|
final String officeName = rs.getString("officeName");
|
||||||
|
|
||||||
@@ -533,7 +545,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
submittedByLastname, activationDate, activatedByUsername, activatedByFirstname, activatedByLastname, closedOnDate,
|
submittedByLastname, activationDate, activatedByUsername, activatedByFirstname, activatedByLastname, closedOnDate,
|
||||||
closedByUsername, closedByFirstname, closedByLastname);
|
closedByUsername, closedByFirstname, closedByLastname);
|
||||||
|
|
||||||
return ClientData.instance(accountNo, status, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
return ClientData.instance(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname,
|
||||||
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId,
|
middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId,
|
||||||
staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, classification);
|
staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, classification);
|
||||||
|
|
||||||
@@ -604,7 +616,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
private static final class ClientIdentifierMapper implements RowMapper<ClientData> {
|
private static final class ClientIdentifierMapper implements RowMapper<ClientData> {
|
||||||
|
|
||||||
public String clientLookupByIdentifierSchema() {
|
public String clientLookupByIdentifierSchema() {
|
||||||
return "c.id as id, c.account_no as accountNo, c.status_enum as statusEnum, c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, "
|
return "c.id as id, c.account_no as accountNo, c.status_enum as statusEnum, c.sub_status as subStatus, c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, "
|
||||||
+ "c.fullname as fullname, c.display_name as displayName,"
|
+ "c.fullname as fullname, c.display_name as displayName,"
|
||||||
+ "c.office_id as officeId, o.name as officeName "
|
+ "c.office_id as officeId, o.name as officeName "
|
||||||
+ " from m_client c, m_office o, m_client_identifier ci "
|
+ " from m_client c, m_office o, m_client_identifier ci "
|
||||||
@@ -621,6 +633,11 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
final Integer statusEnum = JdbcSupport.getInteger(rs, "statusEnum");
|
||||||
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
final EnumOptionData status = ClientEnumerations.status(statusEnum);
|
||||||
|
|
||||||
|
final Long subStatusId = JdbcSupport.getLong(rs, "subStatus");
|
||||||
|
final String subStatusValue = rs.getString("subStatusValue");
|
||||||
|
final String subStatusDesc = rs.getString("subStatusDesc");
|
||||||
|
final CodeValueData subStatus = CodeValueData.instance(subStatusId, subStatusValue, subStatusDesc);
|
||||||
|
|
||||||
final String firstname = rs.getString("firstname");
|
final String firstname = rs.getString("firstname");
|
||||||
final String middlename = rs.getString("middlename");
|
final String middlename = rs.getString("middlename");
|
||||||
final String lastname = rs.getString("lastname");
|
final String lastname = rs.getString("lastname");
|
||||||
@@ -630,7 +647,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
|||||||
final Long officeId = rs.getLong("officeId");
|
final Long officeId = rs.getLong("officeId");
|
||||||
final String officeName = rs.getString("officeName");
|
final String officeName = rs.getString("officeName");
|
||||||
|
|
||||||
return ClientData.clientIdentifier(id, accountNo, status, firstname, middlename, lastname, fullname, displayName, officeId,
|
return ClientData.clientIdentifier(id, accountNo, status,subStatus, firstname, middlename, lastname, fullname, displayName, officeId,
|
||||||
officeName);
|
officeName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
package org.mifosplatform.portfolio.common.domain;
|
package org.mifosplatform.portfolio.common.domain;
|
||||||
|
|
||||||
import org.joda.time.DateTimeConstants;
|
import org.joda.time.DateTimeConstants;
|
||||||
|
|||||||
+5
@@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
package org.mifosplatform.portfolio.common.domain;
|
package org.mifosplatform.portfolio.common.domain;
|
||||||
|
|
||||||
public enum NthDayType {
|
public enum NthDayType {
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
ALTER TABLE `m_client`
|
||||||
|
ADD COLUMN `sub_status` INT(11) NULL DEFAULT NULL AFTER `status_enum`,
|
||||||
|
ADD CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY (`sub_status`) REFERENCES `m_code_value` (`id`);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ClientSubStatus', 1);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `m_code_value`
|
||||||
|
ADD COLUMN `code_description` VARCHAR(500) NULL DEFAULT NULL AFTER `code_value`;
|
||||||
|
|
||||||
Reference in New Issue
Block a user