Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Van Location Details changes #91

Merged
merged 3 commits into from
Mar 19, 2024
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 @@ -43,4 +43,26 @@ public interface V_getVanLocDetailsRepo extends CrudRepository<V_getVanLocDetail
+ "t.blockid, t.blockname, t.villageId, t.villageName, t.govtLGDStateID,t.govtLGDDistrictID"
+ " FROM V_getVanLocDetails t WHERE t.vanID = :vanID")
ArrayList<Object[]> getVanDetails(@Param("vanID") Integer vanID);


@Query(value="SELECT distinct dis.stateID, van.parkingPlaceID, dis.districtID, dis.districtName, db.BlockID, db.BlockName, usrm.Villageid, usrm.VillageName, dis.GovtStateID, dis.GovtDistrictID FROM db_iemr.m_van van "
+ "left join db_iemr.m_parkingplacesubdistrictmap prkdis on van.ParkingPlaceID = prkdis.ParkingPlaceID "
+ "left join db_iemr.m_district dis on prkdis.DistrictID = dis.DistrictID "
+ "left join db_iemr.m_districtblock db on db.DistrictID = dis.DistrictID "
+ "left join db_iemr.m_userservicerolemapping usrm on usrm.Blockid = db.BlockID "
+ "where van.Deleted is false and db.Deleted is false "
+ "and prkdis.Deleted is false and dis.Deleted is false "
+ "and van.vanid = :vanID ",nativeQuery=true)
ArrayList<Object[]> getVanLocDetails(@Param("vanID") Integer vanID);

@Query(value="SELECT distinct dis.stateID, van.parkingPlaceID, dis.districtID, dis.districtName, db.BlockID, db.BlockName, usrm.Villageid, usrm.VillageName, dis.GovtStateID, dis.GovtDistrictID FROM db_iemr.m_van van "
+ "left join db_iemr.m_parkingplacesubdistrictmap prkdis on van.ParkingPlaceID = prkdis.ParkingPlaceID "
+ "left join db_iemr.m_district dis on prkdis.DistrictID = dis.DistrictID "
+ "left join db_iemr.m_districtblock db on db.DistrictID = dis.DistrictID "
+ "left join db_iemr.m_userservicerolemapping usrm on usrm.Blockid = db.BlockID "
+ "where van.Deleted is false and db.Deleted is false "
+ "and prkdis.Deleted is false and dis.Deleted is false "
+ "and van.vanid = :vanID and usrm.userID = :userID",nativeQuery=true)
ArrayList<Object[]> getVanLocDetailsWithUserID(@Param("vanID") Integer vanID,@Param("userID") Integer userID);

}
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ public String getLocDetailsNew(Integer vanID, Integer spPSMID,JSONObject obj) {
// other location details, changed for TM
ArrayList<Object[]> resultSet = null;
if(null != userID) {
resultSet = v_getVanLocDetailsRepo.getVanDetailsWithUserID(vanID,userID);
resultSet = v_getVanLocDetailsRepo.getVanLocDetailsWithUserID(vanID,userID);
}else{
resultSet = v_getVanLocDetailsRepo.getVanDetails(vanID);
resultSet = v_getVanLocDetailsRepo.getVanLocDetails(vanID);
}


Expand Down
Loading