Commit d22018b5 authored by Vijay Chaitanya's avatar Vijay Chaitanya Committed by tdutta-nisum-com

Mt 98 domain changes (#54)

* update code changes

* changes done for saving with Id and Name

* changes done for response for UI
parent 0182a217
......@@ -79,21 +79,20 @@ public class DomainServiceImpl implements DomainService {
domainList=domainRepo.findAll();
updatedDomainList = new ArrayList<>();
Map<String, String> accountMap = new HashMap<String, String>();
for (Domains domain : domainList) {
HashMap<Object, Object> domainMap = new HashMap<>();
domainMap.put(MyTimeUtils.ID,domain.getId());
domainMap.put(MyTimeUtils.ID_,domain.getId());
domainMap.put(MyTimeUtils.DOMAIN_ID, domain.getDomainId());
domainMap.put(MyTimeUtils.DOMAIN_NAME,domain.getDomainName());
domainMap.put(MyTimeUtils.STATUS,domain.getStatus());
domainMap.put(MyTimeUtils.ACCOUNT_ID, domain.getAccountId());
String accountId=domain.getAccountId();
Query accountInfoQuery = new Query(Criteria.where("accountId").in(accountId));
Query accountInfoQuery = new Query(Criteria.where(MyTimeUtils.ACCOUNT_ID).in(domain.getAccountId()));
List<AccountInfo> accountList = mongoTemplate.find(accountInfoQuery, AccountInfo.class);
accountMap.put("AccountId", accountId);
accountMap.put("AccountName", accountList.get(0).getAccountName());
domainMap.put("AccountInfo", accountMap);
if(accountList!=null)
domainMap.put(MyTimeUtils.ACCOUNT_NAME, accountList.get(0).getAccountName());
updatedEmployeeList = new ArrayList<>();
List<String> employeeIds=domain.getDeliveryManagers();
......
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