计划培训期数/人次计算规则修改
parent
1335e14e0b
commit
0704035698
|
|
@ -166,10 +166,11 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
|
|||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int month = calendar.get(Calendar.MONTH) + 1;
|
||||
if (CollectionUtils.isNotEmpty(planLogs)) {
|
||||
vo.setNumberOfPeriods1(planLogs.size());
|
||||
vo.setPersonNum1(planLogs.stream().mapToInt(PersonnelPlanLog::getNumPeople).sum());
|
||||
for (int i = 1; i <= 12; i++) {
|
||||
for (int i = 1; i <= month; i++) {
|
||||
PersonnelPlanLogStatisticsVo.EchartsData echartsData1 = map1.get(i);
|
||||
PersonnelPlanLogStatisticsVo.EchartsData echartsData2 = map2.get(i);
|
||||
|
||||
|
|
@ -184,7 +185,7 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
|
|||
.filter(item ->
|
||||
{
|
||||
calendar.setTime(item.getPlanDate());
|
||||
return calendar.get(Calendar.MONTH) + 1 == finalI;
|
||||
return month == finalI;
|
||||
})
|
||||
.toList();
|
||||
|
||||
|
|
@ -202,7 +203,8 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
|
|||
if (CollectionUtils.isNotEmpty(plans)) {
|
||||
vo.setNumberOfPeriods2(plans.stream().mapToInt(PersonnelPlan::getNum).sum());
|
||||
vo.setPersonNum2(plans.stream().mapToInt(PersonnelPlan::getNumPeople).sum());
|
||||
for (int i = 1; i <= 12; i++) {
|
||||
|
||||
for (int i = 1; i <= month; i++) {
|
||||
PersonnelPlanLogStatisticsVo.EchartsData echartsData1 = map1.get(i);
|
||||
if (Objects.isNull(echartsData1)) {
|
||||
echartsData1 = new PersonnelPlanLogStatisticsVo.EchartsData();
|
||||
|
|
@ -216,7 +218,7 @@ public class PersonnelPlanLogController extends AbstractCommonFileController{
|
|||
.filter(item ->
|
||||
{
|
||||
calendar.setTime(item.getStm());
|
||||
return calendar.get(Calendar.MONTH) + 1 == finalI;
|
||||
return month == finalI;
|
||||
}).toList();
|
||||
|
||||
echartsData1.setMonth(finalI)
|
||||
|
|
|
|||
Loading…
Reference in New Issue