Commit df61f94d authored by vikram singh's avatar vikram singh

updated add resource deleting data for benchAllocation whose enddate is less then start date

parent 2568e7cb
...@@ -87,7 +87,10 @@ public class ResourceService implements IResourceService { ...@@ -87,7 +87,10 @@ public class ResourceService implements IResourceService {
if(currentAllocation != null && currentAllocation.getProjectId().equals(MyTeamUtils.BENCH_PROJECT_ID)){ if(currentAllocation != null && currentAllocation.getProjectId().equals(MyTeamUtils.BENCH_PROJECT_ID)){
currentAllocation.setBillingEndDate(MyTeamDateUtils.getDayLessThanDate(resourceReq.getBillingStartDate())); currentAllocation.setBillingEndDate(MyTeamDateUtils.getDayLessThanDate(resourceReq.getBillingStartDate()));
this.updateExistedResource(currentAllocation); //updateLatestProjectAllocationToEnd if(currentAllocation.getBillingStartDate().compareTo(currentAllocation.getBillingEndDate())<=0)
this.updateExistedResource(currentAllocation); //updateLatestProjectAllocationToEnd
else
resourceRepo.delete(currentAllocation);
resourcePers = resourceRepo.save(resourceReq); //createNewProjectAllocationtoStart resourcePers = resourceRepo.save(resourceReq); //createNewProjectAllocationtoStart
respMap.put("message","Resource has been created"); // added on 21-7 2019 respMap.put("message","Resource has been created"); // added on 21-7 2019
}else{ }else{
......
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