Commit 4fdb4f5f authored by Md Suleman's avatar Md Suleman

Resource service updates

parent e3553028
...@@ -146,6 +146,8 @@ public class ResourceService implements IResourceService { ...@@ -146,6 +146,8 @@ public class ResourceService implements IResourceService {
if(validateResourceForProposedToEngage(resourceReq)){ if(validateResourceForProposedToEngage(resourceReq)){
this.updateExistedResource(resourceReq); this.updateExistedResource(resourceReq);
return; return;
}else{
} }
if(isDatesAvailableForAllocation(resourceReq)) { if(isDatesAvailableForAllocation(resourceReq)) {
Resource prevAllocation = getFirstOfListOrNull(resourceRepo.findByEmployeeId(resourceReq.getEmployeeId()).stream(). Resource prevAllocation = getFirstOfListOrNull(resourceRepo.findByEmployeeId(resourceReq.getEmployeeId()).stream().
...@@ -160,10 +162,10 @@ public class ResourceService implements IResourceService { ...@@ -160,10 +162,10 @@ public class ResourceService implements IResourceService {
nextAllocation.setBillingStartDate(MyTeamDateUtils.getDayMoreThanDate(resourceReq.getBillingEndDate())); nextAllocation.setBillingStartDate(MyTeamDateUtils.getDayMoreThanDate(resourceReq.getBillingEndDate()));
this.updateExistedResource(nextAllocation); this.updateExistedResource(nextAllocation);
} }
// resource.setBillableStatus(resourceReq.getBillableStatus()); resource.setBillableStatus(resourceReq.getBillableStatus());
// resource.setBillingStartDate(resourceReq.getBillingStartDate()); resource.setBillingStartDate(resourceReq.getBillingStartDate());
// resource.setBillingEndDate(resourceReq.getBillingEndDate()); resource.setBillingEndDate(resourceReq.getBillingEndDate());
this.updateExistedResource(resourceReq); this.updateExistedResource(resource);
} }
}else{ }else{
...@@ -182,8 +184,6 @@ public class ResourceService implements IResourceService { ...@@ -182,8 +184,6 @@ public class ResourceService implements IResourceService {
if (resource != null) { if (resource != null) {
Resource resourcePers = resourceRepo.save(resource); Resource resourcePers = resourceRepo.save(resource);
respMap.put("statusCode", 801);
respMap.put("message", "Resource updated successfully");
respMap.put("resourceObj", resourcePers); respMap.put("resourceObj", resourcePers);
} }
......
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