Commit 54f73aa4 authored by Vijay Akula's avatar Vijay Akula

Added delivery leads list instead of map

parent 924fb285
......@@ -43,6 +43,7 @@ public class ProjectController {
if (account != null) {
accountName = account.getAccountName();
int sequenceNumber = account.getAccountProjectSequence();
account.setAccountProjectSequence(sequenceNumber + 1);
projectService.updateProjSeqinAccount(account);
......
......@@ -199,3 +199,6 @@ public class ResourceController {
// @RequestMapping(value = "/getEmployeesToTeam"
// public ResponseEntity<List<Employee>> getActiveEmployeesSortByName() throws
// MyTimeException {
......@@ -27,10 +27,9 @@ public class Domain implements Serializable {
private static final long serialVersionUID = 1L;
//private ObjectId id;
@Id
private ObjectId id;
private String domainId;
@NotNull
@Size(min = 2, max = 80, message = "Domain Name should have atlast 2 and less than 80 characters")
......
......@@ -42,6 +42,11 @@ public class AccountService implements IAccountService {
accountReq.setAccountId(generateAccountId());
accountReq.setStatus(MyTeamUtils.STRING_Y);
if (accountReq.getAccountProjectSequence() == null) {
accountReq.setAccountProjectSequence(0);
}
Account accountPersisted = accountRepo.save(accountReq);
if (log.isInfoEnabled()) {
log.info("Account has been persisted in database with account details::" + accountPersisted);
......
......@@ -402,6 +402,8 @@ public class ProjectService implements IProjectService {
List<Project> projectList = new ArrayList<>();
List<Project> projectListPersisted = projectRepo.findByDeliveryLeadIds(deliveryLeadId);
for (Project project : projectListPersisted) {
//accountService.getAccountById(project.getAccountId()).getAccountName();
if (!project.getStatus().equals("Completed")) {
projectList.add(project);
}
......@@ -690,6 +692,7 @@ public class ProjectService implements IProjectService {
List<HashMap<Object, Object>> projectsList = new ArrayList<HashMap<Object, Object>>();
Set<String> accountIdSet = domainService.accountsAssignedToDeliveryLead(empId);
List<Project> projectList = projectRepo.findByAccountIdIn(accountIdSet);
for (Project proj : projectList) {
addToProjectList(projectsList, proj);
}
......@@ -730,15 +733,17 @@ public class ProjectService implements IProjectService {
projectMap.put("account", account.getAccountName());
projectMap.put("accountId", proj.getAccountId());
projectMap.put("domainId", proj.getDomainId());
projectMap.put("domain",proj.getDomain());
projectMap.put("employeeIds", proj.getEmployeeIds());
if (proj.getDeliveryLeadIds() != null) {
projectMap.put("deliveryLeadIds", employeeService.getDeliveryManagerMap(proj.getDeliveryLeadIds()));
//employeeService.getDeliveryManagerMap(proj.getDeliveryLeadIds()).stream().map(mapObj->mapObj.get("employeeId")).collect(Collectors.toList());
projectMap.put("deliveryLeadIds",proj.getDeliveryLeadIds());
}
if (proj.getManagerIds() != null) {
projectMap.put("managerIds", employeeService.getDeliveryManagerMap(proj.getManagerIds()));
//projectMap.put("managerIds", employeeService.getDeliveryManagerMap(proj.getManagerIds()));
projectMap.put("managerIds", proj.getManagerIds());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment