Commit 83fd6e55 by 刘鑫

fix(分站技能): 分站技能计算数据类型转换错误, 导致无法正常生成分站容量记录

1 parent a66a2a2c
......@@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -100,10 +102,10 @@ public class CalcOrgCapacityScheduler {
dto.setOrgId(groupId);
dto.setLayerId((String) result[1]);
dto.setLayer((String) result[2]);
dto.setEngineerCount((Integer) result[3]);
dto.setCapTotal((Integer) result[4]);
dto.setCapUsed((Integer) result[5]);
dto.setCapLeft((Integer) result[6]);
dto.setEngineerCount(((BigInteger) result[3]).intValue());
dto.setCapTotal(((BigDecimal) result[4]).intValue());
dto.setCapUsed(((BigDecimal) result[5]).intValue());
dto.setCapLeft(((BigDecimal) result[6]).intValue());
stats.add(dto);
}
// 逐条保存
......@@ -178,7 +180,7 @@ public class CalcOrgCapacityScheduler {
}
}
private void calcAllGroupByDays(String bdate, String edate) {
public void calcAllGroupByDays(String bdate, String edate) {
LocalDate currentDate = DateUtils.localDateFromStr(bdate);
LocalDate endDate = DateUtils.localDateFromStr(edate);
List<String> allGroupIds = orgGroupDao.findAll().stream().map(OrgGroupEntity::getGroupId).collect(Collectors.toList());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!