Commit fc31b088 by 丁伟峰

增加了容量调整接口

1 parent 82ef3fec
...@@ -48,7 +48,6 @@ public class OrgCapacityServiceImpl implements OrgCapacityService { ...@@ -48,7 +48,6 @@ public class OrgCapacityServiceImpl implements OrgCapacityService {
if ("cluster".equals(levelType)) { if ("cluster".equals(levelType)) {
names = orgBranchDao.findAllByClusterId(levelValue).stream() names = orgBranchDao.findAllByClusterId(levelValue).stream()
.collect(Collectors.toMap(OrgBranchEntity::getBranchId, OrgBranchEntity::getBranchName)); .collect(Collectors.toMap(OrgBranchEntity::getBranchId, OrgBranchEntity::getBranchName));
;
List<String> branchIds = new ArrayList<>(names.keySet()); List<String> branchIds = new ArrayList<>(names.keySet());
log.info("levelType: {} ==> branchIds: {}", levelType, branchIds); log.info("levelType: {} ==> branchIds: {}", levelType, branchIds);
page = capacityOrgStatDao.findByBranchIdsAndWorkdayBetween(branchIds, reqDTO.getStartDate(), reqDTO.getEndDate(), pageable); page = capacityOrgStatDao.findByBranchIdsAndWorkdayBetween(branchIds, reqDTO.getStartDate(), reqDTO.getEndDate(), pageable);
...@@ -100,7 +99,7 @@ public class OrgCapacityServiceImpl implements OrgCapacityService { ...@@ -100,7 +99,7 @@ public class OrgCapacityServiceImpl implements OrgCapacityService {
.setCapTotal(e.getCapTotal()) .setCapTotal(e.getCapTotal())
.setCapUsed(e.getCapUsed()) .setCapUsed(e.getCapUsed())
.setCapLeft(e.getCapLeft()) .setCapLeft(e.getCapLeft())
.setCapAdjust((int)(e.getCapAdjust()*100)) .setCapAdjust(e.getCapAdjust()*100)
.setEngineerNum(e.getEngineerCount()) .setEngineerNum(e.getEngineerCount())
.setUpdateTime(e.getUpdateTime()); .setUpdateTime(e.getUpdateTime());
} }
...@@ -125,7 +124,7 @@ public class OrgCapacityServiceImpl implements OrgCapacityService { ...@@ -125,7 +124,7 @@ public class OrgCapacityServiceImpl implements OrgCapacityService {
ajustCapacityByDate(reqDTO.getTeamId(), currentDate, adjuest); ajustCapacityByDate(reqDTO.getTeamId(), currentDate, adjuest);
currentDate = currentDate.plusDays(1); // 增加一天 currentDate = currentDate.plusDays(1); // 增加一天
} }
return null; return Result.success(null);
} }
void ajustCapacityByDate(String teamId, LocalDate date, Float adjust) { void ajustCapacityByDate(String teamId, LocalDate date, Float adjust) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!