Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1845,10 +1845,10 @@ public String UserRoleMappings(@RequestBody String userRoleMapping, HttpServletR
resDataMap1.setRoleID(previl1.getRoleID());
resDataMap1.setInbound(previl1.getInbound());
resDataMap1.setOutbound(previl1.getOutbound());
if(previl1.getIsSanjeevani() != null) {
resDataMap1.setIsSanjeevani(previl1.getIsSanjeevani());
}
if (previl1.getTeleConsultation() != null) {
resDataMap1.setTeleConsultation(previl1.getTeleConsultation());
}
}
resDataMap1.setUserID(employeeMaster.get(x).getUserID());
resDataMap1.setProviderServiceMapID(previl.getProviderServiceMapID());
resDataMap1.setWorkingLocationID(previl.getWorkingLocationID());
Expand Down Expand Up @@ -1905,8 +1905,8 @@ public String updateUserRoleMapping(@RequestBody String updateUserRoleMapping, H
usrRole.setVillageID(pre.getVillageID());
usrRole.setVillageName(pre.getVillageName());

if(pre.getIsSanjeevani() != null) {
usrRole.setIsSanjeevani(pre.getIsSanjeevani());
if (pre.getTeleConsultation() != null) {
usrRole.setTeleConsultation(pre.getTeleConsultation());
}

if (pre.getInbound() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public class M_UserServiceRoleMapping2 {
private Boolean deleted=false;

@Expose
@Column(name = "isSanjeevani")
private Boolean isSanjeevani;
@Column(name = "teleConsultation")
private String teleConsultation;

@Expose
@Column(name = "CreatedBy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public class V_Userservicerolemapping {
private String[] villageName;

@Expose
@Column(name="isSanjeevani")
private Boolean isSanjeevani;
@Column(name="teleConsultation")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment says isSanjeevani but the boolean is teleConsultation.
Also the attribute isSanjeevani is not needed?
If you are adding new attributes, can you also raise a PR for AMRIT-DB

private String teleConsultation;

public Integer getProviderServiceMapID() {
return providerServiceMapID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -992,23 +992,22 @@ public ArrayList<V_Userservicerolemapping> getMappedRole(Integer serviceProvider
} else {
mapping.setVillageName(new String[0]);
}
if (mapping.getServiceID()!=null) {
if (mapping.getServiceID() != null) {
mapping.setBlockID(mapping.getBlockID());
mapping.setBlockName(mapping.getBlockName());
mapping.setVillageID(mapping.getVillageID());
mapping.setVillageName(mapping.getVillageName());
if(null != mapping.getIsSanjeevani())
mapping.setIsSanjeevani(mapping.getIsSanjeevani());

} else {
mapping.setBlockID(null);
mapping.setBlockName(null);
mapping.setVillageID(null);
mapping.setVillageName(null);
mapping.setVillageidDb(null);
mapping.setVillageNameDb(null);
mapping.setIsSanjeevani(false);

}
if(null != mapping.getTeleConsultation())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there some curly braces missing here {}
not following where this if block ends.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are not adding curly braces{} this condition will apply for next line alone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. That sort of conditional statement is awful for readability.

mapping.setTeleConsultation(mapping.getTeleConsultation());
mappedRoles.add(mapping);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Priveleges1097_2 {
private Integer roleID;
private Boolean inbound;
private Boolean outbound;
private Boolean isSanjeevani;
private String teleConsultation;

public Integer getRoleID() {
return roleID;
Expand All @@ -46,11 +46,11 @@ public Boolean getOutbound() {
public void setOutbound(Boolean outbound) {
this.outbound = outbound;
}
public Boolean getIsSanjeevani() {
return isSanjeevani;
public String getTeleConsultation() {
return teleConsultation;
}
public void setIsSanjeevani(Boolean isSanjeevani) {
this.isSanjeevani = isSanjeevani;
public void setTeleConsultation(String teleConsultation) {
this.teleConsultation = teleConsultation;
}


Expand Down
Loading